	function getElement( elId )
	{
		if( document.getElementById( elId ) )
		{
			return document.getElementById( elId );
		}
		
		return  false;
	}

	function getElementX( obj )
	{
		var x = 0;
		
		while( obj.offsetParent != null )
		{
			x += obj.offsetLeft;
			obj = obj.offsetParent;
		}
		
		x += obj.offsetLeft;
		
		return x;
	}
	
	function getElementY( obj )
	{
		var y = 0;
		
		while( obj.offsetParent != null )
		{
			y += obj.offsetTop;
			obj = obj.offsetParent;
		}
		
		y += obj.offsetTop;
		
		return y;
	}
	
	function centerElement( el )
	{
		var xpos	=	( getWindowWidth() / 2 ) - ( getElementWidth( el ) / 2 );
		var ypos	=	( getWindowHeight() / 2 ) - ( getElementHeight( el ) / 2 );
		
		moveElementTo( el, xpos, ypos );
	}

	function getElementHeight( el )
	{
		if( el.style.height )
		{
			return	parseInt( el.style.height );
		}
		if( el.offsetHeight )
		{
			return	parseInt( el.offsetHeight );
		}
		if( el.style.pixelHeight )
		{
			return el.style.pixelHeight;
		}
		if( el.clientHeight )
		{
			return el.clientHeight;
		}
		
		return false;
	}
	
	function getElementWidth( el )
	{
		if( el.style.width )
		{
			return	parseInt( el.style.width );
		}
		if( el.offsetWidth )
		{
			return	parseInt( el.offsetWidth );
		}
		if( el.style.pixelWidth )
		{
			return el.style.pixelWidth;
		}
		if( el.clientWidth )
		{
			return el.clientWidth;
		}

		return false;
	}
	
	function showElement( el ) 
	{
		el.style.visibility	=	'visible';
	}
	
	function hideElement( el ) 
	{
		el.style.visibility	=	'hidden';
	}

	function setElementContent( el, content )
	{
		el.innerHTML	=	content;
	}

	function moveElementTo( el, xPos, yPos )
	{
		el.style.left	=	xPos;
		el.style.top	=	yPos;
	}

	function setElementHeight( el, height )
	{
		el.style.height	=	height+"px";
	}
	
	function getPageWidth()
	{
		if( document.width )
		{
			return document.width;
		}
		if( document.body.scrollWidth )
		{
			return document.body.scrollWidth;
		}
		
		return false;
	}

	function getPageHeight()
	{
		if( document.height )
		{
			return document.height;
		}
		if( document.body.scrollHeight )
		{
			return document.body.scrollHeight;
		}
		
		return	false;
	}
	
	function getWindowHeight()
	{
		if( window.innerHeight )
		{
			return	window.innerHeight;
		}
		if( document.body.clientHeight )
		{
			return	document.body.clientHeight;
		}
		
		return	false;
	}

	function getWindowWidth()
	{
		if( window.innerWidth )
		{
			return	window.innerWidth;
		}
		if( document.body.clientWidth )
		{
			return	document.body.clientWidth;
		}
		
		return	false;
	}
	
   /**
	* check, whether the mouse position in 
	* in a certain element
	*
	* @access	public
	* @param	object	el
	*/
	function	isMouseInElement( el )
	{
		var	left	=	getElementX( el );
		if( typeof left == false )
			return	false;
		
		var	top		=	getElementY( el );
		var	right	=	getElementX( el ) + getElementWidth( el );
		var	bottom	=	getElementY( el ) + getElementHeight( el );
	
		if( mdl_mouseX < left )
			return	false;
		if( mdl_mouseX > right )
			return	false;
		if( mdl_mouseY < top )
			return	false;
		if( mdl_mouseY > bottom )
			return	false;
	
		return	true;		
	}
