	function getWindowWidth()
	{
		if( typeof( window.innerWidth ) == 'number' )
		{
			//Non-IE
			return window.innerWidth;
		}
		else if( document.documentElement && ( document.documentElement.clientWidth ) )
		{
			//IE 6+ in 'standards compliant mode'
			return document.documentElement.clientWidth;
		}
		else if( document.body && ( document.body.clientWidth ) )
		{
			//IE 4 compatible
			return document.body.clientWidth;
		}
		return 0;
	}			
	
	function getWindowHeight()
	{
		if( typeof( window.innerHeight ) == 'number' )
		{
			//Non-IE
			return window.innerHeight;
		}
		else if( document.documentElement && ( document.documentElement.clientHeight ) )
		{
			//IE 6+ in 'standards compliant mode'
			return document.documentElement.clientHeight;
		}
		else if( document.body && ( document.body.clientHeight ) )
		{
			//IE 4 compatible
			return document.body.clientHeight;
		}
		return 0;
	}			

	function moveElementTo( element, x, y )
	{
		var reference = element;
		var pxSpecifier = document.childNodes ? 'px' : 0;
		
		if( reference )
		{
			if( reference.style )
			{
				reference = reference.style;
			}
			
			reference.left = x + pxSpecifier;
			reference.top = y + pxSpecifier;
		}
	}
	
	function getElementX( element )
	{
		if( element )
		{
			if( element.style )
				return parseInt( element.style.left );
			else
				return element.left;
		}
	}
	function getElementY( element )
	{
		if( element )
		{
			if( element.style )
				return parseInt( element.style.top );
			else
				return element.top;
		}
	}
	
	function toggleLyrics( songname )
	{
		var lyricsWidget = document.getElementById( songname + ".Lyrics" );
		
		if( lyricsWidget.style.display != "none" )
			lyricsWidget.style.display = "none";
		else
			lyricsWidget.style.display = "block";
	}


	function popupWindow(sUrl, iWidth, iHeight)
	{
		var popup;
		popup = window.open(sUrl,'Popup','toolbar=no,location=no,hotkeys=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,screenX=50,screenY=50,width=' + iWidth + ',height=' + iHeight,true);
		popup.focus(); 
	}
	
