/* LiquiTech API - Window **********************************
 *	
 *	This API contains all the functions needed to get and set 
 *	window properties.
 *
 ***************************************************************************/
 
 /*  Get Window Width * *******************************************************
 *
 *	TAKES:		NOTHING
 * 	RETURNS:	The width of the window.
 *	
 *************************************************************************/
 
 	function getWindowWidth()
	{
		return document.all?document.body.clientWidth:window.innerWidth; 	
	}


 /*  Get Window Height * *******************************************************
 *
 *	TAKES:		NOTHING
 * 	RETURNS:	The height of the window.
 *	
 *************************************************************************/
 
	function getWindowHeight()
	{
		return document.all?document.body.clientHeight:window.innerHeight; 	
	}


 /*  Get Page Y Offset  * *******************************************************
 *
 *	TAKES:		NOTHING
 * 	RETURNS:	The offset from the top of the webpage.
 *	NOTE:		This is the value of webpage, not the browser or window offset.
 *	
 *************************************************************************/
 
	function getPageYOffset()
	{
		var ScrollTop = document.body.scrollTop;
		
		if (ScrollTop == 0)
		{
			if (window.pageYOffset)
				ScrollTop = window.pageYOffset;
			else
				ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
		}
		
		return ScrollTop;
	}
	
 /*  Get Page X Offset  * *******************************************************
 *
 *	TAKES:		NOTHING
 * 	RETURNS:	The offset from the top of the webpage.
 *	NOTE:		This is the value of webpage, not the browser or window offset.
 *	
 *************************************************************************/
 
	function getPageXOffset()
	{
		var ScrollTop = document.body.scrollLeft;
		
		if (ScrollTop == 0)
		{
			if (window.pageXOffset)
				ScrollTop = window.pageXOffset;
			else
				ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollLeft : 0;
		}
		
		return ScrollTop;
	}
	
/* Center To Screen * *******************************************************
 *
 *	TAKES:		Element Object
 *	RETURNS:	NOTHING
 *
 *************************************************************************/
	
	function centerToScreen(element)
	{
		if (element)
		{
			setPosX(element, (getWindowWidth() - getWidth(element)) / 2);
			setPosY(element, (getWindowHeight() / 2) + getPageYOffset() - (getHeight(element)/2) - 100);
		}
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	