//各ホテル・ゴルフ共通ファイル
//serial:2002100705

INFOUT = new Array();


//#１-ローカルタイム取得
//時間のみ抽出
DD = new Date();
HH = DD.getHours();


//#２-ローカルタイムより配列から必要情報を抽出
//	以下は時間に関わらず固定
INFOUT[0] = str[1];		//今日天気
INFOUT[1] = str[2];		//今日最高気温
INFOUT[2] = str[3];		//今日最低気温
INFOUT[4] = str[7];		//明日天気
INFOUT[5] = str[8];		//明日最高気温
INFOUT[6] = str[9];		//明日最低気温
INFOUT[7] = str[10];	//明日降水確率


//	以下は時間により変更
if(HH<6) {
	INFOUT[3] = str[4];
} else if (HH<12) {
	INFOUT[3] = str[4];
} else if (HH<18) {
	INFOUT[3] = str[5];
} else {
	INFOUT[3] = str[6];
}


//#３-INFOUT情報の補正
//	最高最低気温の氷点下処理と小数点以下(最後尾文字)切捨て *丸めていません

for(xxx=1;xxx<7;xxx++) {
	if (INFOUT[xxx] == "0") {
		//データが"0"(０度)の時は切捨て行わず処理なし。

	}else if (INFOUT[xxx].indexOf("-") == 0 ) {
		cnt = INFOUT[xxx].length;
		INFOUT[xxx] = INFOUT[xxx].substring(1,cnt)

		cnt = INFOUT[xxx].length;
		INFOUT[xxx] = "-" + INFOUT[xxx].substring(0,cnt-1)
	}else {
		cnt = INFOUT[xxx].length;
		INFOUT[xxx] = INFOUT[xxx].substring(0,cnt-1)
	}

	if(xxx==2){xxx=4}	//3,4処理せず5へ

}


//	画像ファイル名生成（文字列".gif"の追加）
INFOUT[0] = INFOUT[0].concat(".gif");
INFOUT[4] = INFOUT[4].concat(".gif");

//	データ空時の対応
for(xxx=0;xxx<7;xxx++) {
	if( INFOUT[xxx] == "" ) {
		INFOUT[xxx] = "-";
	}
}

//以下は複数の「地域・地点情報」表示対応
if(str[20]) {
	str2 = str[20].split(",");
	INFOUT[10] = str2[1];		//今日天気
	INFOUT[11] = str2[2];		//今日最高気温
	INFOUT[12] = str2[3];		//今日最低気温
	INFOUT[14] = str2[7];		//明日天気
	INFOUT[15] = str2[8];		//明日最高気温
	INFOUT[16] = str2[9];		//明日最低気温
	INFOUT[17] = str2[10];		//明日降水確率

	if(HH<6) {
		INFOUT[13] = str2[4];
	} else if (HH<12) {
		INFOUT[13] = str2[4];
	} else if (HH<18) {
		INFOUT[13] = str2[5];
	} else {
		INFOUT[13] = str2[6];
	}
	for(xxx=11;xxx<17;xxx++) {
		if (INFOUT[xxx] == "0") {
		}else if (INFOUT[xxx].indexOf("-") == 0 ) {
			cnt = INFOUT[xxx].length;
			INFOUT[xxx] = INFOUT[xxx].substring(1,cnt)
			cnt = INFOUT[xxx].length;
			INFOUT[xxx] = "-" + INFOUT[xxx].substring(0,cnt-1)
		}else {
			cnt = INFOUT[xxx].length;
			INFOUT[xxx] = INFOUT[xxx].substring(0,cnt-1)
		}
		if(xxx==12){xxx=14}	
	}

	INFOUT[10] = INFOUT[10].concat(".gif");
	INFOUT[14] = INFOUT[14].concat(".gif");

	for(xxx=10;xxx<17;xxx++) {
		if( INFOUT[xxx] == "" ) {
			INFOUT[xxx] = "-";
		}
	}

}