function ValidaCamposRegisto() 
{ 
	var Nome = document.getElementById('txt_NomeReg').value;
	var Telefone = document.getElementById('txt_TelefoneReg').value;
	var Telemovel = document.getElementById('txt_TelemovelReg').value;
	var Email = document.getElementById('txt_EmailReg').value;
	var Pwd1 = document.getElementById('txt_Password1Reg').value;
	var Pwd2 = document.getElementById('txt_Password2Reg').value;
	var Aceita = document.getElementById('chk_AceitaReg').checked;
	
	var RegExpAspas = /["'<>]/;
	var RegExpTel = /[^0-9]/;
	
	if(Nome!='')
	{
		if(Nome.length<3) 
		{ 
			alert('O campo \"Nome\" deverá conter pelo menos 3 caracteres'); 
			document.getElementById('txt_NomeReg').focus(); 
			return false;
		} 
		
		if(RegExpAspas.test(Nome)) 
		{ 
			alert('O campo \"Nome\" não pode conter os seguintes caracteres: \" \' < >'); 
			document.getElementById('txt_NomeReg').focus(); 
			return false;
		} 
	}
	
	if(Telefone!='')
	{
		if(Telefone.length<9) 
		{ 
			alert('O campo \"Telefone\" deverá conter pelo menos 9 dígitos'); 
			document.getElementById('txt_TelefoneReg').focus(); 
			return false;
		} 
		
		if(RegExpTel.test(Telefone)) 
		{ 
			alert('O campo \"Telefone\" apenas pode conter valores numéricos sem espaços'); 
			document.getElementById('txt_TelefoneReg').focus(); 
			return false;
		}
	}
	
	if(Telemovel!='')
	{
		if(Telemovel.length<9) 
		{ 
			alert('O campo \"Telemovel\" deverá conter pelo menos 9 dígitos'); 
			document.getElementById('txt_TelemovelReg').focus(); 
			return false;
		} 
		
		if(RegExpTel.test(Telemovel))
		{ 
			alert('O campo \"Telemovel\" apenas pode conter valores numéricos sem espaços'); 
			document.getElementById('txt_TelemovelReg').focus(); 
			return false;
		}
	}
	
	if(Email=='')
	{
		alert('Insira o seu \"E-Mail\" de registo'); 
		document.getElementById('txt_EmailReg').focus();
		return false;
	}
	
	var RegExpEmail = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; 
	if(Email!='' && !RegExpEmail.test(Email)) 
	{ 
		alert('O Campo \"E-Mail\" está incorrecto'); 
		document.getElementById('txt_EmailReg').focus(); 
		return false;
	}
	
	if(RegExpAspas.test(Email)) 
	{ 
		alert('O campo \"E-Mail\" não pode conter os seguintes caracteres: \" \' < >'); 
		document.getElementById('txt_EmailReg').focus(); 
		return false;
	}
	
	if(Pwd1=='')
	{
		alert('Insira a sua \"Password\"'); 
		document.getElementById('txt_Password1Reg').focus(); 
		return false;
	}
	
	if(RegExpAspas.test(Pwd1)) 
	{ 
		alert('O campo \"Password\" não pode conter os seguintes caracteres: \" \' < >'); 
		document.getElementById('txt_Password1Reg').focus(); 
		return false;
	}
	
	if(RegExpAspas.test(Pwd2)) 
	{ 
		alert('O campo \"Confirme Password\" não pode conter os seguintes caracteres: \" \' < >'); 
		document.getElementById('txt_Password2Reg').focus(); 
		return false;
	}
	
	if(Pwd1!=Pwd2)
	{
		alert('A Password inserida não coincide com a confirmação'); 
		document.getElementById('txt_Password2Reg').focus(); 
		return false;
	}
	
	if(!Aceita)
	{
		alert('Tem que concordar com as condições de utilização para poder continuar'); 
		document.getElementById('chk_AceitaReg').focus(); 
		return false;
	}
	
	return true;
}

