// JavaScript Document
function Validar_adesao(form)
{ 
  return (
 		     ValidarVazio(form.nome_p.value,"Por favor, introduza o nome.")
 		     && ValidarVazio(form.num_contrib.value,"Por favor, introduza o número de contribuinte.")
         && ValidarEmail(form.email.value)
 		     
      );

}


function muda_distrito(){

if (xmlhttp)
{
// tenta estabelecer ligação
try
{
///------------------inicio-----------------------
var obj = document.getElementById("corpo_rubricas");

var serverPage ="form_pesquisa_directorio.php";


var distrito=document.getElementById("distrito").value;

var params = "dist="+distrito;

xmlhttp.open("POST", serverPage, true);

//Send the proper header information along with the request
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", params.lengh);
xmlhttp.setRequestHeader("Connection", "close");

xmlhttp.onreadystatechange = function() {
	if(xmlhttp.readyState == 1 ) {

//obj.innerHTML="<img src='./sysimages/loader.gif' border='0'>";
}else if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {



obj.innerHTML = xmlhttp.responseText;


}
}
xmlhttp.send(params);


}
//--------------------fim do bloco try-----------------------
  

// mostra mensagem em caso de erro
catch (e)
{

//alert(e.toString());
}
}
}
