var weather_content = new Array();
var weather_html = "";
var weather_flag = true;
var weather_mouse = 1;
var weather_wait = 2500; 
var weather_count = 1;
var weather_temp = 0;

for (var w_cnt = 0; w_cnt < weatherList.length; w_cnt++) {
	weather_content[w_cnt] = '<table border=0 cellpadding=0 cellspacing=0 width=117 class=fnc><tr><td width=77 style=padding-top:3><a href="http://www.focus.co.kr/servicecenter/weather.asp">' + weatherList[w_cnt][0] + '</a></td><td width=40><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="20" height="20"><param name=movie value="http://weather.fnn.co.kr/wicon/type2/' + weatherList[w_cnt][1] + '"><param name=quality value=high><embed src="http://weather.fnn.co.kr/wicon/type2/' + weatherList[w_cnt][1] + '" quality=high  pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="20" height="20"></embed></object></td></tr></table>\n';
}

function startWeatherScroll() {
	for (i=0; i<weather_content.length; i++) insertWeatherText(i);
	weather_area0.style.display='block';
	weather_flag = true;
	window.setTimeout("weatherScrolling()", weather_wait);
}

function weatherScrolling() {
	weather_flag = true;
	var tmp2;
	if (weather_mouse && weather_flag) {
		//if (weather_temp == 0 && weather_flag) {
			for (var j=0; j<weather_content.length; j++) {
				tmp2 = document.getElementById('weather_area'+j).style;
				if (weather_count % weather_content.length == j) {
					tmp2.display = 'block';
				} else {
					tmp2.display = 'none';
				}
			}
			weather_flag = false;
			weather_count++;
		//}
	}
	window.setTimeout("weatherScrolling()", weather_wait);
}

function insertWeatherText(i) {
	weather_html = '<div style="left: 0px; width: 100%; display=none;" onMouseover="weather_mouse=0" onMouseout="weather_mouse=1" id="weather_area'+i+'">\n';
	weather_html += weather_content[i]+'</div>\n';
	document.write(weather_html);
}
