function districtValidate(str){
	if (document.getElementById('COUNTRY')[document.getElementById('COUNTRY').selectedIndex].value == 'PT'){
		if (document.getElementById('DISTRICT')[document.getElementById('DISTRICT').selectedIndex].value != ''){
			return true;
		} else {
			alert('Deve seleccionar o distrito.');
			return false;
		}
	} else {
		return true;
	}			
} 

function validateNif(nif){

	fNum = nif.charAt(0);

	if (!isInteger(nif,false) || (fNum!=1 && fNum!=5 && fNum!=9) || nif.length < 9)
	{
		alert("O nº de contribuinte introduzido não é válido.");
		return false;
	}

	return true;
		
}
