"; 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 = "