/*
Programmer: adrian@inet.co.cr
Date: 11/08/2002
Description: This function validates the fields for forgot password component cheking it is a valid 
email address with a "@" and a "." required and no spaces.
*/
function ForgotValidator(form)
{	
	var temp
	stremail = new String(form.email.value);
	//temp=stremail.concat();
	if(form.email.value=="")
	{
			alert("Please type your email!");
			form.email.focus();
			return (false);
	}
	
	if (!(CheckSpaces(form.email.value)))
	{
		alert("Your email must not contain spaces!");
		form.email.focus();
		return(false);
	}
	//Check if email contains a @
	if (stremail.indexOf("@") == -1)
	{
		alert("Your email address you provided is not valid. Please make sure you typed it correctly");
		form.email.select();
		return false;
	}
	//Check if email contains a @
	
	//Check if email contains a .
	if (stremail.indexOf(".") == -1)
	{
		alert("Your email address you provided is not valid. Please make sure you typed it correctly.");
		form.email.select();
		return false;
	}
	//Check if email contains a .
	return(true)
}

function CheckSpaces(strField)
{
	//Check if alias has spaces
	strInput=new String(strField);
	if (strInput.indexOf(" ") != -1)
	{
		return false;
	}
	return(true)
	//Check if alias has spaces
}