function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function checkStr(str){
	var result = true;
	validate = new String(str);
	re = /<|>|&/g;
	if (validate.search(re)>-1){
		alert("Sorry, special characters are not allowed.");
		result=false;
	}
	return result;
}

function checkDownForm(form) {
	if (document.proddown.firstname.value == ""){
		alert("Please fill in your first name after clicking <OK>.")
		document.proddown.firstname.focus();
		return false
	}	
	if (document.proddown.lastname.value == "") {
		alert("Please fill in your last name after clicking <OK>.")
		document.proddown.lastname.focus();
		return false
	}
	if (document.proddown.company.value == "") {
		alert("Please fill in your company name after clicking <OK>.")
		document.proddown.company.focus();
		return false
	}
	if (document.proddown.email.value == "" ||	document.proddown.email.value.indexOf("@") + "" == "-1" || 	document.proddown.email.value.indexOf(".") + "" == "-1") {
		alert("Please fill in a valid email address after clicking <OK>.")
		document.proddown.email.focus();
		return false
	}
	if (document.proddown.code.value == "") {
		alert("Please fill in your area code or country code after clicking <OK>.")
		document.proddown.code.focus();
		return false
	}
	if (document.proddown.phone.value == "") {
		alert("Please fill in your phone number after clicking <OK>.")
		document.proddown.phone.focus();
		return false
	}
	if (document.proddown.product.value == ""){
		alert("Please select what version you need a password for after clicking <OK>.");
		document.proddown.product.focus();
		return false
	}
	if (document.proddown.promptedby.value == ""){
		alert("Please select what brought you to our site after clicking <OK>.");
		document.proddown.promptedby.focus();
		return false
	}
	if (!checkStr(document.proddown.problem.value)){
		document.proddown.problem.value="";
		document.proddown.problem.focus();
		return (false);
	}

	return true
}

function checkGoogleForm(form) {
	if (document.proddown.firstname.value == ""){
		alert("Please fill in your first name after clicking <OK>.")
		document.proddown.firstname.focus();
		return false
	}	
	if (document.proddown.lastname.value == "") {
		alert("Please fill in your last name after clicking <OK>.")
		document.proddown.lastname.focus();
		return false
	}
	if (document.proddown.company.value == "") {
		alert("Please fill in your company name after clicking <OK>.")
		document.proddown.company.focus();
		return false
	}
	if (document.proddown.email.value == "" ||	document.proddown.email.value.indexOf("@") + "" == "-1" || 	document.proddown.email.value.indexOf(".") + "" == "-1") {
		alert("Please fill in a valid email address after clicking <OK>.")
		document.proddown.email.focus();
		return false
	}
	if (document.proddown.code.value == "") {
		alert("Please fill in your area code or country code after clicking <OK>.")
		document.proddown.code.focus();
		return false
	}
	if (document.proddown.phone.value == "") {
		alert("Please fill in your phone number after clicking <OK>.")
		document.proddown.phone.focus();
		return false
	}
	if (!checkStr(document.proddown.problem.value)){
		document.proddown.problem.value="";
		document.proddown.problem.focus();
		return (false);
	}

	return true
}

function checkInfoForm(form) {
	if (document.proddown.firstname.value == ""){
		alert("Please fill in your first name after clicking <OK>.")
		document.proddown.firstname.focus();
		return false
	}	
	if (document.proddown.lastname.value == "") {
		alert("Please fill in your last name after clicking <OK>.")
		document.proddown.lastname.focus();
		return false
	}
	if (document.proddown.company.value == "") {
		alert("Please fill in your company name after clicking <OK>.")
		document.proddown.company.focus();
		return false
	}
	if (document.proddown.email.value == "" ||	document.proddown.email.value.indexOf("@") + "" == "-1" || 	document.proddown.email.value.indexOf(".") + "" == "-1") {
		alert("Please fill in a valid email address after clicking <OK>.")
		document.proddown.email.focus();
		return false
	}
	if (document.proddown.code.value == "") {
		alert("Please fill in your area code or country code after clicking <OK>.")
		document.proddown.code.focus();
		return false
	}
	if (document.proddown.phone.value == "") {
		alert("Please fill in your phone number after clicking <OK>.")
		document.proddown.phone.focus();
		return false
	}
	if (document.proddown.promptedby.options[0].selected){
		alert("Please select what prompted you to visit our Website after clicking <OK>.")
		document.proddown.promptedby.focus();
		return false
	}
	if (!checkStr(document.proddown.problem.value)){
		document.proddown.problem.value="";
		document.proddown.problem.focus();
		return (false);
	}
	
	return true
}

function checkReqForm(form) {
	if (document.proddown.firstname.value == ""){
		alert("Please fill in your first name after clicking <OK>.")
		document.proddown.firstname.focus();
		return false
	}	
	if (document.proddown.lastname.value == "") {
		alert("Please fill in your last name after clicking <OK>.")
		document.proddown.lastname.focus();
		return false
	}
	if (document.proddown.company.value == "") {
		alert("Please fill in your company name after clicking <OK>.")
		document.proddown.company.focus();
		return false
	}
	if (document.proddown.email.value == "" ||	document.proddown.email.value.indexOf("@") + "" == "-1" || 	document.proddown.email.value.indexOf(".") + "" == "-1") {
		alert("Please fill in a valid email address after clicking <OK>.")
		document.proddown.email.focus();
		return false
	}
	if (document.proddown.code.value == "") {
		alert("Please fill in your area code or country code after clicking <OK>.")
		document.proddown.code.focus();
		return false
	}
	if (document.proddown.phone.value == "") {
		alert("Please fill in your phone number after clicking <OK>.")
		document.proddown.phone.focus();
		return false
	}
	if (document.proddown.product.value == ""){
		alert("Please select what product you would like information on after clicking <OK>.");
		document.proddown.product.focus();
		return false
	}
	if (document.proddown.promptedby.value == ""){
		alert("Please select what brought you to our site after clicking <OK>.");
		document.proddown.promptedby.focus();
		return false
	}
	if (!checkStr(document.proddown.problem.value)){
		document.proddown.problem.value="";
		document.proddown.problem.focus();
		return (false);
	}
	return true
}

function checkSpecificDemoForm(form) {
	if (document.proddown.firstname.value == ""){
		alert("Please fill in your first name after clicking <OK>.")
		document.proddown.firstname.focus();
		return false
	}	
	if (document.proddown.lastname.value == "") {
		alert("Please fill in your last name after clicking <OK>.")
		document.proddown.lastname.focus();
		return false
	}
	if (document.proddown.company.value == "") {
		alert("Please fill in your company name after clicking <OK>.")
		document.proddown.company.focus();
		return false
	}
	if (document.proddown.email.value == "" ||	document.proddown.email.value.indexOf("@") + "" == "-1" || 	document.proddown.email.value.indexOf(".") + "" == "-1") {
		alert("Please fill in a valid email address after clicking <OK>.")
		document.proddown.email.focus();
		return false
	}
	if (document.proddown.code.value == "") {
		alert("Please fill in your area code or country code after clicking <OK>.")
		document.proddown.code.focus();
		return false
	}
	if (document.proddown.phone.value == "") {
		alert("Please fill in your phone number after clicking <OK>.")
		document.proddown.phone.focus();
		return false
	}
	if (!checkStr(document.proddown.problem.value)){
		document.proddown.problem.value="";
		document.proddown.problem.focus();
		return (false);
	}
	return true
}

function checkSupportForm(form) {
	if (document.proddown.name.value == ""){
		alert("Please fill in your name after clicking <OK>.")
		document.proddown.name.focus();
		return false
	}	
	if (document.proddown.company.value == "") {
		alert("Please fill in your company name after clicking <OK>.")
		document.proddown.company.focus();
		return false
	}
	if (document.proddown.email.value == "" ||	document.proddown.email.value.indexOf("@") + "" == "-1" || 	document.proddown.email.value.indexOf(".") + "" == "-1") {
		alert("Please fill in a valid email address after clicking <OK>.")
		document.proddown.email.focus();
		return false
	}
	if (document.proddown.city.value == "") {
		alert("Please fill in your city after clicking <OK>.")
		document.proddown.city.focus();
		return false
	}
	if (document.proddown.state.value == "") {
		alert("Please fill in your state after clicking <OK>.")
		document.proddown.state.focus();
		return false
	}
	if (document.proddown.code.value == "") {
		alert("Please fill in your area code or country code after clicking <OK>.")
		document.proddown.code.focus();
		return false
	}
	if (document.proddown.phone.value == "") {
		alert("Please fill in your phone number after clicking <OK>.")
		document.proddown.phone.focus();
		return false
	}
	if (document.proddown.product.value == "") {
		alert("Please fill in Axiom product and version you are using after clicking <OK>.")
		document.proddown.product.focus();
		return false
	}
	if (document.proddown.problem.value == "") {
		alert("Please enter a description of the problem you're having after clicking <OK>.")
		document.proddown.problem.focus();
		return false
	}
	if (!checkStr(document.proddown.problem.value)){
		document.proddown.problem.value="";
		document.proddown.problem.focus();
		return (false);
	}
	return true
}