
<!--
function checkTelfmt(str){
	var len = str.length;
	if( len >= 0 )
		for( var i = 0; i < len; i++)
			if( str.charAt(i) < '0' || str.charAt(i) > '9')
				if( str.charAt(i) != '(' && str.charAt(i) != ')' )
					if( str.charAt(i) != '-' && str.charAt(i) != ' '){
						alert("Use numeric format such as: (609) 555-1212");
						return false
						}
	return true;
}
function checkTel(form){
	var inputStr = form.telephone.value;
	if( checkTelfmt(inputStr))
		return true;
	else {
		form.telephone.focus();
		form.telephone.select();
		return false;
		}
	}

function checkEmail (form){
	var i = 0;
	testString = form.email.value;
	if(testString.length < 8){
		alert("E-Mail address too short to be valid");
		form.email.focus();
		form.email.select();
		return false;
		}
	if((i = testString.indexOf("@",1)) < 1){
		alert("E-Mail addresses must contain an '@' sign");
				form.Email.focus();
		form.email.focus();
		form.email.select();
		return false;
		}
	if(testString.indexOf(".",i) <= i+2){
		alert("E-Mail address must have at least two characters between the '@' and the first dot.");
		form.email.focus();
		form.email.select();
		return false;
		}
	return true;
}


function validateData(form){	


	var chkString = form.custname.value;
	if(chkString.length < 5){
		alert("\nYour Name:\n\n is a required field!!");
		form.custname.focus();
		form.custname.select();
		return false;
		}
	var chkString = form.custcompany.value;
	if(chkString.length < 2){
		alert("\nYour Company:\n\n is a required field!!");
		form.custcompany.focus();
		form.custcompany.select();
		return false;
		}
	var chkString = form.addr1.value;
	if(chkString.length < 5){
		alert("\nAddress:\n\n is a required field!!");
		form.addr1.focus();
		form.addr1.select();
		return false;
		}
	var chkString = form.city.value;
	if(chkString.length < 3){
		alert("\nCity:\n\n is a required field!!");
		form.city.focus();
		form.city.select();
		return false;
		}
	var chkString = form.state.value;
	if(chkString.length < 2){
		alert("\nState:\n\n is a required field!!");
		form.state.focus();
		form.state.select();
		return false;
		}
	var chkString = form.telephone.value;
	if(chkString.length < 4){
		alert("\nTelephone:\n\n is a required field!!");
		form.telephone.focus();
		form.telephone.select();
		return false;
		}
	var chkString = form.email.value;
	if(chkString.length < 2){
		alert("\nE-mail Address:\n\n is a required field!!");
		form.email.focus();
		form.email.select();
		return false;
		}

	if( checkTel(form) == false ) return false;
	if( checkEmail(form) == false ) return false;
	
	var chkString = form.industry.selectedIndex;
	if(chkString == 0){
		alert("\nIndustry: \n\nis a required field!!");
		form.industry.focus();
		form.industry.select();
		return false;
		}
	if(chkString == 7){
		var chkString2 = form.industry2.value;
		if(chkString2.length < 5){
			alert("\nOther Industry:\n\n please enter Industry name!!");
			form.industry2.focus();
			form.industry2.select();
			return false;
			}
		}
	var chkString = form.heard_from.selectedIndex;
	if(chkString == 0){
		alert("\nHow did you hear of us: \n\nis a required field!!");
		form.heard_from.focus();
		form.heard_from.select();
		return false;
		}
	if(chkString == 7){
		var chkString2 = form.heard_from2.value;
		if(chkString2.length < 5){
			alert("\nPlease tell us how you heard of us!!");
			form.heard_from2.focus();
			form.heard_from2.select();
			return false;
			}
		}
		
		
		
	return true;
}


function sendPage(form){

	if( validateData(form)){
		document.forms['cform'].submit()
		return true;
	}

	return false;
}

//-->
