﻿
util =
{
}

util.js=
{
}

util.js.focus=function(id) 
{
	try {
		var mytext=document.getElementById(id);
		if (mytext)
			mytext.focus();
	}
	catch(e) {
	}

}

util.js.setCaretToEnd=function(id) {
	var control=document.getElementById(id);
	if (control)
	{
		if(control.createTextRange) {
			var range=control.createTextRange();
			range.collapse(false);
			range.select();
		}
		else if(control.setSelectionRange) {
			util.js.focus(control);
			var length=control.value.length;
			control.setSelectionRange(length,length);
		}
	}
}

