// Z擾
function getAddress()
{
    var zip = document.getElementById("zip").value;

    if (zip.length != 7) return;

    xml_doc = new ActiveXObject("Microsoft.XMLDOM");
    xml_doc.async = false;
    xml_doc.load("../lib/zip/getAddress.php?zip=" + zip);
    if (xml_doc.documentElement.hasChildNodes()) {
        var val = xml_doc.documentElement.childNodes.item(0).text;
        if (val == "") return;
        document.getElementById("pref").value    = val;
        document.getElementById("address").value = xml_doc.documentElement.childNodes.item(1).text + xml_doc.documentElement.childNodes.item(2).text;
    }
}
