	function checker() {
		if (document.form1.fname.value=="")		{alert("Please enter your FIRST NAME.");document.form1.fname.focus();return false;}
		if (document.form1.lname.value=="")		{alert("Please enter your LAST NAME.");document.form1.lname.focus();return false;}
		if (document.form1.street.value=="")	{alert("Please enter your STREET.");document.form1.street.focus();return false;}
		if (document.form1.city.value=="")		{alert("Please enter your CITY.");document.form1.city.focus();return false;}
		if (document.form1.state.selectedIndex==0){alert("Please select your STATE.");document.form1.state.focus();return false;}
		if (document.form1.zip.value=="")		{alert("Please enter your ZIP CODE.");document.form1.zip.focus();return false;}
		var validzip = checkZipCode(document.form1.zip.value);
		if (!validzip)							{alert("The ZIP CODE appears invalid - please enter again.");document.form1.zip.focus();return false;}
		if (document.form1.email.value!="" && !emailCheck (document.form1.email.value)) {return false;}
		if (document.form1.phone1.value=="" || !isNum(document.form1.phone1.value) || document.form1.phone1.value.length<3)	{alert("Please enter your AREA CODE.");document.form1.phone1.focus();return false;}
		if (document.form1.phone2.value=="" || !isNum(document.form1.phone2.value) || document.form1.phone2.value.length<3)	{alert("Please enter a COMPLETE PHONE NUMBER.");document.form1.phone2.focus();return false;}
		if (document.form1.phone3.value=="" || !isNum(document.form1.phone3.value) || document.form1.phone3.value.length<4)	{alert("Please enter a COMPLETE PHONE NUMBER.");document.form1.phone3.focus();return false;}
		return true;
	}

	function checkZipCode(code)     {
		if (code.length < 5)			{return false;}
	    var fivecode = code.substring(0,5);
		if (code.length == 5)    {
			if (!isNum(code))    {return false;}
			return true;
		}
		if (code.length == 10)   {
			if (!isNum(fivecode))       {return false;}
		    if (code.charAt(5) != "-") 	{return false;}
		    var ninecode = code.substring(6);
		    if (!isNum(ninecode))       {return false;}
			return true;
		}
		if (code.length == 7)    {
			if (isNum(code.charAt(0)))  {return false;}
			if (!isNum(code.charAt(1))) {return false;}
			if (isNum(code.charAt(2)))  {return false;}
			if (code.charAt(3) != " ")  {return false;}
			if (!isNum(code.charAt(4))) {return false;}
			if (isNum(code.charAt(5)))  {return false;}
			if (!isNum(code.charAt(6))) {return false;}
			return true;
		}
		return false;
	}
	function isNum(str) {
		var ch,i=0;
		for (i=0;i<str.length;i++)	{
			ch = str.charAt(i);
			if ((ch < "0" || "9" < ch) && ch != '-') {return false;}
		}
		return true;
	}
	function isNumChar(str) {
		var ch,flg,i=0;
		for (i=0;i<str.length;i++)	{
			ch = str.charAt(i);
			flg = 0;
			if (ch < "0" || "9" < ch) {flg = flg + 1;}
			if (ch < "a" || "z" < ch) {flg = flg + 1;}
			if (ch < "A" || "Z" < ch) {flg = flg + 1;}
			if (flg != 2) {return (false);}
		}
		return true;
	}
	function emailCheck (emailStr) {
		var checkTLD=1;
		var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
		var emailPat=/^(.+)@(.+)$/;
		var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
		var validChars="\[^\\s" + specialChars + "\]";
		var quotedUser="(\"[^\"]*\")";
		var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
		var atom=validChars + '+';
		var word="(" + atom + "|" + quotedUser + ")";
		var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
		var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
			alert("Email address seems incorrect (check @ and .'s)");
			return false;
		}
		var user=matchArray[1];
		var domain=matchArray[2];
		for (i=0; i<user.length; i++) {
			if (user.charCodeAt(i)>127) {
				alert("Ths username contains invalid characters.");
				return false;
			}
		}
		for (i=0; i<domain.length; i++) {
			if (domain.charCodeAt(i)>127) {
				alert("Ths domain name contains invalid characters.");
				return false;
			}
		}
		if (user.match(userPat)==null) {
			alert("The username doesn't seem to be valid.");
			return false;
		}
		var IPArray=domain.match(ipDomainPat);
		if (IPArray!=null) {
			for (var i=1;i<=4;i++) {
				if (IPArray[i]>255) {
					alert("Destination IP address is invalid!");
					return false;
				}
			}
			return true;
		}
		var atomPat=new RegExp("^" + atom + "$");
		var domArr=domain.split(".");
		var len=domArr.length;
		for (i=0;i<len;i++) {
			if (domArr[i].search(atomPat)==-1) {
				alert("The domain name does not seem to be valid.");
				return false;
			}
		}
		if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) {
			alert("The address must end in a well-known domain or two letter " + "country.");
			return false;
		}
		if (len<2) {
			alert("This address is missing a hostname!");
			return false;
		}
		return true;
	}

