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;
	}
	else
	{
		tamanho = innerDoc.body.offsetHeight;
	}
		objToResize.height = Number(tamanho);
		document.getElementById('topo').focus();
	}
	
	catch (e) 
	{
		window.status = '';
	}
}


function resizeIframeProd() 
{
	try {
	
	 frame = document.getElementById('cont_prod');
	 innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
	
	 objToResize = (frame.style) ? frame.style : frame;
	
	if(innerDoc=="[object]")
	{
		tamanho = innerDoc.body.scrollHeight;
	}
	else
	{
		tamanho = innerDoc.body.offsetHeight;
	}
		objToResize.height = Number(tamanho);
		document.getElementById('topo').focus();
	}
	
	catch (e) 
	{
		window.status = '';
	}
}


//CHAMA FLASH
function callFlash(swf,largura,altura,id_objeto,wmode,background,vars){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+largura+'" height="'+altura+'" align="middle" id="'+id_objeto+'">');
    document.write('<param name=movie value="'+swf+'">');
    document.write('<param name="allowScriptAccess" value="sameDomain">');
	document.write('<param name="quality" value="best">');
    document.write('<param name="menu" value="false">');
	document.write('<param name="scale" value="noscale"/>');
	document.write('<param name="salign" value="t"/>');
	document.write('<param name="FlashVars" value="'+vars+'">');
    document.write('<embed src="'+swf+'" quality="best" width="'+largura+'" wmode="'+wmode+'" background="'+background+'" height="'+altura+'" FlashVars="'+vars+'" scale="noscale" salign="t" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>');
    document.write('</object>');
}

function altura(tamanho){

		document.getElementById('site').style.height = Number(tamanho+120);

}

function verificaPlugin(){
	if(confirm("Seu plugin do flash está desatualizado.\r\nPara visualizar este site você deve instalar a versão 8.0 ou superior\r\nPara atualizar o plugin clique em OK ?")){
		var desktop = window.open("http://www.macromedia.com/go/getflashplayer");
		desktop.focus();
	}
}
rol = 0
function rola(pos){
	if(pos<3){
		rol+=50
		}
	if(pos==3){
		rol-=50
	}
	if(rol<0){
		rol = 0
	}
	
	window.scroll(0,rol)
	if(rol>document.body.scrollTop){
		rol = document.body.scrollTop
		}
	}
	
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();
}

/////// MOSTRA POPUP
function abrePopUp(nome){
	document.getElementById(nome).style.display = 'block';
}

/////// FECHA POPUP
function fechaPopUp(nome){
	document.getElementById(nome).style.display = 'none';
}

function ajustaJanela()
{
	version = 0;
	
	if (navigator.appVersion.indexOf("MSIE")!=-1){
		temp = navigator.appVersion.split("MSIE");
		version = parseFloat(temp[1]);
	}
	
	if (version == 7){
		num = 75;
	} else {
		num = 50;
	}
	
    var x = document.getElementById("imag").width+10;     
    var y = document.getElementById("marker").offsetTop+num;
 	window.resizeTo(x, y);
}
