﻿// JScript 文件

var xmlHttp = null;
var responseString = "";
var responseCityString = "";
var responseUserString = "";

if (window.XMLHttpRequest)
{ // Mozilla, Safari, ...
    xmlHttp = new XMLHttpRequest();
} 
else if (window.ActiveXObject) 
{ // IE
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}


function sendMessage( url, opFunction )
{
    xmlHttp.open("GET",url,false);
    xmlHttp.onreadystatechange = opFunction;
　　xmlHttp.send(null);
}

function updatePage()
{

　　if (xmlHttp.readyState == 4) {

　　var response = xmlHttp.responseText;
    
　　document.getElementById("zipCode").value = response;
    
　　}
　　//xmlHttp = null;
}

function getExistsUser()
{
    if(xmlHttp.readyState == 4)
    {
        responseUserString = xmlHttp.responseText;
    }
}

function getVilidateCode()
{
    
    if(xmlHttp.readyState ==4 )
    {
        responseString = xmlHttp.responseText;
        //alert(responseString);
    }    
}

function getCity()
{
    if(xmlHttp.readyState == 4)
    {
        responseCityString = xmlHttp.responseText;
    }
}
