
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('wrapper').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'absolute';
				footerElement.style.bottom = '0px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}
window.onload = function() {
	setFooter();
}
window.onresize = function() {
	setFooter();
}
	function DatePicker(thisForm,thisControl) 
	{
			var url = "../Include/ctrlCalendar.aspx?FormName="+thisForm+"&ControlName="+thisControl;
			var w   = 252;
			var h   = 229; 
			if (document.all)var xMax = screen.width, yMax = screen.height;
			else
			{ if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight;
			else      var xMax = 640, yMax=480;
			}
				if (w>xMax) w = xMax * .9;
					if (h>yMax) h = yMax * .9;
					var l = (xMax - w)/2, t = (yMax-h)/2;
						handle_PUH = window.open(url,"DatePicker",'screenX='+l+',left='+l+',screenY='+t+',top='+t+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,fullscreen=0,width='+w+',height='+h);
			}
			
	function setVisible(blnVisible,strObjNames)
	{
		var strObjs = strObjNames.split(",");
		var aObj
		for(i=0;i<=strObjs.length-1;i++)
		{
			aObj = document.getElementById(strObjs[i]);
			if(aObj!=null)
				{
					if(blnVisible)
						{
							document.getElementById(strObjs[i]).style.display = '';
						}
					else
						{
							document.getElementById(strObjs[i]).style.display = 'none';		
						}
				}	
		}
		
	}
	function confirmSubmit(Prompt)
	{
		var agree=confirm(Prompt);
			if (agree)
				return true ;
			else
				return false ;
	}