var otherCityLink = "";
var city_length = 0;
var city_max = 15;
var otherCityLinkMore = "";
var esLink="es/default.html";
var zfLink="zf/default.html"; 
var newsLink="http://zixun.goufang.com/";

var __DATA_City = new Array(
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"哈尔滨","hrb",
"南京","nj",
"吉林","jls"
);

if (location.href.indexOf("http://cc.")>=0 || location.href.indexOf("cityid=cc")>=0)
{
 __DATA_City = new Array(
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"吉林","jls",
"长春","cc",
"哈尔滨","hrb");}
if (location.href.indexOf("http://qd.")>=0 || location.href.indexOf("cityid=qd")>=0)
{
 __DATA_City = new Array(
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"吉林","jls",
"青岛","qd",
"哈尔滨","hrb");}

var ThisCity = "";
var ThisCityName = "大连";
var ThisCityMapName = "";
var localNew = true;

function SetNewMenu()
{esLink="es/default.html";zfLink="zf/default.html";newsLink="http://zixun.goufang.com/";}

function __ACT_ShowSiteHeader()
{
__Get_ThisCityId();
GetThisCityMapName();
document.write(__HTML_SiteHeader());
	//ShowNew();
}
function ShowNew(){
if ("dl" == ThisCity || location.href.indexOf("http://jc.")>=0){	
document.write("<div id=\"new_gif\" style=\"VISIBILITY: hidden ;POSITION: absolute;left:100px;top:25px;z-index:10000;background:url(http://common.goufang.com/images/new.gif);width:32px;height:25px\"></div>");
var searchObj = document.getElementById("top_house_search");
var ttop  = searchObj.offsetTop; 
var tleft = searchObj.offsetLeft;
var theight = searchObj.offsetHeight;
var offset = document.body.clientWidth -780;
if (offset >0)
{
offset = offset/2;
}
else
{
offset = 0;
}
var parm = document.getElementById('new_gif');
parm.style.visibility = "visible";
parm.style.top = ttop;
parm.style.left = offset + tleft + 585;
}
}
function __Get_ThisCityId()
{

try{ThisCity = __G_ThisCityID;}catch(e){ThisCity = "";}
if ( ThisCity != "" )
{
	for(var i=0;i<__DATA_City.length;i=i+2){
		if (ThisCity == __DATA_City[i+1])
		{
			ThisCityName = __DATA_City[i];
		}
	}
}
if ("" == ThisCity)
{
	for(var i=0;i<__DATA_City.length;i=i+2){
		if (0 <= location.href.indexOf("http://" + __DATA_City[i+1] + "."))
		{
			ThisCity = __DATA_City[i+1];
			ThisCityName = __DATA_City[i];
		}
	}
}

if ("" == ThisCity)
{
	var myurl = location.search;

	if (0 <= myurl.indexOf("cityid="))
	{
		myurl = myurl.substring(myurl.indexOf("cityid=")+7,myurl.length)
		if (0 <= myurl.indexOf("&"))
		{
			myurl = myurl.substring(0,myurl.indexOf("&"))
		}
		if ("" != myurl)
		{
			for(var i=0;i<__DATA_City.length;i=i+2){
				if (myurl == __DATA_City[i+1] )
				{
					ThisCity = __DATA_City[i+1];
					ThisCityName = __DATA_City[i];
				}
			}
		}
	}
}


if (0 <= location.href.indexOf("http://beta0."))
{
ThisCity = "beta0";
__DATA_City = new Array(
"测试","beta0",
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"吉林","jls",
"哈尔滨","hrb"
);
}
if (0 <= location.href.indexOf("http://beta."))
{
ThisCity = "beta";
__DATA_City = new Array(
"测试","beta",
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"吉林","jls",
"哈尔滨","hrb"
);
}
if ("" == ThisCity)
{
ThisCity = "dl";
SetNewMenu();__DATA_City = new Array(
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"吉林","jls",
"哈尔滨","hrb"
);
}
}
function GetThisCityMapName()
{
if (-1 == ThisCityName.indexOf("市"))
{
ThisCityMapName = ThisCityName + "市";
}
else
{
ThisCityMapName = ThisCityName ;
}
}

function __UTIL_GetOutParamValue(rValue,rDefault)
{
if(rValue!="")
return rValue;
else
return rDefault;
}
function __HTML_SiteHeader()
{
var str = "";
str += "<div style=\"width:100%;height:25px;text-align:center\">";
str += "<DIV id=\"top_nav\">";
str += "<UL>";  
str += "<LI class=\"no_border_left\">";
str += "<A onclick=\"javascript:try{this.style.behavior='url(#default#homepage)';this.setHomePage(location.href);}catch(e){return false;}\" href=\"#\" target=_self>设为首页</A>";
str += "</LI>"; 
str += "<LI class=\"no_border_left\">";
str += "<A onclick=\"__ACT_AddInFavorite();return false;\" href=\"#\" target=_self>添加到收藏夹</A>";
str += "</LI>";

str += "<LI style=\"list-style:none;float:left;margin-top:3px;margin-left:60px;\">";
str += "<a href=\"http://ad.goufang.com/dl/web/service/\" target=\"_blank\"><img src=\"http://common.goufang.com/images/top_tel.gif\" style=\"border:0px\"/></a>";
str += "</LI>";
str += "<LI style=\"float:right;\">";
str += "<DIV id=c_fship2><A class=alk id=\"c_fship_c\" onmouseover=window.setTimeout(\"show_menu('float_menu3','c_fship_c')\",200) onmouseout=\"hide_menu('float_menu3','c_fship_c')\">信息发布</A></DIV>";
str += "</LI>";  
str += "<LI class=\"no_border_right\"><A href='http://sou.goufang.com/?cityid=" + ThisCity +  "' target=\"_blank\">购房搜索</A>　|</LI>";
str += "<LI id=\"wrods4\"><A href=\"" + GetRegisterUrl() + "\"  target=\"_blank\">免费注册</A></LI>";
str += "<LI id=\"wrods2\"><a href='" + GetLoginUrl() + "' target='_blank'>登录</A></LI>";
str += "</UL>";
str += "</DIV></DIV>";

str += "<div id='top'>";
str += "<div id='top_out'>";
str += "<div id='top_left'></div>";
str += "<div id='top_right'>";
str += "<div id='top_right_top_left'>" + ThisCityName + "</div>";
str += "<div id='top_right_top_right'>"
str += get_part_city();
str += "</div>";
str += "</div>";
str += "<div id='city_select_link'><a href='javascript:Show();' onmouseout='CityDivMouseOut();'>更多城市</a></div>";
str += "<div id='top_menu'>";
str += "<ul id='ul_menu' style='list-style:none; margin:0px;'>";
str += __HTML_SiteMenu();
str += "</ul>";
str += "</div>";
str += "<div id='top_menu_shadow' style='width:" + (__DATA_SiteMenu.length/3 * 60 - 2) + "px'></div>";
str += "</div>";
str += "</div>";
str += "</div>";
str += "<div id='citydiv' style='VISIBILITY: hidden ; Z-INDEX: 102;  WIDTH: 290px; POSITION: absolute; FILTER: ";
str += "revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5);  PADDING-";
str += "RIGHT: 5px;PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; ";
str += " PADDING-TOP: 2px; BACKGROUND-COLOR: #ffffff' onmouseover='CityDivMouseOver();' onmouseout='CityDivMouseOut();'>";
str += "<iframe width=290px height=95px src=''  frameBorder='0' scrolling='no' style='BORDER: #a5a5a5 1px solid;'></iframe>"
str += "<div style='POSITION: absolute;left:10px;top:13px;z-index:4000'><table  border='0' cellspacing='0' cellpadding='0' width=280 align=center>";
    for(var i=0;i<__DATA_City.length;i=i+2){
    if ( ThisCity != __DATA_City[i+1] ) 
    {
otherCityLink += "<li><a target='_blank' href='http://";
otherCityLink += __DATA_City[i+1];
otherCityLink += ".goufang.com/'>";
otherCityLink += __DATA_City[i];
otherCityLink += "</a></li>";
otherCityLinkMore += "<a target='_blank' href='http://";
otherCityLinkMore += __DATA_City[i+1];
otherCityLinkMore += ".goufang.com/'>购房者网站-";
otherCityLinkMore += __DATA_City[i];
otherCityLinkMore += "</a> | ";
    }

if ( i%14 == 0 ) 
{
str += "<tr height=26>";
}
var cityUrl = "http://" + __DATA_City[i+1] + ".goufang.com";
var cityName = __DATA_City[i];
str +="<td align='center' style='padding-top:5px;padding-bottom:3px;border:solid 1px #ffffff;width:40px;' onmouseover='CitySelectTdOver(this)' onmouseout='CitySelectTdOut(this)' onclick=GoToAnotherCity('";
str += cityUrl;
str +="') >";
str += cityName;

str +="</td>";
if ( (i+2)%14  == 0 && i <= __DATA_City.length -2) 
{
str += "</tr>";
if ( i>=8 && i<__DATA_City.length -2)
{
str += "<tr height=1><td colspan=5></td></tr>";
}
}
}
var len = __DATA_City.length/2%7;
for (var i=len; i<7; i++)
{
str += "<td></td>";
}
if ( len > 0)
{
str += "</tr>"; 
}
str +="</table></div></div>";
str += "<DIV id=\"float_menu3\" onmouseover=\"show_menu('float_menu3','c_fship_c')\" style=\"BORDER-RIGHT: #c2bbb5 1px solid; BORDER-TOP: #c2bbb5 1px solid; MARGIN-TOP: 0px; DISPLAY: none; Z-INDEX: 2000; MARGIN-LEFT: -3px; BORDER-LEFT: #c2bbb5 1px solid; WIDTH: 60px;height:40px;BORDER-BOTTOM: #c2bbb5 1px solid; POSITION: absolute\" onmouseout=\"hide_menu('float_menu3','c_fship_c')\">";
str += "<iframe width=60px FRAMEBORDER=no height=60px src=''  scrolling='no'></iframe>";
str += "<div id=\"float_menu2\" style=\" POSITION: absolute;left:2px;top:2px;\">";
str += "<UL id=\"cship_list\" >";
str += "<LI class=\"top_border\"><A href=\"http://" + ThisCity + ".goufang.com/default/SendInfo.aspx?type=1\" target=\"_blank\">发布出售</A></LI>";
str += "<LI class=\"top_border\"><A href=\"http://" + ThisCity + ".goufang.com/es/EsBuyerInfoAddOrEdit.aspx\" target=\"_blank\">发布求购</A></LI>";
str += "<LI class=\"top_border\"><A href=\"http://" + ThisCity + ".goufang.com/default/SendInfo.aspx?type=3\" target=\"_blank\">发布出租</A></LI>";
str += "<LI class=\"top_border\"><A href=\"http://" + ThisCity + ".goufang.com/zf/ZfRenterInfoEdit.aspx\" target=\"_blank\">发布求租</A></LI>";
str += "</UL></div></DIV>";return str;
}
function info_menu_show()
{
//alert("ok");
var obj = document.getElementById('top_info_publish');
//alert(obj);
     var ttop  = obj.offsetTop; 
 var tleft = obj.offsetLeft;
 var theight =obj.offsetHeight;

 var offset = document.body.clientWidth -780;
 if (offset >0)
 {
offset = offset/2;
 }
 else
 {
offset = 0;
 }
 var parm = document.getElementById('info_menu_div');
parm.style.visibility = "visible";
alert("come");
alert(ThisCity);
if (ThisCity=="dl")
{
alert("dl");
parm.style.top = 25;
}else
{
alert("asfd");
parm.style.top = 20;
}
parm.style.left = offset + tleft + 620;
}

function info_menu_hide()
{
 var parm = document.getElementById('info_menu_div');
parm.style.visibility = "hidden";
}
var __DATA_SiteMenu = new Array(
"首页","goufang.com/","_self"
,"新房","xf.goufang.com/","_self"
,"二手房","goufang.com/agentsys/default.aspx","_self"
,"租房","goufang.com/agentsys/rentDefault.aspx","_self"
,"地产资讯",newsLink + "?cityid=$_cityid$","_self"
,"购房论坛","http://bbs.goufang.com","_blank"
);
function get_part_city(){
var part_cityLink="";
for(var i=0;i<__DATA_City.length;i=i+2){
if ( city_length < city_max) 
{
city_length++;
part_cityLink += "<a href='http://";
part_cityLink += __DATA_City[i+1];
part_cityLink += ".goufang.com/'>";
if ( ThisCity != __DATA_City[i+1] )
part_cityLink += __DATA_City[i];
else
part_cityLink += "<font style=\"color:red;font-weight:bolder\">" +  __DATA_City[i] + "</font>" ; 

part_cityLink += "</a>|";
    }
    }
part_cityLink = part_cityLink.substring(0,part_cityLink.length-1); 
part_cityLink += "&nbsp;<span id=\"more_city_select_link\" onclick=\"MoreShow();\" onmouseout=\"Hide();\" style=\"color:red;font-weight:bolder;cursor:hand;text-Decoration:underline\">更多</span>"
return part_cityLink;
}
function __HTML_SiteMenu()
{

var _selected = "首页";
try{
_selected=__G_SelectSiteMenu_Caption;
}catch(e){_selected="首页";}

if (_selected == "说吧"){ _selected = "购房论坛";}
if (_selected == "新闻"){ _selected = "地产资讯";}


var _subMenuHTML = "";
try{_subMenuHTML=__G_SelectSiteMenu_SubMenuHTML}catch(e){_subMenuHTML="";}
SetNewMenu();
if ( "beta0" == ThisCity)
{
		__DATA_SiteMenu = new Array(
		"首页","http://beta0.goufang.com/","_self"
		,"新房","http://beta0.xf.goufang.com/","_self"
		,"二手房","http://beta0.goufang.com/" + esLink,"_self"
		,"租房","http://beta0.goufang.com/" + zfLink,"_self"
//		,"网络经纪人","http://beta0.jj.goufang.com/","_self"
		,"全景小区","http://beta0.xiaoqu.goufang.com/","_self"
		,"装修","http://beta0.zx.goufang.com/","_self"
		,"地产资讯","http://beta0.zixun.goufang.com/","_self"
		,"购房论坛","http://bbs.goufang.com","_blank"
		);
}else if ( "beta" == ThisCity)
{
		__DATA_SiteMenu = new Array(
		"首页","http://beta.goufang.com/","_self"
		,"新房","http://beta0.xf.goufang.com/","_self"
		,"二手房","http://beta.goufang.com/" + esLink,"_self"
		,"租房","http://beta.goufang.com/" + zfLink,"_self"
//		,"网络经纪人","http://beta0.jj.goufang.com/","_self"
		,"全景小区","http://beta0.xiaoqu.goufang.com/","_self"
		,"装修","http://beta0.zx.goufang.com/","_self"
		,"地产资讯","http://beta0.zixun.goufang.com/","_self"
		,"购房论坛","http://bbs.goufang.com","_blank"
		);
}
else if ("dl" == ThisCity || "jc" == ThisCity || location.href.indexOf("http://jc.")>=0)
{
		__DATA_SiteMenu = new Array(
		"首页","http://dl.goufang.com/","_self"
		,"新房","http://dl.xf.goufang.com/","_self"
		,"二手房","http://dl.goufang.com/" + esLink,"_self"
		,"租房","http://dl.goufang.com/" + zfLink,"_self"
		,"全景小区","http://dl.xiaoqu.goufang.com/","_self"
		,"家居建材","http://jc.goufang.com/","_self"
		,"装修","http://dl.zx.goufang.com/","_self"
		,"地产资讯",newsLink,"_self"
		,"购房论坛","http://bbs.goufang.com","_blank"
		);
}
else if ( "bj" == ThisCity || "sh" == ThisCity )
{
		__DATA_SiteMenu = new Array(
		"首页","http://" + ThisCity +".goufang.com/","_self"
		,"新房","http://" + ThisCity +".xf.goufang.com/","_self"
		,"二手房","http://" + ThisCity +".goufang.com/" + esLink,"_self"
		,"租房","http://" + ThisCity +".goufang.com/" + zfLink,"_self"
		,"家居建材","http://" + ThisCity +".jc.goufang.com/","_self"
		,"地产资讯",newsLink + "?cityid=" + ThisCity ,"_self"
		,"购房论坛","http://bbs.goufang.com","_blank"
		);
}
else 
{
	__DATA_SiteMenu = new Array(
	"首页","goufang.com/","_self"
	,"新房","xf.goufang.com/","_self"
	,"二手房","goufang.com/" + esLink,"_self"
	,"租房","goufang.com/" + zfLink,"_self"
	,"地产资讯",newsLink + "?cityid=$_cityid$","_self"
		,"购房论坛","http://bbs.goufang.com","_blank"
	);
	for(var i=0;i< __DATA_SiteMenu.length;i=i+3){
		if (__DATA_SiteMenu[i+1].indexOf("http://")<0)
		{
				__DATA_SiteMenu[i+1] = "http://" + ThisCity + "." + __DATA_SiteMenu[i+1];
		}

		if (__DATA_SiteMenu[i+1].indexOf("$_cityid$") > 0)
			{
						var tmpurl = __DATA_SiteMenu[i+1];
					__DATA_SiteMenu[i+1] = tmpurl.replace("$_cityid$",ThisCity);
			}

	}
}
var _selectedIndex = -1;
var str = ""
    for(var i=__DATA_SiteMenu.length-1;i>=0;i=i-3){
str += "<li><a href='" + __DATA_SiteMenu[i-1] + "' target = '" + __DATA_SiteMenu[i] + "'";
if(_selected ==__DATA_SiteMenu[i-2]){
str += "style='display:block;width:100%;background-color:#ff6600;font-weight:border;color:#ffffff'";
}
str += ">" + __DATA_SiteMenu[i-2] + "</a></li>";
}
if( _subMenuHTML!=""){
}
return str;
}
function GetLoginUrl()
{
var _loginUrl = "http://" + ThisCity + ".goufang.com/agentsys/login.aspx";
try{_loginUrl=__G_Login_URL; if (__G_Login_URL.indexOf("agentsys")>0){_loginUrl="http://" + ThisCity + ".goufang.com/agentsys/login.aspx";}}catch(e){_loginUrl = "http://" + ThisCity + ".goufang.com/agentsys/login.aspx";}
return _loginUrl;
}

function GetRegisterUrl()
{
var _registerUrl = "http://common.goufang.com/html/register.html?cityid=" + ThisCity;
try{_registerUrl=__G_Register_URL;}catch(e){_registerUrl="http://common.goufang.com/html/register.html?cityid=" + ThisCity;}
_registerUrl = "http://common.goufang.com/html/register.html?cityid=" + ThisCity;
return _registerUrl;
}


function __ACT_AddInFavorite()
{
var _url = "http://" + ThisCity + ".goufang.com/";
var _title = "购房者网站--楼盘 二手房 出租 求租 置业顾问 经纪人 置业宝典 地产 新闻";
window.external.AddFavorite(_url,_title);
}

 var flag = false;

function  Show()
{

var obj = document.getElementById('city_select_link');
     var ttop  = obj.offsetTop; 
 var tleft = obj.offsetLeft;
 var theight =obj.offsetHeight;

 var offset = document.body.clientWidth -780;
 if (offset >0)
 {
offset = offset/2;
 }
 else
 {
offset = 0;
 }
 var parm = document.getElementById('citydiv');
parm.filters.revealTrans.apply(); 
parm.style.visibility = "visible";
parm.style.top = ttop+43;
parm.style.left = offset + tleft-3;
       parm.filters.revealTrans.play(); 
   window.clearInterval(theTimer);
}

function  MoreShow()
{

var obj = document.getElementById('more_city_select_link');
     var ttop  = obj.offsetTop; 
 var tleft = obj.offsetLeft;
 var theight =obj.offsetHeight;

 var offset = document.body.clientWidth -780;
 if (offset >0)
 {
offset = offset/2;
 }
 else
 {
offset = 0;
 }
 var parm = document.getElementById('citydiv');
parm.filters.revealTrans.apply(); 
parm.style.visibility = "visible";
parm.style.top = ttop+38;
parm.style.left = offset + tleft-33;
       parm.filters.revealTrans.play(); 
   window.clearInterval(theTimer);
}


 function Hide()
 {
 var parm = document.getElementById('citydiv');
parm.filters.revealTrans.apply(); 
parm.style.visibility = "hidden"; 
parm.filters.revealTrans.play(); 
  window.clearInterval(theTimer);

 }

 function OnSelectCityMouseOut()
{ 
flag= true;
if (flag)
{
theTimer = setTimeout("Hide()",500);
flag= false;

}
}
 function chanage(obj)
{   
document.all.selectcity.value= obj;
}

function CityDivMouseOver()
 {
flag= false;
    document.all.citydiv.style.visibility = "visible";
window.clearInterval(theTimer);
 }
 
function CityDivMouseOut()
 {
   flag= true;

if (flag)
   {
theTimer = setTimeout("Hide()",500);
   flag= false;
   }
   
 }
function killErrors() { 
return true; 
} 
window.onerror = killErrors; 

function __ShowOtherCityLink()
{
document.write(otherCityLink);
}

function __ShowOtherCityLinkMore()
{
document.write(otherCityLinkMore);
}
function CitySelectTdOver(obj)
{
obj.style.backgroundColor = "#FFF1C1";
obj.style.cursor = "hand";
obj.style.border = "solid 1px #ffaa05";
obj.style.color = "#ff0000";
obj.style.fontSize = "12px";
obj.style.textDecoration = "underline";
//obj.style.fontWeight = "bold";
}
function CitySelectTdOut(obj)
{
obj.style.backgroundColor = "#FFFFFF";
obj.style.border = "solid 1px #ffffff";
obj.style.fontWeight = "normal";
obj.style.color = "#000000";
obj.style.fontSize = "12px";
obj.style.textDecoration = "none";
}
function GoToAnotherCity(url)
{

window.navigate(url);
}
function __SetHomePage(obj)
{
obj.style.behavior='url(#default#homepage)';
alert(obj);
obj.setHomePage( 'http://' + thisCity + '.goufang.com');
return false;
}

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if (!window.opera && document.all && this.installedVer.major > 7) {
		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
		deconcept.SWFObject.doPrepUnload = true;
	}
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', false);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	useExpressInstall: function(path) {
		this.xiSWFPath = !path ? "expressinstall.swf" : path;
		this.setAttribute('useExpressInstall', true);
	},
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs[variablePairs.length] = key +"="+ variables[key];
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "PlugIn");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "ActiveX");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			/* 
			//删除一个 for 对应前台脚本不用声明了.
			//王戬 2007-06-04
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			*/
			/* 新添加开始 王戬 2007-06-04 */
			swfNode += "<PARAM NAME='WMode' VALUE='Window'>";
			swfNode += "<PARAM NAME='Play' VALUE='-1'>";
			swfNode += "<PARAM NAME='Loop' VALUE='-1'>";
			swfNode += "<PARAM NAME='Quality' VALUE='High'>";
			swfNode += "<PARAM NAME='SAlign' VALUE=''>";
			swfNode += "<PARAM NAME='Menu' VALUE='-1'>";
			swfNode += "<PARAM NAME='Base' VALUE=''>";
			swfNode += "<PARAM NAME='AllowScriptAccess' VALUE=''>";
			swfNode += "<PARAM NAME='Scale' VALUE='ShowAll'>";
			swfNode += "<PARAM NAME='DeviceFont' VALUE='0'>";
			swfNode += "<PARAM NAME='EmbedMovie' VALUE='0'>";
			swfNode += "<PARAM NAME='BGColor' VALUE=''>";
			swfNode += "<PARAM NAME='SWRemote' VALUE=''>";
			swfNode += "<PARAM NAME='MovieData' VALUE=''>";
			swfNode += "<PARAM NAME='SeamlessTabbing' VALUE='1'>";
			swfNode += "<PARAM NAME='Profile' VALUE='0'>";
			swfNode += "<PARAM NAME='ProfileAddress' VALUE=''>";
			swfNode += "<PARAM NAME='ProfilePort' VALUE='0'>";
			swfNode += "<PARAM NAME='AllowNetworking' VALUE='all'>";
			/* 新添加结束 */
			/*
			对应上边删除
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			*/
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
		var axo = 1;
		var counter = 3;
		while(axo) {
			try {
				counter++;
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
//				document.write("player v: "+ counter);
				PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
			} catch (e) {
				axo = null;
			}
		}
	} else { // Win IE (non mobile)
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if (param == null) { return q; }
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i = objects.length - 1; i >= 0; i--) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
if (deconcept.SWFObject.doPrepUnload) {
	if (!deconcept.unloadSet) {
		deconcept.SWFObjectUtil.prepUnload = function() {
			__flash_unloadHandler = function(){};
			__flash_savedUnloadHandler = function(){};
			window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
		}
		window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
		deconcept.unloadSet = true;
	}
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;
function __HTML_SiteLinkMenu()
{
__Get_ThisCityId();
__HTML_SiteMenu();
var str = "<table cellSpacing='0' cellPadding='0' width='100%' border='0'>";
str += "<tr>";
    for(var i=0;i<__DATA_SiteMenu.length;i=i+3){
str += "<td width='" + 100 /(__DATA_SiteMenu.length/3)  + "%'>";
str += "<a target='_blank' href='"+__DATA_SiteMenu[i+1]+"' >"+__DATA_SiteMenu[i]+"</a>";
str += "</td>";
}
str += "</tr>";
str += "</table>";
document.write(str);
}
document.write("<\script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\"></script>");

function show_menu(obj_s,obj_f){
	var  s_id = document.getElementById(obj_s);
	var  sc_id = document.getElementById(obj_f);
	
     var ttop  = sc_id.offsetTop; 
 var tleft = sc_id.offsetLeft;
 var theight =sc_id.offsetHeight;

 var offset = document.body.clientWidth -780;
 if (offset >0)
 {
offset = offset/2;
 }
 else
 {
offset = 0;
 }
//if(ThisCity=='dl')
//s_id.style.top = 22;
//else
s_id.style.top = 20;

s_id.style.left = offset + tleft + 700;   
	     s_id.style.display = "";
 //var obj = document.getElementById('float_menu2');
	     sc_id.className = "ahv";

 //var parm = document.getElementById('info_menu_div');
//parm.style.visibility = "visible";
//alert(parm.style.visibility);
  	}
     	
  function hide_menu(obj_h,obj_f){
	var  h_id = document.getElementById(obj_h);
	var  hc_id = document.getElementById(obj_f);
	     h_id.style.display = "none";
	     hc_id.className = "alk";
     	}

function openwin(page,size)
{
window.open(page,"newuser","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,"+ size);
} 
