/***************************************************
	REDIMENSIONA IFRAME
***************************************************/

function resizeIframe() 
{
	try {
	
		 frame = document.getElementById('conteudo');
		 innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
		
		 objToResize = (frame.style) ? frame.style : frame;
		
		if(innerDoc=="[object]")
		{
			tamanho = innerDoc.body.scrollHeight;
			altura  = (tamanho < 710) ? 710 : tamanho;
			document.getElementById('menuSite').style.height = Number(altura);
			document.getElementById('rightSite').style.height = Number(altura);
			document.getElementById('rodape_site').style.top = Number(altura)+parseFloat(236);
		}
		else
		{
			tamanho = innerDoc.body.offsetHeight;
			altura  = (tamanho < 710) ? 710 : tamanho;
			document.getElementById('menuSite').style.height = Number(altura);
			document.getElementById('rightSite').style.height = Number(altura);
			document.getElementById('rodape_site').style.top = Number(altura)+parseFloat(236);
		}
		
		objToResize.height = Number(altura);
		document.getElementById('topo').focus();
		document.getElementById('rodape_site').style.top = Number(altura)+parseFloat(236);
	}
	
	catch (e) 
	{
		window.status = '';
	}
}

/***************************************************
	ABRE POPUP
***************************************************/

function popUp(endereco,nome,largura,altura,rolagem)
{
	var desktop = window.open (endereco,nome, "status=no,scrollbars="+rolagem+",width="+largura+", height="+altura+",left=100,top=100")
	desktop.focus();
}

/***************************************************
	JANELA PERSONALIZADA
***************************************************/

function NewWindow(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresize'
	win = window.open(mypage, myname, winprops)
	
	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		win.window.focus(); 
	}
}
