}
};
ZENG.string = {RegExps: {trim: /^s+|s+$/g,ltrim: /^s+/,rtrim: /s+$/,nl2br: /n/g,s2nb: /[x20]{2}/g,URIencode: /[x09x0Ax0Dx20x21-x29x2Bx2Cx2Fx3A-x3Fx5B-x5Ex60x7B-x7E]/g,escHTML: {re_amp: /&/g,re_lt: /</g,re_gt: />/g,re_apos: /x27/g,re_quot: /x22/g},escString: {bsls: //g,sls: ///g,nl: /n/g,rt: /r/g,tab: /t/g},restXHTML: {re_amp: /&/g,re_lt: /</g,re_gt: />/g,re_apos: /&(?:apos|#0?39);/g,re_quot: /"/g},write: /{(d{1,2})(?::([xodQqb]))?}/g,isURL: /^(?:ht|f)tp(?:s)?://(?:[w-.]+).w+/i,cut: /[x00-xFF]/,getRealLen: {r0: /[^x00-xFF]/g,r1: /[x00-xFF]/g},format: /{([dw.]+)}/g},commonReplace: function(s, p, r) {
return s.replace(p, r);
},format: function(str) {
var args = Array.prototype.slice.call(arguments), v;
str = String(args.shift());
if (args.length == 1 && typeof (args[0]) == ‘object’) {
args = args[0];
}
ZENG.string.RegExps.format.lastIndex = 0;
return str.replace(ZENG.string.RegExps.format, function(m, n) {
v = ZENG.object.route(args, n);
return v === undefined ? m : v;
});
}};
ZENG.object = {
routeRE: /([dw_]+)/g,
route: function(obj, path) {
obj = obj || {};
path = String(path);
var r = ZENG.object.routeRE, m;
r.lastIndex = 0;
while ((m = r.exec(path)) !== null) {
obj = obj[m[0]];
if (obj === undefined || obj === null) {
break;
}
}
return obj;
}};
var ua = ZENG.userAgent = {}, agent = navigator.userAgent;
ua.ie = 9 – ((agent.indexOf(‘Trident/5.0’) > -1) ? 0 : 1) – (window.XDomainRequest ? 0 : 1) – (window.XMLHttpRequest ? 0 : 1);
if (typeof (ZENG.msgbox) == ‘undefined’) {
ZENG.msgbox = {};
}
ZENG.msgbox._timer = null;
ZENG.msgbox.loadingAnimationPath = ZENG.msgbox.loadingAnimationPath || (“loading.gif”);
ZENG.msgbox.show = function(msgHtml, type, timeout, opts) {
if (typeof (opts) == ‘number’) {
opts = {topPosition: opts};
}
opts = opts || {};
var _s = ZENG.msgbox,
template = ‘<span class=”zeng_msgbox_layer” style=”display:none;z-index:10000;” id=”mode_tips_v2″><span class=”gtl_ico_{type}”></span>{loadIcon}{msgHtml}<span class=”gtl_end”></span></span>’, loading = ‘<img src=”‘%20+%20(opts.customIcon%20||%20_s.loadingAnimationPath)%20+%20′” alt=”” />’, typeClass = [0, 0, 0, 0, “succ”, “fail”, “clear”], mBox, tips;
_s._loadCss && _s._loadCss(opts.cssPath);
mBox = ZENG.dom.get(“q_Msgbox”) || ZENG.dom.createElementIn(“div”, document.body, false, {className: “zeng_msgbox_layer_wrap”});
mBox.id = “q_Msgbox”;
mBox.style.display = “”;
mBox.innerHTML = ZENG.string.format(template, {type: typeClass[type] || “hits”,msgHtml: msgHtml || “”,loadIcon: type == 6 ? loading : “”});










