function getE(a) { var b; return document.getElementById ? b = document.getElementById(a) : document.all ? b = document.all[a] : document.layers && (b = document.layers[a]), b } function OpenWindow(a, b, c, d) { var e = (screen.width - b) / 2, f = (screen.height - c) / 2; winprops = "resizable=0, height=" + c + ",width=" + b + ",top=" + f + ",left=" + e + "w", d && (winprops += ",scrollbars=1"), window.open(a, "_blank", winprops) } function setLocation(a) { window.location.href="a" } function displayAjaxLoading(a) { a ? $(".ajax-loading-block-window").show() : $(".ajax-loading-block-window").hide("slow") } function AddFavorite(a, b) { try { window.external.addFavorite(a, b) } catch (c) { try { window.sidebar.addPanel(b, a, "") } catch (c) { alert("加入收藏失败,请使用Ctrl+D进行添加") } } } function SetHome(a) { document.all ? (document.body.style.behavior = "url(#default#homepage)", document.body.setHomePage(a)) : alert("您好,您的浏览器不支持自动设置页面为首页功能,请您手动在浏览器里设置该页面为首页!") } function displayPopupNotification(a, b, c) { var d, e, f, g; if (d = "success" == b ? $("#dialog-notifications-success") : "error" == b ? $("#dialog-notifications-error") : $("#dialog-notifications-success"), e = "", "string" == typeof a) e = "

" + a + "

"; else for (f = 0; f < a.length; f++) e = e + "

" + a[f] + "

"; d.html(e), g = c ? !0 : !1, d.dialog({ modal: g }) } function displayBarNotification(a, b, c) { var d, e, f; if (clearTimeout(barNotificationTimeout), d = "success", "success" == b ? d = "success" : "error" == b && (d = "error"), $("#bar-notification").removeClass("success").removeClass("error"), $("#bar-notification .content").remove(), e = "", "string" == typeof a) e = '

' + a + "

"; else for (f = 0; f < a.length; f++) e = e + '

' + a[f] + "

"; $("#bar-notification").append(e).addClass(d).fadeIn("slow").mouseenter(function () { clearTimeout(barNotificationTimeout) }), $("#bar-notification .close").unbind("click").click(function () { $("#bar-notification").fadeOut("slow") }), c > 0 && (barNotificationTimeout = setTimeout(function () { $("#bar-notification").fadeOut("slow") }, c)) } function DynamicLoad(a) { var b = $(a), c = b.attr("isload"); 1 != c && b.hasClass("lazyload") && (b.attr("isload", 1), b.attr("src", b.attr("src"))) } function ShowMessageInBar(a) { var c = $("#progressbar", window.parent.document); c.html(a), c.show(), setTimeout(hideTheProgressbar, 300) } function hideTheProgressbar() { var a = $("#progressbar", window.parent.document); a.hide() } function htmlEncode(a) { return $("
").text(a).html() } function htmlDecode(a) { return $("
").html(a).text() } function toHexColor(a, b, c) { var d = "#", e = "0123456789ABCDEF"; return low = a % 16, high = (a - low) / 16, d += e.charAt(high) + e.charAt(low), low = b % 16, high = (b - low) / 16, d += e.charAt(high) + e.charAt(low), low = c % 16, high = (c - low) / 16, d += e.charAt(high) + e.charAt(low) } function addStrToArrayString(a, b) { var e, f, c = b.split(","), d = c.length; for (e = 0; d > e; e++) if (c[e] == a) return b; return c.push(a), f = c.join(","), 0 == f.indexOf(",") && (f = f.substring(1)), f } function removeStrFromArrayString(a, b) { var e, f, c = b.split(","), d = c.length; for (e = 0; d > e; e++) if (c[e] == a) return c.splice(e, 1), f = c.join(","), 0 == f.indexOf(",") && (f = f.substring(1)), f; return b } function isExsitInSem(a, b) { var e, c = b.split("^&"), d = c.length; for (e = 0; d > e; e++) if (c[e] == a) return !0; return !1 } function addStrToArrayStringSem(a, b) { var d, c = b.split("^*"); return c.push(a), d = c.join("^*"), 0 == d.indexOf("^*") && (d = d.substring(2)), d } function removeStrFromArrayStringSem(a, b) { var e, f, c = b.split("^*"), d = c.length; for (e = 0; d > e; e++) if (c[e] == a) return c.splice(e, 1), f = c.join("^*"), 0 == f.indexOf("^*") && (f = f.substring(2)), f; return b } function TurnPageSmartView(a, b, c, d, e, f, g, h, i, j) { var l, m, n, o, p, q, k = $("#bakload"); for ("" != k && null != k && void 0 != typeof k && k.show(), l = "true", m = b.split("_")[2], n = "/Plugins/RunTime/TurnPageSmartView?pagenumber=" + d + "&loaddesign=" + l + "&pageId=" + a + "&smartViewId=" + m + "&isDesign=" + c, "undefined" != typeof g && (n = n + "&keyword=" + h + "&searchCategory=" + g), o = f.split(","), p = "isAppend=" + e, "undefined" != i && (p += ""), q = 0; q < o.length - 1; q++) p = str + "&" + o[q] + "=" + $("#" + b + " .yibuFrameContent input[name='" + o[q] + "']").val(); $.ajax({ cache: !1, url: n, data: p, type: "get", success: function (a) { e ? "function" == typeof j ? j(m, $(a)) : ($("#" + b + " .yibuFrameContent .pager.f_clearfix").remove(), $("#" + b + " .yibuFrameContent .w_pager").remove(), $("#" + b + " .yibuFrameContent").append($(a)), $("#" + b + " .yibuFrameContent .pager").not(".f_clearfix").not(":first").remove()) : $("#" + b + " .yibuFrameContent").html(a), "" != k && null != k && "undefined" != typeof k && k.hide() } }) } function TurnNewPageSmartView(a, b, c, d, e, f, g) { var l, i = "true", j = b.split("_")[2], k = "/Plugins/RunTime/TurnPageSmartView?pagenumber=1&loaddesign=" + i + "&pageId=" + a + "&smartViewId=" + j + "&isDesign=" + c; k = k + "&keyword=" + d + "&categoryId=" + f + "&categoryName=" + g, l = "", "undefined" != e && (l += ""), $.ajax({ cache: !1, url: encodeURI(k), data: l, type: "get", success: function (a) { $("#" + b + " .yibuFrameContent").html($(a)) } }) } function TurnPageCategoryListSmartView(a, b, c, d, e, f, g, h, i, j) { var l, m, n, o, p, q, k = $("#bakload"); for ("" != k && null != k && void 0 != typeof k && k.show(), l = "true", m = b.split("_")[2], n = "/Plugins/RunTime/TurnPageSmartView?pagenumber=" + d + "&loaddesign=" + l + "&pageId=" + a + "&smartViewId=" + m + "&isDesign=" + c, "undefined" != typeof h && (n = n + "&EntityTypeName=" + g + "&categoryId=" + h), o = f.split(","), p = "isAppend=" + e, "undefined" != typeof i && (p += ""), q = 0; q < o.length - 1; q++) p = str + "&" + o[q] + "=" + $("#" + b + " .yibuFrameContent input[name='" + o[q] + "']").val(); $.ajax({ cache: !1, url: encodeURI(n), data: p, type: "get", success: function (a) { e ? "function" == typeof j ? j(m, $(a)) : ($("#" + b + " .yibuFrameContent .w_pager").remove(), $("#" + b + " .yibuFrameContent .pager.f_clearfix").remove(), $("#" + b + " .yibuFrameContent").append($(a)), $("#" + b + " .yibuFrameContent .pager").not(".f_clearfix").not(":first").remove()) : $("#" + b + " .yibuFrameContent").html(a), "" != k && null != k && void 0 != typeof k && k.hide() } }) } function PcListPagination(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) { if (kino.razor.use("$"), "PageNumber" == c) $("#" + a + " #prePage").click(function () { var c, b = $("#" + a + " #pagerHtml a[class *='activi']"); "1" != b.html() && (c = $("#" + a + " #pagerHtml li[class !='dom'] a:not(a[class *='w-page-flip'])"), $.each(c, function () { parseInt($(this).html()) == parseInt(b.html()) - 1 && $(this).click() })) }), $("#" + a + " #nextPage").click(function () { var c, b = $("#" + a + " #pagerHtml a[class *='activi']"); b.html() != e.toString() && (c = $("#" + a + " #pagerHtml li[class !='dom'] a:not(a[class *='w-page-flip'])"), $.each(c, function () { parseInt($(this).html()) == parseInt(b.html()) + 1 && $(this).click() })) }), $("#" + a + " #pagerHtml li[class !='dom'] a:not(a[class *='w-page-flip'])").click(function () { var q = parseInt($(this).html()), r = $(this).html(); e > 5 && (4 > q ? ($("#" + a + " #firstdom").hide(), $("#" + a + " #lasedom").show(), $("#" + a + " #secondPage").html(2), $("#" + a + " #thirdPage").html(3), $("#" + a + " #forthPage").html(4)) : q > e - 3 ? ($("#" + a + " #firstdom").show(), $("#" + a + " #lasedom").hide(), $("#" + a + " #secondPage").html(e - 3), $("#" + a + " #thirdPage").html(e - 2), $("#" + a + " #forthPage").html(e - 1)) : ($("#" + a + " #firstdom").show(), $("#" + a + " #lasedom").show(), $("#" + a + " #secondPage").html(q - 1), $("#" + a + " #thirdPage").html(q), $("#" + a + " #forthPage").html(q + 1))), $("#" + a + " #pagerHtml").find("a").removeClass("activi"), $.each($("#" + a + " #pagerHtml").find("a"), function () { $(this).html() == r && $(this).addClass("activi") }), AssembleData(a, b, c, d, q, e, f, g, h, i, j, k, l, m, n, o, p) }); else if ("NextPreview" == c) $("#" + a + " #prePage").click(function () { var q = parseInt($("#" + a + " #firstNum").html()); 1 != q && (q -= 1, $("#" + a + " #firstNum").html(q), AssembleData(a, b, c, d, q, e, f, g, h, i, j, k, l, m, n, o, p)) }), $("#" + a + " #nextPage").click(function () { var q = parseInt($("#" + a + " #firstNum").html()); q != e && (q += 1, $("#" + a + " #firstNum").html(q), AssembleData(a, b, c, d, q, e, f, g, h, i, j, k, l, m, n, o, p)) }), $("#" + a + " #goPage").click(function () { var q = $("#" + a + " #turnPage").val(), r = parseInt(q); !isNaN(r) && e >= r && r >= 1 && ($("#" + a + " #firstNum").html(r), AssembleData(a, b, c, d, r, e, f, g, h, i, j, k, l, m, n, o, p), $("#" + a + " #turnPage").val("")) }); else if ("MoreButton" == c) { var q = 1; $("#" + a + " #searchMore").click(function () { q++, q == e && $(this).parent().hide(), AssembleData(a, b, c, d, q, e, f, g, h, i, j, k, l, m, n, o, p) }) } } function AssembleData(htmlId, listType, pagerStyle, pageSize, pageIndex, totalPage, categoryIds, entityIds, dateStyle, orderByField, orderByType, isCategoryList, postData, searchKeyWord, showImage, showPrice, callBack) { var param = { listType: listType, pageIndex: pageIndex - 1, pageSize: pageSize, showImgUrl: showImage, categoryIds: categoryIds, isCategoryList: isCategoryList, postData: postData, searchKeyWord: searchKeyWord, entityIds: entityIds, dateStyle: dateStyle, orderByField: orderByField, orderByType: orderByType }; $.post("/Plugins/ListDataCommon/GetListItems", param, function (data) { var preAddHetght, func; "PageNumber" == pagerStyle || "NextPreview" == pagerStyle ? ($("#ulList_" + htmlId + " li").remove(), $.each(data.Items, function (a, b) { $("#ulList_" + htmlId).append(kino.razor($("#listTemplate_" + htmlId).html(), { data: b })) })) : "MoreButton" == pagerStyle && (preAddHetght = $("#" + htmlId + " .yibuFrameContent").height(), $.each(data.Items, function (a, b) { $("#ulList_" + htmlId).append(kino.razor($("#listTemplate_" + htmlId).html(), { data: b })) }), ReComputeVisibleSmartViewTop()), isExitsFunction(callBack) && (func = eval(callBack), func()) }, "json") } function isExitsFunction(funcName) { try { if ("function" == typeof eval(funcName)) return !0 } catch (e) { } return !1 } function createBaiduMap(a, b) { var c, d, e, f, g, h, i, j, k, l, m, n; try { c = { offset: new BMap.Size(10, 5) }, d = new BMap.Map(a.id), e = new BMap.Point(116.404, 39.915), d.centerAndZoom(e, 15), a.ShowNavigation && d.addControl(new BMap.NavigationControl), a.ShowScale && d.addControl(new BMap.ScaleControl(c)), a.ShowMapType && d.addControl(new BMap.MapTypeControl), d.enableScrollWheelZoom(), h = '
' + a.content + "
", i = null, j = {}, j.title = a.title, j.width = 100, j.height = 105, j.panel = "panel", j.enableAutoPan = !0, k = [], a.ShowSearch && k.push(BMAPLIB_TAB_SEARCH), a.ShowToHere && k.push(BMAPLIB_TAB_TO_HERE), a.ShowFromHere && k.push(BMAPLIB_TAB_FROM_HERE), j.searchTypes = k, i = new BMapLib.SearchInfoWindow(d, h, j), l = new BMap.Geocoder, l.getPoint(a.address, function (b) { if (b && (g = b, d.centerAndZoom(b, 16), m = new BMap.Marker(b), d.addOverlay(m), a.ShowWindow && i.open(m), m.addEventListener("click", function () { i.open(m) }), void 0 != f)) { var c = new BMap.DrivingRoute(d, { renderOptions: { map: d, autoViewport: !0 } }); c.search(f, g) } }, ""), d.addEventListener("tilesloaded", function () { jQuery(".anchorBL").hide(); var a = jQuery(".BMap_cpyCtrl"); a.hide(), jQuery(".BMap_scaleCtrl").show() }), n = new BMap.Geolocation, n.getCurrentPosition(function (a) { var b, c; this.getStatus() == BMAP_STATUS_SUCCESS && (b = new BMap.Marker(a.point), d.addOverlay(b), d.panTo(a.point), f = a.point, void 0 != g && (c = new BMap.DrivingRoute(d, { renderOptions: { map: d, autoViewport: !0 } }), c.search(a.point, g))) }, { enableHighAccuracy: !0 }) } catch (o) { 0 == b && createBaiduMap(a, 1) } } function ShowCommonImageDialog(a, b) { var c = "/Plugins/Image/AddPicListPanel", d = [{ text: "确定", click: function () { $.ajax({ type: "post", url: "/Plugins/Image/ReturnImageJson", data: { ids: $("#hfImgId").val() }, dataType: "json", success: function (a) { b(a) } }), $(this).ajaxdialog("close") } }, { text: "取消", click: function () { $(this).ajaxdialog("close") } }], e = function (a, b) { b.htmlElement.html(b.httpData) }; ShowTopDialog(c, "选择图片", 600, 480, d, e) } function DisplayLang() { 0 == $("#wapPreview").length && 0 == $("#langyY").length && $.ajax({ cache: !1, url: "/Plugins/LanSwitchSmartView/QueryLang", type: "post", success: function (a) { var b, c, d, e; if ("" != a) for (b = "