// JavaScript Document
function validacontato(){
           da = document.formulario;
           //validar nome
           if (da.empresa.value == "Empresa"){
                     alert("O campo empresa deve ser preenchido!");
                     da.empresa.focus();
                     return false;
           }
		   
		       if (da.endereco.value == "Endereço"){
                     alert("O campo endereço deve ser preenchido!");
                     da.endereco.focus();
                     return false;
           }
			 
			     if (da.nome.value == "Nome do contato"){
                     alert("O campo nome do contato deve ser preenchido!");
                     da.nome.focus();
                     return false;
           }
			 //validar email
         	 if (da.email.value == "E-mail"){
                   alert("O campo e-mail deve ser preenchido!");
                   da.email.focus();
                   return false;
         	 }
         	
			 //validar email(verificao de endereco eletrônico)
         	 parte1 = da.email.value.indexOf("@");
         	 //parte2 = d.email.value.indexOf(".");
         	 //parte3 = d.email.value.length;
         	 if (!(parte1 >= 3 )) {
                   alert ("O campo e-mail deve ser conter um endereco eletronico!");
                   da.email.focus();
                   return false;
         	 }
			 
		   //validar telefone
           if (da.telefone.value == "Telefone"){
                     alert("O campo telefone deve ser preenchido!");
                     da.telefone.focus();
                     return false;
           }
		    
			 	   //validar estado
           if (da.assunto.value == "Assunto"){
                     alert("O campo assunto deve ser preenchido!");
                     da.assunto.focus();
                     return false;
           }
		   
		    if (da.comentario.value == "Escreva sua mensagem..."){
                     alert("Você deve escrever sua mensgem!");
                     da.comentario.focus();
                     return false;
           }
		   	 if (da.termos.checked == ""){
                   alert("Por favor aceite os termos da nossa política de privacidade para se cadastrar.");
                   da.termos.focus();
                   return false;
         	 }
		  	
		   return true;
}
//valida cadastro
function validacad(){
           pe = document.form;
           //validar nome
           if (pe.empresa.value == "Empresa"){
                     alert("O campo empresa deve ser preenchido!");
                     pe.empresa.focus();
                     return false;
           }
		   
		       if (pe.endereco.value == "Endereço"){
                     alert("O campo endereço deve ser preenchido!");
                     pe.endereco.focus();
                     return false;
           }
			 
			     if (pe.nome.value == "Nome do contato"){
                     alert("O campo nome do contato deve ser preenchido!");
                     pe.nome.focus();
                     return false;
           }
			 //validar email
         	 if (pe.email.value == "E-mail"){
                   alert("O campo e-mail deve ser preenchido!");
                   pe.email.focus();
                   return false;
         	 }
         	
			 //validar email(verificao de endereco eletrônico)
         	 parte1 = pe.email.value.indexOf("@");
         	 //parte2 = pe.email.value.indexOf(".");
         	 //parte3 = pe.email.value.length;
         	 if (!(parte1 >= 3 )) {
                   alert ("O campo e-mail deve ser conter um endereco eletronico!");
                   pe.email.focus();
                   return false;
         	 }
			 
		   //validar telefone
           if (pe.telefone.value == "Telefone"){
                     alert("O campo telefone deve ser preenchido!");
                     pe.telefone.focus();
                     return false;
           }
		    
			 	   //validar estado
           if (pe.assunto.value == "Assunto"){
                     alert("O campo assunto deve ser preenchido!");
                     pe.assunto.focus();
                     return false;
           }
		     	 if (pe.termos.checked == ""){
                   alert("Por favor aceite os termos da nossa política de privacidade para se cadastrar.");
                   pe.termos.focus();
                   return false;
         	 }
		  	
		   return true;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
