function getCookie(name) { var strCookie = document.cookie; var arrCookie = strCookie.split("; "); for (var i = 0; i < arrCookie.length; i++) { var arr = arrCookie[i].split("="); if (arr[0] == name) { return arr[1] } } return "" } function GetToday() { var t = ""; $.ajax({ url: "/webshow/pubdata.aspx", data: { action: "today" }, async: false, cache: false, type: "post", dataType: "json", success: function (d) { t = d.Data }, error: function (d) { } }); return t }; function GetMenu(sel, data, num, ulclass, curparentpath, curliclass, target) { var h = " 0 && p >= num) { break } h += "= 0) { h += ' class="' + curliclass + '"' } h += ">' + data[p].nodename + "" } h += ""; $(sel).html(h) } function GetMenu2(d) { var c = { sel: "#exx_menu2", data: [], num1: 0, num2: 0, ulclass: "menu-heng", curparentpath: "", curliclass: "sel", target: "_blank", minwidth: 350 }; $.extend(c, d); var h = '
    0 && p >= c.num1) { break } h += "
  • ' + c.data[p].nodename + ""; if (c.data[p].child.length > 0) { h += '
      = 0) { h += " " + c.curliclass } h += '">'; for (var q = 0; q < c.data[p].child.length; q++) { if (c.num2 > 0 && q >= c.num2) { break } h += "
    • ' + c.data[p].child[q].nodename + ""; h += "
    • " } h += "
    " } h += "
  • " } h += "
"; $(c.sel).html(h); $(document).on("mouseover", c.sel + " .li-dp1", function () { var ul = $(this).find("ul").first(); if (ul.length != 1) { return } var p = $(this).parent().parent(); var pl = p.offset().left; var pw = p.outerWidth(); var ll = $(this).offset().left; var lw = $(this).outerWidth(); var liw = 0; ul.find("li").each(function (index, element) { liw += $(this).outerWidth() }); ul.css({ width: liw + "px" }); var lmax = pl + pw - ll; var w = ul.outerWidth(); if (w > lmax) { var _w = lmax - ul.outerWidth() + ul.width(); if (_w < c.minwidth) { _w = c.minwidth } ul.css({ width: _w + "px" }) } var _ulw = ll + ul.outerWidth(); var ulw = ul.offset().left + ul.outerWidth(); if (pw + pl >= _ulw) { ul.css({ left: 0 }) } else { ul.css({ width: liw + "px" }); lmax = ll + lw - pl; w = ul.outerWidth(); if (w > lmax) { var _w = lmax - ul.outerWidth() + ul.width(); ul.css({ width: _w + "px" }) } ul.css({ right: 0 }) } }) }; function GetMenu3(d) { var c = { sel: "#exx_menu3", data: [], num1: 0, num2: 0, ulclass: "menu-shu", curparentpath: "", curliclass: "sel", target: "_blank" }; $.extend(c, d); var h = '
    0 && p >= c.num1) { break } h += "
  • ' + c.data[p].nodename + ""; if (c.data[p].child.length > 0) { h += '
      = 0) { h += " " + c.curliclass } h += '">'; for (var q = 0; q < c.data[p].child.length; q++) { if (c.num2 > 0 && q >= c.num2) { break } h += "
    • ' + c.data[p].child[q].nodename + ""; h += "
    • " } h += "
    " } h += "
  • " } h += "
"; $(c.sel).html(h) }; function ExxQH(pbq, tbq, cbq, more, curclass) { $(pbq).each(function (pi) { var p = this; var t = $(this).find(tbq); var c = $(this).find(cbq); var m = []; if (more != undefined && more != "") { m = $(this).find(more) } if (t.length > 0) { t.removeClass(curclass); $(t[0]).addClass(curclass); c.hide(); $(c[0]).show(); if (m.length > 0) { m.hide(); $(m[0]).show() } t.each(function (ti) { $(this).bind("mouseover", function () { t.removeClass(curclass); $(this).addClass(curclass); c.hide(); $(c[ti]).show(); if (m.length > 0) { m.hide(); $(m[ti]).show() } }) }) } }) } function ExxQH2(pbq, tbq, cbq, more, curclass) { $(pbq).each(function (pi) { var p = this; var t = $(this).find(tbq); var c = $(this).find(cbq); var m = []; if (more != undefined && more != "") { m = $(this).find(more) } if (t.length > 0) { t.removeClass(curclass); $(t[0]).addClass(curclass); c.hide(); $(c[0]).show(); if (m.length > 0) { m.hide(); $(m[0]).show() } t.each(function (ti) { $(this).bind("click", function () { t.removeClass(curclass); $(this).addClass(curclass); c.hide(); $(c[ti]).show(); if (m.length > 0) { m.hide(); $(m[ti]).show() } }) }) } }) } function ExxFlash1(data, mainclass, speed, target) { if (data.length <= 0) { return } if (target == undefined || target == "") { target = "" } else { target = ' target="' + target + '"' } var h = '
'; h += '
"; h += '
    '; var i = 1; for (var p = 0; p < data.length; p++) { if (data[p].bigimg == undefined) { continue } h += "'; i++ } h += "
"; h += "
"; document.write(h); var s = setInterval(d, speed); $("." + mainclass + " li").bind("mouseover", function () { clearInterval(s); $("." + mainclass + " li").removeClass("cur"); $(this).addClass("cur"); f() }); $("." + mainclass + " li").bind("mouseout", function () { s = setInterval(d, speed) }); d(); function d() { var li = $("." + mainclass + " li.cur"); if (li.length > 0) { var lis = $("." + mainclass + " li"); if (lis.length == 1) { clearInterval(s); return } lis.removeClass("cur"); var nli = li.next("li"); if (nli.length > 0) { nli.addClass("cur") } else { $(lis[0]).addClass("cur") } } else { var lis = $("." + mainclass + " li"); if (lis.length > 0) { $(lis[0]).addClass("cur") } else { clearInterval(s) } } f() } function f() { var li = $("." + mainclass + " li.cur"); if (li.length > 0) { $("." + mainclass + " .fla_bimg").show(); $("." + mainclass + " .fla_bimg").attr("src", li.attr("eimg")); $("." + mainclass + " .fla_bigimg a").attr("href", li.attr("elink")); $("." + mainclass + " .fla_title a").attr("href", li.attr("elink")); $("." + mainclass + " .fla_title a").html(li.attr("etitle")) } } } function ExxFlash2(data, mainclass, speed, target) { if (data.length <= 0) { return } if (target == undefined || target == "") { target = "" } else { target = ' target="' + target + '"' } var h = '
'; h += '
'; h += '
'; h += '
    '; var lis = ""; var r = ""; var i = 1; for (var p = 0; p < data.length; p++) { if (data[p].bigimg == undefined) { continue } r = ""; lis = r + lis; i++ } h += lis; h += "
"; h += '
"; h += "
"; document.write(h); var s = setInterval(d, speed); $("." + mainclass + " li").bind("mouseover", function () { clearInterval(s); $("." + mainclass + " li").removeClass("cur"); $(this).addClass("cur"); f() }); $("." + mainclass + " li").bind("mouseout", function () { s = setInterval(d, speed) }); d(); function d() { var li = $("." + mainclass + " li.cur"); if (li.length > 0) { var lis = $("." + mainclass + " li"); if (lis.length == 1) { clearInterval(s); return } lis.removeClass("cur"); var nli = li.prev("li"); if (nli.length > 0) { nli.addClass("cur") } else { $(lis[lis.length - 1]).addClass("cur") } } else { var lis = $("." + mainclass + " li"); if (lis.length > 0) { $(lis[lis.length - 1]).addClass("cur") } else { clearInterval(s) } } f() } function f() { var li = $("." + mainclass + " li.cur"); if (li.length > 0) { $("." + mainclass + " img").show(); $("." + mainclass + " img").attr("src", li.attr("eimg")); $("." + mainclass + " a").attr("href", li.attr("elink")); $("." + mainclass + " .fla_title a").attr("href", li.attr("elink")); $("." + mainclass + " .fla_title a").html(li.attr("etitle")) } } } function LeftMove(sel, maxw, speed, speedpx) { $(sel).each(function (index, element) { var a = $(this); var b = a.children(); if (b.length > 0) { var c = $(b[0]).children(); if (c.length > 0) { var cw = 0, cwm = 0, tw = 0; if (maxw) { c.each(function (index, element) { if (cw < $(this).width()) { cw = $(this).width() } if (cwm < $(this).outerWidth(!0)) { cwm = $(this).outerWidth(!0) } }); tw = cwm * c.length; c.css({ width: cw }) } else { c.each(function (index, element) { tw += $(this).outerWidth(!0) }) } var aw = a.width(); var p = Math.ceil(aw / tw) + 1; var bh = $(b[0]).html(); var _bh = ""; var _tw = 1; for (var i = p; p > 0; p--) { _bh += bh; _tw += tw } $(b[0]).html(_bh); $(b[0]).width(_tw); $(b[0]).children().bind("mouseover", function () { clearInterval(s) }); $(b[0]).children().bind("mouseout", function () { s = setInterval(f, speed) }); var s = setInterval(f, speed) } } function f() { var lf = $(b[0]).css("left").replace("px", ""); if (-lf < tw) { $(b[0]).animate({ left: lf - speedpx }, 0) } else { $(b[0]).animate({ left: 0 }, 0) } } }) }; function ToDate(obj, format) { var t = new Date(obj.replace(/-/gi, "/")); t.format(format) }; Date.prototype.format = function (fmt) { var o = { "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours() % 12 == 0 ? 12 : this.getHours() % 12, "H+": this.getHours(), "m+": this.getMinutes(), "s+": this.getSeconds(), "q+": Math.floor((this.getMonth() + 3) / 3), "S": this.getMilliseconds() }; var week = { "0": "/u65e5", "1": "/u4e00", "2": "/u4e8c", "3": "/u4e09", "4": "/u56db", "5": "/u4e94", "6": "/u516d" }; if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)) } if (/(E+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? "/u661f/u671f" : "/u5468") : "") + week[this.getDay() + ""]) } for (var k in o) { if (new RegExp("(" + k + ")").test(fmt)) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))) } } return fmt }; String.prototype.format = function (args) { var result = this; if (arguments.length > 0) { if (arguments.length == 1 && typeof (args) == "object") { for (var key in args) { if (args[key] != undefined) { var reg = new RegExp("({)" + key + "(})", "g"); result = result.replace(reg, args[key]) } } } else { for (var i = 0; i < arguments.length; i++) { if (arguments[i] != undefined) { var reg = new RegExp("({)" + i + "(})", "g"); result = result.replace(reg, arguments[i]) } } } } return result };