// JavaScript Document
function MM_validateForm() 
 { 
   //v4.0
   var i,p,q,nm,test,num,min,max,errors='';
   var error=0;
   var erroemail=0;
   var args=MM_validateForm.arguments;
   var er = /^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/;
    
   for (i=0; i<(args.length); i++) 
      { 
        val = MM_findObj(args[i]);
        nm = val.value; 
        if (nm == "Seu nome" || nm == "Seu e-mail" || nm == "DDD" || nm == "Seu telefone" || nm == "Sua localidade" || nm == "Mensagem") 
            {
              error++;
            }
        if(i==1)
            {
             if ((!nm.match(er)))
                {
                erroemail++;
                }
            }
       }
   
   if(error > 0)
    {
        alert('Todos os campos são obrigatórios');
        document.MM_returnValue = false;
    }
    else if(erroemail > 0)
    {
         alert('Formato inválido de email.');
         document.MM_returnValue = false;
    }
    else
    {
        document.MM_returnValue = true;
    }
 }
 
 function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}


function validacaoEmail(campo) 
{
    var vl = MM_findObj(campo).value;
    alert(vl);
     var er = /^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/;
    if ((!vl.match(er)))
    {
        alert('Formato inválido de email.');
        document.MM_returnValue = false;
    }    
    else
    {
        document.MM_returnValue = true;
    }
}