" + AreaArr[i][1] + ":

"; tempHotHtml += "

"; for (var k = 0; k < CityArr.length; k++) { var arr = CityArr[k]; if (AreaArr[i][0] == arr[0]) { if (cid == arr[2]) { tempHotHtml += "" + arr[3] + "" } else { tempHotHtml += "" + arr[3] + "" } } }; tempHotHtml += "

"; tempHotHtml += "" }; return tempHotHtml }; (function (window, undefined) { var auto = (function () { var document = window.document; var auto = function (selector) { return new auto.fn.init(selector) }; auto.fn = auto.prototype = { elem: null, init: function (selector) { this.length = 1; this[0] = "string" == typeof selector ? document.getElementById(selector) : selector; this.elem = this[0] } }; auto.extend = auto.fn.extend = function () { var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; if (typeof target === "boolean") { deep = target; target = arguments[1] || {}; i = 2 }; if (typeof target !== "object" && !typeof target === "function") target = {}; if (length == i) { target = this; --i }; for (; i < length; i++) { if ((options = arguments[i]) != null) { for (var name in options) { var src = target[name], copy = options[name]; if (target === copy) { continue }; if (deep && copy && typeof copy === "object" && !copy.nodeType) { target[name] = auto.extend(deep, src || (copy.length != null ? [] : {}), copy) } else { if (copy !== undefined) { target[name] = copy } } } } }; return target }; auto.fn.init.prototype = auto.fn; return auto })(); auto.extend({ isArray: function (o) { return Object.prototype.toString.call(o) == "[object Array]" }, isMouseLeaveOrEnter: function (e, handler) { if (e.type !== 'mouseout' && e.type !== 'mouseover') { return false }; var reltg = e.relatedTarget ? e.relatedTarget : (e.type === 'mouseout' ? e.toElement : e.fromElement); while (reltg && reltg !== handler) { reltg = reltg.parentNode }; return (reltg !== handler) }, ready: function (fn) { document.onreadystatechange = function () { if (document.readyState === "complete") fn() } }, cookie: { set: function (name, value, option) { var str = name + '=' + escape(value); if (option) { if (option.expireHours) { var d = new Date(); d.setTime(d.getTime() + option.expireHours * 3600 * 1000); str += '; expires=' + d.toGMTString() }; if (option.path) str += '; path=' + option.path; else str += '; path=/'; if (option.domain) str += '; domain=' + option.domain; if (option.secure) str += '; true' }; document.cookie = str }, get: function (name, defval) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return decodeURIComponent(c.substring(nameEQ.length, c.length)) }; return typeof defval == "undefined" ? null : defval }, del: function (name) { var exp = new Date(); exp.setTime(exp.getTime() - 1); var cval = this.get(name); if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString() } }, jsLoad: function () { var scr, fn, args = [], length = arguments.length; if (length == 1) { target = arguments[0] || {}; if (typeof target == "object") { src = target.url; fn = target.fn; args = target.args } } else { src = arguments[0]; fn = arguments[1]; for (var i = 0; i < length - 2; i++) { args[i] = arguments[i + 2] } }; s = document.createElement("script"); s.setAttribute("type", "text/javascript"); s.setAttribute("src", src); s.onload = s.onreadystatechange = function () { if (!s.readyState || s.readyState == "loaded" || s.readyState == "complete") { if (typeof fn == "function") fn.apply(this, args); s.onload = s.onreadystatechange = null; try { s.parentNode && s.parentNode.removeChild(s) } catch (e) { } } }; document.getElementsByTagName("head")[0].appendChild(s) }, waitTime: function (fn, s) { var waitInterval, args = [], length = arguments.length; if (length > 2) { if (length == 3) { if (auto.isArray(arguments[2])) { args = arguments[2] } } else { for (var i = 0; i < length - 2; i++) { args[i] = arguments[i + 2] } } }; clearTimeout(waitInterval); waitInterval = window.setTimeout(function () { fn.apply(this, args) }, s) }, binds: function (target, eventName, handler, args) { var eventHandler = handler; if (args) { eventHander = function (e) { handler.call(args, e) } }; if (window.addEventListener) { if (eventName.substring(0, 2) == "on") eventName = eventName.substring(2, eventName.length); target.addEventListener(eventName, eventHandler, false) } else if (window.attachEvent) { if (eventName.substring(0, 2) != "on") eventName = "on" + eventName; target.attachEvent(eventName, eventHandler) } }, mouseHover: function (f, c, s) { var fn, args = [], length = arguments.length, fo = auto(f), co = auto(c); if (fo == null || co == null) return; fn = length > 3 ? arguments[3] : function () { }; this.binds(fo[0], "onmouseover", function () { fn(); s == 0 ? co.show() : auto.waitTime(function () { co.show() }, s) }); this.binds(fo[0], "onmouseout", function () { s == 0 ? co.hide() : auto.waitTime(function () { co.hide() }, s) }) }, mouseClick: function (f, c, ch, s) { var fn, args = [], length = arguments.length, fo = auto(f), co = auto(c), cho = auto(ch); if (fo == null || co == null || cho == null) return; fn = length > 4 ? arguments[4] : function () { }; this.binds(cho[0], "onclick", function () { fn(); s == 0 ? co.target() : auto.waitTime(function () { co.target() }, s) }); this.binds(fo[0], "onmouseout", function (evt) { if (auto.isMouseLeaveOrEnter(evt, fo[0])) { s == 0 ? co.hide() : auto.waitTime(function () { co.hide() }, s) } }) } }); auto.fn.extend({ show: function () { this.elem.style.display = "block" }, hide: function () { this.elem.style.display = "none" }, target: function () { this.elem.style.display == "" || this.elem.style.display == "block" ? this.hide() : this.show() }, html: function (val) { if (val) { this.elem.innerHTML = val } else { return this.elem.innerHTML } }, attr: function (name) { var val = arguments[1]; if (val) { this.elem.attributes(name, val) } else { return this.elem.getAttribute(name) } }, css: function (val) { if (val) { this.elem.className = val } else { return this.elem.className } }, click: function (fn) { this.elem.onclick = function () { fn() } }, href: function (url) { if (url) { this.elem.href = url } else { return this.elem.href } } }); auto.extend({ home: { waitTime: [0, 300, 250], homeUrl: "http://www.autohome.com.cn/", clubUrl: "club.asp?id=/", clubServUrl: "http://club.service.autohome.com.cn/", newServUrl: "http://news.service.autohome.com.cn/", nowUrl: location.href, ocid: auto.cookie.get("cityId") ? parseInt(auto.cookie.get("cityId")) : 0, ccid: auto.cookie.get("cookieCityId") ? parseInt(auto.cookie.get("cookieCityId")) : 0, areaid: parseInt(auto.cookie.get("area")) ? parseInt(auto.cookie.get("area")) : 0, cid: auto.cookie.get("cookieCityId") == null || auto.cookie.get("cookieCityId") == 0 ? (auto.cookie.get("area") ? parseInt(auto.cookie.get("area") / 100) * 100 : 0) : parseInt(auto.cookie.get("cookieCityId")), getUserArea: function (cid) { var cityid = cid != null || cid > 0 ? cid : auto.home.cid; auto.jsLoad(auto.home.homeUrl + "Ashx/AjaxHeadArea.ashx?OperType=GetAreaNavList&VarName=AreaNavList&CityId=" + cityid, function () { if (typeof AreaNavList != "undefined") { if (AreaNavList.Status) { if (AreaNavList.AreaNavCount > 0) { var arrAreaNav = AreaNavList.AreaNavList; html = "城市:"; for (var i = 0; i < arrAreaNav.length; i++) { html += "" + arrAreaNav[i].CityName + "" }; html += "371个城市>>"; auto("cslbtt").html(html) } } } }) }, areaCookie: function () { var r = true; if (typeof arguments[0] == "boolean") { r = arguments[0] }; expire = arguments[1] ? arguments[1] : { expireHours: 36000 * 24, domain: ".autohome.com.cn" }; this.set = function (cityName, oldCityId, newCityId) { auto.cookie.del("cityId"); auto.cookie.del("cookieCityId"); auto.cookie.set("cityId", oldCityId, expire); auto.cookie.set("cookieCityId", newCityId, expire); auto("hidcid")[0].value = newCityId; if (r) { window.location.reload() } else { changArea(newCityId); auto.home.getUserArea(newCityId); auto("changediv").hide(); auto("changediv").html(GetCityHtml(auto("hidcid")[0].value)) } } } } }); window.auto = auto })(window); Function.prototype.bind = function (bindObj, args) { var _self = this; return function () { return _self.apply(bindObj, [].concat(args)) } }; function readCookie(name, defauleValue) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return decodeURIComponent(c.substring(nameEQ.length, c.length)) }; return typeof defauleValue != "undefined" ? defauleValue : null }; function AutohomeJsLoad(args) { var s = document.createElement("script"); s.setAttribute("type", "text/javascript"); s.setAttribute("src", args.url); s.onload = s.onreadystatechange = function () { if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") { if (typeof args.callBack == "function") args.callBack(args.args); s.onload = s.onreadystatechange = null; try { s.parentNode && s.parentNode.removeChild(s) } catch (e) { } } }; document.getElementsByTagName("head")[0].appendChild(s) }; Function.prototype.bind = function (bindObj, args) { var _self = this; return function () { return _self.apply(bindObj, [].concat(args)) } }; function AutoUserFct() { this.init() }; AutoUserFct.prototype = { sopLogUrl: auto.home.clubServUrl + "Ashx/Member/LoginClub.ashx?parm=Autohomeloginjosn", sopExitUrl: auto.home.clubUrl + "bbs/exit.aspx?action=script", sopClubUrl: auto.home.newServUrl + "header/AjaxHeadClub.ashx?OperType=GetClubList&VarName=UserClubList", logUrl: auto.home.clubServUrl + "login/index.aspx?backtopurl=" + auto.home.nowUrl, userUrl: "http://i.autohome.com.cn/home.html", regUrl: auto.home.clubServUrl + "Reg/mobile/index.html?backtopurl=" + auto.home.nowUrl, addUrl: auto.home.clubServUrl + "otherUser/addinfo.aspx?backurl=" + auto.home.nowUrl, upgradeUrl: auto.home.clubServUrl + "login/AutoUserUpgrade.aspx?backurl=" + auto.home.nowUrl, isLogIn: false, ssoUN: [], UC: null, UID: null, UP: null, UN: null, isLoadOver: false, logoffArray: [], loginArray: [], LoginDIV: document.getElementById("login"), readCookieValue: function () { var UN = readCookie("ssoUN"); this.UID = readCookie("UID"); this.UC = readCookie("UC"); this.UP = parseInt(readCookie("UP", "0")); this.UN = readCookie("UN"); this.ssoUN = UN != null ? this.ssoUN = UN.split("|") : []; this.UP = this.UP != null ? parseInt(this.UP) : null; this.UID = this.UID != null ? parseInt(this.UID) : null; if (this.UID == null || this.UP == null || this.UC == null) return false; return true }, init: function (t) { if (typeof t == "undefined") this.isLogIn = this.readCookieValue(); this.isLoadOver = false; if (this.ssoUN.length > 0) { this.ssoUNOK(); return }; this.clubOK() }, clubHtml: function () { html = "
  • "; html += "
    进入论坛
    "; html += "
    "; html += "
    "; html += "
    "; html += "
    加载中...
    "; html += "
    "; html += "
    "; html += "
  • "; return html }, getClubList: function (uid) { uid = uid ? uid : this.UID; if (uid) { auto.jsLoad(this.sopClubUrl, function () { html = ""; if (typeof UserClubList != "undefined") { if (UserClubList.Status) { if (UserClubList.ClubCount > 0) { var arrClub = UserClubList.ClubList; for (var i = 0; i < arrClub.length; i++) { html += "" + arrClub[i].seriesname + "论坛" } } } }; html += "我的地区论坛"; auto("bbsList").html(html) }) } }, clubOK: function () { if (this.isLogIn == false) { html = "
  • 请 登录 或 注册
  • " } else { var MISUSER = readCookie("MISUSER"); MISUSER = MISUSER != null ? parseInt(MISUSER) : -1; if (MISUSER == 0 || MISUSER == 3) { html = "
  • " + this.UN + "
  • 升级
  • " + this.clubHtml() + "
  • 退出
  • " } else { html = "
  • " + this.UN + "
  • " + this.clubHtml() + "
  • 退出
  • " } }; this.onlogin(); this.LoginDIV.innerHTML = html }, ssoUNOK: function () { if (this.ssoUN.length <= 0) return; var accoutid = -1; accoutid = parseInt(this.ssoUN[1]); if (!this.isLogIn) { if (accoutid == 0) { this.LoginDIV.innerHTML = "
  • " + this.ssoUN[0] + "
  • 补充信息
  • 退出
  • "; this.onlogin() } else { AutohomeJsLoad({ url: "http://club.service.autohome.com.cn/Ashx/Member/LoginClub.ashx?parm=Autohomeloginjosn", callBack: function () { this.isLogIn = this.readCookieValue(); this.clubOK() } .bind(this, []) }) } }; if (this.isLogIn) { if (this.UID == accoutid && accoutid != 0) { this.clubOK() } else { if (accoutid > 0) { AutohomeJsLoad({ url: "http://club.service.autohome.com.cn/Ashx/Member/LoginClub.ashx?parm=Autohomeloginjosn", callBack: function () { this.isLogIn = this.readCookieValue(); this.clubOK() } .bind(this, []) }) } else { this.onlogin(); this.LoginDIV.innerHTML = "
  • " + this.ssoUN[0] + "
  • 补充信息
  • 退出
  • " } } } }, logoff: function () { this.isLogIn = false; this.isLoadOver = false; AutohomeJsLoad({ url: "club.asp?id=/bbs/exit.aspx?action=script", callBack: function () { this.logoffHTML(); this.onlogoff() } .bind(this, []) }) }, logoffHTML: function () { this.isLogIn = false; this.ssoUN = []; this.UID = 0; this.isLoadOver = true; this.LoginDIV.innerHTML = "
  • 请 登录 或 注册
  • " }, onlogin: function () { this.isLoadOver = true; for (var i = 0, length = this.loginArray.length; i < length; i++) { if (typeof this.loginArray[i] == "function") try { this.loginArray[i]() } catch (err) { } } }, onloginAdd: function (fun) { if (typeof fun == "function" && this.isLoadOver) { try { fun() } catch (err) { } }; this.loginArray.push(fun) }, onlogoff: function () { for (var i = 0, length = this.logoffArray.length; i < length; i++) { if (typeof this.logoffArray[i] == "function") try { this.logoffArray[i]() } catch (err) { } } }, onlogoffAdd: function (fun) { if (typeof fun == "function" && this.isLoadOver) { try { fun() } catch (err) { } }; this.logoffArray.push(fun) } }; var AutohomeUserInfo = new AutoUserFct(); function addFavorite(url, title) { var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf("msie 8") > -1) { try { external.AddToFavoritesBar(url, title) } catch (e) { alert("您的浏览器不支持此功能,请使用快捷键 Ctrl+D 手动加入收藏夹") } } else { try { window.external.AddFavorite(url, title) } catch (e) { try { window.sidebar.addPanel(title, url, "") } catch (e) { alert("您的浏览器不支持此功能,请使用快捷键 Ctrl+D 手动加入收藏夹") } } } }; auto.mouseClick("cityli", "changediv", "oncitydiv", auto.home.waitTime[0], function () { auto("changediv").html(GetCityHtml(auto("hidcid")[0].value)); }); if (auto("bbsli")[0]) auto.mouseClick("bbsli", "bbsli_con", "onclubdiv", auto.home.waitTime[0], function () { AutohomeUserInfo.getClubList(); }); auto.mouseClick("moveli", "moveli_con", "onmovediv", auto.home.waitTime[0]); auto.mouseClick("moreli", "moreli_con", "onmorediv", auto.home.waitTime[0]); auto.home.getUserArea(); var ac = new auto.home.areaCookie(false); var list2sc = [0, 110000, 310000, 440000, 320000, 330000, 410000, 370000, 210000, 130000, 500000]; var default2sc = 0; auto("hidcid")[0].value = auto.home.cid; function a2scExist(cid) { for (var i = 0; i < list2sc.length; i++) { if (list2sc[i] == parseInt(cid / 10000) * 10000) return true; } return false; } changArea(auto.home.cid); function changArea(cid) { D = GetCityInfo(cid, 2); auto("cookieCity").html(D.CityName); if (D.CityId == 0) { auto("cookieCity").href(auto.home.homeUrl + D.PingYin); auto("markethref").href(auto.home.homeUrl + "market/"); auto("CarDealer1")[0].src = auto.home.homeUrl + "includefile/index1017/dealerprice/110100.html"; auto("CarMarket1")[0].src = auto.home.homeUrl + "includefile/index1017/automobile/0.html"; auto("maiketId").html(D.CityName + "车市"); auto("maiketId").href("http://www.autohome.com.cn/list/c2-1.html"); auto("maiketmoreid").href("http://www.autohome.com.cn/list/c2-1.html"); } else { if (D.CityId == 110100 || D.CityId == 310100 || D.CityId == 440100 || D.CityId == 510100 || D.CityId == 370100 || D.CityId == 430100) { document.getElementById("usemore").style.display = "block"; } else { document.getElementById("usemore").style.display = "none"; } auto("cookieCity").href(auto.home.homeUrl + D.PingYin + "/"); auto("markethref").href(auto.home.homeUrl + D.PingYin + "/"); auto("CarDealer1")[0].src = auto.home.homeUrl + "includefile/index1017/dealerprice/" + D.CityId + ".html"; auto("CarMarket1")[0].src = auto.home.homeUrl + "includefile/index1017/automobile/" + D.CityId + ".html"; auto("maiketId").html(D.CityName + "车市"); auto("maiketId").href("http://www.autohome.com.cn/" + D.PingYin); auto("maiketmoreid").href("http://www.autohome.com.cn/" + D.PingYin); } auto("topMarket")[0].src = auto.home.homeUrl + "includefile/index1017/market/" + D.CityId + ".html"; //auto("topMarket")[0].src = "http://www.autohome.com.cn/controls/index_new/1017/index_new_Market.aspx?areaid=" + D.CityId+"&dddd"; var cid = a2scExist(D.CityId) ? D.CityId : 0; for (var i = 0; i < list2sc.length; i++) { if (list2sc[i] == parseInt(cid / 10000) * 10000) { default2sc = list2sc[i]; } } document.getElementById("infoto2sc").src = "http://www.autohome.com.cn/usedcar/201110/" + default2sc + ".html?v=a"; }