function centerFoundation() {
	var foundationWidth = 940;
	var zeroX=((screen.width-foundationWidth)/2);
	
	if (zeroX >= 0) {
	document.all.foundation.style.left=zeroX;
	} else {
	document.all.foundation.style.left=0;
	}
	document.all.foundation.style.visibility = "visible";
}

function showHLServices(theID) {
	document.getElementById("datamodeler").style.backgroundColor = "";
	document.getElementById("modelmanager").style.backgroundColor = "";
	document.getElementById("autosys").style.backgroundColor = "";
	document.getElementById("insight").style.backgroundColor = "";
	document.getElementById("sysviewmq").style.backgroundColor = "";
	document.getElementById("sysviewcics").style.backgroundColor = "";
	document.getElementById("filemaster").style.backgroundColor = "";
	document.getElementById("scheduler").style.backgroundColor = "";
	document.getElementById("changemanagermf").style.backgroundColor = "";
	document.getElementById("changemanagerdist").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLComSoftware(theID) {	
	document.getElementById("datamodeler").style.backgroundColor = "";
	document.getElementById("msuite").style.backgroundColor = "";
	document.getElementById("validator").style.backgroundColor = "";
	document.getElementById("modelmanager").style.backgroundColor = "";
	document.getElementById("modelnavigator").style.backgroundColor = "";
	document.getElementById("processmodeler").style.backgroundColor = "";
	document.getElementById("saphir").style.backgroundColor = "";
	document.getElementById("arcservebackup").style.backgroundColor = "";
	document.getElementById("xosoftreplicator").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLSolutions(theID) {
	document.getElementById("dmpqsp").style.backgroundColor = "";
	document.getElementById("dmjsp").style.backgroundColor = "";
	document.getElementById("dmup").style.backgroundColor = "";
	document.getElementById("dmcmp").style.backgroundColor = "";
	document.getElementById("dmmp").style.backgroundColor = "";
	document.getElementById("dajsp").style.backgroundColor = "";
	document.getElementById("brpjsp").style.backgroundColor = "";
	document.getElementById("rmjsp").style.backgroundColor = "";
	document.getElementById("custom").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLdmjsp(theID) {
	document.getElementById("modeling").style.backgroundColor = "";
	document.getElementById("package").style.backgroundColor = "";
	document.getElementById("req").style.backgroundColor = "";
	document.getElementById("install").style.backgroundColor = "";
	document.getElementById("practices").style.backgroundColor = "";
	document.getElementById("services").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLdmmp(theID) {
	document.getElementById("metadata").style.backgroundColor = "";
	document.getElementById("package").style.backgroundColor = "";
	document.getElementById("req").style.backgroundColor = "";
	document.getElementById("establish").style.backgroundColor = "";
	document.getElementById("deliver").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLdmup(theID) {
	document.getElementById("package").style.backgroundColor = "";
	document.getElementById("req").style.backgroundColor = "";
	document.getElementById("upgrade").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLdajsp(theID) {
	document.getElementById("admin").style.backgroundColor = "";
	document.getElementById("package").style.backgroundColor = "";
	document.getElementById("req").style.backgroundColor = "";
	document.getElementById("install").style.backgroundColor = "";
	document.getElementById("practices").style.backgroundColor = "";
	document.getElementById("deliver").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLdmcmp(theID) {
	document.getElementById("change").style.backgroundColor = "";
	document.getElementById("package").style.backgroundColor = "";
	document.getElementById("req").style.backgroundColor = "";
	document.getElementById("install").style.backgroundColor = "";
	document.getElementById("establish").style.backgroundColor = "";
	document.getElementById("deliver").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLdmpqsp(theID) {
	document.getElementById("modeling").style.backgroundColor = "";
	document.getElementById("package").style.backgroundColor = "";
	document.getElementById("req").style.backgroundColor = "";
	document.getElementById("install").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLbrpjsp(theID) {
	document.getElementById("restore").style.backgroundColor = "";
	document.getElementById("package").style.backgroundColor = "";
	document.getElementById("req").style.backgroundColor = "";
	document.getElementById("install").style.backgroundColor = "";
	document.getElementById("practices").style.backgroundColor = "";
	document.getElementById("backup").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

function showHLrmjsp(theID) {
	document.getElementById("recmgmt").style.backgroundColor = "";
	document.getElementById("package").style.backgroundColor = "";
	document.getElementById("req").style.backgroundColor = "";
	document.getElementById("install").style.backgroundColor = "";
	document.getElementById("practices").style.backgroundColor = "";
	
	document.getElementById(theID).style.backgroundColor = "#FBF820";
}

//Trim function
String.prototype.trim=function(){
    return this.replace(/^\s*|\s*$/g,'');
}

function validValues(fldValue, validVals) {
   var validChars = validVals;
   var isValid=true;
   var char;
 
   for (i = 0; i < fldValue.length && isValid == true; i++) 
      { 
      char = fldValue.charAt(i); 
      if (validChars.indexOf(char) == -1) 
         {
         isValid = false;
         }
      }
   return isValid;
}

function validateQuoteRequest(doc) {
	var errorTxt;
	var isProductSelected
	errorTxt = "";
	isProductSelected = false
	
	if (doc.first_name.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>First Name</strong><br>"
	}
	if (doc.last_name.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Last Name</strong><br>"
	}
	if (doc.company.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Company</strong><br>"
	}
	if (doc.addr1.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Address 1</strong><br>"
	}
	if (doc.city.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>City</strong><br>"
	}
	if (doc.state.selectedIndex == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>State</strong><br>"
	}
	if (doc.zip.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Zip</strong><br>"
	} else {
		if (validValues(doc.zip.value,"0123456789-") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Zip</strong> must be numeric<br>"
		}	
	}
	if (doc.email.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Email Addr</strong><br>"
	}
	if (doc.phone.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Phone</strong><br>"
	}

	if (doc.ca_modeling_suite.value.length > 0) {
		if (validValues(doc.ca_modeling_suite.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_modeling_suite.value != 0) {
				isProductSelected = true
				if ((doc.ca_modeling_suite_m1.checked == false) && (doc.ca_modeling_suite_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_modeling_suite_m1.checked == true) || (doc.ca_modeling_suite_m3.checked == true)) && ((doc.ca_modeling_suite.value.length == 0) || (doc.ca_modeling_suite.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_data_modeler.value.length > 0) {
		if (validValues(doc.ca_data_modeler.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_data_modeler.value != 0) {
				isProductSelected = true
				if ((doc.ca_data_modeler_m1.checked == false) && (doc.ca_data_modeler_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_data_modeler_m1.checked == true) || (doc.ca_data_modeler_m3.checked == true)) && ((doc.ca_data_modeler.value.length == 0) || (doc.ca_data_modeler.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}
	
	
	if (doc.ca_data_profiler.value.length > 0) {
		if (validValues(doc.ca_data_profiler.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_data_profiler.value != 0) {
				isProductSelected = true
				if ((doc.ca_data_profiler_m1.checked == false) && (doc.ca_data_profiler_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_data_profiler_m1.checked == true) || (doc.ca_data_profiler_m3.checked == true)) && ((doc.ca_data_profiler.value.length == 0) || (doc.ca_data_profiler.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_model_manager.value.length > 0) {
		if (validValues(doc.ca_model_manager.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_model_manager.value != 0) {
				isProductSelected = true
				if ((doc.ca_model_manager_m1.checked == false) && (doc.ca_model_manager_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_model_manager_m1.checked == true) || (doc.ca_model_manager_m3.checked == true)) && ((doc.ca_model_manager.value.length == 0) || (doc.ca_model_manager.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_model_navigator.value.length > 0) {
		if (validValues(doc.ca_model_navigator.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_model_navigator.value != 0) {
				isProductSelected = true
				if ((doc.ca_model_navigator_m1.checked == false) && (doc.ca_model_navigator_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_model_navigator_m1.checked == true) || (doc.ca_model_navigator_m3.checked == true)) && ((doc.ca_model_navigator.value.length == 0) || (doc.ca_model_navigator.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_process_modeler.value.length > 0) {
		if (validValues(doc.ca_process_modeler.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_process_modeler.value != 0) {
				isProductSelected = true
				if ((doc.ca_process_modeler_m1.checked == false) && (doc.ca_process_modeler_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_process_modeler_m1.checked == true) || (doc.ca_process_modeler_m3.checked == true)) && ((doc.ca_process_modeler.value.length == 0) || (doc.ca_process_modeler.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_data_model_val.value.length > 0) {
		if (validValues(doc.ca_data_model_val.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_data_model_val.value != 0) {
				isProductSelected = true
				if ((doc.ca_data_model_val_m1.checked == false) && (doc.ca_data_model_val_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_data_model_val_m1.checked == true) || (doc.ca_data_model_val_m3.checked == true)) && ((doc.ca_data_model_val.value.length == 0) || (doc.ca_data_model_val.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_saphir_option.value.length > 0) {
		if (validValues(doc.ca_saphir_option.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_saphir_option.value != 0) {
				isProductSelected = true
				if ((doc.ca_saphir_option_m1.checked == false) && (doc.ca_saphir_option_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_saphir_option_m1.checked == true) || (doc.ca_saphir_option_m3.checked == true)) && ((doc.ca_saphir_option.value.length == 0) || (doc.ca_saphir_option.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_high_availability.value.length > 0) {
		if (validValues(doc.ca_high_availability.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_high_availability.value != 0) {
				isProductSelected = true
				if ((doc.ca_high_availability_m1.checked == false) && (doc.ca_high_availability_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_high_availability_m1.checked == true) || (doc.ca_high_availability_m3.checked == true)) && ((doc.ca_high_availability.value.length == 0) || (doc.ca_high_availability.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_replication.value.length > 0) {
		if (validValues(doc.ca_replication.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_replication.value != 0) {
				isProductSelected = true
				if ((doc.ca_replication_m1.checked == false) && (doc.ca_replication_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_replication_m1.checked == true) || (doc.ca_replication_m3.checked == true)) && ((doc.ca_replication.value.length == 0) || (doc.ca_replication.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.ca_arcserve.value.length > 0) {
		if (validValues(doc.ca_arcserve.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.ca_arcserve.value != 0) {
				isProductSelected = true
				if ((doc.ca_arcserve_m1.checked == false) && (doc.ca_arcserve_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.ca_arcserve_m1.checked == true) || (doc.ca_arcserve_m3.checked == true)) && ((doc.ca_arcserve.value.length == 0) || (doc.ca_arcserve.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.exeros_xprofiler.value.length > 0) {
		if (validValues(doc.exeros_xprofiler.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.exeros_xprofiler.value != 0) {
				isProductSelected = true
				if ((doc.exeros_xprofiler_m1.checked == false) && (doc.exeros_xprofiler_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.exeros_xprofiler_m1.checked == true) || (doc.exeros_xprofiler_m3.checked == true)) && ((doc.exeros_xprofiler.value.length == 0) || (doc.exeros_xprofiler.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.exeros_usb.value.length > 0) {
		if (validValues(doc.exeros_usb.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.exeros_usb.value != 0) {
				isProductSelected = true
				if ((doc.exeros_usb_m1.checked == false) && (doc.exeros_usb_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.exeros_usb_m1.checked == true) || (doc.exeros_usb_m3.checked == true)) && ((doc.exeros_usb.value.length == 0) || (doc.exeros_usb.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.exeros_trans_analyzer.value.length > 0) {
		if (validValues(doc.exeros_trans_analyzer.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.exeros_trans_analyzer.value != 0) {
				isProductSelected = true
				if ((doc.exeros_trans_analyzer_m1.checked == false) && (doc.exeros_trans_analyzer_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}


	if (((doc.exeros_trans_analyzer_m1.checked == true) || (doc.exeros_trans_analyzer_m3.checked == true)) && ((doc.exeros_trans_analyzer.value.length == 0) || (doc.exeros_trans_analyzer.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if (doc.exeros_validator.value.length > 0) {
		if (validValues(doc.exeros_validator.value,"0123456789") == false) {
			errorTxt = errorTxt + "Invalid format: <strong>Quantity</strong> must be numeric<br>"
		} else {
			if (doc.exeros_validator.value != 0) {
				isProductSelected = true
				if ((doc.exeros_validator_m1.checked == false) && (doc.exeros_validator_m3.checked == false)) {
					errorTxt = errorTxt + "Enter required field: You must select a <strong>Maintenance</strong> option if you enter a Quantity<br>"
				}
			}
		}
	}

	if (isProductSelected == false) {
		errorTxt = errorTxt + "Enter required field: You must enter a <strong>Quantity</strong> for atleast 1 product<br>"
	}


	if (((doc.exeros_validator_m1.checked == true) || (doc.exeros_validator_m3.checked == true)) && ((doc.exeros_validator.value.length == 0) || (doc.exeros_validator.value == 0))) {
		errorTxt = errorTxt + "Enter required field: You cannot select a <strong>Maintenance</strong> option if you do not enter a Quantity<br>"
	}

	
	if ((doc.services_interest[0].checked == false) && (doc.services_interest[1].checked == false)) {
		errorTxt = errorTxt + "Enter required field: <strong>Are you interested in software integration services?</strong><br>"
	}
	
	if (errorTxt == "") {
		document.getElementById("errorMsgs").style.visibility = "hidden";
		doc.submit();
	} else {
		document.getElementById("errorMsgs").innerHTML = "<strong><font color='red'>FORM ERRORS:</font></strong><br><br>" + errorTxt;
		document.getElementById("errorMsgs").style.visibility = "visible";
	}
}

function validateWebcastRegistration(doc) {
	var errorTxt;
	errorTxt = "";
	
	if (doc.first_name.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>First Name</strong><br>"
	}
	if (doc.last_name.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Last Name</strong><br>"
	}
	if (doc.email.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Email Addr</strong><br>"
	}
	
	if (errorTxt == "") {
		document.getElementById("errorMsgs").style.visibility = "hidden";
		doc.submit();
	} else {
		document.getElementById("errorMsgs").innerHTML = "<strong><font color='red'>FORM ERRORS:</font></strong><br><br>" + errorTxt;
		document.getElementById("errorMsgs").style.visibility = "visible";
	}
}

function validateRequestMaterials(doc) {
	var errorTxt;
	errorTxt = "";
	emailFld = doc.email.value;
	atsignLoc = emailFld.indexOf("@")
	dotLoc = emailFld.lastIndexOf(".")
	
	if (doc.first_name.value.length < 1) {
		errorTxt = errorTxt + "Enter required field: <strong>First Name</strong><br>"
	}
	if (doc.last_name.value.length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>Last Name</strong><br>"
	}
	if (doc.company.value.length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>Company</strong><br>"
	}
	if (doc.addr1.value.length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>Address 1</strong><br>"
	}
	if (doc.city.value.length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>City</strong><br>"
	}
	if (doc.state.selectedIndex == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>State</strong><br>"
	}
	
	if (doc.zip.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Zip</strong><br>"
	} else if (validValues(doc.zip.value,"0123456789-") == false) {
		errorTxt = errorTxt + "Invalid format: <strong>Zip</strong> contains invalid values<br>"
	} else if (doc.zip.value.length < 5) {
		errorTxt = errorTxt + "Invalid format: <strong>Zip</strong> must be atleast 5 numbers in length<br>"
	}
	
	if (doc.email.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Email Addr</strong><br>"
	} else if (atsignLoc == -1) {  
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // At sign not present
	} else if ((emailFld.charAt(atsignLoc - 1) == "") || (emailFld.charAt(atsignLoc - 1) == " ")) {   
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // There is not a character in front of the at sign
	} else if ((emailFld.charAt(atsignLoc + 1) == "") || (emailFld.charAt(atsignLoc + 1) == " ")) {   
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // There is not a character behind at sign
	} else if (dotLoc == -1) {
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // No dot present
	} else if ((emailFld.charAt(dotLoc - 1) == "") || (emailFld.charAt(dotLoc - 1) == " ")) {   
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // There is not a character in front of the dot
	} else if ((emailFld.charAt(dotLoc + 1) == "") || (emailFld.charAt(dotLoc + 1) == " ")) {   
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // There is not a character behind the dot
	} else if (atsignLoc > dotLoc) {
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // Dot is not behind the at sign
	}	
	
	if (doc.phone.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Phone</strong><br>"
	} else if (validValues(doc.phone.value,"0123456789-() .") == false) {
		errorTxt = errorTxt + "Invalid format: <strong>Phone</strong> contains invalid values<br>"
	} else if (doc.phone.value.length < 10) {
		errorTxt = errorTxt + "Invalid format: <strong>Phone</strong> must be atleast 10 numbers in length<br>"
	}
	
	if (errorTxt == "") {
		document.getElementById("errorMsgs").style.visibility = "hidden";
		doc.submit();
	} else {
		document.getElementById("errorMsgs").innerHTML = "<strong><font color='red'>FORM ERRORS:</font></strong><br><br>" + errorTxt;
		document.getElementById("errorMsgs").style.visibility = "visible";
	}
}






















function validateDemoRequest(doc) {
	var errorTxt;
	errorTxt = "";
	emailFld = doc.email.value;
	atsignLoc = emailFld.indexOf("@")
	dotLoc = emailFld.lastIndexOf(".")
	
	var first_name = doc.first_name.value
	if (first_name.trim().length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>First Name</strong><br>"
	}
	
	var last_name = doc.last_name.value
	if (last_name.trim().length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>Last Name</strong><br>"
	}
	
	var company = doc.company.value
	if (company.trim().length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>Company</strong><br>"
	}
	
	var addr1 = doc.addr1.value
	if (addr1.trim().length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>Address 1</strong><br>"
	}
	
	var city = doc.city.value
	if (city.trim().length < 2) {
		errorTxt = errorTxt + "Enter required field: <strong>City</strong><br>"
	}
	
	if (doc.state.selectedIndex == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>State</strong><br>"
	}


	if (doc.zip.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Zip</strong><br>"
	} else if (validValues(doc.zip.value,"0123456789-") == false) {
		errorTxt = errorTxt + "Invalid format: <strong>Zip</strong> contains invalid values<br>"
	} else if (doc.zip.value.length < 5) {
		errorTxt = errorTxt + "Invalid format: <strong>Zip</strong> must be atleast 5 numbers in length<br>"
	}
	
	
	if (doc.email.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Email Addr</strong><br>"
	} else if (atsignLoc == -1) {  
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // At sign not present
	} else if ((emailFld.charAt(atsignLoc - 1) == "") || (emailFld.charAt(atsignLoc - 1) == " ")) {   
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // There is not a character in front of the at sign
	} else if ((emailFld.charAt(atsignLoc + 1) == "") || (emailFld.charAt(atsignLoc + 1) == " ")) {   
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // There is not a character behind at sign
	} else if (dotLoc == -1) {
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // No dot present
	} else if ((emailFld.charAt(dotLoc - 1) == "") || (emailFld.charAt(dotLoc - 1) == " ")) {   
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // There is not a character in front of the dot
	} else if ((emailFld.charAt(dotLoc + 1) == "") || (emailFld.charAt(dotLoc + 1) == " ")) {   
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // There is not a character behind the dot
	} else if (atsignLoc > dotLoc) {
		errorTxt = errorTxt + "Invalid format: You must enter a valid <strong>Email Addr</strong><br>"  // Dot is not behind the at sign
	}	

	
	var phone = doc.phone.value
	if (doc.phone.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Phone</strong><br>"
	} else if (validValues(doc.phone.value,"0123456789-() .") == false) {
		errorTxt = errorTxt + "Invalid format: <strong>Phone</strong> contains invalid values<br>"
	} else if (phone.trim().length < 10) {
		errorTxt = errorTxt + "Invalid format: <strong>Phone</strong> must be atleast 10 numbers in length<br>"
	}


	if ((doc.ca_modeling_suite.checked == false) && 
		(doc.ca_data_modeler.checked == false) &&
		(doc.ca_data_profiler.checked == false) &&
		(doc.ca_model_manager.checked == false) &&
		(doc.ca_model_navigator.checked == false) &&
		(doc.ca_process_modeler.checked == false) &&
		(doc.ca_data_model_val.checked == false) &&
		(doc.ca_saphir_option.checked == false) &&
		(doc.ca_high_availability.checked == false) &&
		(doc.ca_replication.checked == false) &&
		(doc.ca_arcserve.checked == false) &&
		(doc.exeros_xprofiler.checked == false) &&
		(doc.exeros_usb.checked == false) &&
		(doc.exeros_trans_analyzer.checked == false) &&
		(doc.exeros_validator.checked == false) &&
		(doc.dm_sos.checked == false)) {
			errorTxt = errorTxt + "Enter required field: You must select atleast 1 <strong>Product</strong> to demonstrate<br>"
	}


	if (doc.demo_date.value.length == 0) {
		errorTxt = errorTxt + "Enter required field: <strong>Desired date of demonstration</strong><br>"
	} else if (validValues(doc.demo_date.value,"0123456789/") == false) {
		errorTxt = errorTxt + "Invalid format: <strong>Desired date of demonstration</strong> contains invalid values<br>"
	} else if (doc.demo_date.value.length < 10) {
		errorTxt = errorTxt + "Invalid format: <strong>Desired date of demonstration</strong> must be atleast 10 characters in length<br>"
	}
	
	if (doc.participants.value.length < 1) {
		errorTxt = errorTxt + "Enter required field: <strong>Number of participants</strong><br>"
	} else if (validValues(doc.participants.value,"0123456789") == false) {
		errorTxt = errorTxt + "Invalid format: <strong>Number of participants</strong> must be numeric<br>"
	} else if (doc.participants.value < 1) {
		errorTxt = errorTxt + "Invalid format: <strong>Number of participants</strong> must be atleast 1<br>"
	}

	var intended_use = doc.intended_use.value
	if (intended_use.trim().length < 1) {
		errorTxt = errorTxt + "Enter required field: <strong>Please describe the intended use of the software</strong><br>"
	}
	
	if (errorTxt == "") {
		document.getElementById("errorMsgs").style.visibility = "hidden";
		doc.submit();
	} else {
		document.getElementById("errorMsgs").innerHTML = "<strong><font color='red'>FORM ERRORS:</font></strong><br><br>" + errorTxt;
		document.getElementById("errorMsgs").style.visibility = "visible";
	}
}
