function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function validateASI() {
    if (document.req_cat.casi.value !="" && document.req_cat.casi.value.length != 6) {
        alert('ASI Number entered is not valid. Please re-enter.');
 				document.req_cat.casi.focus();
        return false;
    }

    var valid="0123456789"

    for (var i=0; i<6; i++) {
        if (document.req_cat.casi.value !="" && (valid.indexOf(document.req_cat.casi.value.charAt(i)) < 0)) {
            alert('ASI Number entered is not valid. Please re-enter.');
						document.req_cat.casi.focus();
            return false;
        }
    }

    return true;
}

function validateABC() {
    if (document.req_cat.ccust.value !="" && document.req_cat.ccust.value.length != 6) {
        alert('Aura Badge Customer ID entered is not valid. Please try again.');
				document.req_cat.ccust.focus();
        return false;
    }

    var valid="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"  
    for (var i=0; i<2; i++) {
        if (valid.indexOf(document.req_cat.ccust.value.charAt(i)) < 0){
            alert('Aura Badge Customer ID entered is not valid. Please try again.');
				    document.req_cat.ccust.focus();
            return false;
        }
				}
				
		var valid2="0123456789"
    for (var i=2; i<6; i++) {
        if (valid2.indexOf(document.req_cat.ccust.value.charAt(i)) < 0){
            alert('Aura Badge Customer ID entered is not valid. Please try again.');
						document.req_cat.ccust.focus();
            return false;
        }
				}

				      
    return true;
}

function checkFields() {
missinginfo = "";
if ((document.req_cat.cname.value == "") || (document.req_cat.cname.value == "1")) {
missinginfo += "\n     *  Name";
}
if ((document.req_cat.ccompany.value == "") || (document.req_cat.ccompany.value == "1")) {
missinginfo += "\n     *  Company";
}

if ((document.req_cat.caddress.value == "")  || (document.req_cat.caddress.value == "1"))  {
missinginfo += "\n     *  Address";
}
if ((document.req_cat.ccity.value == "")  || (document.req_cat.ccity.value == "1")) {
missinginfo += "\n     *  City";
}
if ((document.req_cat.cstate.value == "-")   || (document.req_cat.cstate.value == "1")) {
missinginfo += "\n     *  State";
}
if ((document.req_cat.czip.value == "")  || (document.req_cat.czip.value == "1")) {
missinginfo += "\n     *  Zip Code";
}
if (document.req_cat.cemail.value != "" && 
((document.req_cat.cemail.value.indexOf('@') == -1) || (document.req_cat.cemail.value.indexOf('.') == -1))) {
missinginfo += "\n     *  Valid Email Address";

}
if (document.req_cat.casi.value == "" && 
document.req_cat.ccust.value == "") {
missinginfo += "\n     *  ASI Number or Aura Badge Customer ID";
}

if (document.req_cat.qty_campaign.value == 0 && document.req_cat.qty_catalog.value == 0) {
missinginfo += "\n     *  Quantity for at Least One Item";
}

if (missinginfo != "") {
missinginfo = "The following information is required:\n" +
missinginfo + "\n" + "\nPlease enter this information and submit again.";
document.req_cat.cname.focus();
alert(missinginfo);
return false;
}


else return true;
}

