//-----------------------------------------------------------------------------------------|
//---static Window helper methods
function WindowX() {
	if(Browser.isIE)
		return document.body.offsetWidth + document.documentElement.scrollLeft + document.body.scrollLeft;
	else
		return window.innerWidth + document.documentElement.scrollLeft + document.body.scrollLeft;		
}

function WindowY() {
	if(Browser.isIE)
		return document.body.offsetHeight + document.documentElement.scrollTop + document.body.scrollTop;
	else
		return window.innerHeight + document.documentElement.scrollTop + document.body.scrollTop;				
}

function GetEvent(ao_evt) {
	return window.event ? window.event : ao_evt;
}

function GetElement(as_el) {
	var lo_el = document.getElementById(as_el);
	
	if(!lo_el)
		return null;
		
	if(lo_el.nodeType == 3)
		return lo_el.parentNode;
	else
		return lo_el;
}

function getMouseX(ao_evt) {
	// Handles the way events are fired (especially when dealing with all CSS layouts)
	var e = GetEvent(ao_evt);
	if (e.pageX) {
		return e.pageX;
	} else if (e.clientX) {
	   return 	e.clientX + (document.documentElement.scrollLeft ?
	   						 document.documentElement.scrollLeft :
	   						 document.body.scrollLeft);
	} else {
		return null;
	}
}

function getMouseY(ao_evt) {
	// Handles the way events are fired (especially when dealing with all CSS layouts)
	var e = GetEvent(ao_evt);
	if (e.pageY) {
		return e.pageY;
	} else if (e.clientY) {
		return e.clientY + (document.documentElement.scrollTop ?
	   	        		    document.documentElement.scrollTop :
	   						document.body.scrollTop);
	} else {
		return null;
	}
}

function SetOpacity(ao_el, ai_Opacity) {
	ao_el.style.opacity = (ai_Opacity / 100);
   	ao_el.style.MozOpacity = (ai_Opacity / 100);
  	ao_el.style.KhtmlOpacity = (ai_Opacity / 100);
   	ao_el.style.filter = "alpha(opacity=" + ai_Opacity + ")";
}
//---end static Window helper methods
//-----------------------------------------------------------------------------------------|
