// JavaScript Document

function News(){
	
	d = document.news;
	var obj = eval("document.news.email");
  	var txt = obj.value;
	
	if(d.nome.value == 'Informe seu nome'){
		alert("O campo nome deve ser preenchido!");
		d.nome.focus();
        return false;
	}
		
	if(d.email.value == 'Informe seu e-mail'){
		alert("O campo e-mail deve ser preenchido corretamente!");
		d.email.focus();
        return false;
	}
	
	if ((txt.length != 0) && ((txt.indexOf("@") < 1) || (txt.indexOf('.') < 7))){
    	alert('Email incorreto');
		obj.focus();
		return false;
	}
	
	
	return true;

	
}


function Send(){
	
	d = document.send;
	var obj = eval("document.send.destinatario");
  	var txt = obj.value;
	var obj1 = eval("document.send.remetente");
  	var txt1 = obj.value;
	
			
	if(d.destinatario.value == ''){
		alert("O campo e-mail do destinatario deve ser preenchido corretamente!");
		d.destinatario.focus();
        return false;
	}
	
	if ((txt.length != 0) && ((txt.indexOf("@") < 1) || (txt.indexOf('.') < 7))){
    	alert('Email incorreto');
		obj.focus();
		return false;
	}
	
	f(d.remetente.value == ''){
		alert("O campo e-mail do destinatario deve ser preenchido corretamente!");
		d.remetente.focus();
        return false;
	}
	
	if ((txt1.length != 0) && ((txt1.indexOf("@") < 1) || (txt1.indexOf('.') < 7))){
    	alert('Email incorreto');
		obj1.focus();
		return false;
	}
	
	
	return true;

	
}

