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 getScrollXY()
{
	var scrOfX = 0, scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' )
	{
		//Netscape compliant
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	}
	else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) )
	{
		//DOM compliant
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	} 
	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )
	{
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	}
	//return [ scrOfX, scrOfY ];
	//return scrOfY;
	return document.body.clientHeight;
}
function setFooter()
{
	if (document.getElementById)
	{
		var windowHeight = getScrollXY() > getWindowHeight() ? getScrollXY() : getWindowHeight();
		if (windowHeight>0)
		{
			var footerElement = document.getElementById('footer');
			var footerHeight = footerElement.offsetHeight;
			if (windowHeight-(footerHeight)>=0)
			{
				footerElement.style.position='absolute';
				footerElement.style.top=(windowHeight-(footerHeight))+'px';
			}
			else
			{
				footerElement.style.position='static';
			}
		}
	}
}
document.write('<style type="text/css">#footer {	position: absolute;	padding: 0px;	background-color: transparent;	width: 75%;}</style>');
document.write('<div id="footer"><div class="rmussi"><a href="http://www.rafaelmussi.com.br/" target="_blank"><img id="statusrm" src="http://webapps.rafaelmussi.com.br/smile/smile_rafaelmussi.gif" width="6" height="5" alt="Rafael Mussi - Analista Programador Web" title="Rafael Mussi - Analista Programador Web" border="0" /></a></div></div>');
setFooter();
window.onresize = function()
{
	setFooter();
}
