/**
 *validateEmail
 *Object field - Name of the field that contains the email address; the function will return the 
 *focus to this field if it contains an invalid email address
 *String alerttxt - Message that should appear in the javascript alert that notifies the user of 
 * an invalid email address
 */
function validateEmail(field,alerttxt)
{
	var result = false;
	with (field)
	{
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (apos<1||dotpos-apos<2) 
		  {alert(alerttxt);field.focus(); result = false; }
		else { result = true; }
	}
	return result;
}