/* $import */
eval(function(p, a, c, k, e, r) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] } ]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('f.v=(f.w)?f.w:f.U;9 2={t:[],8:d,n:"h.V.j",o:W,x:p(){9 a=d;7(f.y){a=z y();7(a.A)a.A="X/Y"}k 7(f.B){9 b=["u.l.6.0","u.l.5.0","u.l.4.0","C.l.3.0","C.l","Z.l"];D(9 i=0;i<b.m;i++){10{a=z B(b[i]);E}11(e){}}}F a},q:p(){2.8=G.12.13;2.o=(2.8.H("\\\\")==-1);2.8=2.8.14(0,2.8.15((2.16)?"/":"\\\\")+1);9 a=G.17("18");9 b=d;D(9 i=0;i<a.m;i++){b=a[i].19("1a");7(b&&b.H(2.n)!=-1)E}7(b!=d){7(b.1b(0)==\'/\'){7(!2.o)r("[2.q()] j s I J K,L M N O P !");k 2.8=b.Q(0,b.m-2.n.m)}k 2.8=2.8+b.Q(0,b.m-2.n.m)}},$h:p(a,b){9 c=d;b=b||R;7(b){7(!2.o){r("[2.q()] j s ["+a+"] I J K,L M N O P !");F}c="/"+a.S(/[\\\\.]/g,"/")+".j"}k c=2.8+a.S(/[\\\\.]/g,"/")+".j";7(!2.t[c]){2.t[c]="1c";2.T(c)}k{r("[$h()] j s [ "+c+" ] 1d 1e 1f !")}},T:p(a){9 b=2.x();7(b==d){r("1g 1h 1i,$h s 1j !")}k{b.1k("1l",a,R);b.1m(d);f.v(b.1n)}}};7(2.8==d)2.q();7(!$h)9 $h=2.$h;', 62, 86, '||Import|||||if|_rootDir|var||||null||window||import||js|else|XMLHTTP|length|_selfName|_isHttpPath|function|_setRootDir|alert|file|_functionList|Msxml2|_execute|execScript|_createRequestInstance|XMLHttpRequest|new|overrideMimeType|ActiveXObject|MSXML2|for|break|return|document|indexOf|use|absolute|path|but|current|request|is|invalid|substr|false|replace|_exccuteJs|eval|lite|true|text|xml|Microsoft|try|catch|location|pathname|substring|lastIndexOf|isHttpPath|getElementsByTagName|script|getAttribute|src|charAt|finished|has|been|load|not|support|ajax|faild|open|GET|send|responseText'.split('|'), 0, {}));
/* cookie */
eval(function(p, a, c, k, e, r) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] } ]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('2 c={O:6(l,f,z){2 7=m P();a(n l=="o"&&n f=="o"&&n f=="o"){7.Q(7.R()+p(l));7.S(7.T()+p(f));7.U(7.V()+p(z));b 7.W()}},A:6(q){2 g=3.4.r(";",q);a(g==-1){g=3.4.d}b X(3.4.B(q,g))},C:6(5){2 s=5+"=";2 D=s.d;2 E=3.4.d;2 i=0;Y(i<E){2 j=i+D;a(3.4.B(i,j)==s){b c.A(j)}i=3.4.r(" ",i)+1;a(i==0)Z}b""},F:6(){t=m G();a(3.4.r(";")!=-1){2 h,u,10,11,12;2 v=3.4.H("; ");2 I=v.d;J(i=0;i<I;i++){h=v[i].H("=");u=h[0];K=h[1];k=m G();k[\'5\']=u;k[\'w\']=K;t.13(k)}}b t},14:6(5,w,e,8,9,x){3.4=5+"="+15(w)+((e)?"; e="+e:"")+((8)?"; 8="+8:"")+((9)?"; 9="+9:"")+((x)?"; x":"")},L:6(5,8,9){a(c.C(5)){3.4=5+"="+((8)?"; 8="+8:"")+((9)?"; 9="+9:"")+"; e=16, M-17-18 N:N:M 19"}},1a:6(){y=c.F();J(i=0;i<y.d;i++){c.L(y[i][\'5\'])}},1b:6(){b 3.4}}', 62, 74, '||var|document|cookie|name|function|expDate|path|domain|if|return|Cookies|length|expires|hours|endstr|_sp|||_coo|days|new|typeof|number|parseInt|offset|indexOf|arg|_Cookie|_name|_item|value|secure|cookies|minutes|getCookieVal|substring|getCookie|alen|clen|getCookies|Array|split|_itemlength|for|_value|deleteCookie|01|00|getExpDate|Date|setDate|getDate|setHours|getHours|setMinutes|getMinutes|toGMTString|unescape|while|break|_tp|_tars|_tarslength|push|setCookie|escape|Thu|Jan|70|GMT|clearCookie|getCookieString'.split('|'), 0, {}))
/* 缩略图 */
function thumbImg(ImgD, width_s, height_s) {
    var image = new Image();
    image.src = ImgD.src;
    if (image.width > 0 && image.height > 0) {
        flag = true;
        if (image.width / image.height >= width_s / height_s) {
            if (image.width > width_s) {
                ImgD.width = width_s;
                ImgD.height = (image.height * width_s) / image.width;
            } else {
                ImgD.width = image.width;
                ImgD.height = image.height;
            }
        }
        else {
            if (image.height > height_s) {
                ImgD.height = height_s;
                ImgD.width = (image.width * height_s) / image.height;
            } else {
                ImgD.width = image.width;
                ImgD.height = image.height;
            }
        }
    }
}

/* 获取URL参数 request('参数名称') */
function request(p) {
    var ptn, url, paras;
    url = location.href;
    if (url.indexOf("?") == -1) return "";
    paras = url.split('?')[1];
    if (paras.indexOf(p + "=") == -1) return "";
    ptn = new RegExp(p + "=([^&]*)", "g");
    ptn.exec(paras);
    return RegExp.$1.replace("#","");
}
/* 去除字符两边的空格 */
String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
String.prototype.ZhLen = function() {
    var len = 0;
    if (this == null || this.length == 0)
        return 0;
    var str = this.replace(/(^\s*)|(\s*$)/g, ""); 
    for (i = 0; i < str.length; i++)
        if (str.charCodeAt(i) > 0 && str.charCodeAt(i) < 128)
        len++;
    else
        len += 2;
    return len;
}
/* 对时间对象的扩展 */
Date.prototype.format = function(format) {
    var o = {
        "M+": this.getMonth() + 1,   //month   
        "d+": this.getDate(),         //day   
        "h+": this.getHours(),       //hour   
        "m+": this.getMinutes(),   //minute   
        "s+": this.getSeconds(),   //second   
        "q+": Math.floor((this.getMonth() + 3) / 3),     //quarter   
        "S": this.getMilliseconds()   //millisecond   
    }
    if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
          (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o) if (new RegExp("(" + k + ")").test(format))
        format = format.replace(RegExp.$1,
              RegExp.$1.length == 1 ? o[k] :
                  ("00" + o[k]).substr(("" + o[k]).length));
    return format;
};
/* 播放flash */
function PlayFlash(oid, src, width, height, tran) {
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="' + oid + '" align="middle">');
    document.write('<param name="allowScriptAccess" value="always">');
    document.write('<param name="movie" value="' + src + '">');
    document.write('<param name="menu" value="false">');
    document.write('<param name="quality" value="high">');
    if (tran) {document.write('<param name="wmode" value="transparent">'); }
    document.write('<embed src="' + src + '" menu="false" quality="high" wmode="transparent" width="' + width + '" height="' + height + '" name="' + oid + '" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    document.write('</object>');
}

/* 导入js或者css */
//(function($) { $.extend({ ImportBasePath: '', fileinfo: function(data) { data = data.replace(/^\s|\s$/g, ""); var m; if (/\.\w+$/.test(data)) { m = data.match(/([^\/\\]+)\.(\w+)$/); if (m) { if (m[2] == 'js') { return { filename: m[1], ext: m[2], tag: 'script'} } else if (m[2] == 'css') { return { filename: m[1], ext: m[2], tag: 'link'} } else { return { filename: m[1], ext: m[2], tag: null} } } else { return { filename: null, ext: null} } } else { m = data.match(/([^\/\\]+)$/); if (m) { return { filename: m[1], ext: null, tag: null} } else { return { filename: null, ext: null, tag: null} } } }, fileExist: function(filename, filetype, attrCheck) { var elementsArray = document.getElementsByTagName(filetype); for (var i = 0; i < elementsArray.length; i++) { if (elementsArray[i].getAttribute(attrCheck) == $.ImportBasePath + filename) { return true } } return false }, createElement: function(filename, filetype) { switch (filetype) { case 'script': if (!$.fileExist(filename, filetype, 'src')) { var scriptTag = document.createElement(filetype); scriptTag.setAttribute('language', 'javascript'); scriptTag.setAttribute('type', 'text/javascript'); scriptTag.setAttribute('src', $.ImportBasePath + filename); return scriptTag } else { return false } break; case 'link': if (!$.fileExist(filename, filetype, 'href')) { var styleTag = document.createElement(filetype); styleTag.setAttribute('type', 'text/css'); styleTag.setAttribute('rel', 'stylesheet'); styleTag.setAttribute('href', $.ImportBasePath + filename); return styleTag } else { return false } break; default: return false; break } }, cssReady: function(index, callback) { function check() { if (document.styleSheets[index]) { if (typeof callback == 'function') { callback() } window.clearInterval(checkInterval) } } var checkInterval = window.setInterval(check, 200) }, include: function(file, callback) { var headerTag = document.getElementsByTagName('head')[0]; var fileArray = []; typeof file == 'string' ? fileArray[0] = file : fileArray = file; for (var i = 0; i < fileArray.length; i++) { var elementTag = $.fileinfo(fileArray[i]).tag; var el = []; if (elementTag !== null) { el[i] = $.createElement(fileArray[i], elementTag); if (el[i]) { headerTag.appendChild(el[i]); if ($.browser.msie) { el[i].onreadystatechange = function() { if (this.readyState === 'loaded' || this.readyState === 'complete') { if (typeof callback == 'function') { callback() } } } } else { if (elementTag == 'link') { $.cssReady(i, callback) } else { el[i].onload = function() { if (typeof callback == 'function') { callback() } } } } } } else { return false } } } }) })(jQuery);

function GetUrlFileName() {
    var url = location.href;
    if (arguments[0]) { url = arguments[0]; }
    var i = url.lastIndexOf('/');
    if (i) {
        url = url.substring(i + 1, url.length);
        i = url.indexOf('?');
        if (i != -1) {
            return url.substring(0, i);
        }
        return url;
    }
    return "";
}
/* 设置fck的内容 */
function SetFckHTML(EditorName, ContentStr) { var oEditor = FCKeditorAPI.GetInstance(EditorName); oEditor.SetHTML(ContentStr); }
/* 获取fck的内容 */
function GetFckHTML(EditorName) { var oEditor = FCKeditorAPI.GetInstance(EditorName); return (oEditor.GetXHTML(true)); }
/* 得到fck焦点 */
function GetFckFocus(EditorName) {FCKeditorAPI.GetInstance(EditorName).Focus(); }
/* fck 相关的操作API */
var Fck = {
    SetHTML: function(EditorName, Str) {
        var oEditor = FCKeditorAPI.GetInstance(EditorName); oEditor.SetHTML(Str);
    },
    GetHTML: function(EditorName) {
        var oEditor = FCKeditorAPI.GetInstance(EditorName); return (oEditor.GetXHTML(true));
    }
}
/* 复制文本到剪贴板 */
function copyText(str,msg) {
    copyToClipboard(str);
    var mmsg = msg || "复制成功";
    alert(mmsg);
}
function copyToClipboard(txt) {
    if (window.clipboardData) {
        window.clipboardData.clearData();
        window.clipboardData.setData("Text", txt);
    }
    else if (navigator.userAgent.indexOf("Opera") != -1) {
        window.location = txt;
    }
    else if (window.netscape) {
        try {
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
        }
        catch (e) {
            alert("您使用的浏览器不支持此复制功能，请使用ctrl+c或者浏览器右键复制");
        }
        var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
        if (!clip)
            return;
        var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
        if (!trans)
            return;
        trans.addDataFlavor('text/unicode');
        var str = new Object();
        var len = new Object();
        var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
        var copytext = txt;
        str.data = copytext;
        trans.setTransferData("text/unicode", str, copytext.length * 2);
        var clipid = Components.interfaces.nsIClipboard;
        if (!clip)
            return false;
        clip.setData(trans, null, clipid.kGlobalClipboard);
    }
    return true;
}

function getcenterpos() {
    return { left: ((document.body.clientWidth / 2) - 125)/2, top: (document.documentElement.scrollTop + 200) };
}