function e(id){return document.getElementById(id);}function getWindowHeight(){ var a=0;if(typeof window.innerHeight=="number")	a = window.innerHeight; else if(document.documentElement && document.documentElement.clientHeight) a = document.documentElement.clientHeight; else if(document.body && document.body.clientHeight) a=document.body.clientHeight; if(!a || a<100) a=100; return a; } function getWindowWidth(){ var a=0;if(typeof window.innerWidth=="number") a=window.innerWidth;else if(document.documentElement&&document.documentElement.clientWidth) a=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth) a=document.body.clientWidth;if(!a||a<100)a=100;return a;}
function numbersonly(myfield, evt, dec){var key;var keychar;if(window.event) key=window.event.keyCode;else if(evt) key=evt.which;else return true;keychar=String.fromCharCode(key);
// control keys
if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )  return true;
// numbers
else if ((("0123456789").indexOf(keychar) > -1))    return true;
// decimal point jump
else if (dec && (keychar == ".")) { myfield.form.elements[dec].focus(); return false; } else return false;
}
//Get the XMLHttpRequest Object
function GetRequestObject()
{
	var req = null;
	if (typeof XMLHttpRequest != "undefined")
		req = new XMLHttpRequest();
	if (!req && typeof ActiveXObject != "undefined")
	{
		try
		{
			req=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				req=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e2)
			{
				try {
					req=new ActiveXObject("Msxml2.XMLHTTP.4.0");
				}
				catch (e3)
				{
					req=null;
				}
			}
		}
	}
	if(!req && window.createRequest)
		req = window.createRequest();
	
	if (!req)
		alert("Request Object instantiation failed!");//this.DebugMessage("Request Object Instantiation failed.");
		
	return req;
}
