var browser=navigator.appName;//取得浏览器名称
String.prototype.replaceAll  = function(s1,s2){    
	return this.replace(new RegExp(s1,"gm"),s2);    
} 
function onForecast(td){
	var forecastArea = document.getElementById('forecastArea');
	for(var i=0;i<forecastArea.getElementsByTagName("td").length;i++){	
		if(forecastArea.getElementsByTagName("td")[i]==td){			
			forecastArea.getElementsByTagName("td")[i].className='STYLE19write';
			forecastArea.getElementsByTagName("td")[i].bgColor='#666666';
			document.getElementById(td.id+"Forecast").style.display="";
			document.getElementById(td.id+"ForecastList").style.display="";
		}else{
			forecastArea.getElementsByTagName("td")[i].className='STYLE19A';	
			forecastArea.getElementsByTagName("td")[i].bgColor='';
			document.getElementById(forecastArea.getElementsByTagName("td")[i].id+"Forecast").style.display="none";
			document.getElementById(forecastArea.getElementsByTagName("td")[i].id+"ForecastList").style.display="none";
		}
	}
}

function onMaps(td){
	var mapArea = document.getElementById('mapArea');
	var text ="";
	for(var i=0;i<mapArea.getElementsByTagName("td").length;i++){	
		text = mapArea.getElementsByTagName("td")[i].innerHTML;		
		if(browser=="Netscape"){
			className = text.substring(text.indexOf("class=")+7,(text.indexOf("class=")+9));
		}else{
			className = text.substring(text.indexOf("class=")+6,text.indexOf("class=")+8);
		}		
		if(mapArea.getElementsByTagName("td")[i]==td){					
			if(className=="V6"){
				mapArea.getElementsByTagName("td")[i].innerHTML=text.replaceAll(className,"V5");//改变当前超链接样式	
			}
			mapArea.getElementsByTagName("td")[i].bgColor='#666666';
			document.getElementById(td.id+"Map").style.display="";			
		}else{
			if(className=="V5"){
				mapArea.getElementsByTagName("td")[i].innerHTML=text.replaceAll(className,"V6");//改变其它超链接样式
			}
			mapArea.getElementsByTagName("td")[i].bgColor='';
			document.getElementById(mapArea.getElementsByTagName("td")[i].id+"Map").style.display="none";
		}
	}
}
