function login()
{

	document.frmLogin.submit();
}


/* 
* Function to add onload events while preserving existing onload events 
* @param func - sting 
*      function name 
*/ 
function addLoadEvent(func) { 
   var oldonload = window.onload; 
   if (typeof window.onload != 'function') { 
       window.onload = func; 
   } else { 
       window.onload = function() { 
           oldonload(); 
           func(); 
       } 
   } 
}
//addLoadEvent(setFooter);

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('page').offsetHeight;
					var footerElement = document.getElementById('global_footer');
					var footerHeight  = footerElement.offsetHeight;
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						footerElement.style.position = 'relative';
						footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
					}
					else {
						footerElement.style.position = 'static';
					}
				}
			}
			
		}
/*window.onresize = function() {
	setFooter();
}*/

function popitup(url)
{
	newwindow=window.open(url,'name', 'top='+((screen.availHeight - 256) / 2)+',left='+((screen.availWidth - 320) / 2)+'+,height=256,width=320');
	if (window.focus) {newwindow.focus()}
	return false;
}
function getLayer(strLayer) {
	var i;
	var colLayers;

	if (document.layers) {
		
		colLayers = layParent.document.layers;
			
		if (colLayers[strLayer])
			return colLayers[strLayer];
				
		for (i = 0; i < colLayers;)
			return(getLayer(strLayer, colLayers[i++]));
				
	} else if (document.all) {
		
		return document.all[strLayer];
			
	} else if (document.getElementById) {
		
		return document.getElementById(strLayer);
			
	}
}
function isVisible(strItem)
{
	if (document.layers) {
		return (getLayer(strItem).visibility == 'visible') ? true : false;
	} else {
		return (getLayer(strItem).style.visibility == 'visible') ? true : false;
	}
}
function makeVisible(strItem)
{
	if (document.layers) {
		getLayer(strItem).visibility = 'show';
		getLayer(strItem).display = 'block';
	} else {
		getLayer(strItem).style.visibility = 'visible';
		getLayer(strItem).style.display = 'block';
	}
}
function makeInvisible(strItem)
{
	if (document.layers) {
		getLayer(strItem).visibility = 'hide';
		getLayer(strItem).display = 'none';
	} else {
		getLayer(strItem).style.visibility = 'hidden';
		getLayer(strItem).style.display = 'none';
	}
}
