<!--


var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

var theNumbers = "0123456789";
function check4numbers(testVal){
	var isAnumber = true;
	for(x=0; x < testVal.length; x++){
		if ( theNumbers.indexOf(testVal.charAt(x)) < 0 ) isAnumber = false;
	}
	return isAnumber;
}

function checkForm(){
	var theForm = document.contactForm;
 	if  (theForm.First_Name.value == ""){
 		alert('Please enter your first name in the "First Name" field.');
 		theForm.First_Name.focus();
 		return;
 	}

 	if  (theForm.Last_Name.value == ""){
 		alert('Please enter your last name in the "Last Name" field.');
 		theForm.Last_Name.focus();
 		return;
 	}

 	if  (theForm.coName.value == ""){
 		alert('Please enter your company name in the "Company Name" field.');
 		theForm.coName.focus();
 		return;
 	}

 	if  (theForm.custAddress1.value == ""){
 		alert('Please enter your address in the "Address 1" field.');
 		theForm.custAddress1.focus();
 		return;
 	}

 	if  (theForm.city.value == ""){
 		alert('Please enter your city in the "City" field.');
 		theForm.city.focus();
 		return;
 	}

 	if  (theForm.state.value == ""){
 		alert('Please enter your state in the "State" field.');
 		theForm.state.focus();
 		return;
 	}

	if  (theForm.zip.value.length != 5 || !check4numbers(theForm.zip.value)){
 		alert('Please enter your valid zip code in the "Zip" field.');
 		theForm.zip.focus();
 		return;
 	}

 	if  (theForm.phAreaCode.value.length != 3 || !check4numbers(theForm.phAreaCode.value)){
 		alert('Please enter your area code.');
 		theForm.phAreaCode.focus();
 		return;
 	}

 	if  (theForm.phPrefix.value.length != 3 || !check4numbers(theForm.phPrefix.value)){
 		alert('Please enter you complete telepone number.');
 		theForm.phPrefix.focus();
 		return;
 	}

 	if  (theForm.phone.value.length != 4 || !check4numbers(theForm.phone.value)){
 		alert('Please enter your complete telepone number.');
 		theForm.phone.focus();
 		return;
 	}

 	if  (theForm.fromemail.value.length < 5 || !re.test(theForm.fromemail.value) ){
 		alert('Please enter a valid email address.');
 		theForm.fromemail.focus();
 		return;
 	}

	if ( !theForm.Digital_Phone_Systems.checked &&  !theForm.Voice_Processing_Systems.checked &&  !theForm.Unified_Messaging_Systems.checked &&  !theForm.VoIP_Solutions.checked &&  !theForm.Other.checked ){
		alert('Please indicate what you would like to find out more about.');
		theForm.Digital_Phone_Systems.focus();
		return;
	}

	theForm.submit();
}



function checkForm2(){
	var theForm = document.supportForm;
 	if  (theForm.First_Name.value == ""){
 		alert('Please enter your first name in the "First Name" field.');
 		theForm.First_Name.focus();
 		return;
 	}

 	if  (theForm.Last_Name.value == ""){
 		alert('Please enter your last name in the "Last Name" field.');
 		theForm.Last_Name.focus();
 		return;
 	}

 	if  (theForm.Company_Name.value == ""){
 		alert('Please enter your company name in the "Company Name" field.');
 		theForm.Company_Name.focus();
 		return;
 	}

 	if  (theForm.Address.value == ""){
 		alert('Please enter your address in the "Address" field.');
 		theForm.Address.focus();
 		return;
 	}

 	if  (theForm.City.value == ""){
 		alert('Please enter your city in the "City" field.');
 		theForm.City.focus();
 		return;
 	}

 	if  (theForm.State.value == ""){
 		alert('Please enter your state in the "State" field.');
 		theForm.State.focus();
 		return;
 	}

	if  (theForm.Zip.value.length != 5 || !check4numbers(theForm.Zip.value)){
 		alert('Please enter your valid zip code in the "Zip" field.');
 		theForm.Zip.focus();
 		return;
 	}

 	if  (theForm.phAreaCode.value.length != 3 || !check4numbers(theForm.phAreaCode.value)){
 		alert('Please enter your area code.');
 		theForm.phAreaCode.focus();
 		return;
 	}

 	if  (theForm.phPrefix.value.length != 3 || !check4numbers(theForm.phPrefix.value)){
 		alert('Please enter you complete telepone number.');
 		theForm.phPrefix.focus();
 		return;
 	}

 	if  (theForm.phone.value.length != 4 || !check4numbers(theForm.phone.value)){
 		alert('Please enter your complete telepone number.');
 		theForm.phone.focus();
 		return;
 	}

 	if  (theForm.fromemail.value.length < 5 || !re.test(theForm.fromemail.value) ){
 		alert('Please enter a valid email address.');
 		theForm.fromemail.focus();
 		return;
 	}

	if ( theForm.Problem.value.length < 5 ){
		alert('Please enter a detailed description.');
		theForm.Problem.focus();
		return;
	}

	theForm.submit();
}

//-->