function setFooter() 
{
if (document.getElementById) 
{
var windowHeight=getWindowHeight();
if (windowHeight>0) 
{

//var contentHeight_1=document.getElementById('menusx').offsetHeight + 25;
var contentHeight_1=document.getElementById('corpo').offsetHeight + 50;
var contentHeight_2=document.getElementById('content').offsetHeight + 125;
//var contentHeight_2=(contentHeight_2b > contentHeight_2a)?contentHeight_2b:contentHeight_2a;
var contentHeight=(contentHeight_2 > contentHeight_1)?contentHeight_2:contentHeight_1;
var footerElement=
document.getElementById('footer');            
var footerHeight=footerElement.offsetHeight;

footerElement.style.position='absolute';
footerElement.style.top=(contentHeight+footerHeight)+'px';

/*
if (windowHeight-(contentHeight+footerHeight)>=0) 
{
footerElement.style.position='relative';
footerElement.style.top=(windowHeight-
(contentHeight+footerHeight))+'px';
}
else 
{
footerElement.style.position='static';
}
*/
footerElement.style.visibility='visible'; 
}

}
}
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;
}

