
//上の写真の枚数設定
uePhotoMax = 14;
uePdir = 'http://www.itph.jp/test/kyushu/english/';


function wordCheck(word){
	if(!word || word=="" || word==" " || word=="　"){
		alert("検索キーワードを入力してください");
		return false;
	}
}

function topSearchWrite(){
	document.write(''
	+'<div id="searchBoxWrapTop">'
	+'	<form method=GET action="http://www.google.co.jp/search" style="margin:0px; padding:0px;" onSubmit="return wordCheck(this.q.value);">'
	+'		<input type="hidden" name="hl" value="ja" />'
	+'		<input type="hidden" name="ie" value="Shift_JIS" />'
	+'		<input type="hidden" name="domains" value="http://www.trip.co.jp/" />'
	+'		<input type="hidden" name="sitesearch" value="http://www.trip.co.jp/lovekyushu/" />'
	+'	<div id="searchBoxLtop"><img src="images/share/search_title_top.gif" width="121" height="18" alt="キーワード検索" /></div>'
	+'	<input type="text" name="q" maxlength="255" id="searchBoxTtop" value="" />'
	+'	<input type="submit" name="btnG" value="検索" id="searchBoxStop" />'
	+'	</form>'
	+'</div>'
	+'');
}

function searchWrite(){
	//改行入れると、WinIE6でバグるので
	document.write(''
	+'<div id="searchBoxWrap">'
	+'	<form method=GET action="http://www.google.co.jp/search" style="margin:0px; padding:0px;" onSubmit="return wordCheck(this.q.value);">'
	+'		<input type="hidden" name="hl" value="ja" /><input type="hidden" name="ie" value="Shift_JIS" /><input type="hidden" name="domains" value="http://www.trip.co.jp/" /><input type="hidden" name="sitesearch" value="http://www.trip.co.jp/lovekyushu/" /><div id="searchBoxL"><img src="../images/share/search_title.gif" width="190" height="17" alt="キーワード検索" /></div>'
	+'	<input type="text" name="q" maxlength="255" id="searchBoxT" value="" /><input type="submit" name="btnG" value="検索" id="searchBoxS" /></form></div>'
	+'');
}


function uePhotoWrite(){
	//階層によってパスを変える
	
	//テスト時コメントアウト
	/*path = location.pathname;
	pathArr = new Array();
	pathArr = path.split('/');
	uePdir = '';
	//Macローカル制作環境処理
	if(path.indexOf('/nino/') > -1 ){
		dirLoopSuu = pathArr.length-7;
	}else if(path.indexOf('Volumes') > -1 ){
		dirLoopSuu = pathArr.length-6;
	}else{
		dirLoopSuu = pathArr.length-2;
	}
	//階層指定
	for(i=0; i<dirLoopSuu; i++){
		uePdir += '../';
	}*/

	
	//ランダムに
	uPrand = Math.ceil(Math.random()*uePhotoMax);
	if(uPrand == 0){
		uPrand = 1;
	}
	imgName = 'ueP';
	document.images[imgName].src = uePdir+'images/ue/'+uPrand+'.jpg'; 
	//以下WinIE5.0で不安定なのでやめた
	//document.getElementById('flaWrapper').style.background = 'url(../images/ue/2.jpg)';
}

