
function AAA(){
	/*
	MacIE5と、Safariで不安定なのでとりあえず、ヤメる
	*/
	hiki = location.search;
	if(hiki != '' && hiki != null){
		hiki = hiki.substr(1);
		hikiArr = new Array();
		hikiArr = hiki.split("&");
		document.keyForm.keyW.value = unescape(hikiArr[0]);
		search(unescape(hikiArr[0]),hikiArr[1]);
	}
}

//--キーワード検索::::::::::::::::::::::::::::::::::::::::>----------------------------------------
function search(str,pageMode){
	//キーワードが入力されているか
	if(str == '' || str == null){
		alert('キーワードを入力してください');
		return false;
	}
	//一旦空にする
	document.getElementById("keyKekka").innerHTML = '<div style="margin:0 0 2px 0;"><a href="javascript:searchClose()"><img src="http://www.wakasa-mikatagoko.jp/hyaka/images/hidari/close.gif" width="56" height="15" alt="検索結果を閉じる" /></a></div>';
	keyMachFLag = false;
	//検索
	for(i = 0; i < spot.length; i++){
		if( spot[i][0].indexOf(str) !=-1 && spot[i][7] == ''){
			keyMachFLag = true;
			if(pageMode == 'map'){
				//map移動用
				document.getElementById("keyKekka").innerHTML += '・<a href="javascript:mapIdou('+i+')">'+spot[i][0]+'</a><br />';
			}else{
				//ページ移動用
				//carはジャンプ特殊なので
				if(spot[i][5] == 'car'){
					document.getElementById("keyKekka").innerHTML += '・<a href="http://www.wakasa-mikatagoko.jp/'+spot[i][5]+'/index.html#'+spot[i][3]+'">'+spot[i][0]+'</a><br />';
				}else{
					//document.getElementById("keyKekka").innerHTML += '・<a href="../'+spot[i][5]+'/'+spot[i][3]+'.html?'+escape(str)+'&'+pageMode+'">'+spot[i][0]+'</a><br />';
					document.getElementById("keyKekka").innerHTML += '・<a href="http://www.wakasa-mikatagoko.jp/'+spot[i][5]+'/'+spot[i][3]+'.html">'+spot[i][0]+'</a><br />';
				}
			}
		}
	}
	if(keyMachFLag != true){
		document.getElementById("keyKekka").innerHTML += '該当するデータがありません。<br />他のキーワードでお試しください。<br />';
	}
	//spot[0]=['福山城',133.36114883422852,34.49084429427237,'001','p1.jpg','hyaka','category_park:category_museum:area_chusin'];

	//ぱか
	if(document.getElementById){
		obj = document.getElementById('keyKekka');
	}
	if(obj){
		if(obj.style.display == "none"){
			obj.style.display = "block";
		}
	}
}
//obj.style.displayが取得できないので、さらにobj.style.displayを指定
onload = function(){
	document.getElementById('keyKekka').style.display = "none";
	//AAA();
}

//--閉じる::::::::::::::::::::::::::::::::::::::::>----------------------------------------
function searchClose(){
	if(document.getElementById){
		obj = document.getElementById('keyKekka');
	}
	if(obj){
		obj.style.display = "none";
	}
}


