

function isEmailAddr(Email)
{
	var result = false
	var theStr = new String(Email)
	var index = theStr.indexOf("@");
	if (index > 0)
	{
	var pindex = theStr.indexOf(".",index);
	if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
	}
	return result;
}

function Validate(theForm)
{

	if (theForm.Name.value == "")
	{
		alert("Please Enter Your Name.");
		theForm.Name.focus();
		return (false);
	}	

	if (theForm.Email.value == "")
	{
		alert("Please enter a value for the \"Your Email\" field.");
		theForm.Email.focus();
		return (false);
	}
	
	if (!isEmailAddr(theForm.Email.value))
	{
		alert("Please enter a complete email address in the \"Your Email\" field.: yourname@yourdomain.com");
		theForm.Email.focus();
		return (false);
	}  

	if (theForm.Email.value.length < 3)
	{
		alert("Please enter at least 3 characters in the \"Your Email\" field.");
		theForm.Email.focus();
		return (false);
	}			
	
return (true);
}

function ValidateCombo(oSrc, args)
{
	args.IsValid = (args.Value != 0);
}
 
