<!-- // hide from old browsers
function janelas(arquivo,largura,altura) {
window.open(arquivo, 'floats', 'scrollbars=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=no,width=' + largura + ',height=' + altura + ',left=50,top=50');
}
function janelasscroll(arquivo,largura,altura) {
window.open(arquivo, 'floats', 'scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=no,width=' + largura + ',height=' + altura + ',left=50,top=50');
}

function getElementsByClassName(n) {
	objDivs = document.getElementsByTagName("div");
	elemens = Array();
	for (i = 0; i < objDivs.length; i++) {
		if(objDivs[i].className == n)
			elemens[elemens.length] = objDivs[i];
	}
	
	return elemens;
}

var nav = navigator.userAgent.toLowerCase();
	
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;
			}
		}
	}
	if (nav.indexOf("opera") > -1)
	{
		return windowHeight - 4;
	}
	else
	{
		return windowHeight;
	}
}

function getPageSizeWithScroll(){
	
	var pageWidth, pageHeight;

		
	if(nav.indexOf("firefox") > 0) { // Firefox 
		pageWidth = window.innerWidth + window.scrollMaxX;
		pageHeight = window.innerHeight + window.scrollMaxY;
	}
	else if( document.body.scrollHeight > document.body.offsetHeight ) // all but Explorer Mac
	{
		pageWidth = document.body.scrollWidth;
		pageHeight = document.body.scrollHeight;
	}
	else // works in Explorer 6 Strict, Mozilla (not FF) and Safari
	{
		pageWidth = document.body.offsetWidth + document.body.offsetLeft;
		pageHeight = document.body.offsetHeight + document.body.offsetTop;
	}

	arrayPageSizeWithScroll = new Array(pageWidth,pageHeight);
	return arrayPageSizeWithScroll;
} 

function redimensiona() {

	alturaDispensada = -118;
	alturaPagina = getPageSizeWithScroll()[1];
	alturaJanela = getWindowHeight();

	objCentro = getElementsByClassName("centro")[0];	

	if (nav.indexOf("firefox") > 0) {
	    objCentro.style.height = (alturaPagina - 117) + "px";
	} else if(nav.indexOf("msie 7.0") > 0) {
		if (document.body.scrollHeight >= alturaJanela) {
		   objCentro.style.height = (alturaPagina + alturaDispensada) +  "px";
		}  else {
		   objCentro.style.height = (alturaJanela - 118) +  "px";
		}		
                        
	} else {
	    objCentro.style.height = (alturaJanela - 118) + "px";
	}
}

window.onload = redimensiona;

// Função pra esconder e mostrar DIV
function AbreDiv(id){
 var item = document.getElementById(id);
 if (item.style.display == 'block'){
 item.style.display = 'none';
 } else {
 item.style.display = 'block';
 }
}
//-->


