var $login_area = '';
function login_check(){
	new Ajax.Request("/login/login_check/",{
		method:"post",
		parameters:"cache="+(new Date()).getTime(),
		onSuccess:function(httpObj){
			
			if(httpObj.responseText != 'ようこそ ゲスト さん' && httpObj.responseText){
				//$login_area ='<p class="guest02" id="guest02">'+httpObj.responseText+'</p>';
				//document.getElementById("login_area").innerHTML = $login_area+'<p class="btn01" id="btn01"><a href="/login/login/out/"><img name="login" src="/common/image/header_btn0003.gif" onmouseover="MM_swapImage(\'login\',\'\',\'/common/image/header_btn0003_on.gif\',1)" onmouseout="MM_swapImgRestore()" id ="login" alt="ログインアウト" /></a></p>';
				$login_area ='<p class="guest" id="guest">'+httpObj.responseText+'</p>';
				$login_area =$login_area+'<p class="btn01" id="btn01"><a href="/login/login/out/"><img name="login" src="/common/image/header_btn0003.gif" onmouseover="MM_swapImage(\'login\',\'\',\'/common/image/header_btn0003_on.gif\',1)" onmouseout="MM_swapImgRestore()" id ="login" alt="ログアウト" /></a></p>';
				document.getElementById("login_area").innerHTML =$login_area+'<p class="btn03"><a href="https://www.816t.jp/ssl/shizunavi/formmail/edit.php/login.html" target="_blank">登録内容変更/退会</a></p>';	
				document.getElementById("login-input-area").style.display = "none";
			}else{
				$login_area ='<p class="guest" id="guest">'+httpObj.responseText+'</p>';
				$login_area =$login_area+'<p class="btn01" id="btn01"><a href="/login/index.html"><img name="login" src="/common/image/header_btn0001.gif" onmouseover="MM_swapImage(\'login\',\'\',\'/common/image/header_btn0001_on.gif\',1)" onmouseout="MM_swapImgRestore()" id ="login" alt="ログイン" /></a></p>';
				document.getElementById("login_area").innerHTML =$login_area+'<p class="btn02" id="btn02"><a href="https://www.816t.jp/ssl/shizunavi/formmail/registration.php/form.html" target="_blank">新規会員登録（無料）</a></p>';
			}
		}
	});
}


function countm(){
	new Ajax.Request("/search/relation/cnt_m/",{
		method:"post",
		parameters:"cache="+(new Date()).getTime(),
		onSuccess:function(httpObj){
			if(httpObj.responseText){
				document.getElementById("cnt-m").innerHTML ='（'+httpObj.responseText+'件）';
			}
		}
	});
}
function counth(){
	new Ajax.Request("/search/relation/cnt_h/",{
		method:"post",
		parameters:"cache="+(new Date()).getTime(),
		onSuccess:function(httpObj){
			if(httpObj.responseText){
				document.getElementById("cnt-h").innerHTML ='（'+httpObj.responseText+'件）';
			}
		}
	});
}
function countl(){
	new Ajax.Request("/search/relation/cnt_l/",{
		method:"post",
		parameters:"cache="+(new Date()).getTime(),
		onSuccess:function(httpObj){
			if(httpObj.responseText){
				document.getElementById("cnt-l").innerHTML ='（'+httpObj.responseText+'件）';
			}
		}
	});
}
function counti(){
	new Ajax.Request("/search/relation/cnt_i/",{
		method:"post",
		parameters:"cache="+(new Date()).getTime(),
		onSuccess:function(httpObj){
			if(httpObj.responseText){
				document.getElementById("cnt-i").innerHTML ='（'+httpObj.responseText+'件）';
			}
		}
	});
}
function countw(){
	new Ajax.Request("/search/relation/cnt_w/",{
		method:"post",
		parameters:"cache="+(new Date()).getTime(),
		onSuccess:function(httpObj){
			if(httpObj.responseText){
				document.getElementById("cnt-w").innerHTML ='（'+httpObj.responseText+'件）';
			}
		}
	});
}
var $area ='';
var $class ='';
var $id ='';

function relationb($area,$class,$id){
	new Ajax.Request("/search/relation/get_relation_bottom/"+$area+"/"+$class+"/"+$id,{
		method:"post",
		parameters:"cache="+(new Date()).getTime(),
		onSuccess:function(httpObj){
			if(httpObj.responseText){
				document.getElementById("relation-bottom").innerHTML =httpObj.responseText;
			}else{
				document.getElementById("relation-bottom").style.display = 'none';
			}
		}
	});
}

function relationr($area,$class,$id){
	new Ajax.Request("/search/relation/get_relation_right/"+$area+"/"+$class+"/"+$id,{
		method:"post",
		parameters:"cache="+(new Date()).getTime(),
		onSuccess:function(httpObj){
			if(httpObj.responseText){
				document.getElementById("relation-right").innerHTML =httpObj.responseText;
			}else{
				document.getElementById("relation-right").style.display = 'none';
			}
		}
	});
}

