/**
 * @author Cocowool
 */

 var CityList = [
		{"tags":"B", "contents":[
			{"link":"http://map.house.sina.com.cn/bj/index.html","text":"北京","province":"北京","citycode":"010"}
			]},
		{"tags":"C", "contents":[
   			{"link":"http://map.house.sina.com.cn/cz/index.html","text":"常州","province":"江苏","citycode":"0519"},
   			{"link":"http://map.house.sina.com.cn/cd/index.html","text":"成都","province":"四川","citycode":"028"},
			{"link":"http://map.house.sina.com.cn/cq/index.html","text":"重庆","province":"重庆","citycode":"023"},
			{"link":"http://map.house.sina.com.cn/cs/index.html","text":"长沙","province":"湖南","citycode":"0731"}
			]},
		{"tags":"D", "contents":[
			{"link":"http://map.house.sina.com.cn/dl/index.html","text":"大连","province":"辽宁","citycode":"0411"},
			{"link":"http://map.house.sina.com.cn/dy/index.html","text":"东营","province":"山东","citycode":"0546"},
			{"link":"http://map.house.sina.com.cn/dg/index.html","text":"东莞","province":"广东","citycode":"0769"}
			]},
		{"tags":"G", "contents":[
			{"link":"http://map.house.sina.com.cn/gz/index.html","text":"广州","province":"广东","citycode":"020"},
			{"link":"http://map.house.sina.com.cn/guizhou/index.html","text":"贵阳","province":"贵州","citycode":"0851"},
			{"link":"http://map.house.sina.com.cn/guilin/index.html","text":"桂林","province":"广西","citycode":"0773"}
			]},
		{"tags":"H", "contents":[
			{"link":"http://map.house.sina.com.cn/hangzhou/index.html","text":"杭州","province":"浙江","citycode":"0571"},
			{"link":"http://map.house.sina.com.cn/h/index.html","text":"哈尔滨","province":"黑龙江","citycode":"0451"},
			{"link":"http://map.house.sina.com.cn/han/index.html","text":"海口","province":"海南","citycode":"0898"},
			{"link":"http://map.house.sina.com.cn/hf/index.html","text":"合肥","province":"安徽","citycode":"0551"},
			{"link":"http://map.house.sina.com.cn/huangshi/index.html","text":"黄石","province":"湖北","citycode":"0714"}
			]},
		{"tags":"J", "contents":[
			{"link":"http://map.house.sina.com.cn/sd/index.html","text":"济南","province":"山东","citycode":"0531"},
			{"link":"http://map.house.sina.com.cn/jingzhou/index.html","text":"荆州","province":"湖北","citycode":"0716"}
			]},
		{"tags":"K", "contents":[
            {"link":"http://map.house.sina.com.cn/yn/index.html","text":"昆明","province":"云南","citycode":"0871"}
   			]},	
		{"tags":"N", "contents":[
   			{"link":"http://map.house.sina.com.cn/nc/index.html","text":"南昌","province":"江西","citycode":"0791"},
			{"link":"http://map.house.sina.com.cn/nanjing/index.html","text":"南京","province":"江苏","citycode":"025"},
			{"link":"http://map.house.sina.com.cn/gx/index.html","text":"南宁","province":"广西","citycode":"0771"},
			{"link":"http://map.house.sina.com.cn/nb/index.html","text":"宁波","province":"浙江","citycode":"0574"},
			{"link":"http://map.house.sina.com.cn/nt/index.html","text":"南通","province":"江苏","citycode":"0513"}
			]},
		{"tags":"Q", "contents":[
			{"link":"http://map.house.sina.com.cn/qd/index.html","text":"青岛","province":"山东","citycode":"0532"},
			{"link":"http://map.house.sina.com.cn/qhd/index.html","text":"秦皇岛","province":"河北","citycode":"0335"}
			]},
		{"tags":"S", "contents":[
			{"link":"http://map.house.sina.com.cn/sh/index.html","text":"上海","province":"上海","citycode":"021"},
			{"link":"http://map.house.sina.com.cn/sjz/index.html","text":"石家庄","province":"河北","citycode":"0311"},
			{"link":"http://map.house.sina.com.cn/sy/index.html","text":"沈阳","province":"辽宁","citycode":"024"},
			{"link":"http://map.house.sina.com.cn/sz/index.html","text":"深圳","province":"广东","citycode":"0755"},
			{"link":"http://map.house.sina.com.cn/suzhou/index.html","text":"苏州","province":"江苏","citycode":"0512"},
			{"link":"http://map.house.sina.com.cn/sanya/index.html","text":"三亚","province":"海南","citycode":"0899"}]},
		{"tags":"T", "contents":[
   			{"link":"http://map.house.sina.com.cn/ty/index.html","text":"太原","province":"山西","citycode":"0351"},
			{"link":"http://map.house.sina.com.cn/tj/index.html","text":"天津","province":"天津","citycode":"022"}
			]},
		{"tags":"W", "contents":[
			{"link":"http://map.house.sina.com.cn/wh/index.html","text":"武汉","province":"湖北","citycode":"027"},
			{"link":"http://map.house.sina.com.cn/wx/index.html","text":"无锡","province":"江苏","citycode":"0510"},
			{"link":"http://map.house.sina.com.cn/weihai/index.html","text":"威海","province":"山东","citycode":"0631"}
			]},
		{"tags":"X", "contents":[
   			{"link":"http://map.house.sina.com.cn/xiangtan/index.html","text":"湘潭","province":"湖北","citycode":"0732"}
   			]},	
		{"tags":"Y", "contents":[
			{"link":"http://map.house.sina.com.cn/yt/index.html","text":"烟台","province":"山东","citycode":"0535"},
			{"link":"http://map.house.sina.com.cn/yichang/index.html","text":"宜昌","province":"湖北","citycode":"0717"}
			]},	
		{"tags":"Z", "contents":[
			{"link":"http://map.house.sina.com.cn/hn/index.html","text":"郑州","province":"河南","citycode":"0371"}
			]} 	
	]
	
 headTopShow = function(){
	    var _s = '<div class="pd8 citycontainer">';
	    for(var i=0,len=CityList.length;i<len;i++)
	    {
	        _s += '<span class="Cred fb f14">'+CityList[i].tags+'</span> ';
	        for (var j=0,jlen=CityList[i].contents.length; j<jlen; j++)
	        {
	            _s += '<a href="'+CityList[i].contents[j].link+'">·'+CityList[i].contents[j].text+'</a> ';
	        }
	    }
	    _s += "<p align='right' class='ptb10'><a href='javascript:void(0);' onclick=\"showhidendiv('map_citylist')\">[关闭窗口]</a></p></div>";
	    return _s;
 };
 
 DisplayCitySelector = function(citycode){
 	var _s = '';
	for(var i=0,len=CityList.length;i<len;i++){
		for(var j=0,jlen=CityList[i].contents.length;j<jlen;j++){
			_s += "<option value='" + CityList[i].contents[j].citycode + "'";
			if(citycode == CityList[i].contents[j].citycode) _s += " selected ";
			_s += ">" + CityList[i].contents[j].text + "</option>";
		}		
	}
	
	document.write(_s);
 };
