// CONTATO
function validaform_contato(f){

		if(f.nome.value=="")
		{
        	alert("Please, type your NAME.")
        	f.nome.focus();
        	return false
    	}

		if(f.email.value=="")
		{
			alert("Please, type your EMAIL.")
			f.email.focus();
			return false
	    }
		
//inicio de validando o email
   if ((f.email.value.indexOf ('@',0) == -1 || f.email.value.indexOf ('.',0) == -1))
      {
      alert("\nEMAIL incorrect.")
      f.email.focus();
      return false;
      }

   for (var i=0; i < f.email.value.length; i++)
        {
          if ( f.email.value.substring(i, i + 1) == "'"  || f.email.value.substring(i, i + 1) == '"' )
             {
              alert("\nEMAIL incorrect.\n\n")
              f.email.focus();
	          return false;
	             }
        }
//fim de validando o email

		
		if(f.mensagem.value=="")
		{
        	alert("Please, type your MESSAGE.")
        	f.mensagem.focus();
        	return false
    	}

}
//-->


//ANUNCIAR IMOVEL
function validaform_anunciar(f){

     if (f.natureza.value == "0") {
	alert("TYPE of property is necessary.");
        f.natureza.focus();
        return false;
     }
	 
     if (f.tipo.value == "0") {
	alert("Nš of BEDROOMS is necessary.");
        f.tipo.focus();
        return false;
     }

     if (f.finalidade.value == "0") {
	alert("BUSINESS is necessary.");
        f.finalidade.focus();
        return false;
     }


     if (f.endereco.value.length == 0) {
	alert("ADDRESS of property is necessary.");
        f.endereco.focus();
        return false;
     }

     if (f.cidade.value.length == 0) {
	alert("LOCATION of property is necessary.");
        f.cidade.focus();
        return false;
     }
	 
     if (f.descricao.value.length == 0) {
	alert("DESCRIPTION of property is necessary.");
        f.descricao.focus();
        return false;
     }

     if (f.preco.value.length == 0) {
	alert("PRICE of property is necessary.");
        f.preco.focus();
        return false;
     }


		if(f.nome.value=="")
		{
        	alert("Please, type your NAME.")
        	f.nome.focus();
        	return false
    	}

		if(f.email.value=="")
		{
			alert("Please, type your EMAIL.")
			f.email.focus();
			return false
	    }
		
//inicio de validando o email
   if ((f.email.value.indexOf ('@',0) == -1 || f.email.value.indexOf ('.',0) == -1))
      {
      alert("\nEMAIL incorrect.")
      f.email.focus();
      return false;
      }

   for (var i=0; i < f.email.value.length; i++)
        {
          if ( f.email.value.substring(i, i + 1) == "'"  || f.email.value.substring(i, i + 1) == '"' )
             {
              alert("\nEMAIL incorrect.\n\n")
              f.email.focus();
	          return false;
	             }
        }
//fim de validando o email

}
 
//-->
