function test(key){
    alert(key);
}


function getDomainCheck3wd(key) {
    pageURL = 'http://nippon-kigyo.jp/3moji/3moji_check.html?key=' + key;
    xmlhttp = createXMLHttp();
    if (xmlhttp){
        xmlhttp.onreadystatechange = setPageData;
        xmlhttp.open('GET', pageURL);
        xmlhttp.send(null);
        return 'OK';
    }
    else{
        alert("XMLHttpRequest¸s");
        return 'NG';
    }
}


function setPageData(){
    if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
//        document.getElementById("disp").innerHTML = xmlhttp.responseText;
        val = xmlhttp.responseText;
        writeResult(val);
    }
}

function createXMLHttp(){
    try {
        return new ActiveXObject ("Microsoft.XMLHTTP");
    }
    catch(e){
        try {
            return new XMLHttpRequest();
        }
        catch(e) {
            return null;
        }
    }
    return null;
}


function writeResult(val){
    document.getElementById('check_result').innerHTML = val;
}

