function barra_menu_1(element){
     if(document.getElementById(element).style.display == 'block')
     {
       document.getElementById(element).style.display = 'none';
	   document.getElementById("barra."+element).className='titulo_produto_linha_1';
     }
     else 
     {
       document.getElementById(element).style.display = 'block';
	   document.getElementById("barra."+element).className='titulo_produto_linha_1_2';
     }
}
function barra_menu_2(element){
     if(document.getElementById(element).style.display == 'block')
     {
       document.getElementById(element).style.display = 'none';
	   document.getElementById("barra."+element).className='titulo_produto_linha_2';
     }
     else 
     {
       document.getElementById(element).style.display = 'block';
	   document.getElementById("barra."+element).className='titulo_produto_linha_2_2';
     }
}
function barra_menu_3(element){
     if(document.getElementById(element).style.display == 'block')
     {
       document.getElementById(element).style.display = 'none';
	   document.getElementById("barra."+element).className='titulo_produto_linha_3';
     }
     else 
     {
       document.getElementById(element).style.display = 'block';
	   document.getElementById("barra."+element).className='titulo_produto_linha_3_2';
     }
}


function showFrame_div_servicos_1() {
	document.getElementById('div_servicos_1').style.display = "block";
	document.getElementById('div_servicos_selecionado_1').style.display = "block";
	document.getElementById('div_servicos_2').style.display = "none";
	document.getElementById('div_servicos_selecionado_2').style.display = "none";
	document.getElementById('div_servicos_3').style.display = "none";
	document.getElementById('div_servicos_selecionado_3').style.display = "none";
}
function showFrame_div_servicos_2() {
	document.getElementById('div_servicos_1').style.display = "none";
	document.getElementById('div_servicos_selecionado_1').style.display = "none";
	document.getElementById('div_servicos_2').style.display = "block";
	document.getElementById('div_servicos_selecionado_2').style.display = "block";
	document.getElementById('div_servicos_3').style.display = "none";
	document.getElementById('div_servicos_selecionado_3').style.display = "none";
}
function showFrame_div_servicos_3() {
	document.getElementById('div_servicos_1').style.display = "none";
	document.getElementById('div_servicos_selecionado_1').style.display = "none";
	document.getElementById('div_servicos_2').style.display = "none";
	document.getElementById('div_servicos_selecionado_2').style.display = "none";
	document.getElementById('div_servicos_3').style.display = "block";
	document.getElementById('div_servicos_selecionado_3').style.display = "block";
}

function showFrame_div_produtos_1() {
	document.getElementById('div_produtos_1').style.display = "block";
	document.getElementById('div_produtos_selecionado_1').style.display = "block";
	document.getElementById('div_produtos_2').style.display = "none";
	document.getElementById('div_produtos_selecionado_2').style.display = "none";
	document.getElementById('div_produtos_3').style.display = "none";
	document.getElementById('div_produtos_selecionado_3').style.display = "none";
}
function showFrame_div_produtos_2() {
	document.getElementById('div_produtos_1').style.display = "none";
	document.getElementById('div_produtos_selecionado_1').style.display = "none";
	document.getElementById('div_produtos_2').style.display = "block";
	document.getElementById('div_produtos_selecionado_2').style.display = "block";
	document.getElementById('div_produtos_3').style.display = "none";
	document.getElementById('div_produtos_selecionado_3').style.display = "none";
}
function showFrame_div_produtos_3() {
	document.getElementById('div_produtos_1').style.display = "none";
	document.getElementById('div_produtos_selecionado_1').style.display = "none";
	document.getElementById('div_produtos_2').style.display = "none";
	document.getElementById('div_produtos_selecionado_2').style.display = "none";
	document.getElementById('div_produtos_3').style.display = "block";
	document.getElementById('div_produtos_selecionado_3').style.display = "block";
}

function valida_formulario_locacao()
{
	if (document.getElementById('destino').value==''){ alert("Preencha o campo destinatario"); document.getElementById('destino').focus(); return false; }
	if (document.getElementById('empresa').value==''){ alert("Preencha o campo empresa"); document.getElementById('empresa').focus(); return false; }
	if (document.getElementById('cnpj').value==''){ alert("Preencha o campo cnpj"); document.getElementById('cnpj').focus(); return false; }
	if (document.getElementById('nome').value==''){ alert("Preencha o campo nome"); document.getElementById('nome').focus(); return false; }
	if (document.getElementById('cargo').value==''){ alert("Preencha o campo cargo"); document.getElementById('cargo').focus(); return false; }
	if (document.getElementById('telefone').value==''){ alert("Preencha o campo telefone"); document.getElementById('telefone').focus(); return false; }
	if (document.getElementById('email').value==''){ alert("Preencha o campo e-mail"); document.getElementById('email').focus(); return false; }		
	if (document.getElementById('email').value!=""){
	if (document.getElementById('email').value.indexOf("@") < 1 || document.getElementById('email').value.indexOf(".") < 1) {alert("Preencha o campo e-mail corretamente"); document.getElementById('email').focus(); return false;} }	
	form_locacao.action='envia_mail_locacao.asp';
	form_locacao.submit();
}

function valida_formulario_contato()
{
	if (document.getElementById('destino').value==''){ alert("Preencha o campo destinatario"); document.getElementById('destino').focus(); return false; }
	if (document.getElementById('empresa').value==''){ alert("Preencha o campo empresa"); document.getElementById('empresa').focus(); return false; }
	if (document.getElementById('cnpj').value==''){ alert("Preencha o campo cnpj"); document.getElementById('cnpj').focus(); return false; }
	if (document.getElementById('nome').value==''){ alert("Preencha o campo nome"); document.getElementById('nome').focus(); return false; }
	if (document.getElementById('cargo').value==''){ alert("Preencha o campo cargo"); document.getElementById('cargo').focus(); return false; }
	if (document.getElementById('telefone').value==''){ alert("Preencha o campo telefone"); document.getElementById('telefone').focus(); return false; }
	if (document.getElementById('email').value==''){ alert("Preencha o campo e-mail"); document.getElementById('email').focus(); return false; }		
	if (document.getElementById('email').value!=""){
	if (document.getElementById('email').value.indexOf("@") < 1 || document.getElementById('email').value.indexOf(".") < 1) {alert("Preencha o campo e-mail corretamente"); document.getElementById('email').focus(); return false;} }	
	form_contato.action='envia_mail_contato.asp';
	form_contato.submit();
}

function valida_formulario_busca()
{
	form_busca.action='busca.asp';
	form_busca.submit();
}

function manutencao()
{
	if (document.getElementById('plano').value==''){ alert("Em manutenção."); document.getElementById('plano').focus(); return false; }
	form_contrato.action='contrato.asp';
	form_contrato.submit();
}

function abreMenu(url)
{
	window.location.href=url;
}

function valida_formulario_newsletter()
{
	document.getElementById('botao').value='salva';
	if (document.getElementById('nome').value==''){ alert("Preencha o campo nome"); document.getElementById('nome').focus(); return false; }
	if (document.getElementById('empresa').value==''){ alert("Preencha o campo empresa"); document.getElementById('empresa').focus(); return false; }
	if (document.getElementById('email').value==''){ alert("Preencha o campo e-mail"); document.getElementById('email').focus(); return false; }		
	if (document.getElementById('email').value!=""){
	if (document.getElementById('email').value.indexOf("@") < 1 || document.getElementById('email').value.indexOf(".") < 1) {alert("Preencha o campo e-mail corretamente"); document.getElementById('email').focus(); return false;} }	
//	form_newsletter.action='envia_mail_newsletter.asp';
	form_newsletter.submit();
}

function valida_formulario_orcamento()
{
	if (document.getElementById('destino').value==''){ alert("Preencha o campo destinatario"); document.getElementById('destino').focus(); return false; }
	if (document.getElementById('cotacao').value==''){ alert("Preencha o campo cotação"); document.getElementById('cotacao').focus(); return false; }
	if (document.getElementById('empresa').value==''){ alert("Preencha o campo empresa"); document.getElementById('empresa').focus(); return false; }
	if (document.getElementById('cnpj').value==''){ alert("Preencha o campo cnpj"); document.getElementById('cnpj').focus(); return false; }
	if (document.getElementById('nome').value==''){ alert("Preencha o campo nome"); document.getElementById('nome').focus(); return false; }
	if (document.getElementById('cargo').value==''){ alert("Preencha o campo cargo"); document.getElementById('cargo').focus(); return false; }
	if (document.getElementById('telefone').value==''){ alert("Preencha o campo telefone"); document.getElementById('telefone').focus(); return false; }
	if (document.getElementById('email').value==''){ alert("Preencha o campo e-mail"); document.getElementById('email').focus(); return false; }		
	if (document.getElementById('email').value!=""){
	if (document.getElementById('email').value.indexOf("@") < 1 || document.getElementById('email').value.indexOf(".") < 1) {alert("Preencha o campo e-mail corretamente"); document.getElementById('email').focus(); return false;} }	
	form_orcamento.action='envia_mail_orcamento.asp';
	form_orcamento.submit();
}

function PrintElementID(id, pg) {
        var oPrint, oJan;
        oPrint  = window.document.getElementById(id).innerHTML;
        oJan    = window.open(pg);
        oJan.document.write(oPrint);
        oJan.history.go();
        oJan.window.print();
}

function showFrame_div_orcamento() {
	document.getElementById('orcamento').style.display = "block";
	document.getElementById('cesta1').style.display = "none";
	document.getElementById('cesta2').style.display = "none";
	document.getElementById('cesta3').style.display = "none";
}
function showFrame_div_cesta() {
	document.getElementById('orcamento').style.display = "none";
	document.getElementById('cesta1').style.display = "block";
	document.getElementById('cesta2').style.display = "block";
	document.getElementById('cesta3').style.display = "block";
}
