function check(form){

	if (form.model.value =="") {
		alert("You must fill in an APU Model.");
  		form.model.focus();
   	return false;
   	}
   	else
	if (form.part_no.value =="") {
		alert("You Must Fill in the APU Part Number.");
  		form.part_no.focus();
   	return false;
   	}
	
    else
	if (form.yname.value =="") {
		alert("You Must Fill in Your Name.");
  		form.yname.focus();
   	return false;
   	}
	
   	else
	if (form.cname.value =="") {
		alert("You Must Fill in the Company Name.");
  		form.cname.focus();
   	return false;
   	}
	
   	else
	if (form.address1.value =="") {
		alert("You Must Fill in the Address1.");
  		form.address1.focus();
   	return false;
   	}
	
   	else
	if (form.address2.value =="") {
		alert("You Must Fill in the Address2.");
  		form.address2.focus();
   	return false;
   	}
	
   	else
	if (form.phone.value =="") {
		alert("You Must Fill in the Phone Number.");
  		form.phone.focus();
   	return false;
   	}
	
	else
	if (validEmail(form.cust_email) == false){
		alert("Please Enter a Valid Email Address.");
  		form.cust_email.focus();
		return false;
		}
   
   else
   {   
          return true;
   }   
}

// Validate E-mail address format
function validEmail(elm) {
if (elm.length < 7)  { 
    return false;
}
else
if (elm.value.indexOf("@") == "-1" || 
	    elm.value.indexOf(".") == "-1")
	return false;
	else return true;
} 

//Validate Phone
function checkPhone(phone) {
	var phoneVal=phone.value;
	var phoneLen=phoneVal.length;
	var Nums = "0123456789-.()";
	var theDigit="";
	var soFar="";
    var theDigit="";
	for (i=0;i<phoneLen;i++) {
		theDigit = phoneVal.charAt(i);
		if (Nums.indexOf(theDigit)==-1) {
			phone.value=soFar;
			alert("Phone numbers may not contain  " + theDigit + ".  Please enter a valid Phone Number in this format - xxx-xxx-xxxx.");
			phone.focus();
			phone.select();
			return false;
			}
			soFar=soFar+theDigit;
		}
		return true;
	}

//Valisate Fax
function checkFax(fax) {
	var faxVal=fax.value;
	var faxLen=faxVal.length;
	var Nums = "0123456789-.()";
	var theDigit="";
	var soFar="";
    var theDigit="";
	for (i=0;i<faxLen;i++) {
		theDigit = faxVal.charAt(i);
		if (Nums.indexOf(theDigit)==-1) {
			fax.value=soFar;
			alert("Fax numbers may not contain  " + theDigit + ".  Please enter a valid Fax Number in this format - xxx-xxx-xxxx.");
			fax.focus();
			fax.select();
			return false;
			}
			soFar=soFar+theDigit;
		}
		return true;
	}
	
//Validate Part number
function partNo(part_no){
    var partVal=part_no.value;
	if(isNaN(partVal)){
	 alert("You must enter a number for part number");
	 part_no.focus();
	 part_no.select();
	} 
}	
	