function login() {
  var id = $F('id');
  var pwd = $F('pwd');
  var noid = $F('noid');
  if (noid == null) {noid = 0};

  var url = "/scripts/auth/check";
  var parm = "id=" + id + "&pwd=" + pwd + "&noid=" + noid;

  new Ajax.Request(
      url, {
           method: "post",
           parameters: parm,
           onSuccess : function(response) {
             var txt = response.responseText;
             if (txt == "") {
               location.href = "/scripts/index/";
             } else {
               alert(txt);
             }
           },
           onFailure : ajaxShowErrorMsg
      }
  );

  function ajaxShowErrorMsg() {
      alert('login() : エラー発生');
  }
}
