<!--
  var idxLoopPick = 0;
  var idxForm = 0;
  var intMonthMin = 0;
  var intDayMin = 0;

  var frmSelectIdx = 0;
  var frmSelectLength = 0;
  var frmSelectVal = "";
  var frmSelectText = "";

  var strTemp = "";
  var strTempCardType = "";
  var strReturnVal = true;
  var strErrMessage = "";
  var strReturnMonthEdit = "";
  var strMonthMessage = "";
  var strReturnDayEdit = "";
  var strDayMessage = "";
  var strReturnYearEdit = "";
  var strYearMessage = "";
  var wRequest = "";

  function setSelectionLists()
   {
    findModel();
    findSubcode();
    findCreditCard();
    findAnnualMonth();
    findInsrMonth();
   }

  function resetFields()
   {
    wRequest = "Reset";
    initFields();
   }

  function setRetrieve()
   {
    wRequest = "Retrieve";
   }

  function MemberRenewalFieldEdits()
   {
    strErrMessage = "";
    strReturnVal = true;

    if (wRequest == "Reset")
     {
      wRequest = "";
      return false;
     }

    if (wRequest == "Retrieve")
     {
      editLoginPasswordFields();
     }
    else
     {
      UpdateEdits();
     }

    if (strReturnVal != true)
     {
      alert (strErrMessage);
     }

    return strReturnVal;
   }

  function initFields()
   {
    document.forms[idxForm].subcode.selectedIndex = 0;
    document.forms[idxForm].credcard.selectedIndex = 0;
    document.forms[idxForm].cardnum.value = "";
    document.forms[idxForm].expdate.value = "";
    document.forms[idxForm].lastnam.value = "";
    document.forms[idxForm].firstnam.value = "";
    document.forms[idxForm].middinit.value = "";
    document.forms[idxForm].company.value = "";
    document.forms[idxForm].streeta.value = "";
    document.forms[idxForm].streetb.value = "";
    document.forms[idxForm].city.value = "";
    document.forms[idxForm].state.value = "";
    document.forms[idxForm].zip.value = "";
    document.forms[idxForm].clemail.value = "";
    document.forms[idxForm].clvemail.value = "";
 //   document.forms[idxForm].wphone.value = "";
    document.forms[idxForm].hphone.value = "";
 //   document.forms[idxForm].passwrd1.value = "";
 //   document.forms[idxForm].passwrd2.value = "";
 //   document.forms[idxForm].secques.value = "";
 //   document.forms[idxForm].secansw.value = "";
    document.forms[idxForm].airbase.value = "";
    document.forms[idxForm].mooneyn.value = "";
    document.forms[idxForm].model.selectedIndex = 0;
    document.forms[idxForm].moonsern.value = "";
    document.forms[idxForm].othernum.value = "";
    document.forms[idxForm].othermod.value = "";
    document.forms[idxForm].annumo.selectedIndex = 0;
    document.forms[idxForm].annuyr.value = "";
    document.forms[idxForm].insrmo.selectedIndex = 0;
    document.forms[idxForm].insryr.value = "";
   }

  function UpdateEdits()
   {
    editUpdateRequest();

    if (strReturnVal != true)
     {
      return;
     }

    editLoginPasswordFields();
    editRestOfFields();

    if (strReturnVal == true)
     {
      strTemp = document.forms[idxForm].mooneyn.value;
      if (strTemp.substring(0,1) != "N" &&
          strTemp.substring(0,1) != "n")
       {
        if (confirm("Are you sure your Mooney Number does not begin with an N?"))
         {

         }
        else
         {
          strErrMessage = "The Submit request has been cancelled.";
          strReturnVal = false;
         }
       }
     }
   }

  function editLoginPasswordFields()
   {
    if (document.forms[idxForm].LoginId.value == null ||
        document.forms[idxForm].LoginId.value == "")
     {
      strReturnVal = false;
      strErrMessage += "Please provide your Member Id.\n";
     }

    if (document.forms[idxForm].LoginPassword.value == null ||
        document.forms[idxForm].LoginPassword.value == "")
     {
      strReturnVal = false;
      strErrMessage += "Please provide a Login Password.\n";
     }
   }

  function editRestOfFields()
   {
    if (document.forms[idxForm].credcard.selectedIndex > 0)
     {
      editCardFields();
     }

    if (document.forms[idxForm].clemail.value != null &&
        document.forms[idxForm].clemail.value != "")
     {
      if (document.forms[idxForm].clemail.value != document.forms[idxForm].clvemail.value)
       {
        strReturnVal = false;
        strErrMessage += "The Email Address entered is not the same as the Verify Email Address.\n";
       }
     }

    strReturnMonthEdit = true;
    strMonthMessage = "";
    intMonthMin = 0;
 //   editMonth(document.forms[idxForm].annumo.value);
    if (document.forms[idxForm].annumo.selectedIndex < 1)
     {
      strReturnVal = false;
      strErrMessage += "Please select the Month of your Annual Renewal.\n";
     }

    strReturnYearEdit = true;
    strYearMessage = "";
    editYear(document.forms[idxForm].annuyr.value);
    if (strReturnYearEdit == false)
     {
      strReturnVal = false;
      strErrMessage += "The Annual Date Year" + strYearMessage;
     }

    strReturnMonthEdit = true;
    strMonthMessage = "";
    intMonthMin = 0;
 //   editMonth(document.forms[idxForm].insrmo.value);
    if (document.forms[idxForm].insrmo.selectedIndex < 1)
     {
      strReturnVal = false;
      strErrMessage += "Please select the Month of your Insurance Renewal.\n";
     }

    strReturnYearEdit = true;
    strYearMessage = "";
    editYear(document.forms[idxForm].insryr.value);
    if (strReturnYearEdit == false)
     {
      strReturnVal = false;
      strErrMessage += "The Insurance Date Year" + strYearMessage;
     }
   }

  function editUpdateRequest()
   {
    if (document.forms[idxForm].subcode.selectedIndex < 1 &&
        document.forms[idxForm].credcard.selectedIndex < 1 &&
        document.forms[idxForm].cardnum.value == "" &&
        document.forms[idxForm].expdate.value == "" &&
        document.forms[idxForm].lastnam.value == "" &&
        document.forms[idxForm].firstnam.value == "" &&
        document.forms[idxForm].middinit.value == "" &&
        document.forms[idxForm].company.value == "" &&
        document.forms[idxForm].streeta.value == "" &&
        document.forms[idxForm].streetb.value == "" &&
        document.forms[idxForm].city.value == "" &&
        document.forms[idxForm].state.value == "" &&
        document.forms[idxForm].zip.value == "" &&
        document.forms[idxForm].clemail.value == "" &&
        document.forms[idxForm].hphone.value == "" &&
        document.forms[idxForm].airbase.value == "" &&
        document.forms[idxForm].mooneyn.value == "" &&
        document.forms[idxForm].model.selectedIndex < 1 &&
        document.forms[idxForm].moonsern.value == "" &&
        document.forms[idxForm].othernum.value == "" &&
        document.forms[idxForm].othermod.value == "" &&
        document.forms[idxForm].annumo.selectedIndex < 1 &&
        document.forms[idxForm].annuyr.value == "" &&
        document.forms[idxForm].insrmo.selectedIndex < 1 &&
        document.forms[idxForm].insryr.value == "")
       {
        strReturnVal = false;
        strErrMessage += "You have not entered information to use for an update.";
       }

   }

  function editCardFields()
   {
    strTemp = document.forms[idxForm].cardnum.value;
    frmSelectIdx = document.forms[idxForm].credcard.selectedIndex;
    strTempCardType = document.forms[idxForm].credcard.options[frmSelectIdx].text;
    if ((strTempCardType == "MasterCard" ||
        strTempCardType == "Visa") && (strTemp.length != 16))
     {
      strReturnVal = false;
      strErrMessage += "The Credit Card Number you entered is invalid.\n";
     }
    if ((strTempCardType == "American Express") && (strTemp.length != 15))
     {
      strReturnVal = false;
      strErrMessage += "The Credit Card Number you entered is invalid.\n";
     }

    if (document.forms[idxForm].expdate.value == null ||
        document.forms[idxForm].expdate.value == "")
     {
      strReturnVal = false;
      strErrMessage += "Please provide a Card Expiration Date.\n";
     }
   }

  function editMonth(parmMonth)
   {
    var inputMonth;
    
    inputMonth = parseInt(parmMonth);

    if (isNaN(inputMonth))
     {
      strReturnMonthEdit = false;
      strMonthMessage += " is a non-numeric value.\n";
     }
    else
     {
      if (inputMonth < intMonthMin || inputMonth > 12)
       {
        strReturnMonthEdit = false;
        strMonthMessage += " is a not between " + intMonthMin + " and 12.\n";
       }
     }
   }

  function editDay(parmDay)
   {
    var inputDay;
    
    inputDay = parseInt(parmDay);

    if (isNaN(inputDay))
     {
      strReturnDayEdit = false;
      strDayMessage += " is a non-numeric value.\n";
     }
    else
     {
      if (inputDay < intDayMin || inputDay > 31)
       {
        strReturnDayEdit = false;
        strDayMessage += " is a not between " + intDayMin + " and 31.\n";
       }
     }
   }

  function editYear(parmYear)
   {
    var inputYear;
    strTemp = parmYear;

    inputYear = parseInt(parmYear);

    if (isNaN(inputYear))
     {
      strReturnYearEdit = false;
      strYearMessage += " is a non-numeric value.\n";
     }
   }

  function findModel()
   {
    var PickListLen = document.forms[idxForm].model.length;
    idxLoopPick = 1;

    while (idxLoopPick < PickListLen)
     {
      if (document.forms[idxForm].model.options[idxLoopPick].value == document.forms[idxForm].holdmodel.value)
       {
        document.forms[idxForm].model.selectedIndex = idxLoopPick;
        return;
       }
      ++idxLoopPick;
     }
   }

  function findSubcode()
   {
    var PickListLen = document.forms[idxForm].subcode.length;
    idxLoopPick = 1;

    while (idxLoopPick < PickListLen)
     {
      if (document.forms[idxForm].subcode.options[idxLoopPick].text == document.forms[idxForm].holdsubcode.value)
       {
        document.forms[idxForm].subcode.selectedIndex = idxLoopPick;
        return;
       }
      ++idxLoopPick;
     }
   }

  function findCreditCard()
   {
    var PickListLen = document.forms[idxForm].credcard.length;
    idxLoopPick = 1;

    while (idxLoopPick < PickListLen)
     {
      if (document.forms[idxForm].credcard.options[idxLoopPick].value == document.forms[idxForm].holdcredcard.value)
       {
        document.forms[idxForm].credcard.selectedIndex = idxLoopPick;
        return;
       }
      ++idxLoopPick;
     }
   }

  function findAnnualMonth()
   {
    var PickListLen = document.forms[idxForm].annumo.length;
    idxLoopPick = 1;

    while (idxLoopPick < PickListLen)
     {
      if (document.forms[idxForm].annumo.options[idxLoopPick].value == document.forms[idxForm].holdannumo.value)
       {
        document.forms[idxForm].annumo.selectedIndex = idxLoopPick;
        return;
       }
      ++idxLoopPick;
     }
   }

  function findInsrMonth()
   {
    var PickListLen = document.forms[idxForm].insrmo.length;
    idxLoopPick = 1;

    while (idxLoopPick < PickListLen)
     {
      if (document.forms[idxForm].insrmo.options[idxLoopPick].value == document.forms[idxForm].holdinsrmm.value)
       {
        document.forms[idxForm].insrmo.selectedIndex = idxLoopPick;
        return;
       }
      ++idxLoopPick;
     }
   }

//-->
