function ValidarAnyForm(form){ 

	input= document.anyForm.name;
	if (input.value.length == 0)
	{
		alert('Insert your name');
		input.focus();
		return false;
	}
	input= document.anyForm.email;
	return ValidEmail(input);

	return true;

} 

function ValidEmail(input){
	var pos1, pos2, bOk = true; 
	var sDir = input.value; 
	if (sDir == ""){ 
		alert("Insert your email address"); 
		input.focus(); 
		return false; 
	} 
	pos1 = sDir.indexOf('@', 0); 
	pos2 = sDir.indexOf('.', 0); 
	bOk = bOk && (pos1 > 0); 
	bOk = bOk && (pos2 != -1); 
	bOk = bOk && (pos1 < pos2 - 1); 
	bOk = bOk && (pos2 < sDir.length - 1); 
	if (!bOk){ 
		alert("Invalid email address"); 
		input.focus(); 
		return false; 
	}   
	return true;
}
