
function loadTextFile(nst,cid,cz) {
	nst -= 0;	// nstを数値型にします
	for (i = nst; i <= 5; i = i +1){
		rsd = "resultData"+i;
		$(rsd).innerHTML = '';
		document.getElementById(rsd).style.display = "none";
	}
	if (cid == "") {
		rsd = "resultData"+nst;
		$(rsd).innerHTML = '';
		reuren;
	}
	httpObj = createXMLHttpRequest(displayData);
	httpObj.onreadystatechange = function(){ var hoge = arguments[0]; return function() { displayData(hoge) }; }(nst);
	if (httpObj) {
		httpObj.open("GET","op.php?n="+nst+"&cid="+cid+"&cz="+cz,true);
		httpObj.send(null);
	}
}
function displayData(nst) {

	rsd = "resultData"+nst;
	document.getElementById(rsd).style.display = "block"; 

	if (httpObj.readyState == 4) {
		try {
			statusCode[""+httpObj.status]();
		}catch(e){
			return;
		}

		//$("resultData").innerHTML = httpObj.responseText;
		//document.getElementById("resultData").innerText = httpObj.responseText;
	}else{
		document.getElementById("rsd").innerText = "Loading...";
	}


}

statusCode = new Array();
statusCode["200"] = function (){
	$(rsd).innerHTML = httpObj.responseText;
}
statusCode["401"] = function (){ document.getElementById(rsd).innerText = "認証失敗"; }
statusCode["403"] = function (){ document.getElementById(rsd).innerText = "アクセスが許可されてません"; }
statusCode["404"] = function (){ document.getElementById(rsd).innerText = "ファイルがありません"; }
statusCode["500"] = function (){ document.getElementById(rsd).innerText = "内部エラー"; }

function worddel() {
	if (document.getElementById('word').value == '検索ワードを入力') {
		document.getElementById('word').value = "";
		//document.kensaku.word.value = '';
		document.getElementById('word').style.color = "#000000";
	}
}
