// JavaScript Document

XmlsReq9 = false;
if(window.XMLHttpRequest){
	XmlsReq9 = new XMLHttpRequest();
}else if(window.ActiveXObject){
	try{
			XmlsReq9 = new ActiveXObject("Msxm12.XMLHTTP");
	}catch(e){
			XmlsReq9 = new ActiveXObject("Microsoft.XMLHTTP");
	}
}
var docurl = document.URL;
var aryburl = docurl.split('/');
var ajaxurl= "";
if(aryburl[4] == "tenpo"){
	ajaxurl = '../putlog.php';
}else{
	ajaxurl = 'miyage/putlog.php';
}
function counturl(key,url,types){
	if(!XmlsReq9)return;
	XmlsReq9.open('POST',ajaxurl);
	XmlsReq9.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");
	XmlsReq9.send(encodeURI("dir=" + key+'&types='+types));
	XmlsReq9.onreadystatechange=function(){
		if(XmlsReq9.readyState==4 && XmlsReq9.status==200){
			alert(XmlsReq9.responseText +"のサイトへ移動します");
			window.location.href = url;
		}
	}
}