

    function fIgnoreEnter() 
    {
      return !(window.event && window.event.keyCode == 13); 
    }



    function fValidate1(vHost, vChHost)
    {  

      var vId, vUrl, vParam
      var validRegExp = "^[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9]@[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9][\.][a-z0-9]{2,4}$";


      vId = document.fForm1.vId.value; 

      if (vId == "") 
      {
        alert("Please enter your E-Mail Address.");
        document.fForm1.vId.focus();
        return (false);
      }
      
      if (document.fForm1.vId.value.toLowerCase().search(validRegExp) == -1)
      {
        alert("Please enter a valid E-mail Address.");
        document.fForm1.vId.focus();
        return (false);
      }
  
      vUrl = "http://" + vHost + "/Ws/wsMMAH.asp";
      vParam = "vFunction=MMAH_SignIn&vCust=MMAH2782&vId=" + escape(document.fForm1.vId.value);
      vWs = WebService(vUrl, vParam);


      if (vWs == "error")
      {
        alert("We are unable to provide this service, please contact support.");
        return (false);
      }


      if (vWs == "invalid id")
      {
        alert("That Email Address is not on file. Please Enroll below.");
        document.fForm1.vId.focus();
        return (false);
      }

      vUrl = "http://" + vHost + "/Default.asp";
      vUrl += "?vCust=MMAH2782";
      vUrl += "&vId=" + vId;
      vUrl += "&vSource=http://" + vChHost + "/MMAH/EN/Default.asp";


      document.fForm1.action = vUrl;
      document.fForm1.submit();
    }
 



  function fValidate2(vHost, vChHost)
  {  
    var vCust, vId1, vId2, vUrl, vParam
    var validRegExp = "^[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9]@[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9][\.][a-z0-9]{2,4}$";

    vId1 = document.fForm2.vId1.value; 
    if (vId1 == "") 
    {
      alert("Please enter your E-mail Address.");
      document.fForm2.vId1.focus();
      return;
    }


    vId2 = document.fForm2.vId2.value; 
    if (vId2 == "") 
    {
      alert("Please re-enter your E-mail Address.");
      document.fForm2.vId2.focus();
      return;
    }


    if (document.fForm2.vId1.value.toLowerCase().search(validRegExp) == -1)
    {
      alert("Please enter a valid E-mail Address.");
      document.fForm2.vId1.focus();
      return (false);
    }


    if (document.fForm2.vId2.value.toLowerCase().search(validRegExp) == -1)
    {
      alert("Please re-enter a valid E-mail Address.");
      document.fForm2.vId2.focus();
      return (false);
    }


    if (vId1 != vId2)
    {
      alert("Please ensure both E-mail Addresses are the same.");
      document.fForm2.vId1.focus();
      return (false);
    }


/*

    var vFirstName = document.fForm2.vFirstName.value; 
    if (vFirstName == "") 
    {
      alert("Please enter your First Name.");
      document.fForm2.vFirstName.focus();
      return;
    }

    var vLastName = document.fForm2.vLastName.value; 
    if (vLastName == "") 
    {
      alert("Please enter your Last Name.");
      document.fForm2.vLastName.focus();
      return;
    }
*/

    var vGeographicArea = document.fForm2.vGeographicArea .value; 
    if (document.fForm2.vGeographicArea .selectedIndex < 1)
    {
      alert("Please select your Geographic Area.");
      document.fForm2.vGeographicArea .focus();
      return;
    }

    var vSector = document.fForm2.vSector.value; 
    if (document.fForm2.vSector.selectedIndex < 1)
    {
      alert("Please select your Sector.");
      document.fForm2.vSector.focus();
      return;
    }

    var vMunicipality = document.fForm2.vMunicipality.value; 

    vUrl = "http://" + vHost + "/Ws/wsMMAH.asp";
    vParam = "vFunction=MMAH_Enroll&vCust=" + escape(document.fForm2.vCust.value) + "&vId=" + escape(document.fForm2.vId1.value);
    vWs = WebService(vUrl, vParam);

    if (vWs == "error")
    {
      alert("We are unable to provide this service, please contact support.");
      return (false);
    }

    if (vWs == "invalid cust")
    {
      alert("The Account Id is invalid - please contact systems.");
      document.fForm2.vCust.focus();
      return;
    }

    if (vWs == "invalid id")
    {
      alert("That Email Address is already on file. If you are already enrolled, then please signin.");
      document.fForm2.vId1.focus();
      return;
    }


    vUrl = "http://" + vHost + "/Default.asp";
    vUrl += "?vCust=MMAH2782";
    vUrl += "&vId=" + vId1;
//  vUrl += "&vFirstName=" + vFirstName;
//  vUrl += "&vLastName=" + vLastName;
    vUrl += "&vEmail=" + vId1;
    vUrl += "&vMemo=" + vGeographicArea + "|" + vSector + "|" + vMunicipality;
    vUrl += "&vSource=http://" + vChHost + "/MMAH/EN/Default.asp";

//    alert(vUrl);

    document.fForm2.action = vUrl;
    document.fForm2.submit();
  }

