if (document.all)
{     document.onkeydown = function ()
     {     var key_enter= 13; // 13 = Enter
          if (key_enter==event.keyCode)
          {
          event.keyCode=0;
          document.getElementById('LoginButton').click();
          return false;
          }
     }
}

      function submitenter(e){
       //alert("gg");
        var keycode;
        if (window.event) 
          keycode = window.event.keyCode;
        else 
          if (e) 
            keycode = e.which;
        else 
          return true;
        if (keycode == 13){
          document.getElementById('LoginButton').click();
          return false;
        }
        else
          return true;
      }

      function DoSignIn(){
        if (CheckSignInInputs()==1){
          return 1;
        }
      }

      function CheckSignInInputs(){
        if (document.GenLoginPage.weLogin.value==''){
          alert("User Name cannot be empty. Please try again.");
          document.GenLoginPage.weLogin.focus();
          return 1;
        }
        return 0;
      }

      function SendPwdMail(){
        if (CheckSignInInputs()==0){
          var iHeight = 200;
          var iWidth = 300;
          var intLeft = (screen.availWidth - iWidth)/2;
          var intTop = (screen.availHeight - iHeight)/2;
          var FeatureStr = "scrollbars=no, resizable=no, toolbar=no, menubar=no, statusbar=no, ";
          FeatureStr = FeatureStr + "width=" + iWidth + ", height=" + iHeight + ", top=" + intTop + ", left=" + intLeft;
          //alert(theurl+featurestr);
          var aForgotPassURL="ForgotPassAction?UserID=" + document.GenLoginPage.weLogin.value;
          window.open(aForgotPassURL, "ForgotPassWindow", FeatureStr);
        }
      }

      function ResendActivationEMail(){
        if (CheckSignInInputs()==0){
          var iHeight = 200;
          var iWidth = 300;
          var intLeft = (screen.availWidth - iWidth)/2;
          var intTop = (screen.availHeight - iHeight)/2;
          var FeatureStr = "scrollbars=no, resizable=no, toolbar=no, menubar=no, statusbar=no, ";
          FeatureStr = FeatureStr + "width=" + iWidth + ", height=" + iHeight + ", top=" + intTop + ", left=" + intLeft;
          //alert(theurl+featurestr);
          var aResendActivationURL="ResendActivation?UserID=" + document.GenLoginPage.weLogin.value;
          window.open(aResendActivationURL, "ResendActivationWindow", FeatureStr);
        }
      }

