	
function verify()
{
	if (document.form.fname.value =="") {
		alert("Your First Name is Required.");
		document.form.fname.focus();
		return false;
		
	}	

	if (document.form.lname.value =="") {
		alert("Your Last Name is Required.");
		document.form.lname.focus();
		return false;
		
	}

	if (document.form.email.value =="") {
		alert("Your Email Address is Required.");
		document.form.email.focus();
		return false;
		
	}

	if (!check_email(document.form.email.value)) {
		alert("You have not entered a valid email address.");
		document.form.email.focus();
		return false;
	}

	if (document.form.phone.value =="") {
		alert("Your Phone Number is Required.");
		document.form.phone.focus();
		return false;
		
	}

	if (document.form.address1.value =="") {
		alert("Your Address is Required.");
		document.form.address1.focus();
		return false;
		
	}

	if (document.form.city.value =="") {
		alert("Your City is Required.");
		document.form.city.focus();
		return false;
		
	}

		if (document.form.state.value =="") {
		alert("Your State is Required.");
		document.form.state.focus();
		return false;
		
	}

	if (document.form.zip.value =="") {
		alert("Your Zip Code is Required.");
		document.form.zip.focus();
		return false;
		
	}

else {
		document.form.submit();
	}

		
}

///////sub routines
	

function check_email(e) {
	var myEMailIsValid = true;

	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){ 
			myEMailIsValid = false;
		}	
	} 

	// Newer browsers
	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (re.test(e) || !re_two.test(e)) {
			myEMailIsValid = false;
		} 
	// Older Browsers
	} else {

		var myAtSymbolAt = e.indexOf('@');
		var myLastDotAt = e.lastIndexOf('.');
		var mySpaceAt = e.indexOf(' ');
		var myLength = e.length;

		// at least one @ must be present and not before position 2
		// @yellow.com : NOT valid
		// x@yellow.com : VALID

		if (myAtSymbolAt < 1 ) {
			myEMailIsValid = false;
		}

		// at least one . (dot) afer the @ is required
		// x@yellow : NOT valid
		// x.y@yellow : NOT valid
		// x@yellow.org : VALID

		if (myLastDotAt < myAtSymbolAt) {
			myEMailIsValid = false;
		}

		// at least two characters [com, uk, fr, ...] 
		//   must occur after the last . (dot), but not more than 4
		// x.y@yellow. : NOT valid
		// x.y@yellow.a : NOT valid
		// x.y@yellow.ca : VALID

		if (myLength - myLastDotAt <= 2 || myLength - myLastDotAt >= 4) {
			myEMailIsValid = false;
		}

		// no empty space " " is permitted (one may trim the email)
		// x.y@yell ow.com : NOT valid

		if (mySpaceAt != -1) {
			myEMailIsValid = false;
		}
	}
	return myEMailIsValid;
}