function setFaceSize(myID,local_fontSize) {
		lineHeight = local_fontSize+Math.round(.3*local_fontSize);

		obj = document.getElementById(myID);
		obj.style.fontSize = local_fontSize+"px";
		obj.style.lineHeight = lineHeight+"px"
}

function FontLarger(myID) {
	if (myID == "") {
		myID = "txt";
	}
	obj = document.getElementById(myID);
	var local_fontSize = obj.style.fontSize;
	if (local_fontSize == "") {
		local_fontSize = 10;
	} else {
		local_fontSize = local_fontSize.replace("px","")
	}
	local_fontSize = Math.floor(local_fontSize);
	if (local_fontSize < 14) {
		local_fontSize += 2;
		setFaceSize(myID,local_fontSize);
	}
}
	
function FontSmaler(myID) {
	if (myID == "") {
		myID = "txt";
	}
	obj = document.getElementById(myID);
	var local_fontSize = obj.style.fontSize;
	if (local_fontSize == "") {
		local_fontSize = 10;
	} else {
		local_fontSize = local_fontSize.replace("px","")
	}
	local_fontSize = Math.floor(local_fontSize);
	if (local_fontSize > 10) {
		local_fontSize -= 2
		setFaceSize(myID,local_fontSize);
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

var PagingPopUpWin = 0;
function PagingPopUpWindow(URLStr, left, top, width, height) {
	if (left == 'mid') {
		left = (screen.width-width)/2
	}
	if (top == 'mid') {
		top = (screen.height-height)/2
	}
	if(PagingPopUpWin) {
		if(!PagingPopUpWin.closed) PagingPopUpWin.close();
	}
	PagingPopUpWin = open(URLStr, 'PagingPopUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
function PrintMe(id) {
	if (id == "")
		id = "printid_"
	PagingPopUpWindow("/common/print.asp?a=htmlgrab&id=" + id, 'mid', 'mid', 700, 550)
}

//####################################
//#####		   FORM FOCUS		 #####
//####################################
	var elem = 0;
	function formFocus() {
		try {
			if (document.forms[0].elements[elem].type == "button" || document.forms[0].elements[elem].type == "checkbox" || document.forms[0].elements[elem].type == "hidden" || (document.forms[0].elements[elem].type == "select-one" && document.forms[0].elements[elem].id == "inpList") ) {
				elem += 1;
				formFocus();
			} else {
				document.forms[0].elements[elem].focus();
			}
		} catch (e) {
			//alert(e.description)
		}
	}

	function OMconfirm(msg,url) {
		if ( confirm( msg ) ) {
			location = url;
		}
	}

	function countRest(obj,id) {
		try {
			if (obj.value.length > 255) {
				obj.value = Left(obj.value,255);
			}
			TheDiv = document.getElementById(id);
			TheDiv.innerHTML = 255 - obj.value.length;
		} catch (e) {
			alert(e.description)
		}
	}
	function Left(str, n){
		if (n <= 0)
			return "";
		else if (n > String(str).length)
			return str;
		else
			return String(str).substring(0,n);
	}
	function Right(str, n){
		if (n <= 0)
		   return "";
		else if (n > String(str).length)
		   return str;
		else {
		   var iLen = String(str).length;
		   return String(str).substring(iLen, iLen - n);
		}
	}

