function convertEntities(b) { var d, a; d = function (c) { if (/&[^;]+;/.test(c)) { var f = document.createElement("div"); f.innerHTML = c; return !f.firstChild ? c : f.firstChild.nodeValue } return c }; if (typeof b === "string") { return d(b) } else { if (typeof b === "object") { for (a in b) { if (typeof b[a] === "string") { b[a] = d(b[a]) } } } } return b } var leeCookies = { each: function (d, a, c) { var e, b; if (!d) { return 0 } c = c || d; if (typeof (d.length) != "undefined") { for (e = 0, b = d.length; e < b; e++) { if (a.call(c, d[e], e, d) === false) { return 0 } } } else { for (e in d) { if (d.hasOwnProperty(e)) { if (a.call(c, d[e], e, d) === false) { return 0 } } } } return 1 }, getHash: function (c) { var a = this.get(c), b; if (a) { this.each(a.split("&"), function (d) { d = d.split("="); b = b || {}; b[d[0]] = d[1] }) } return b }, setHash: function (i, a, f, c, h, b) { var g = ""; this.each(a, function (e, d) { g += (!g ? "" : "&") + d + "=" + e }); this.set(i, g, f, c, h, b) }, get: function (h) { var g = document.cookie, f, d = h + "=", a; if (!g) { return } a = g.indexOf("; " + d); if (a == -1) { a = g.indexOf(d); if (a != 0) { return null } } else { a += 2 } f = g.indexOf(";", a); if (f == -1) { f = g.length } return decodeURIComponent(g.substring(a + d.length, f)) }, set: function (h, a, f, c, g, b) { document.cookie = h + "=" + encodeURIComponent(a) + ((f) ? "; expires=" + f.toGMTString() : "") + ((c) ? "; path=" + c : "") + ((g) ? "; domain=" + g : "") + ((b) ? "; secure" : "") }, remove: function (c, a) { var b = new Date(); b.setTime(b.getTime() - 1000); this.set(c, "", b, a, b) } }; function getUserSetting(a, b) { var c = getAllUserSettings(); if (c.hasOwnProperty(a)) { return c[a] } if (typeof b != "undefined") { return b } return "" } function setUserSetting(a, i, k) { if ("object" !== typeof userSettings) { return false } var h = "lee-settings-" + userSettings.uid, e = leeCookies.getHash(h) || {}, g = new Date(), b, f = a.toString().replace(/[^A-Za-z0-9_]/, ""), j = i.toString().replace(/[^A-Za-z0-9_]/, ""); if (k) { delete e[f] } else { e[f] = j } g.setTime(g.getTime() + 31536000000); b = userSettings.url; leeCookies.setHash(h, e, g, b); leeCookies.set("lee-settings-time-" + userSettings.uid, userSettings.time, g, b); return a } function deleteUserSetting(a) { return setUserSetting(a, "", 1) } function getAllUserSettings() { if ("object" !== typeof userSettings) { return {} } return leeCookies.getHash("lee-settings-" + userSettings.uid) || {} };
function setImgSize(img, width, height) {
    var MaxWidth = width; //设置图片宽度界限
    var MaxHeight = height; //设置图片高度界限
    var HeightWidth = img.offsetHeight / img.offsetWidth; //设置高宽比
    var WidthHeight = img.offsetWidth / img.offsetHeight; //设置宽高比
    if (img.offsetWidth > MaxWidth) {
        img.width = MaxWidth;
        img.height = MaxWidth * HeightWidth;
    }
    if (img.offsetHeight > MaxHeight) {
        img.height = MaxHeight;
        img.width = MaxHeight * WidthHeight;
    }
}
function playswf(sFile, sWidth, sHeight) {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + sWidth + '" height="' + sHeight + '">  ');
    document.write('<param name="movie" value="' + sFile + '">');
    document.write('<param name="quality" value="high">');
    document.write('<param name="wmode" value="transparent">');
    document.write('<embed src="' + sFile + '" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + sWidth + '" height="' + sHeight + '"></embed>  ');
    document.write('</object>');
}
function vod() { }

//encodeURIComponent可以还处理utf-8编码
function EncodeURL(str) {
    return encodeURIComponent(str).replace(/\+/g, "%2b");
}
function escape2(str) {
    return escape(str).replace(/\+/g, "%2b");
}
