function createXMLHttpRequest(cbFunc){
	var XMLhttpObject = null;
	try{
		XMLhttpObject = new XMLHttpRequest();
	}catch(e){
		try{
			XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){
				return null;
			}
		}
	}
	if (XMLhttpObject){
		XMLhttpObject.onreadystatechange = cbFunc;
	}
	return XMLhttpObject;
}
// document.getElementById
function $(tagId)
{
	return document.getElementById(tagId);
}

function displayData(){
	if ((httpObj.readyState == 4) && (httpObj.status == 200)){
		//$("result").innerHTML = "";
	}else{
		//$("result").innerHTML = "<b>Loading...</b>";
	}
}



function wget(serviceid, wordid){
	httpObj = createXMLHttpRequest(displayData);

	//var url = 'http://www.nttpc.co.jp/test_yougo/serviceCounter.php?wordid=4&serviceid=4';
	//本番
	var url = "http://www.nttpc.co.jp/yougo/serviceCounter.php?serviceid=" +serviceid +"&wordid=" +wordid;
	//テスト
	//var url = "http://www.nttpc.co.jp/test_yougo/serviceCounter.php?serviceid=" +serviceid +"&wordid=" +wordid;
	
	if(httpObj){
		httpObj.open("POST", url, false);
		httpObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		httpObj.send(null);
		//alert(httpObj.responseText);
		return httpObj.responseText;
		
		//findText = document.ajaxForm.requestText.value; // 検索する文字
	}
	
	//alert(url);
	//XMLhttpObject.open("GET", url, true);
	//XMLhttpObject.send(null);
	//return XMLhttpObject.responseText;

}