﻿
function sendRequest(strPostCode, btcID, trg) {
  if (strPostCode != ''){
    var args = "PostCode=" + strPostCode;
    new Ajax.Request
    (
      "/postcheck.aspx"
      ,{
         "method": "post",
         "parameters": args,
         onSuccess: function(res)
         {
           var jsonData = eval("(" + res.responseText + ")")
           if(jsonData.status=="0")
           {
             showMessage(btcID, trg, jsonData.result);
           }else{
             showMessage(btcID, trg, jsonData.result);
           }
         },
         onFailure: function(res)
         {
           alert('エリア検索ができませんでした');
         },
         onException: function (res)
         {
           alert('エリア検索ができませんでした');
         }
       }
    );
  }
}

function showMessage(btcID, trg, msg)
{
  showTooltip(btcID, trg, msg);
}

