function showFrameinstitucional() {
	document.getElementById('institucional_frame').style.display = "block";
	document.getElementById('linha_frame').style.display = "none";
	document.getElementById('linhadotempo_frame').style.display = "none";
	document.getElementById('videoinstitucional_frame').style.display = "none";
	document.getElementById('acaosocial_frame').style.display = "none";
	
}


function showFramelinha() {
	document.getElementById('institucional_frame').style.display = "none";
	document.getElementById('linha_frame').style.display = "block";
	document.getElementById('linhadotempo_frame').style.display = "none";
	document.getElementById('videoinstitucional_frame').style.display = "none";
	document.getElementById('acaosocial_frame').style.display = "none";
}


function showFramelinhadotempo() {
	document.getElementById('institucional_frame').style.display = "none";
	document.getElementById('linha_frame').style.display = "none";
	document.getElementById('linhadotempo_frame').style.display = "block";
	document.getElementById('videoinstitucional_frame').style.display = "none";
	document.getElementById('acaosocial_frame').style.display = "none";
}


function showFramevideoinstitucional() {
	document.getElementById('institucional_frame').style.display = "none";
	document.getElementById('linha_frame').style.display = "none";
	document.getElementById('linhadotempo_frame').style.display = "none";
	document.getElementById('videoinstitucional_frame').style.display = "block";
	document.getElementById('acaosocial_frame').style.display = "none";
}


function showFrameacaosocial() {
	document.getElementById('institucional_frame').style.display = "none";
	document.getElementById('linha_frame').style.display = "none";
	document.getElementById('linhadotempo_frame').style.display = "none";
	document.getElementById('videoinstitucional_frame').style.display = "none";
	document.getElementById('acaosocial_frame').style.display = "block";
}


function abrir()
{
w = (screen.width)
h = (screen.height)
h = h - 710
w = w - 790
eval("window.open('http://www..com.br/atendimentoonline/suporte/cliente/','Atendimento','width=400,height=450,top="+ h +",left="+ w +"')")
}


function dspPatOnOff(varDisplay)
{
	textPat = "display-"+varDisplay;
	setaUpPat = "setaUp-"+varDisplay;
	setaDownPat = "setaDown-"+varDisplay;
	if (document.getElementById(textPat).style.display=='')
	{
		document.getElementById(textPat).style.display='none';
		document.getElementById(setaUpPat).style.display='none';
		document.getElementById(setaDownPat).style.display='';
	}else{
		document.getElementById(textPat).style.display='';
		document.getElementById(setaUpPat).style.display='';
		document.getElementById(setaDownPat).style.display='none';
	}	
}


function abreMenu(url)
{
	window.location.href=url;
}


function abrir_popup_atendimento_online()
{
  tpo = 15 ;  //tempo de espera para abertura
  setTimeout('fechar_popup_atendimento_online_automatico()', tpo*1000);
}


function fechar_popup_atendimento_online_automatico()
{
  document.getElementById('divImg').style.display = 'block';
  tpo = 10 ; //tempo de espera para fechamento
  setTimeout('fechar_popup_atendimento_online()', tpo*1000);
}


function fechar_popup_atendimento_online()
{
  document.getElementById('divImg').style.display = 'none';
}


function mostraEstado(oestado) {
   window.location.href('parceiros.asp?estado='+oestado+'#estado');
}

//////////////////////////////////////////////////
////////////////////CAPTCHA///////////////////////
function localizando_objeto(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=localizando_objeto(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function checar_formulario() { //v4.66
//copyright (c)ByBuRCUVA maxasp.org
  var args = checar_formulario.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
  for (var i=1; i<args.length;i=i+4){
    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
    var myObj = localizando_objeto(args[i].replace(/\[\d+\]/ig,""));
    myV=myObj.value;
    if (myObj.type=='text'||myObj.type=='senha'||myObj.type=='hidden'){
      if (myReq&&myObj.value.length==0){addErr=true}
      if ((myV.length>0)&&(args[i+2]==1)){ //fromto
        var myMa=args[i+1].split('_');if(isNaN(myV)||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==2)){
          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;
      } else if ((myV.length>0)&&(args[i+2]==3)){ // date
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);
        if(myAt){
          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
          var myDate=new Date(myY,myM,myD);
          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
        }else{addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==4)){ // time
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
      } else if (myV.length>0&&args[i+2]==5){ // check this 2
            var myObj1 = localizando_objeto(args[i+1].replace(/\[\d+\]/ig,""));
            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!myObj1.checked){addErr=true}
      } else if (myV.length>0&&args[i+2]==6){ // the same
            var myObj1 = localizando_objeto(args[i+1]);
            if(myV!=myObj1.value){addErr=true}
      }
    } else
    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
      if (args[i+2]==1&&myObj1&&myObj1.checked&&localizando_objeto(args[i+1]).value.length/1==0){addErr=true}
      if (args[i+2]==2){
        var myDot=false;
        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
        if(!myDot){myErr+='* ' +args[i+3]+'\n'}
      }
    } else if (myObj.type=='checkbox'){
      if(args[i+2]==1&&myObj.checked==false){addErr=true}
      if(args[i+2]==2&&myObj.checked&&localizando_objeto(args[i+1]).value.length/1==0){addErr=true}
    } else if (myObj.type=='seleção-unica'||myObj.type=='seleção-multipla'){
      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
    }else if (myObj.type=='area-de-texto'){
      if(myV.length<args[i+1]){addErr=true}
    }
    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
  }
  if (myErr!=''){alert('Erro encontrado !!!:\t\t\t\t\t\n\n'+myErr)}
  document.MM_returnValue = (myErr=='');
}
////////////////////////////////////////////////////


//////////////////////////////////////////////////
///////////////FORM FALECONOSCO //////////////////
function valida_formulario_contato_faleconosco()
{
	if (document.getElementById('empresa').value==''){ alert("Preencha o campo empresa"); document.getElementById('empresa').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('endereco').value==''){ alert("Preencha o campo endereço"); document.getElementById('endereco').focus(); return false; }
	if (document.getElementById('cidade').value==''){ alert("Preencha o campo cidade"); document.getElementById('cidade').focus(); return false; }
	if (document.getElementById('uf').value==''){ alert("Preencha o campo uf"); document.getElementById('uf').focus(); return false; }
	if (document.getElementById('pais').value==''){ alert("Preencha o campo país"); document.getElementById('pais').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;} }
	if (document.getElementById('mensagem').value==''){ alert("Preencha o campo mensagem"); document.getElementById('mensagem').focus(); return false; }	
	
	var captcha1 = document.getElementById("captcha1").value
	var captcha2 = document.getElementById("captcha2").value
	if (captcha1 != captcha2) {
		alert("O codigo de segurança esta errado"); document.getElementById('captcha1').focus(); return false;
	}
	
	form_contato_faleconosco.action='mail_faleconosco.asp';
	form_contato_faleconosco.submit();
}


function valida_formulario_contato_faleconosco_refresh()
{
	form_contato_faleconosco.submit();
}
//////////////////////////////////////////////////


//////////////////////////////////////////////////
///////////////FORM CADASTRE-SE //////////////////
function valida_formulario_contato_cadastre()
{
	document.getElementById('botao').value='salva';
	if (document.getElementById('empresa').value==''){ alert("Preencha o campo empresa"); document.getElementById('empresa').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('endereco').value==''){ alert("Preencha o campo endereço"); document.getElementById('endereco').focus(); return false; }
	if (document.getElementById('cidade').value==''){ alert("Preencha o campo cidade"); document.getElementById('cidade').focus(); return false; }
	if (document.getElementById('uf').value==''){ alert("Preencha o campo uf"); document.getElementById('uf').focus(); return false; }
	if (document.getElementById('pais').value==''){ alert("Preencha o campo país"); document.getElementById('pais').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;} }	
	
	var captcha1 = document.getElementById("captcha1").value
	var captcha2 = document.getElementById("captcha2").value
	if (captcha1 != captcha2) {
		alert("O codigo de segurança esta errado"); document.getElementById('captcha1').focus(); return false;
	}
	
//	form_contato_cadastre.action='mail.asp';
	form_contato_cadastre.submit();
}


function valida_formulario_contato_cadastre_refresh()
{
	form_contato_cadastre.submit();
}
//////////////////////////////////////////////////
/////////////////FORM TECNICO ////////////////////
function valida_formulario_contato_tecnico()
{
	if (document.getElementById('empresa').value==''){ alert("Preencha o campo empresa"); document.getElementById('empresa').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('endereco').value==''){ alert("Preencha o campo endereço"); document.getElementById('endereco').focus(); return false; }
	if (document.getElementById('cidade').value==''){ alert("Preencha o campo cidade"); document.getElementById('cidade').focus(); return false; }
	if (document.getElementById('uf').value==''){ alert("Preencha o campo uf"); document.getElementById('uf').focus(); return false; }
	if (document.getElementById('pais').value==''){ alert("Preencha o campo país"); document.getElementById('pais').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;} }	
	
	var captcha1 = document.getElementById("captcha1").value
	var captcha2 = document.getElementById("captcha2").value
	if (captcha1 != captcha2) {
		alert("O codigo de segurança esta errado"); document.getElementById('captcha1').focus(); return false;
	}
	
	form_contato_tecnico.action='mail_tecnico.asp';
	form_contato_tecnico.submit();
}


function valida_formulario_contato_tecnico_refresh()
{
	form_contato_tecnico.submit();
}
//////////////////////////////////////////////////


/////////////////FORM SAC ////////////////////
function valida_formulario_contato_sac()
{
	if (document.getElementById('empresa').value==''){ alert("Preencha o campo empresa"); document.getElementById('empresa').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('endereco').value==''){ alert("Preencha o campo endereço"); document.getElementById('endereco').focus(); return false; }
	if (document.getElementById('cidade').value==''){ alert("Preencha o campo cidade"); document.getElementById('cidade').focus(); return false; }
	if (document.getElementById('uf').value==''){ alert("Preencha o campo uf"); document.getElementById('uf').focus(); return false; }
	if (document.getElementById('pais').value==''){ alert("Preencha o campo país"); document.getElementById('pais').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;} }	
	
	var captcha1 = document.getElementById("captcha1").value
	var captcha2 = document.getElementById("captcha2").value
	if (captcha1 != captcha2) {
		alert("O codigo de segurança esta errado"); document.getElementById('captcha1').focus(); return false;
	}
	
	form_contato_sac.action='mail_sac.asp';
	form_contato_sac.submit();
}


function valida_formulario_contato_sac_refresh()
{
	form_contato_sac.submit();
}
//////////////////////////////////////////////////


/////////////////FORM TRABALHE ////////////////////
function valida_formulario_contato_trabalhe()
{
	if (document.getElementById('nome').value==''){ alert("Preencha o campo nome"); document.getElementById('nome').focus(); return false; }
	if (document.getElementById('telefone').value==''){ alert("Preencha o campo telefone"); document.getElementById('telefone').focus(); return false; }
	if (document.getElementById('endereco').value==''){ alert("Preencha o campo endereço"); document.getElementById('endereco').focus(); return false; }
	if (document.getElementById('cidade').value==''){ alert("Preencha o campo cidade"); document.getElementById('cidade').focus(); return false; }
	if (document.getElementById('uf').value==''){ alert("Preencha o campo uf"); document.getElementById('uf').focus(); return false; }
	if (document.getElementById('pais').value==''){ alert("Preencha o campo país"); document.getElementById('pais').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;} }	
	
	var captcha1 = document.getElementById("captcha1").value
	var captcha2 = document.getElementById("captcha2").value
	if (captcha1 != captcha2) {
		alert("O codigo de segurança esta errado"); document.getElementById('captcha1').focus(); return false;
	}
	
	form_contato_trabalhe.action='mail_rh.asp';
	form_contato_trabalhe.submit();
}


function valida_formulario_contato_trabalhe_refresh()
{
	form_contato_trabalhe.submit();
}

function valida_formulario_contato_trabalhe_anexo()
{
	form_contato_trabalhe.action='rh_salva_anexo.asp';
	form_contato_trabalhe.submit();
}
//////////////////////////////////////////////////




<!-- USUARIOS ONLINE LIVEZILLA -->
var script = document.createElement("script");script.type="text/javascript";var src = "http://www.universalautomotive.com.br/chat/server.php?request=track&output=jcrpt&nse="+Math.random();setTimeout("script.src=src;document.getElementById('livezilla_tracking').appendChild(script)",1);
<!-- //USUARIOS ONLINE LIVEZILLA -->



var name;
function mostra(id){
	name = 'btn' + id;
	document.getElementById(name).style.display = "inline";
}
function esconde(id){
	name = 'btn' + id;
	document.getElementById(name).style.display = "none";
}
function lancamentos(id){
	document.getElementById("imglanc").src = "../fotos/" + id
}
function validaCadastro(){
	if(document.frmCadastro.cNome.value == ""){
	alert('O campo Nome é obrigatório');document.frmCadastro.cNome.focus();return false;
	}
	if(document.frmCadastro.cEmail.value == ""){
	alert('O campo Email é obrigatório');document.frmCadastro.cEmail.focus();return false;
	}
	if(document.frmCadastro.cTelefone.value == ""){
	alert('O campo Telefone é obrigatório');document.frmCadastro.cTelefone.focus();return false;
	}
	if(document.frmCadastro.cEmpresa.value == ""){
	alert('O campo  é obrigatório');document.frmCadastro.cEmpresa.focus();return false;
	}
	if(document.frmCadastro.cCnpj.value == ""){
	alert('O campo  é obrigatório');document.frmCadastro.cCnpj.focus();return false;
	}
	if(document.frmCadastro.cCargo.value == ""){
	alert('O campo Cargo é obrigatório');document.frmCadastro.cCargo.focus();return false;
	}
	if(document.frmCadastro.cCidade.value == ""){
	alert('O campo cCidade é obrigatório');document.frmCadastro.cCidade.focus();return false;
	}
	if(document.frmCadastro.cLogin.value == ""){
	alert('O campo Login é obrigatório');document.frmCadastro.cLogin.focus();return false;
	}
	if(document.frmCadastro.cSenha.value == ""){
	alert('O campo Senha é obrigatório');document.frmCadastro.cSenha.focus();return false;
	}
}
function validaContato(){
	if(document.frmContato.cNome.value == ""){
	alert('O campo Nome é obrigatório');document.frmContato.cNome.focus();return false;
	}
	if(document.frmContato.cEmail.value == ""){
	alert('O campo Email é obrigatório');document.frmContato.cEmail.focus();return false;
	}
	if(document.frmContato.cEndereco.value == ""){
	alert('O campo Endereço é obrigatório');document.frmContato.cEndereco.focus();return false;
	}
	if(document.frmContato.cBairro.value == ""){
	alert('O campo Bairro é obrigatório');document.frmContato.cBairro.focus();return false;
	}
	if(document.frmContato.cCep.value == ""){
	alert('O campo CEP é obrigatório');document.frmContato.cCep.focus();return false;
	}
	if(document.frmContato.cCidade.value == ""){
	alert('O campo Cidade é obrigatório');document.frmContato.cCidade.focus();return false;
	}
	if(document.frmContato.cCidade.value == ""){
	alert('O campo Cidade é obrigatório');document.frmContato.cCidade.focus();return false;
	}
	if(document.frmContato.cUf.value == ""){
	alert('O campo UF é obrigatório');document.frmContato.cUf.focus();return false;
	}
	if(document.frmContato.cTelefone.value == ""){
	alert('O campo Telefone é obrigatório');document.frmContato.cTelefone.focus();return false;
	}
	if(document.frmContato.cMensagem.value == ""){
	alert('O campo Mensagem é obrigatório');document.frmContato.cMensagem.focus();return false;
	}	
}

function validaEntrada(){
	if(document.frm.cLogin.value == ""){
		alert("O campo login não pode estar vazio");document.frm.cLogin.focus();return false;
	}
	if(document.frm.cSenha.value == ""){
		alert("O campo senha não pode estar vazio");document.frm.cSenha.focus();return false;
	}
}

function mostraResultado(codigo){
	window.open("includes/resultadoEnquete.asp?COD=" + codigo, "mywindow", "width=600, height=300");
}

function validaEnquete(){
	//validacao de radio buttons sem saber quantos sao
	marcado = -1
	for (i=0; i<document.frmEnquete.enquete.length; i++) {
		if (document.frmEnquete.enquete[i].checked) {
			marcado = i
			resposta = document.frmEnquete.enquete[i].value
		}
	}
	if (marcado == -1) {
		alert("Selecione uma resposta.");
		document.frmEnquete.enquete[0].focus();
		return false;
	} 
	else {
		return true;
	}
}

function mascara(o,f){
    v_obj=o
    v_fun=f
    setTimeout("execmascara()",1)
}

function execmascara(){
    v_obj.value=v_fun(v_obj.value)
}

function telefone(v){
    v=v.replace(/\D/g,"")                 //Remove tudo o que não é dígito
    v=v.replace(/^(\d\d)(\d)/g,"($1) $2") //Coloca parênteses em volta dos dois primeiros dígitos
    v=v.replace(/(\d{4})(\d)/,"$1-$2")    //Coloca hífen entre o quarto e o quinto dígitos
    return v
}

function cnpj(v){
    v=v.replace(/\D/g,"")                //Remove tudo o que não é dígito
    v=v.replace(/(\d{3})(\d)/,"$1.$2") 
	v=v.replace(/(\d{3})(\d)/,"$1.$2")
	v=v.replace(/(\d{3})(\d)/,"$1/$2")
	v=v.replace(/(\d{3})(\d{1,2})$/,"$1-$2")
    return v
}

function SoLetra(v){
    v=v.toUpperCase()             //Maiúsculas
	v=v.replace(/[^asdfghjklçqwertyuiopzxcvbnmASDFGHJKLÇQWERTYUIOPZXCVBNM]/g,"") //Remove tudo o que não Letra
    return v
}

function soNumero(v){
    return v.replace(/\D/g,"")	
}

function cep(v){
    v=v.replace(/\D/g,"")                //Remove tudo o que não é dígito
    v=v.replace(/^(\d{5})(\d)/,"$1-$2") //Esse é tão fácil que não merece explicações
    return v
}

function cpf(v){
    v=v.replace(/\D/g,"")                //Remove tudo o que não é dígito
    v=v.replace(/(\d{3})(\d)/,"$1.$2") 
	v=v.replace(/(\d{3})(\d)/,"$1.$2")
	v=v.replace(/(\d{3})(\d{1,2})$/,"$1-$2")
    return v
}

function nascimento(v){
	v=v.replace(/\D/g,"")
	v=v.replace(/(\d{2})(\d)/,"$1/$2")
	v=v.replace(/(\d{2})(\d)/,"$1/$2")
	return v
}

function outro(id){
	if(document.getElementById(id).value == "outro"){
		document.getElementById("cOutro").style.display = "";
		document.getElementById("cOutroTexto").style.display = "";
	}
	else{
		document.getElementById("cOutro").style.display = "none";
		document.getElementById("cOutroTexto").style.display = "none";
	}
}
