function FormValidator(theForm)
	{
	var hostName = document.location.host;
	theForm.action = "https://" + hostName + "/contact_us/form/sendmail.htm";
	if (theForm.RouteTo.value == "")
		{
		alert ('Please select an organization.');
		theForm.RouteTo.focus();
		return (false);
		}
	if (theForm.Name.value == "")
		{
		alert("Please enter a Name.");
		theForm.Name.focus();
		return (false);
		}
	if (theForm.Email.value == "")
		{
		alert("Please enter an E-mail Address.");
		theForm.Email.focus();
		return (false);
		}
	else
		{
		//validate e-mail
		var emailID = theForm.Email.value;
		if (emailcheck(emailID)==false)
			{
			theForm.Email.value="";
			theForm.Email.focus();
			return (false);
			}

		}
	if (theForm.Comments.value == "")
		{
		alert("Please enter your comments or request.");
		theForm.Comments.focus();
		return (false);
		}

	return (true);
	}
function emailcheck(emailid) 
	{
	var at="@"
	var dot="."
	var lat=emailid.indexOf(at)
	var lstr=emailid.length
	var ldot=emailid.indexOf(dot)
	if ((emailid.indexOf(at)==-1) || (emailid.indexOf(at)==-1 || emailid.indexOf(at)==0 || emailid.indexOf(at)==lstr) || (emailid.indexOf(dot)==-1 || emailid.indexOf(dot)==0 || emailid.indexOf(dot)==lstr) || (emailid.indexOf(at,(lat+1))!=-1) || (emailid.substring(lat-1,lat)==dot || emailid.substring(lat+1,lat+2)==dot) || (emailid.indexOf(dot,(lat+2))==-1) || (emailid.indexOf(" ")!=-1))
		{
		alert("Invalid E-mail Address");
		return (false);
		}
	}


