// JavaScript Document

<!-- Original: wsabstract.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin -->
function checkReq(theForm){
		var f = theForm;
		/*Billing Information Validation*/				
		if (f.fname.value==""){
			alert("You must enter your FIRST NAME");
			f.fname.focus();
			return false;
		}
		if (f.lname.value==""){
			alert("You must enter your LAST NAME");
			f.lname.focus();
			return false;
		}
		
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(f.email.value)){
		
		}else{
			alert("Invalid E-mail Address! Please re-enter.");
			f.email.focus();
			return false;
		}
		
		if(f.phone.value != ""){
			var ssth=f.phone.value
			var matchArrth = ssth.match(/^(\d{3})-?\d{3}-?\d{4}$/);
			var numDashesth = ssth.split('-').length - 1 ;
			if (matchArrth == null || numDashesth == 1) {
			alert("Please enter your Telephone number in the following format: NNN-NNN-NNNN.");
			f.phone.focus();
			return false;
			}
		}
		
			
		
}

