var ie = true;


function openShadowboxHtml(content, player, title, width, height){
	scrollTo(0,0);
	document.getElementById("tbTopo").className = "topoFalseYes";
	document.getElementById("tbBanner").className = "bannerFalseYes"; 

    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
        width:      width,
        height:      height
    });
}
function openShadowbox(content, player, title){
	scrollTo(0,0);

	document.getElementById("tbTopo").className = "topoFalseYes";
	document.getElementById("tbBanner").className = "bannerFalseYes";
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
    });
}
//False Imagens
function falseHide(){
	document.getElementById("tbTopo").className = "topoFalseNo";
	document.getElementById("tbBanner").className = "bannerFalseNo";	
}


//Função Botoes Muda Bg Lateral

function mudaBg(cont){
	
		if(cont == 1){
		window.location.href = "index.html";
		return false;
		
		}else if(cont ==2){
		window.location.href = "certificacoes.html";	
		return false;
		
		}else if(cont ==3){
		window.location.href = "linhaProducao.html";	
		return false;
		
		}else if(cont ==4){
		window.location.href = "produtos.html";	
		return false;
		
		}else if(cont ==5){
		window.location.href = "catalogo.html";	
		return false;
		
		}else if(cont ==6){
		return false;
		window.location.href = "contato.html";	
		
		}else if(cont ==7){
		window.location.href = "produtos2.html";	
		return false;
		
		}else{
		window.location.href = "index.html";	
		return false;
		}
	
	
}

function mostra(cont,total){
	//alert(cont+" , "+total);
	for(i=1;i<=total;i++){
		if(i==cont){
			//alert("if ...i("+i+"),cont("+cont+")");
			document.getElementById("cont"+i).style.display= "";
		}else{
			//alert("else...i("+i+"),cont("+cont+")");
			document.getElementById("cont"+i).style.display= "none";
		}
		//alert("i: "+i);
	}
}
function loadDiv(cont){
	//alert("carrega: "+cont);
   document.getElementById('conteudo').innerHTML = "<iframe frameborder='0'  width='100%' heigth='1005' src='produtos/01.html'></iframe>";
	

}

function loadPage(temp) {
	//	alert("carrega: ");

	var req = new XMLHttpRequest();
	req.open("GET", temp, false);
	req.send(null);
	var page = req.responseText;
	document.getElementById("conteudo").innerHTML = page;
}

function popUp(pag){
	
	window.open(pag,"visualizador.html","menubar=no,resizable=yes,scrollbars=yes");
	document.write("bruno");
}
function popImg(pag){
	window.open(pag,"","menubar=no,resizable=no,width=500,height=500,scrollbars=yes");
}
function popHtml(pag){
	window.open(pag,"","menubar=no,resizable=yes,scrollbars=yes");
}


function linkProdutos(cont){

	total = 6;
	for(i=1;i<=total;i++){
		
		if(i==cont){
			document.getElementById("link"+i).className = "selecionadoL";
			document.getElementById("part"+i).style.display = "";
		}else{
			document.getElementById("part"+i).style.display = "none";
			document.getElementById("link"+i).className = "linkPretoAzul";
		}
	}
	
	
	//Dimensiona Iframe
	if(cont == 1){
		document.getElementById("produtos").height = 2150;	
		
		
	}
	if(cont == 2){
		document.getElementById("produtos").height = 800;	
	}
	if(cont == 3){
		document.getElementById("produtos").height = 700;	
	}
		if(cont == 4){
		document.getElementById("produtos").height = 1400;	
	}
		if(cont == 5){
		document.getElementById("produtos").height = 800;	
	}
		if(cont == 6){
			
		document.getElementById("produtos").height = 2450;		
	}

}
//Função Pega Scroll
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 ];
}

function irTopo(){
	
	window.location.href ="#topo";	
	scrollTo(0,0);
	
}
function certificado(cont){
window.open('../figuras/certificados/download2.jpg', '_blank'); 

}
function alerta(){
	alert("Bem Vindo!");	
}





