//Verify an input string based on a primitive number type
function mVerifyNumber(str,useMin,minVal,useMax,maxVal,precision) { 
   //Check to see that we indeed have a number (integer or decimal)
   var re;
   if (precision == 0) re = new RegExp("^[0-9]+$");
   else re = new RegExp("^(([0-9]+)|([0-9]*\\.[0-9]+))$");
   if (!re.test(str)) return false;

   //Check precision, and parse the number accordingly
   if (precision == 0) val = parseInt(str);
   else val = parseFloat(str);

   //Make sure the number is in the valid range
   if (useMin && val < minVal) return false;
   if (useMax && val > maxVal) return false;
   return true;
}

function mParseNumber(str,precision) { 
   //Check to see that we indeed have a number (integer or decimal)
   var re = new RegExp("([0-9]+)|([0-9]*\\.[0-9]+)");
   if (!re.test(str)) return 0;

   //Check precision, and parse the number accordingly
   if (precision == 0) return parseInt(str);
   else return parseFloat(str);
}

function mVerifyString(str,minLen,maxLen,ic,verification) { 
   //Check string length is in the valid range
   if (str.length > maxLen && maxLen != -1) return false;
   if (str.length < minLen && minLen != -1) return false;
   //Check for invalid characters in the string
   for (i=0;i<ic.length;i++) 
       for (j = 0; j<str.length; j++)
           if (ic.charAt(i) == str.charAt(j)) return false;

   if (verification == "") return true;
   //If there is a regular expression specifying the string format
   //make sure the string is valid
   var isok = false;
   var re = new RegExp(verification);
   return re.test(str);
}

//Verify an input string based on a primitive date type
function mVerifyDate(str,useMin,minUseCurrent,minVal,useMax,maxUseCurrent,maxVal) { 
   var date,minDate,maxDate,month,day,year,daymax;
   var s = new String(str);

   //Test to see that the string is of the format ##/##/##
   var re = new RegExp("^[0-9]{2}/[0-9]{2}/[0-9]{4}$");
   if (!re.test(str)) return false;

   //Interpret the string as MM/DD/YY
   month = s.substring(0,2);
   day = s.substring(3,5);
   year = s.substring(6,10);

   //Make sure this is a valid date
   if (month < 1 || month > 12) return false;
   if ((month % 2 == 1 && month < 8) ||
       (month % 2 == 0 && month > 7) ) daymax = 31;
   else daymax = 30;
   if (month == 2) daymax = ( year % 4 == 0 ? 29 : 28 );
   if (day < 1 || day > daymax) return false;
   date = new Date(year,month-1,day);

   //Test to see that the date is in the valid range
   if (useMin) {
       if (!minUseCurrent) { 
           minDate = minVal; 
       } else minDate = new Date();
      minDate.setMinutes(0);
      minDate.setHours(0);
      minDate.setSeconds(0);
      if (date < minDate) return false;
  }

   if (useMax) { 
       if (maxUseCurrent) { 
           maxDate = maxVal; 
       } else maxDate = new Date();
       maxDate.setMinutes(59);
       maxDate.setHours(23);
       maxDate.setSeconds(59);
       if (date > maxDate) return false; 
  }

   return true;
}

function mParseDate(str) {
   var date,month,day,year,daymax;
   var s = new String(str);

   //Test to see that the string is of the format ##/##/##
   var re = new RegExp("[0-9]{2}/[0-9]{2}/[0-9]{4}");
   if (!re.test(str)) return new Date();

   //Interpret the string as MM/DD/YY
   month = s.substring(0,2);
   day = s.substring(3,5);
   year = s.substring(6,10);
   //Make sure this is a valid date
   if (month < 1 || month > 12) return new Date();
   if ((month % 2 == 1 && month < 8) ||
       (month % 2 == 0 && month > 7) ) daymax = 31;
   else daymax = 30;
   if (month == 2) daymax = ( year % 4 == 0 ? 29 : 28 );
   if (day < 1 || day > daymax) return new Date();
   return new Date(year,month-1,day);
}

function replaceQuotes(str) {
    var s = new String(str);
    var out = "";
    if (s.indexOf("'") == -1) return str;
    while ( (i = s.indexOf("'")) != -1) {
        out = out + s.substring(0,i+1) + "'";
        s = s.substring(i+1,s.length);
    }
    out = out + s;
    return out;
}

function replaceDQuotes(str) {
    var s = new String(str);
    var out = "";
    if (s.indexOf("\"") == -1) return str;
    while ( (i = s.indexOf("\"")) != -1) {
        out = out + s.substring(0, i) + "\\\"";
        s = s.substring(i+1,s.length);
    }
    out = out + s;
    return out;
}

function replaceBackslash(str) {
    var s = new String(str);
    var out = "";
    if (s.indexOf("\\") == -1) return str;
    while ( (i = s.indexOf("\\")) != -1) {
        out = out + s.substring(0,i) + "\\\\";
        s = s.substring(i+1,s.length);
    }
    out = out + s;
    return out;
}

function padZero(str, desiredLen, left) {
    While (str.length < desiredLen)
        if (left) str = "0" + str;
        else str = str + "0";
    return str;
}

var oldItem = null;
function j2(i,f,d) {
    i.className = 'regtextCaption2'
    if (d==null) d = document;
    d.location = "#" + i.id;
    if (!f.disabled) f.focus();
    if (oldItem != null && oldItem != i)
        oldItem.className = "regtextCaption"

    oldItem = i;
    return false;
}

function jTrim(x) {
  while (x.charAt(0) == '\t' || x.charAt(0) == '\n' || x.charAt(0) == ' ')
  x = x.substring(1,x.length);
  while (x.charAt(x.length-1) == '\t' || x.charAt(x.length-1) == '\n' || x.charAt(x.length-1) == ' ')
  x = x.substring(1,x.length);
  return x;
}

function verifyDealerName(f) { 
   if (!mVerifyString(f.value, 1, 50, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Dealer Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyIndexType(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, false, 0, 0)) {
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseIndexType(str) { mParseNumber(str, 0); }

function verifyDateType(f) { 
   if (!mVerifyDate(f.value, false, false, new Date(), false, false, new Date())) {
       alert("Invalid Date");
       if (!f.disabled) f.focus();
       return false;
   }
return true;
}
function parseDateType(str) { return mParseDate(str); }

function verifyPriceLevelType1(str) { return true; }
function verifyOrganizationEnumType(str) { return true; }
function verifyPriceLevel(pLevel1, pLevel2, pLevel3, pLevel4, pLevel5) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (!pLevel1.checked && !pLevel2.checked && !pLevel3.checked && !pLevel4.checked && !pLevel5.checked) {
    _rVal = false;
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("Please check at least one inventory price range.");
    return false;
}

function createPriceLevel(
pLevel1pLevel2pLevel3pLevel4pLevel5) { 
 //Create the object

 var tObj = new Object();
 var argv = createPriceLevel.arguments;
 tObj.pLevel1 = pLevel1;
 tObj.pLevel2 = pLevel2;
 tObj.pLevel3 = pLevel3;
 tObj.pLevel4 = pLevel4;
 tObj.pLevel5 = pLevel5;
 return tObj;
}


function verifyLongName(f) { 
   if (!mVerifyString(f.value, -1, 30, "<>", "")) {
       alert("Invalid Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyYearNumberType(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 1800, true, 2004, 0)) {
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseYearNumberType(str) { mParseNumber(str, 0); }

function verifySignUpDate(f) { 
   if (!mVerifyDate(f.value, false, false, new Date(), false, false, new Date())) {
       alert("Invalid Sign Up Date");
       if (!f.disabled) f.focus();
       return false;
   }
return true;
}
function parseSignUpDate(str) { return mParseDate(str); }

function verifyPriceLevelType2(str) { return true; }
function verifyOldOrganizationEnumType(str) { return true; }
function verifyStateCountryZip(state, country, zip) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (country.value === "") {
    alert("You must select a country.");
    country.focus();
    return false;
}

if ((state.value === "" || state.value == "Not Applicable" || state.value == "1") && (country.value == "1" || country.value == "37" || country.value == "United States" || country.value == "Canada")) {
    alert("You must enter a state or a province if the country is the US or Canada.");
    state.focus();
    return false;
}

if (country.value != "1" && country.value !="37" && country.value != "Canada" && country.value != "United States" && (state.value != "1" && state.value !== "" && state.value != "Not Applicable")) {
    alert("You cannot enter a state with a country that is not the US or Canada.");
    state.focus();
    return false;
}
if (country.value == "1" || country.value == "United States") {
    re = new RegExp("^[0-9]{5}$");
    if (!re.test(zip.value)) {
        alert("US zip code must be comprised of 5 digits.");
        zip.focus();
        return false;
    }
}

///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createStateCountryZip(
statecountryzip) { 
 //Create the object

 var tObj = new Object();
 var argv = createStateCountryZip.arguments;
 tObj.state = state;
 tObj.country = country;
 tObj.zip = zip;
 return tObj;
}


function verifyShortName(f) { 
   if (!mVerifyString(f.value, 1, 25, "<>", "[\\w]{1,}")) {
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyEstablishmentYear(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, true, 2030, 0)) {
       alert("Invalid Establishment Year");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseEstablishmentYear(str) { mParseNumber(str, 0); }

function verifyEndDate(f) { 
   if (!mVerifyDate(f.value, true, true, new Date(), false, false, new Date())) {
       alert("End Date must be set to a future date.");
       if (!f.disabled) f.focus();
       return false;
   }
return true;
}
function parseEndDate(str) { return mParseDate(str); }

function verifyPriceLevelType3(str) { return true; }
function verifySalesRepresentativeType(str) { return true; }
function verifyPrimaryPhoneNumber(countryCode, areaCode, phoneNumber, extension, country) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (countryCode.value === "" || areaCode.value === "" || phoneNumber.value === "") {
    alert("Invalid phone number.");
    return false;
}

if (country.value != "1" && country.value != "37" && country.value != "United States" && country.value != "Canada" && countryCode == "001") {
    alert("The Country Code for a country other than the United States or Canada cannot be set to 001");
    countryCode.focus();
    return false;
}

if ((country.value == "1" || country.value == "United States") && countryCode.value != "001") {
    alert("The Country Code for the United States must be set to 001");
    countryCode.focus();
    return false;
}

if (areaCode.value.length < 3 && (country.value == "1" || country.value=="United States")) {
    alert("Please enter a 3-digit area code.");
    areaCode.focus();
    return false;
}

if (country.value == "1" || country.value == "United States") {
    //re = new RegExp("^[0-9]{3}\-[0-9]{4}$");
    re = new RegExp("^[0-9]{3}[\-|\s]?[0-9]{4}$");
    if (!re.test(phoneNumber.value)) {
        alert("You must enter a phone number of the form ###-####.");
        return false;
    }
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createPrimaryPhoneNumber(
countryCodeareaCodephoneNumberextensioncountry) { 
 //Create the object

 var tObj = new Object();
 var argv = createPrimaryPhoneNumber.arguments;
 tObj.countryCode = countryCode;
 tObj.areaCode = areaCode;
 tObj.phoneNumber = phoneNumber;
 tObj.extension = extension;
 tObj.country = country;
 return tObj;
}


function verifyStreetAddress1(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Street Address");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyNumEmployees(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, false, 0, 0)) {
       alert("Invalid Employee Count");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseNumEmployees(str) { mParseNumber(str, 0); }

function verifyPriceLevelType4(str) { return true; }
function verifyOldStateType(str) { return true; }
function verifyEffectiveDate(mydt) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
var ndt = new Date();
if (ndt.getDate() != 1) {
    if (ndt.getMonth() == 11) {
        ndt.setMonth(0);
        ndt.setYear(ndt.getYear()+1);
    } else {
       ndt.setMonth(ndt.getMonth() + 1);
    }
    ndt.setDate(1);
}

var dt = parseDateType(mydt.value);

ndt.setHours(0); ndt.setMinutes(0); ndt.setSeconds(0);
dt.setHours(23); dt.setMinutes(59); dt.setSeconds(59);

if (dt.getDate() != 1) {
    alert("You must enter a date which occurs on the first of a month.");
    return false;
}

if (dt < ndt) {
    alert("The date must be on or after " + ndt);
    return false;
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("Invalid Effective Date");
    return false;
}

function createEffectiveDate(
mydt) { 
 //Create the object

 var tObj = new Object();
 var argv = createEffectiveDate.arguments;
 tObj.mydt = mydt;
 return tObj;
}


function verifyStreetAddress2(f) { 
   if (!mVerifyString(f.value, -1, 30, "<>", "")) {
       alert("Invalid Street Address");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyCategorySortOrder(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 1, true, 6, 0)) {
       alert("The Order must be between 1 and 6.");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseCategorySortOrder(str) { mParseNumber(str, 0); }

function verifyPriceLevelType5(str) { return true; }
function verifyStateType(str) { return true; }
function verifyDifferentCategories(doc, numCategories) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
var argv = verifyDifferentCategories.arguments;
var catArray = new Object();
for (i=2;i<=numCategories+1;i++) {
     if (typeof(catArray[argv[i].value]) == 'undefined') {
         catArray[argv[i].value] = 1;
     } else {
         if (argv[i].value==="") {
            catArray[""]++;
         } else {
             alert("You must select distinct categories.");
             return j2(argv[i+numCategories],argv[i],doc);
         }
     }
}

if (catArray[""] == numCategories) {
    alert("You must select at least one category in order to proceed.");
    return j2(argv[2+numCategories],argv[2],doc);
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createDifferentCategories(
docnumCategories) { 
 //Create the object

 var tObj = new Object();
 var argv = createDifferentCategories.arguments;
 tObj.doc = doc;
 tObj.numCategories = numCategories;
 return tObj;
}


function verifyZipCode(f) { 
   if (!mVerifyString(f.value, 1, 10, "<>", "[\\w]{1,}")) {
       alert("Invalid Zip Code");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPriority(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 1, false, 0, 0)) {
       alert("Invalid Priority");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parsePriority(str) { mParseNumber(str, 0); }

function verifyCountryType(str) { return true; }
function verifyOrganizationType(orgEnum, orgOther) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if ((orgEnum.value == "7" || orgEnum.value == "Other") && orgOther.value === "") {
    alert("If you choose to enter another organization type, you must enter a textual value.");
    return false;
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("Invalid Organization Type");
    return false;
}

function createOrganizationType(
orgEnumorgOther) { 
 //Create the object

 var tObj = new Object();
 var argv = createOrganizationType.arguments;
 tObj.orgEnum = orgEnum;
 tObj.orgOther = orgOther;
 return tObj;
}


function verifyCountryCode(f) { 
   if (!mVerifyString(f.value, -1, 4, "", "^[0-9]*$")) {
       alert("Invalid Country Code");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyNumCategories(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 1, false, 0, 0)) {
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseNumCategories(str) { mParseNumber(str, 0); }

function verifyListingPlanType(str) { return true; }
function verifyOldOrganizationType(orgEnum, orgOther) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (orgEnum == "Other" && orgOther === "") {
    alert("If you choose to enter another organization type, you must enter a textual value.");
    return false;
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createOldOrganizationType(
orgEnumorgOther) { 
 //Create the object

 var tObj = new Object();
 var argv = createOldOrganizationType.arguments;
 tObj.orgEnum = orgEnum;
 tObj.orgOther = orgOther;
 return tObj;
}


function verifyAreaCode(f) { 
   if (!mVerifyString(f.value, -1, 3, "", "^[0-9]*$")) {
       alert("Invalid Area Code");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPrice(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, false, 0, false, 0, 2)) {
       alert("Invalid Price");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parsePrice(str) { mParseNumber(str, 2); }

function verifyDiscountLevelType(str) { return true; }
function verifyAlternatePhoneNumber(countryCode, areaCode, phoneNumber, extension, country) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (areaCode.value === '' && phoneNumber.value === '') { return true; }

if (country.value != "1" && country.value != "37" && country.value != "United States" && country.value != "Canada" && countryCode == "001") {
    alert("The Country Code for a country other than the United States or Canada cannot be set to 001");
    countryCode.focus();
    return false;
}


if ((country.value == "1" || country.value == "United States") && countryCode.value != "001") {
    alert("The Country Code for the United States must be set to 001");
    countryCode.focus();
    return false;
}

if (areaCode.value.length < 3 && (country.value == "1" || country.value=="United States")) {
    alert("Please enter a 3-digit area code.");
    areaCode.focus();
    return false;
}

if (country.value == "1" || country.value == "United States") {
    re = new RegExp("^[0-9]{3}\-[0-9]{4}$");
    if (!re.test(phoneNumber.value)) {
        alert("You must enter a phone number of the form ###-####.");
        return false;
    }
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createAlternatePhoneNumber(
countryCodeareaCodephoneNumberextensioncountry) { 
 //Create the object

 var tObj = new Object();
 var argv = createAlternatePhoneNumber.arguments;
 tObj.countryCode = countryCode;
 tObj.areaCode = areaCode;
 tObj.phoneNumber = phoneNumber;
 tObj.extension = extension;
 tObj.country = country;
 return tObj;
}


function verifyPhoneNumber(f) { 
   if (!mVerifyString(f.value, -1, 10, "", "^[0-9\\.\\-]*$")) {
       alert("Invalid Phone Number");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyInventoryItems(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, false, 0, 0)) {
       alert("Invalid Inventory Items");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseInventoryItems(str) { mParseNumber(str, 0); }

function verifyReferringDealerType(str) { return true; }
function verifyFaxNumber(countryCode, areaCode, phoneNumber, country) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (areaCode.value === '' && phoneNumber.value === '') { return true; }

if (country.value != "1" && country.value != "37" && country.value != "United States" && country.value != "Canada" && countryCode == "001") {
    alert("The Country Code for a country other than the United States or Canada cannot be set to 001");
    countryCode.focus();
    return false;
}


if ((country.value == "1" || country.value == "United States") && countryCode.value != "001") {
    alert("The Country Code for the United States must be set to 001");
    countryCode.focus();
    return false;
}

if (areaCode.value.length < 3 && (country.value == "1" || country.value=="United States")) {
    alert("Please enter a 3-digit area code.");
    areaCode.focus();
    return false;
}

if (country.value == "1" || country.value == "United States") {
    re = new RegExp("^[0-9]{3}\-[0-9]{4}$");
    if (!re.test(phoneNumber.value)) {
        alert("You must enter a phone number of the form ###-####.");
        return false;
    }
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createFaxNumber(
countryCodeareaCodephoneNumbercountry) { 
 //Create the object

 var tObj = new Object();
 var argv = createFaxNumber.arguments;
 tObj.countryCode = countryCode;
 tObj.areaCode = areaCode;
 tObj.phoneNumber = phoneNumber;
 tObj.country = country;
 return tObj;
}


function verifyPhoneNumberExtension(f) { 
   if (!mVerifyString(f.value, -1, 6, "<>", "")) {
       alert("Invalid Phone Number Extension");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyDimension(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, false, 0, 2)) {
       alert("Invalid Dimension");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseDimension(str) { mParseNumber(str, 2); }

function verifyAssetLevelType(str) { return true; }
function verifyVPasswd(passwd, vPasswd) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (passwd.value != vPasswd.value) {
    alert("The passwords entered do not match.");
    passwd.focus();
    return false;
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createVPasswd(
passwdvPasswd) { 
 //Create the object

 var tObj = new Object();
 var argv = createVPasswd.arguments;
 tObj.passwd = passwd;
 tObj.vPasswd = vPasswd;
 return tObj;
}


function verifyEmail(f) { 
   if (!mVerifyString(f.value, 5, 50, "<>", "^([0-9A-Za-z]+[_\\.\\-]?)*[0-9A-Za-z]+@[0-9A-Za-z]+([_\\.\\-]?[0-9A-Za-z]+)*\\.[a-zA-Z]{2,3}$")) {
       alert("Invalid E-mail Address");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyQuantity(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, false, 0, 0)) {
       alert("Invalid Quantity");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseQuantity(str) { mParseNumber(str, 0); }

function verifyCategoryType(str) { return true; }
function verifySubscriberSignUpType(email, emailVerify, firstName, middleInitial, lastName, streetAddress1, streetAddress2, city, stateCountryZip, primaryPhone, altPhone, userType, businessName, businessType, annualPurchase, whereFind) { 
 _rVal = true;
 if (_rVal) if (!verifyPrimaryPhoneNumber(stateCountryZip["state"], stateCountryZip["country"], stateCountryZip["zip"])) _rVal = false;
 if (_rVal) if (!verifyAlternatePhoneNumber(primaryPhone["countryCode"], primaryPhone["areaCode"], primaryPhone["phoneNumber"], primaryPhone["extension"], primaryPhone["country"])) _rVal = false;
 if (_rVal) if (!verifyUserTypeType(altPhone["countryCode"], altPhone["areaCode"], altPhone["phoneNumber"], altPhone["extension"], altPhone["country"])) _rVal = false;
 if (_rVal) if (!verify(whereFind["enumWhere"], whereFind["txtWhere"])) _rVal = false;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (email != emailVerify) {
    alert("The email and email verification field must match!");
    return false;
}
if (userType == "0") {
    alert("You must specify a user type.");
    return false;
}

if (businessType == "0") {
    alert("You must specify your business type.");
    return false;
}
if (whereFind.enumWhere === "") {
    alert("You must specify through where you found the website.");
    return false;
}

///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createSubscriberSignUpType(
emailemailVerifyfirstNamemiddleInitiallastNamestreetAddress1streetAddress2citystateCountryZipprimaryPhonealtPhoneuserTypebusinessNamebusinessTypeannualPurchasewhereFind) { 
 //Create the object

 var tObj = new Object();
 var argv = createSubscriberSignUpType.arguments;
 tObj.email = email;
 tObj.emailVerify = emailVerify;
 tObj.firstName = firstName;
 tObj.middleInitial = middleInitial;
 tObj.lastName = lastName;
 tObj.streetAddress1 = streetAddress1;
 tObj.streetAddress2 = streetAddress2;
 tObj.city = city;
 tObj.stateCountryZip = stateCountryZip;
 tObj.primaryPhone = primaryPhone;
 tObj.altPhone = altPhone;
 tObj.userType = userType;
 tObj.businessName = businessName;
 tObj.businessType = businessType;
 tObj.annualPurchase = annualPurchase;
 tObj.whereFind = whereFind;
 return tObj;
}


function verifyDealerProfile(f) { 
   if (!mVerifyString(f.value, 1, 1000, "<>", "[\\w]{1,}")) {
       alert("Invalid Dealer Profile");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyAmount(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, false, 0, false, 0, 2)) {
       alert("Invalid Amount");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseAmount(str) { mParseNumber(str, 2); }

function verifyUserTypeType(str) { return true; }
function verifyWhereFind(enumWhere, txtWhere) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (enumWhere.value === "") {
    _rVal = false;
}
if (!verifyFullNameType(txtWhere)) {
   alert("Invalid entry.");
   return false;
}
if (enumWhere.value == "Other" && txtWhere.value === "") {
    _rVal = false;
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("You must specify where you found our website.");
    return false;
}

function createWhereFind(
enumWheretxtWhere) { 
 //Create the object

 var tObj = new Object();
 var argv = createWhereFind.arguments;
 tObj.enumWhere = enumWhere;
 tObj.txtWhere = txtWhere;
 return tObj;
}


function verifyCity(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid City");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyNumValue(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, false, 0, 0)) {
       alert("Invalid Value");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseNumValue(str) { mParseNumber(str, 0); }

function verifyWhereFindEnumType(str) { return true; }
function verifyServiceProviderSignUpType(subscriberInfo, hoursOfOperation, yearEst, profile) { 
 _rVal = true;
 if (_rVal) if (!verifyFullNameType(subscriberInfo["email"], subscriberInfo["emailVerify"], subscriberInfo["firstName"], subscriberInfo["middleInitial"], subscriberInfo["lastName"], subscriberInfo["streetAddress1"], subscriberInfo["streetAddress2"], subscriberInfo["city"], subscriberInfo["stateCountryZip"], subscriberInfo["primaryPhone"], subscriberInfo["altPhone"], subscriberInfo["userType"], subscriberInfo["businessName"], subscriberInfo["businessType"], subscriberInfo["annualPurchase"], subscriberInfo["whereFind"])) _rVal = false;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (subscriberInfo.businessName === "") {
    alert("You must enter your business name.");
    return false;
}

if (profile.length > 200) {
    alert("Your profile must not exceed 200 characters.");
    return false;
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createServiceProviderSignUpType(
subscriberInfohoursOfOperationyearEstprofile) { 
 //Create the object

 var tObj = new Object();
 var argv = createServiceProviderSignUpType.arguments;
 tObj.subscriberInfo = subscriberInfo;
 tObj.hoursOfOperation = hoursOfOperation;
 tObj.yearEst = yearEst;
 tObj.profile = profile;
 return tObj;
}


function verifyOtherOrganizationType(f) { 
   if (!mVerifyString(f.value, -1, 25, "<>", "")) {
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyBaseCommissionRate(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, true, 100, 0)) {
       alert("Base Commission Rate must be between 0 and 100.");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseBaseCommissionRate(str) { mParseNumber(str, 0); }

function verifyPurchaseLevelType(str) { return true; }
function verifyAdminRepresentative(adminLvl, rep) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (adminLvl.value == '4' && rep.value == '0') {_rVal = false;}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("You must choose a representative.");
    return false;
}

function createAdminRepresentative(
adminLvlrep) { 
 //Create the object

 var tObj = new Object();
 var argv = createAdminRepresentative.arguments;
 tObj.adminLvl = adminLvl;
 tObj.rep = rep;
 return tObj;
}


function verifyFullNameType(f) { 
   if (!mVerifyString(f.value, -1, 50, "<>", "")) {
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyRecurringCommissionRate(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, true, 100, 0)) {
       alert("Recurring Commission Rate must be between 0 and 100.");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseRecurringCommissionRate(str) { mParseNumber(str, 0); }

function verifyAdminLevel(str) { return true; }
function verifyFreeCategories(category1, category2) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (category1.value === "" || category2.value === "" || category1.value == category2.value) {_rVal = false;}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("You must select two distinct categories.");
    return false;
}

function createFreeCategories(
category1category2) { 
 //Create the object

 var tObj = new Object();
 var argv = createFreeCategories.arguments;
 tObj.category1 = category1;
 tObj.category2 = category2;
 return tObj;
}


function verifyWebSite(f) { 
   if (!mVerifyString(f.value, -1, 100, "<>", "")) {
       alert("Invalid Web Site");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyUpfrontBase(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, true, 100, 0)) {
       alert("Upfront Base must be between 0 and 100.");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseUpfrontBase(str) { mParseNumber(str, 0); }

function verifyPaymentOption(str) { return true; }
function verifyDateRange(sDate, eDate) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
var sDt = parseDateType(sDate.value);
var eDt = parseDateType(eDate.value);

if (sDt.getTime() > eDt.getTime()) {_rVal = false;}

///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("The start date must precede end date.");
    return false;
}

function createDateRange(
sDateeDate) { 
 //Create the object

 var tObj = new Object();
 var argv = createDateRange.arguments;
 tObj.sDate = sDate;
 tObj.eDate = eDate;
 return tObj;
}


function verifytxtStateType(f) { 
   if (!mVerifyString(f.value, -1, 30, "<>", "")) {
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyUpfrontDuration(f) { 
   if (!f.disabled) f.value = jTrim(f.value);
   if (!mVerifyNumber(f.value, true, 0, true, 12, 0)) {
       alert("Upfront Duration must be between 0 and 12.");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}
function parseUpfrontDuration(str) { mParseNumber(str, 0); }

function verifyVEmail(email, vEmail) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (email.value != vEmail.value) {
    alert("The email addresses entered do not match.");
    email.focus();
    return false;
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createVEmail(
emailvEmail) { 
 //Create the object

 var tObj = new Object();
 var argv = createVEmail.arguments;
 tObj.email = email;
 tObj.vEmail = vEmail;
 return tObj;
}


function verifyMiddleInitial(f) { 
   if (!mVerifyString(f.value, -1, 1, "<>", "")) {
       alert("Invalid Middle Initial");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPropertySortOrder(propertyName, propertyOrder, alertID, doc) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if (propertyName.value === "" && propertyOrder.value !== "") {
    alert("You cannot associate an order with a qualifier (type, style, etc.) without selecting it.");
    return j2(alertID, propertyOrder,doc);
}

if (propertyName.value !== "") {
    if (!verifyCategorySortOrder(propertyOrder)) {
        return j2(alertID, propertyOrder,doc);
    }
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    return false;
}

function createPropertySortOrder(
propertyNamepropertyOrderalertIDdoc) { 
 //Create the object

 var tObj = new Object();
 var argv = createPropertySortOrder.arguments;
 tObj.propertyName = propertyName;
 tObj.propertyOrder = propertyOrder;
 tObj.alertID = alertID;
 tObj.doc = doc;
 return tObj;
}


function verifyTaxID(f) { 
   if (!mVerifyString(f.value, -1, 15, "<>", "")) {
       alert("Invalid Tax ID");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPropertySortCollection(dummy) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
var i;
var argv = verifyPropertySortCollection.arguments;
var exp = new Array();
var n = argv.length / 2;

for (i=0;i<n;i++) {
     exp[i+1] = 0;
}

for (i=0;i<n;i++) {
     if(argv[i].value !== '') {
         if (exp[parseInt(argv[i+n].value)] == 1) {_rVal = false;}
         exp[parseInt(argv[i+n].value)] = 1;
     }
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("You cannot set two category qualifiers (type, style, etc.), to the same order value.");
    return false;
}

function createPropertySortCollection(
dummy) { 
 //Create the object

 var tObj = new Object();
 var argv = createPropertySortCollection.arguments;
 tObj.dummy = dummy;
 return tObj;
}


function verifyPasswd(f) { 
   if (!mVerifyString(f.value, 4, 8, "<>", "[\\w]{1,}")) {
       alert("Invalid Password");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPaymentAmount(amt, lstFlag) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if ((amt.value)<0 && ((lstFlag.value)=='R'||(lstFlag.value)=='C')) { _rVal = false; }
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("For the credits or refunds the amount must be greater than or equal to zero.");
    return false;
}

function createPaymentAmount(
amtlstFlag) { 
 //Create the object

 var tObj = new Object();
 var argv = createPaymentAmount.arguments;
 tObj.amt = amt;
 tObj.lstFlag = lstFlag;
 return tObj;
}


function verifyAlternateContactPerson(f) { 
   if (!mVerifyString(f.value, -1, 50, "<>", "")) {
       alert("Invalid Alternate Contact Person");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyNumRange(sNum, eNum) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
if ((sNum.value/1) > (1+eNum.value/1) ) {_rVal = false;}

///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("The minimum must be less than the maximum.");
    return false;
}

function createNumRange(
sNumeNum) { 
 //Create the object

 var tObj = new Object();
 var argv = createNumRange.arguments;
 tObj.sNum = sNum;
 tObj.eNum = eNum;
 return tObj;
}


function verifyBusinessName(f) { 
   if (!mVerifyString(f.value, 1, 50, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Business Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyCheckboxes(chkList) { 
 _rVal = true;
if (_rVal) { 
///////////////////////////////////////////////////////////////////////////////////
//Customized script entered in type definition
///////////////////////////////////////////////////////////////////////////////////
_rVal = false;
for (i=0;i<chkList.length;i++) {
    if(chkList[i].checked) {_rVal = true;}
}
///////////////////////////////////////////////////////////////////////////////////
//End of customized script
///////////////////////////////////////////////////////////////////////////////////
}

    if (_rVal) return true;
    alert("You must choose at least one option.");
    return false;
}

function createCheckboxes(
chkList) { 
 //Create the object

 var tObj = new Object();
 var argv = createCheckboxes.arguments;
 tObj.chkList = chkList;
 return tObj;
}


function verifyHoursOfOperation(f) { 
   if (!mVerifyString(f.value, -1, 50, "<>", "")) {
       alert("Invalid Hours of Operation");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifySubscriberProfile(f) { 
   if (!mVerifyString(f.value, 1, 400, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Profile");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyFirstName(f) { 
   if (!mVerifyString(f.value, 1, 25, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid First Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyLastName(f) { 
   if (!mVerifyString(f.value, 1, 25, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Last Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyOptBusinessName(f) { 
   if (!mVerifyString(f.value, 1, 25, "<>", "")) {
       alert("Invalid Business Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyUserName(f) { 
   if (!mVerifyString(f.value, 1, 50, "<>", "[\\w]{1,}")) {
       alert("Invalid User Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyEnumValueExists(f) { 
   if (!mVerifyString(f.value, 1, -1, "", "")) {
       alert("You must specify a value");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyMinLongName(f) { 
   if (!mVerifyString(f.value, 5, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Minimum Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyMDBFileName(f) { 
   if (!mVerifyString(f.value, -1, -1, "<>", "\\.[mM][dD][bB]$")) {
       alert("Invalid Access Database Filename");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyBrandName(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[\\w]{1,}")) {
       alert("Invalid Brand Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyDBUsername(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[\\w]{1,}")) {
       alert("Invalid User Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyDBPassword(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[\\w]{1,}")) {
       alert("Invalid Password");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyIPAddress(f) { 
   if (!mVerifyString(f.value, 8, -1, "!@#$%^&*()<>{}[]\\|,", "[\\d]{1,3}[.][\\d]{1,3}[.][\\d]{1,3}[.][\\d]{1,3}$|^(localhost)$")) {
       alert("Invalid IP Address");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyMDFFileName(f) { 
   if (!mVerifyString(f.value, -1, -1, "<>", "\\.[mM][dD][fF]$")) {
       alert("Invalid Database Filename");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyCountryName(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Country Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyEra(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[\\w]{1,}")) {
       alert("Invalid Era");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyEstateName(f) { 
   if (!mVerifyString(f.value, 1, 50, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Estate Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyLocation(f) { 
   if (!mVerifyString(f.value, -1, 50, "<>", "")) {
       alert("Invalid Location");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyHelpTitle(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Help Title");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyHelpPages(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[\\w]{1,}")) {
       alert("Invalid Help Page(s)");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyMaterial(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Material Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyMegaCategory(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Mega Category Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifySectionTitle(f) { 
   if (!mVerifyString(f.value, 1, 50, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Title");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyShareName(f) { 
   if (!mVerifyString(f.value, 1, 25, "<>", "[\\w]{1,}")) {
       alert("Invalid Permission Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyRegion(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Region Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyResourceGroupName(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Resource Group Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifySalesRegion(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Sales Region");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyStyle(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Style Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyStateName(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid State Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifySuperCategoryName(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Super Category Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyTypeName(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Type Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifySubTitlePage(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[\\w]{1,}")) {
       alert("Invalid Sub Title URL");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPlanName(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Listing Plan Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPlanDescription(f) { 
   if (!mVerifyString(f.value, -1, 35, "<>", "")) {
       alert("Invalid Listing Plan Description");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyItemTitle(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Item Title");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyItemDescription(f) { 
   if (!mVerifyString(f.value, 1, 400, "<>", "[\\w]{1,}")) {
       alert("Invalid Description");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyItemCondition(f) { 
   if (!mVerifyString(f.value, -1, 50, "<>", "")) {
       alert("Invalid Item Condition");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPromotionName(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[\\w]{1,}")) {
       alert("Invalid Promotion Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyEventName(f) { 
   if (!mVerifyString(f.value, 1, 50, "<>", "[\\w]{1,}")) {
       alert("Invalid Event Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyDBName(f) { 
   if (!mVerifyString(f.value, 2, -1, "!@#$%^&*()<>;'[]{}\\|", "[\\w]{1,}")) {
       alert("Invalid Database Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyPortNumber(f) { 
   if (!mVerifyString(f.value, 4, 4, "", "[\\d]{4}")) {
       alert("Invalid Port Number");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifygeneral50(f) { 
   if (!mVerifyString(f.value, 1, 50, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Values");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifygeneral30(f) { 
   if (!mVerifyString(f.value, 1, 30, "<>", "[a-zA-Z]{1,}")) {
       alert("Invalid Values");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifygeneralPullDown(f) { 
   if (!mVerifyString(f.value, 1, -1, "", "")) {
       alert("No selection made");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifygeneralPic(f) { 
   if (!mVerifyString(f.value, 1, -1, "<>", "[\\w]*\\.(([jJ][pP][eE]?[gG])|([gG][iI][fF])|([sS][wW][fF])|([bB][mM][pP]))")) {
       alert("Invalid Pic");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyNoVerification(f) { 
   if (!mVerifyString(f.value, -1, -1, "", "")) {
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifysubsBiz(f) { 
   if (!mVerifyString(f.value, 1, 50, "<>", "")) {
       alert("Invalid Business Name");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

function verifyTicker(f) { 
   if (!mVerifyString(f.value, 1, 400, "", "[a-zA-Z]{1,}")) {
       alert("Invalid Ticker");
       if (!f.disabled) f.focus();
       return false;
   }
  return true;
}

