function $(id){return document.getElementById(id);}
function getIEVersonNumber()
    {
        var ua = navigator.userAgent;
        var msieOffset = ua.indexOf("MSIE ");
        if(msieOffset < 0)
        {
            return 0;
        }
        return parseFloat(ua.substring(msieOffset + 5, ua.indexOf(";", msieOffset)));
    }
    var isIE5Min = (getIEVersonNumber() >= 5);
    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.ty158.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://gy.")>=0 || location.href.indexOf("cityid=gy")>=0|| location.href.indexOf("http://house.gy.")>=0)
{
 __DATA_City = new Array(
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"哈尔滨","hrb",
"贵阳","gy",
"吉林","jls",
"南京","nj"
);}
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/";zfLink="zf/";newsLink="http://zixun.ty158.com/";}
function __ACT_ShowSiteHeader()
{
__Get_ThisCityId();
GetThisCityMapName();
$("h_cur_city").innerHTML="<strong>" + ThisCityName + "<strong>";
if (ThisCity == "beta"){$("city_selected_bj").innerHTML="<strong>" + ThisCityName + "<strong>";}
else{$("city_selected_" + ThisCity).innerHTML="<strong>" + ThisCityName + "<strong>";}
document.write(__HTML_SiteHeader());
refresh_menu();	//ShowNew();
}
function __Get_ThisCityId()
{
try{ThisCity = __G_ThisCityID;}catch(e){ThisCity = "";}
if (location.href.indexOf("http://beta.")>=0 || location.href.indexOf("cityid=beta")>=0 || ThisCity=="beta")
{
ThisCity = "beta";
__DATA_City = new Array(
"测试","beta",
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"吉林","jls",
"哈尔滨","hrb"
);
}
if (location.href.indexOf("http://gy.")>=0 || location.href.indexOf("cityid=gy")>=0|| location.href.indexOf("http://house.gy.")>=0)
{
 __DATA_City = new Array(
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"哈尔滨","hrb",
"贵阳","gy",
"吉林","jls",
"南京","nj"
);}
if (location.href.indexOf("http://cc.")>=0 || location.href.indexOf("cityid=cc")>=0|| location.href.indexOf("http://house.cc.")>=0)
{
 __DATA_City = new Array(
"北京","bj",
"上海","sh",
"广州","gz",
"杭州","hz",
"沈阳","sy",
"天津","tj",
"成都","cd",
"武汉","wh",
"重庆","cq",
"深圳","sz",
"大连","dl",
"宁波","nb",
"长沙","cs",
"哈尔滨","hrb",
"长春","cc",
"吉林","jls",
"南京","nj"
);}
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 (0 <= location.href.indexOf("http://house." + __DATA_City[i+1] + "."))
		{
			ThisCity = __DATA_City[i+1];
			ThisCityName = __DATA_City[i];
		}
		if (0 <= location.href.indexOf("http://home." + __DATA_City[i+1] + "."))
		{
			ThisCity = __DATA_City[i+1];
			ThisCityName = __DATA_City[i];
		}
		if (0 <= location.href.indexOf("http://zixun.ty158.com/" + __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 ("" == 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 __HTML_SiteHeader()
{
var str = "<div style='position:relative;width:1px; height:1px;line-height:1.5em;'>";
str += "<div id='citydiv' style='POSITION: absolute;border:1px solid #ccc;VISIBILITY: hidden ;left:-340px;top:-38px;z-index:4000;FILTER: ";
str += "revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5); BACKGROUND-COLOR: #ffffff' onmouseover='Show();' onmouseout='Hide()'>";
if (isIE5Min){str+="<iframe width=290px height=115px src=''  frameBorder='0' scrolling='no'></iframe>";}
str += "<table  border='0' cellspacing='0' cellpadding='0' style='";
if (isIE5Min)str+="position:absolute;top:0px;left:0px;";
str +="background:#fff' 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 += ".ty158.com/'>";
otherCityLink += __DATA_City[i];
otherCityLink += "</a></li>";
    }

if ( i%14 == 0 ) 
{
str += "<tr height=26>";
}
var cityUrl = "http://" + __DATA_City[i+1] + ".ty158.com";
var cityName = __DATA_City[i];
str +="<td align='center' style='padding-top:5px;padding-bottom:3px;border:solid 1px #ffffff;width:40px;cousor:hand' 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>";
return str;
}

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 += ".ty158.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 = "地产资讯";}
if (_selected == "网络经纪人"){ _selected = "网络经纪";}
return _selected;
}
function GetLoginUrl()
{
var _loginUrl = "http://" + ThisCity + ".ty158.com/agentsys/login.aspx";
try{_loginUrl=__G_Login_URL; if (__G_Login_URL.indexOf("agentsys")>0){_loginUrl="http://" + ThisCity + ".ty158.com/agentsys/login.aspx";}}catch(e){_loginUrl = "http://" + ThisCity + ".ty158.com/agentsys/login.aspx";}
return _loginUrl;
}

function GetRegisterUrl()
{

var _registerUrl;

try{_registerUrl=__G_Register_URL;}catch(e){_registerUrl="http://common.ty158.com/html/register.html?cityid=" + ThisCity;}
if (_registerUrl==null || _registerUrl=="") _registerUrl = "http://common.ty158.com/html/register.html?cityid=" + ThisCity;
return _registerUrl;
}
function __ACT_AddInFavorite()
{
var _url = "http://" + ThisCity + ".ty158.com/";
var _title = "购房者网站--楼盘 二手房 出租 求租 置业顾问 经纪人 置业宝典 地产 新闻";
window.external.AddFavorite(_url,_title);
}
 var flag = false;
function  Show()
{
var parm = $('citydiv');
if (!isIE5Min){parm.style.top="-43px";parm.style.width="280px"}
else if (getIEVersonNumber()==7){parm.style.top="-43px";}
parm.style.visibility = "visible";
}
 function Hide()
 {

 var parm = $('citydiv');
parm.style.visibility = 'hidden'; 

 }


 function chanage(obj)
{   
document.all.selectcity.value= obj;
}
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);
}


/**
 * 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') ? $(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;

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 = $(obj_s);
if(!isIE5Min){s_id.style.left = "313px";s_id.style.top = "-1px";}
else if (getIEVersonNumber()==7){s_id.style.top="-2px";}
s_id.style.display = "";
}
  function hide_menu(obj_h){
	var  h_id = $(obj_h);
    h_id.style.display = "none";
 }
function refresh_menu()
{
    $("main_menu_home_a").href="http://" + ThisCity + ".ty158.com/";
    $("main_menu_xf_a").href="http://house." + ThisCity + ".ty158.com/";
    $("main_menu_es_a").href="http://" + ThisCity + ".ty158.com/es/";
    $("main_menu_zf_a").href="http://" + ThisCity + ".ty158.com/zf/";
    if($("main_menu_jj_a"))$("main_menu_jj_a").href="http://" + ThisCity + ".jj.ty158.com/";
    if($("main_menu_xq_a"))$("main_menu_xq_a").href="http://" + ThisCity + ".xiaoqu.ty158.com/";
    $("main_menu_jc_a").href="http://home." + ThisCity + ".ty158.com/";
    $("main_menu_jc_a").innerHTML="<span>家居装饰</span>";
    $("main_menu_zx_a").href="http://" + ThisCity + ".zx.ty158.com/";
    $("main_menu_xw_a").href="http://zixun.ty158.com/" + ThisCity+"/";
    $("menu_chongzhika").href="http://card.ty158.com/?cityid=" + ThisCity;
    $("main_menu_login").href=GetLoginUrl();
    $("main_menu_register").href=GetRegisterUrl();
    $("menu_woyaosoushuo").href="http://sou.ty158.com/?cityid=" + ThisCity;
$("menu_fabu_cs").href="http://" + ThisCity + ".ty158.com/default/SendInfo.aspx?type=1";
$("menu_fabu_qg").href="http://" + ThisCity + ".ty158.com/es/EsBuyerInfoAddOrEdit.aspx";
$("menu_fabu_cz").href="http://" + ThisCity + ".ty158.com/default/SendInfo.aspx?type=3";
$("menu_fabu_qz").href="http://" + ThisCity + ".ty158.com/zf/ZfRenterInfoEdit.aspx";
$("city_selected_dl").href="http://dl.ty158.com/";
     	if(ThisCity!="gy"){if($("city_selected_gy")!=null){$("city_selected_gy").style.display="none";}}
     	if(ThisCity!="cc"){if($("city_selected_cc")!=null){$("city_selected_cc").style.display="none";}}
   
    var selected = __HTML_SiteMenu();
    var curMenuObj
    switch(selected)
    {
        case "首页":
           curMenuObj=$("main_menu_home_a");
           break;
        case "新房":
            curMenuObj=$("main_menu_xf_a");
           break;
        case "二手房":
            curMenuObj=$("main_menu_es_a");
            break;
        case "租房":
             curMenuObj=$("main_menu_zf_a");
           break;
        case "经纪人":
             curMenuObj=$("main_menu_jj_a");
           break;
        case "装修":
            curMenuObj=$("main_menu_zx_a");
            break;
        case "家居装饰":
            curMenuObj=$("main_menu_jc_a");
            break;
        case "地产资讯":
            curMenuObj=$("main_menu_xw_a");
            break;
        case "全景小区":
            curMenuObj=$("main_menu_xq_a");
            break;
        case "地产博客":
            curMenuObj=$("main_menu_bk_a");
            break;
        case "购房宝典":
            if ($("main_menu_lt_a"))curMenuObj=$("main_menu_lt_a");
            break;
        default:
            break;
    }
    if(selected!="首页"){if($("home_logo_href")!=null)$("home_logo_href").href="http://" + ThisCity + ".ty158.com/";}
    if($("main_menu_zx_a"))$("main_menu_zx_a").parentNode.removeChild($("main_menu_zx_a"));
    if($("main_menu_xq_a"))$("main_menu_xq_a").parentNode.removeChild($("main_menu_xq_a"));
	if(ThisCity!="sy"&&ThisCity!="wh"&&ThisCity!="dl"&&ThisCity!="cd"&&ThisCity!="jls")$("main_menu_xw_a").parentNode.removeChild($("main_menu_xw_a"));

    if(curMenuObj)curMenuObj.className = "top_xxk02 top_btn_mr";
    if ( "dl" == ThisCity || "jc" == ThisCity || location.href.indexOf("http://jc.")>=0 )
    {
        //$("main_menu_jj_a").parentNode.removeChild($("main_menu_jj_a"));
    }
    else if ("bj" == ThisCity || "sh" == ThisCity || "cq" == ThisCity )
    {
        //$("main_menu_jj_a").parentNode.removeChild($("main_menu_jj_a"));
        $("main_menu_xw_a").parentNode.removeChild($("main_menu_xw_a"));
    }else
    {
        if ( ThisCity != "cd")
        //$("main_menu_jj_a").parentNode.removeChild($("main_menu_jj_a"));
        $("main_menu_jc_a").parentNode.removeChild($("main_menu_jc_a"));
    }
    
    if (ThisCity=="jls"){    $("main_menu_xw_a").innerHTML="<span>家居装饰</span>";}
    
}
function gouFang_SetHomePage(obj)
{
    try{obj.style.behavior="url(#default#homepage)";obj.setHomePage(location.href); return false}catch(e){alert(e);return false;}
}
document.write("<iframe id=\"initdomain\" width=0 height=0 scrolling=\"no\" frameborder=\"no\"></iframe>");

