
function validateform(){

// Check for cust_name
	if(document.application.apName.value=="") {
		document.application.apName.focus();
		window.alert ("Please provide a name.");
		return false;
	}

// Check for apAddress
	if(document.application.apAddress.value=="") {
		document.application.apAddress.focus();
		window.alert ("Please provide an address.");
		return false;
	}

// Check for valid email address
	if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.application.apEmail.value)){
//		return (true)

	} else {
	document.application.apEmail.focus();
	alert("Please provide a valid E-mail Address")
	return (false)
	}

// Check for apPhone
	if(document.application.apPhone.value=="") {
		document.application.apPhone.focus();
		window.alert ("Please provide a Phone.");
		return false;
	}


// Check for apBestTime
	if(document.application.apBestTime.value=="") {
		document.application.apBestTime.focus();
		window.alert ("Please provide a good time to contact you on the phone.");
		return false;
	}



// Check for apProdDesc
	if(document.application.apProdDesc.value=="") {
		document.application.apProdDesc.focus();
		window.alert ("Please provide a Product Description");
		return false;
	}

// Check for apSkillHist
	if(document.application.apSkillHist.value=="") {
		document.application.apSkillHist.focus();
		window.alert ("Please provide a history");
		return false;
	}


// Check that Display Selection radios are selected
	if ((document.application.apFeePref[0].checked == false)&&(document.application.apFeePref[1].checked == false)&&(document.application.apFeePref[2].checked == false)&&(document.application.apFeePref[3].checked == false)) {
		alert ("Please choose your Merchandising Fee");
		return false;
	}

// Check that CONFIRM checkbox is checked
	if(!document.application.confirm.checked){alert("Please confirm that you agree to the terms and conditions");
	return false; }

}
