function hpnm_researchbp(name, kbn) {
	httpObj = hpnm_createXMLHttpRequest(hpnm_resultfunc);
	if(httpObj) {
		httpObj.open("GET","http://www.hapinemu.net/researchbp.php?ref="+encodeURI(document.referrer)+"&name="+encodeURI(name)+"&kbn="+kbn,true);
		httpObj.send(null);
	}
}

function hpnm_researchbp2(name) {
	httpObj = hpnm_createXMLHttpRequest(hpnm_resultfunc);
	if(httpObj) {
		httpObj.open("GET","http://www.hapinemu.net/researchbp2.php?ref="+encodeURI(document.URL)+"&bpid="+encodeURI(name),true);
		httpObj.send(null);
	}
}

function hpnm_resultfunc() {
}

function hpnm_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;
}
