	function removeSpaces(string) {
		var tstring = "";
		string = '' + string;
		splitstring = string.split(" ");
		for(i = 0; i < splitstring.length; i++)
		tstring += splitstring[i];
		return tstring;
	}
	
	function ValidarNewsletter()
	{
		nome = document.getElementById('nome');
		email = document.getElementById('email');
		
		// Regra para a validação de e-mail.
		var reEmail = /^[\w-]+(\.[\w-]+)*@(([\w-]{2,63}\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$/;
		
		if(removeSpaces(nome.value) == "") {
			alert("Informe o nome.");
			nome.focus();
			return false;
		}
		
		if(removeSpaces(email.value) == "") {
			alert("Informe o e-mail.");
			email.focus();
			return false;
		}
		else
		{
			valid_email = reEmail.exec(email.value)
			if(valid_email == null) {
				alert("E-mail inválido!");
				email.focus();
				return false;
			}
		} 
		
	}
