/**
 * FrameWork "Tama"
 * JavaScript(要prototype.js)
 * 
 * 天気・潮汐スクリプト
 * 
 * $Id: $
 */

//onLoad時のイベント
/*
Event.observe(window, 'load', function(){
	;
}, false);
*/

/**
 * function：天気取得
 * 
 * 説明：
 */
function wtGetWeather(targetid, pref, city){
	setTimeout('_wtGetWeather("' + targetid + '", "' + pref + '", "' + city + '");', 500);
}
function _wtGetWeather(targetid, pref, city){
	fDate = new Date();
	fTime = fDate.getTime();
	new Ajax.Updater(
		targetid,
		'/a/weather/',
		{
			'method': 'get',
			'parameters': 'a=b&pref=' + pref + '&city=' + city + '&t=' + fTime
		}
	);
}

/**
 * function：潮汐取得
 * 
 * 説明：
 */
function wtGetTide(targetid, pref, date){
	setTimeout('_wtGetTide("' + targetid + '", "' + pref + '", "' + date + '");', 1000);
}
function _wtGetTide(targetid, pref, date){
	fDate = new Date();
	fTime = fDate.getTime();
	new Ajax.Updater(
		targetid,
		'/a/tide/',
		{
			'method': 'get',
			'parameters': 'a=b&pref=' + pref + '&date=' + date + '&t=' + fTime
		}
	);
}
