function memoryAccess()
{
	httpObj = createXMLHttpRequest(displayData);
	if (httpObj) {
		httpObj.open("POST","http://www.japade.com/printlog.php",true);
	    httpObj.setRequestHeader("Content-Type" , "application/x-www-form-urlencoded");

		var param = new Object();
		var astring = "";
		astring += "q=" + allReplace(location.search, "&", "###amp###");
		astring += "&page=" + allReplace(location.href, "&", "###amp###");
		astring += "&ref=" + allReplace(document.referrer, "&", "###amp###");

		httpObj.send(astring);
	}
}

// 特に何もしなくてOK
function displayData()
{
//	if ((httpObj.readyState == 4) && (httpObj.status == 200)) {
//	}
}

// HTTP通信用、共通関数
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;
}

function allReplace(text, sText, rText) {
	text_copy = text;
	while (true) { // 無限ループ。
		dummy = text_copy;
		text_copy = dummy.replace(sText, rText); // 置換。
		if (text_copy == dummy) {
			break;
		}
	}
	return text_copy;
}
