var a;root=typeof root=="undefined"?"":root;String.format=function(){for(var b=arguments[0],d=1;d<arguments.length;d++)b=b.replace(new RegExp("\\{"+(d-1)+"\\}","ig"),arguments[d]);return b};
var BBSMAX={AvatarDefault:root+"/max-assets/avatar/avatar_120.gif",ImageDefault:root+"/max-assets/images/NotFound.gif",CodeUrl:"ValidateCode.aspx?type=",CodeLoadingImage:root+"/max-assets/Images/loading.gif",MessageSoundPath:root+"/max-assets/sound-msg/",SpaceImage:root+"/max-assets/images/blank.gif",NetExistsExt:/^(accdb|as|asm|aspx|avi|bmp|c|cfc|chm|cpp|cs|css|db|default|dll|doc|docx|eip|fla|flv|gif|h|html|jpg|js|mdb|mp3|mpeg|mpg|msi|pdf|php|png|ppt|pptx|psd|rar|sln|swf|tif|txt|vb|vs|wav|wma|wmv|xls|xlsx|xml|zip)$/i,NetExistsPath:root+
"/Images/FileIcons/48x48/",NetExistsWidth:48,NetExistsHeight:48,NetDefaultWidth:70,NetDefaultHeight:70,ImagePreviewBg:"/max-assets/Images/imagesPreview_percent_bg.gif"};$Defined("Global");var Global={PATH:"/"};Global.GetObject=function(b){var d=document;return d.all&&d.all(b)||d.getElementById&&d.getElementById(b)||null};Global.GetDocWidth=function(b){b=b||document;return Math.max(this.GetClientWidth(b),b.body.offsetWidth)};
Global.GetDocHeight=function(b){b=b||document;return Math.max(this.GetClientHeight(b),b.body.offsetHeight)};Global.GetScrollLeft=function(b){b=b||document;return b.documentElement?b.documentElement.scrollLeft:b.body.scrollLeft};Global.GetScrollTop=function(b){b=b||document;return b.documentElement?b.documentElement.scrollTop:b.body.scrollTop};Global.GetClientWidth=function(b){b=b||document;return window.innerWidth||b.documentElement&&b.documentElement.clientWidth||b.body.clientWidth};
Global.GetClientHeight=function(b){b=b||document;return window.innerHeight||b.documentElement&&b.documentElement.clientHeight||b.body.clientHeight};Global.GetOffsetTop=function(b,d){b=$(b);for(var e=b.offsetTop;b=b.offsetParent;){if(b==d)break;e+=b.offsetTop}return e};Global.GetOffsetLeft=function(b,d){b=$(b);for(var e=b.offsetLeft;b=b.offsetParent;){if(b==d)break;e+=b.offsetLeft}return e};Global.Random=function(){return(new Date).getTime()+"_"+Math.floor(Math.random()*1E7)};
Global.FlashEnabled=function(b,d){var e=false,g=6,f=11;if(typeof b=="number"){g=b;f=d?d+1:b+1}try{if(window.ActiveXObject){for(b=g;b<f;b++)if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b))break;if(b<f)e=true}else{var h=/^Shockwave\s+Flash\s+([0-9]+)/i.exec(navigator.plugins["Shockwave Flash"].description);if(h&&h.length>1&&h[1]>=g&&h[1]<f)e=true}}catch(i){e=false}return!!e};Global.LoadScript=function(b){document.write('<script type="text/javascript" src="'+b+'"><\/script>')};
Array.prototype.push||(Array.prototype.push=function(b){this[this.length]=b});function ToArray(b,d){return Array.prototype.slice.apply(b).slice(d||0)}function TypeOf(b){if(typeof b=="undefined")return"undefined";var d=b.constructor.name;if(b.constructor&&typeof d=="undefined"){if(b.constructor===Object)return"object";if(b.constructor===Function)return"function"}return d?d.toLowerCase():"string"}
function $(){var b=arguments;if(b.length==1)b=typeof b[0]=="string"?Global.GetObject(b[0]):b[0];else if(b.length>1)for(var d=0;d<b.length;d++)b[d]=typeof b[d]=="string"?Global.GetObject(b[d]):b[d];else b=null;return b}function $E(b,d){d=d||window;return d.event||b||null}function $EO(b){return b&&(b.target||b.srcElement)||null}function $Defined(b){typeof eval(b)!="undefined"&&alert("\u53d8\u91cf"+b+" \u91cd\u5b9a\u4e49\u3002")}window.onerror=function(){};a=String.prototype;
a.Contains=function(b){return this.indexOf(b)>-1};a.Trim=function(){return this.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"")};a.LTrim=function(){return this.replace(/^[ \t\n\r]*/g,"")};a.RTrim=function(){return this.replace(/[ \t\n\r]*$/g,"")};a.HtmlToStr=function(){return this.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")};String.Space=function(b,d){d=d?"&nbsp;":" ";for(var e="",g=0;g<b;g++)e+=d;return e};$Defined("Browser");var Browser={s:navigator.userAgent.toLowerCase()};
(function(b){b.IsIE=b.s.Contains("msie");b.IsIE5=b.s.Contains("msie 5");b.IsIE6=b.s.Contains("msie 6");b.IsIE7=b.s.Contains("msie 7");b.IsIE56=!b.IsIE7&&(b.IsIE6||b.IsIE5);b.IsGecko=b.s.Contains("gecko");b.IsSafari=b.s.Contains("safari");b.IsOpera=b.s.Contains("opera");b.IsMac=b.s.Contains("macintosh");b.IsIELike=b.IsIE||b.IsOpera;b.IsGeckoLike=b.IsGecko||b.IsSafari})(Browser);$Defined("Events");var Events={};
Events.AttachEvent=function(b,d,e,g,f){if(b=$(b)){g=g?true:false;d=d.toLowerCase();if(b.addEventListener)b.addEventListener(d,e,g);else{var h=this;this._AttachEvent(b,d,e);b["on"+d]=function(i){h._FireEvent(b,d,i,f)}}}};Events.RemoveEvent=function(b,d,e,g){if(b=$(b)){g=g?true:false;d=d.toLowerCase();if(b.removeEventListener)b.removeEventListener(d,e,g);else if(b.events&&b.events[d]){b=b.events[d];d=0;for(g=b.length;d<g;d++)if(b[d]&&e&&b[d]===e){b.splice(d,1);break}}}};
Events._AttachEvent=function(b,d,e){d=d.toLowerCase();if(!b.events)b.events={};b.events[d]||(b.events[d]=[]);b=b.events[d];b[b.length]=e};Events._FireEvent=function(b,d,e,g){e=g?g.event:$E(e);d=d.toLowerCase();if(!(!b||!b.events||!b.events[d])){d=b.events[d];g=0;for(var f=d.length;g<f;g++)d[g]&&d[g].call(b,e,b)}};Events.CancelBubble=function(b){if(b){b.cancelBubble=true;b.stopPropagation&&b.stopPropagation()}};Events.CancelEvent=function(b){if(b){b.returnValue=false;b.preventDefault&&b.preventDefault()}};
Events.CancelAll=function(b){this.CancelBubble(b);this.CancelEvent(b)};Events.Button=function(b){if(b.button!=undefined)return b.button;else if(b.which!=undefined)return b.which};Events.OnLoadTasks=[];Events.AttachEvent(window,"load",function(){for(var b=0;b<Events.OnLoadTasks.length;b++)typeof Events.OnLoadTasks[b]==="function"&&Events.OnLoadTasks[b]()});$Defined("oNode");var oNode={};oNode.IsNode=function(b){if(b&&typeof b=="object"&&b.nodeType==1)return true;return false};
oNode.IsNodeOrDocumentFragment=function(b){return this.IsNode(b)||b&&typeof b=="object"&&b.nodeType==11};oNode.IsTextNode=function(b){if(b&&typeof b=="object"&&b.nodeType==3)return true;return false};oNode.CreateNode=function(b){return document.createElement(b)};oNode.CreateTextNode=function(b){return document.createTextNode(b)};
oNode.AddNode=function(b,d){d=d||document.body;if(this.IsNodeOrDocumentFragment(b)||this.IsTextNode(b)){if(b.parentNode&&this.IsNode(b.parentNode))return false;d.appendChild(b)}else this.AddNode(this.CreateTextNode(b.toString()),d);return true};oNode.RemoveNode=function(b){if(!b||!b.parentNode||b.parentNode&&b.parentNode.nodeType!=1)return null;return b.parentNode.removeChild(b)};oNode.InsertBefore=function(b,d){d.parentNode.insertBefore(b,d)};
oNode.CreateIframe=function(b){var d;try{d=this.CreateNode('<iframe name="'+b+'">')}catch(e){d=this.CreateNode("iframe");d.name=b}d.id=b;return d};oNode.CreateForm=function(b,d,e){var g;try{g=this.CreateNode('<form name="'+b+'"'+(e?'enctype="'+e+'"':"")+(d?' method="'+d+'"':"")+">")}catch(f){g=this.CreateNode("form");d&&(g.method=d);e&&(g.enctype=e);g.name=b}return g};oNode.CreateInput=function(b){var d;try{d=this.CreateNode('<input name="'+b+'">')}catch(e){d=this.CreateNode("input");d.name=b}return d};
$Defined("CSS");var CSS={LEFT:"left",RIGHT:"right",BOTH:"both"};CSS.GetRe=function(b){return new RegExp("^\\s*"+b+"\\s+|\\s+"+b+"\\s*$|\\s+"+b+"\\s+|^\\s*"+b+"\\s*$","")};CSS.AddClass=function(b){if(oNode.IsNode(b))for(var d=arguments,e=1,g=d.length;e<g;e++){var f=d[e];typeof f!="string"||f==""||this.GetRe(f).test(b.className)||(b.className+=((b.className?" ":"")+f).replace(/\s{2,}/g," "))}};
CSS.RemoveClass=function(b){if(oNode.IsNode(b))for(var d=arguments,e=1,g=d.length;e<g;e++){var f=d[e];if(!(typeof f!="string"||f=="")){f=this.GetRe(f);if(f.test(b.className))b.className=b.className.replace(f," ").replace(/^\s{2,}$/," ")}}};CSS.ReplaceClass=function(b,d,e){this.RemoveClass(b,d);this.AddClass(b,e)};CSS.HasClass=function(b,d){if(!oNode.IsNode(b))return false;if(typeof d!="string"||d=="")return false;return this.GetRe(d).test(b.className)};
CSS.SetAlpha=function(b,d){if(Browser.IsIE)try{b.filters[0].Opacity=d}catch(e){b.style.filter="alpha(Opacity="+d+")"}else{b.style.MozOpacity=d/100;b.style.opacity=d/100}};CSS.GetAlpha=function(b){if(Browser.IsIE)try{return b.filters[0].Opacity}catch(d){return 100}else return b.style.opacity*100};CSS.SetDisplay=function(b,d,e){b.style.display=d?e?"block":"":"none"};CSS.SetVisible=function(b,d){b.style.visibility=d?"visible":"hidden"};
CSS.SetFloat=function(b,d){b.style.styleFloat=d;b.style.cssFloat=d};CSS.AddClear=function(b,d){var e=oNode.CreateNode("div");oNode.AddNode(e,b);e.style.overflow="hidden";e.style.clear=d;return e};CSS.SelectOn=function(b){b=b||document;b.body.style.MozUserSelect="";b.body.style.KhtmlUserSelect="";b.onselectstart=null};CSS.SelectOff=function(b){b=b||document;b.body.style.MozUserSelect="none";b.body.style.KhtmlUserSelect="none";b.onselectstart=function(){return false}};
CSS.AddBack=function(b,d){var e=oNode.CreateNode("div");if(b)b.$BG=e;b&&d?oNode.InsertBefore(e,b):oNode.AddNode(e);with(e.style){position="absolute";zIndex=1;top=left="0px";background="transparent url("+BBSMAX.SpaceImage+") repeat 0 0"}e.Show=function(){this.style.width=Global.GetDocWidth()-(Browser.IsGecko&&!Browser.IsSafari?18:0)+"px";this.style.height=Math.max(Global.GetDocHeight(),Global.GetClientHeight())+"px";CSS.SetVisible(this,true)};e.Hide=function(){CSS.SetVisible(this,false);with(this.style)height=
width="1px"};e.Show();return e};CSS.AddStyle=function(b){var d=oNode.CreateNode("style");d.type="text/css";if(d.styleSheet)d.styleSheet.cssText=b;else oNode.AddNode(b,d);oNode.AddNode(d,document.getElementsByTagName("head")[0]);return d};function oAjax(){this.req=null;this.content=this.url="";this.type="text";this.encode="";this.asyn=true;this.action="get";this.error=false}a=oAjax.prototype;
a.init=function(){if(window.XMLHttpRequest)this.req=new XMLHttpRequest;else if(window.ActiveXObject)try{this.req=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{this.req=new ActiveXObject("Microsoft.XMLHTTP")}catch(d){this.req=false}}var e=this;if(this.req)this.req.onreadystatechange=function(){e.listener()}};
a.listener=function(){if(this.req.readyState==4)if(this.req.status==200)try{this.callback(Browser.IsIE&&this.encode=="gb2312"?oAjax.gb2utf8(this.req.responseBody):this.type=="text"?this.req.responseText:this.req.responseXML)}catch(b){this.halt("[callback] "+b.name+":"+b.message)}else this.halt("[callback error] "+this.req.status)};
a.send=function(b){this.init();b=this.url=b||this.url||"";this.content=this.content?this.content:"";this.encode=this.encode?this.encode.toLowerCase():"";this.asyn=this.asyn==undefined?true:!!this.asyn;this.action=this.action==undefined||this.action=="get"?"Get":"Post";this.error=this.error==undefined?false:!!this.error;if(!b&&this.error)alert("Ajax\u8bf7\u6c42URL\u4e0d\u80fd\u4e3a\u7a7a\u3002");else{try{this.req.open(this.action,b,this.asyn)}catch(d){this.halt("[open] "+d.name+":"+d.message);return}try{this.req.setRequestHeader("Connection",
"close");this.req.setRequestHeader("Accept-Encoding","gzip, deflate");this.req.setRequestHeader("Content-Type","application/x-www-form-urlencoded"+(this.encode?";charset="+this.encode:""));if(this.req.overrideMimeType&&this.encode)this.req.overrideMimeType("text/xml"+(this.encode?";charset="+this.encode:""));this.req.send(this.content)}catch(e){this.halt("[open] "+e.name+":"+e.message+"\n** \u68c0\u67e5\u662f\u5426\u4e3a\u8de8\u57df\u8bbf\u95ee\u3002")}}};a.callback=function(){};a.abort=function(){this.req.abort()};
a.halt=function(b){this.error&&alert(b)};
oAjax.gb2utf8=function(b){var d=[];gb2utf8_data=b;execScript("gb2utf8_data = MidB(gb2utf8_data, 1)","VBScript");b=escape(gb2utf8_data).replace(/%u/g,"").replace(/(.{2})(.{2})/g,"%$2%$1").replace(/%([A-Z].)%(.{2})/g,"@$1$2");b=b.split("@");for(var e=0,g=b.length,f;++e<g;){f=b[e].substring(0,4);if(!d[f]){gb2utf8_char=eval("0x"+f);execScript("gb2utf8_char = Chr(gb2utf8_char)","VBScript");d[f]=escape(gb2utf8_char).substring(1,6)}b[e]=d[f]+b[e].substring(4)}gb2utf8_data=gb2utf8_char=null;return unescape(b.join("%"))};
$Defined("Url");var Url={l:location};Url.Get=function(){var b=arguments;if(b.length==1)b=b[0]in this.QS()?this.QS()[b[0]]:"";else if(b.length>1)for(var d=0;d<b.length;d++)b[d]=b[d]in this.QS()?this.QS()[b[d]]:"";else b="";return b};Url.Set=function(b,d){this.QueryString[b]=d};
Url.Retrieve=function(){var b="";for(var d in this.QueryString){var e=this.QueryString[d];if(b!="")b+="&";if(typeof e=="object")for(var g=0,f=e.length;g<f;g++){if(b!="")b+="&";b+=d+"="+encodeURIComponent(e[g])}else b+=d+"="+encodeURIComponent(e)}return b};
Url.QS=function(){if(typeof this.QueryString=="undefined"){this.QueryString={};var b=this.l.search;b=b.substr(1);b=b.split("&");for(var d=0,e=b.length;d<e;d++){var g=b[d].split("="),f=g[0];g=decodeURIComponent(g[1]||"");if(typeof this.QueryString[f]=="undefined")this.QueryString[f]=g;else if(typeof this.QueryString[f]=="object")this.QueryString[f].push(g);else this.QueryString[f]=[this.QueryString[f],g]}}return this.QueryString};
Url.Reload=function(b){if(/^https?:\/\//i.test(b))this.l.href=b;else{var d=this.l.href.lastIndexOf(b);if(b!="/"&&d>0&&b!=this.l.href.substr(d))this.l.reload(true);else this.l.href=b}};Url.ClearAnchor=function(b){b=b||this.l.href;return b.substring(0,b.indexOf("#"))};Url.GetAnchor=function(b){b=b||this.l.href;return b.substr(b.lastIndexOf("#")+1||b.length)};Url.GotoAnchor=function(b){if(b!="")this.l.hash=b};
Url.Add=function(b,d,e){if(!e)return b;b=b.indexOf("?")>-1?"&":"?";b+=d+"="+encodeURIComponent(e);return b};Url.Escape=function(b){return escape(this.UTF8Encode(b))};Url.UTF8Encode=function(b){b=b.toString().replace(/\r\n/g,"\n");for(var d="",e=0;e<b.length;e++){var g=b.charCodeAt(e);if(g<128)d+=String.fromCharCode(g);else{if(g>127&&g<2048)d+=String.fromCharCode(g>>6|192);else{d+=String.fromCharCode(g>>12|224);d+=String.fromCharCode(g>>6&63|128)}d+=String.fromCharCode(g&63|128)}}return d};
Url.UTF8Decode=function(b){var d="",e=0,g=c1=c2=0;for(b=b.toString();e<b.length;){g=b.charCodeAt(e);if(g<128){d+=String.fromCharCode(g);e++}else if(g>191&&g<224){c2=b.charCodeAt(e+1);d+=String.fromCharCode((g&31)<<6|c2&63);e+=2}else{c2=b.charCodeAt(e+1);c3=b.charCodeAt(e+2);d+=String.fromCharCode((g&15)<<12|(c2&63)<<6|c3&63);e+=3}}return d};Url.QS();$Defined("PopUp");var PopUp={};PopUp.Index=1;
PopUp.Panel=function(b,d,e,g){var f=oNode.IsNode(b)&&b.parentNode,h=f?b:oNode.CreateNode("div");h.tabIndex="-1";h.style.position="absolute";h.style.left="-10000px";h.style.top="-10000px";h.style.zIndex=2;if(f)h.$Parent=h.parentNode;h.Center=function(i){if(i||g){if(f){h.style.display="block";d=h.offsetWidth;e=h.offsetHeight}d=d||h.offsetWidth;e=e||h.offsetHeight;h.$P=g;h.style.left=((Global.GetClientWidth()||Global.GetDocWidth())-d)/2+"px";h.style.top=Global.GetScrollTop()+((Global.GetClientHeight()||
Global.GetDocHeight())-e)/2+"px";function k(){if(d!=h.offsetWidth)d=h.offsetWidth;if(e!=h.offsetHeight)e=h.offsetHeight;h.style.left=((Global.GetClientWidth()||Global.GetDocWidth())-d)/2+"px";h.style.top=Global.GetScrollTop()+((Global.GetClientHeight()||Global.GetDocHeight())-e)/2+"px";h.$D&&h.$D.Show();if(h.$M){h.$M.style.left=h.style.left;h.$M.style.top=h.style.top}}h.$Move=k;Events.AttachEvent(window,"resize",k)}};h.Center();if(typeof b!="string")f||oNode.AddNode(b,h);else h.innerHTML=b;return h};
PopUp.AddPopUp=function(b,d,e){oNode.AddNode(b,e);if(d)b.$D=CSS.AddBack(b,true);if(b.gradual){var g=0,f=function(){if(g>100)CSS.SetAlpha(b,100);else{CSS.SetAlpha(b,g);g+=15;setTimeout(f,0)}};f()}return b.$D};PopUp.AddMask=function(b){if(Browser.IsIE56){var d=b.$M=oNode.CreateNode("iframe");oNode.InsertBefore(d,b);d.frameBorder=0;d.scrolling="no";with(d.style){position="absolute";left=b.style.left;top=b.style.top;width=b.offsetWidth+"px";height=b.offsetHeight+"px";opacity=0;filter="alpha(opacity=0)"}}};
PopUp.RemovePopUp=function(b,d){d=d||document.body;if(b.parentNode!=d)return false;oNode.RemoveNode(b,d);b.$D&&oNode.RemoveNode(b.$D,b.$D.parentNode);b.$M&&oNode.RemoveNode(b.$M,b.parentNode);b.$BG&&oNode.RemoveNode(b.$BG);b.$P&&Events.RemoveEvent(window,"resize",b.$Move)};PopUp.RestorePopUp=function(b){b.style.left="-10000px";b.style.top="-10000px";PopUp.RemovePopUp(b,b.parentNode);b.$Parent&&oNode.AddNode(b,b.$Parent)};
PopUp.SetXY=function(b,d,e){b.style.left=typeof d=="string"?d:d+"px";b.style.top=typeof e=="string"?e:e+"px";if(b.$M){b.$M.style.left=b.style.left;b.$M.style.top=b.style.top}};PopUp.ResetXY=function(b){if(b.$M){b.$M.style.left=b.style.left;b.$M.style.top=b.style.top}};PopUp.SetSize=function(b,d,e){this.SetSizeW(b,d);this.SetSizeH(b,e)};PopUp.SetSizeW=function(b,d){d=typeof d=="string"?d:d+"px";b.style.width=d;this.ResetSize(b)};
PopUp.SetSizeH=function(b,d){d=typeof d=="string"?d:d+"px";b.style.height=d;this.ResetSize(b)};PopUp.ResetSize=function(b){if(b.$M){b.$M.style.width=b.offsetWidth+"px";b.$M.style.height=b.offsetHeight+"px"}};PopUp.SetVisible=function(b,d){d=d?"visible":"hidden";b.style.visibility=d;if(b.$D)b.$D.style.visibility=d;if(b.$M)b.$M.style.visibility=d;if(b.$BG)b.$BG.style.visibility=d};
PopUp.SetDisplay=function(b,d){d=d?"block":"none";b.style.display=d;if(b.$D)b.$D.style.display=d;if(b.$M)b.$M.style.display=d;if(b.$BG)b.$BG.style.display=d};PopUp.HideModal=function(b){b.$D&&CSS.SetAlpha(b.$D,0)};$Defined("Effects");var Effects={};
Effects.Trans=function(b,d,e,g){function f(){CSS.GetAlpha(d[l])>=100&&CSS.SetAlpha(d[l],0);var n=d[j],m=CSS.GetAlpha(n)+10;CSS.SetAlpha(n,m);n=false;if(m>=100){n=true;l=j;j=(j+1)%d.length}k=setTimeout(f,n?g:e)}if(oNode.IsNode(b))if(!(typeof d!="object"||!d.length)){var h=document.createElement("div");b.appendChild(h);with(h.style){position="relative";top=left=0;height=width="100%"}for(b=0;b<d.length;b++){var i=document.createElement("div");h.appendChild(i);with(i.style){position="absolute";top=left=
0;height=width="100%";textAlign="center";opacity=0;filter="alpha(opacity=0)"}i.innerHTML=d[b];d[b]=i}var k,j=0,l=0;e=e||100;g=g||1E3;f()}};Effects.TransColor=function(b,d,e){function g(){if(j+l>d[(k+1)%f]){k=(k+1)%f;j=d[k]}else j+=l;b.style.color=Color.GetColorFromNum(j);i=setTimeout(g,e)}if(oNode.IsNode(b)){for(var f=d.length,h=0;h<f;h++)d[h]=Color.GetNumFromColor(d[h]);var i,k=0,j=d[0],l=100;g()}};Effects.Roll=function(){};
Effects.Switch=function(b,d,e){function g(l,n){n=n||this;if(i!=n.index){var m=b[i][0];CSS.RemoveClass(m,d);CSS.AddClass(m,e);b[i][1].style.display="none";m=b[n.index][0];CSS.RemoveClass(m,e);CSS.AddClass(m,d);b[n.index][1].style.display="";i=n.index;Events.CancelAll(l)}}for(var f=0,h=b.length;f<h;f++){oNode.IsNode(b[f][0])||(b[f][0]=$(b[f][0]));oNode.IsNode(b[f][1])||(b[f][1]=$(b[f][1]))}var i=0;f=0;for(h=b.length;f<h;f++){var k=b[f],j=k[0];j.index=f;Events.AttachEvent(j,"click",g);k[1].style.display=
f==0?"":"none"}b[0][1].style.display=""};
Effects.Move=function(b,d,e){function g(r){k=true;j[0]=r.clientX;j[1]=r.clientY;m=r.clientX+(A?Global.GetScrollLeft():0);o=r.clientY+(A?Global.GetScrollTop():0);l=parseInt(d.style.left);n=parseInt(d.style.top);w&&w(r);if(!d.$D){B||(B=CSS.AddBack(d));CSS.SetAlpha(B,0);B.Show()}Events.CancelAll(r)}function f(r){if(k){var t=i(r);if(u){var z=d.modal_panel;if(!z){z=d.modal_panel=oNode.CreateNode("div");oNode.AddNode(z,d.parentNode);with(z.style){position="absolute";p&&(cursor="move");zIndex=d.style.zIndex;
v=d.offsetWidth+"px";x=d.offsetHeight+"px";border="1px dotted #000"}}if(s&&!d.zIndex){d.zIndex=d.style.zIndex;z.style.zIndex=q}z.style.left=t[0];z.style.top=t[1]}else{if(s&&!d.zIndex){d.zIndex=d.style.zIndex;d.style.zIndex=q}d.style.left=t[0];d.style.top=t[1]}G&&G(r)}return false}function h(r){j[2]=r.clientX;j[3]=r.clientY;if(k){k=false;if(u&&d.modal_panel){if(s)d.zIndex=0;d.style.left=d.modal_panel.style.left;d.style.top=d.modal_panel.style.top;oNode.RemoveNode(d.modal_panel,d.parentNode);d.modal_panel=
null}else{if(s){d.style.zIndex=d.zIndex;d.zIndex=0}var t=i(r);d.style.left=t[0];d.style.top=t[1]}PopUp.ResetXY(d);B&&B.Hide();C&&C(r,j)}}function i(r){var t=l+r.clientX-m;r=n+r.clientY-o;var z=d.offsetWidth-Global.GetClientWidth(),I=d.offsetHeight-Global.GetClientHeight(),J=d.offsetWidth-Global.GetClientWidth()/2,K=d.offsetHeight-Global.GetClientHeight()/2;if(J>0){D=-(d.offsetWidth-Global.GetClientWidth()/2);y=Global.GetClientWidth()/2}else{D=0;y=-z}if(K>0){E=-(d.offsetHeight-Global.GetClientHeight()/
2);F=Global.GetClientHeight()/2}else{E=0;F=-I}if(t<D)t=D;else if(t>y)t=y;if(r<E)r=E;else if(r>F)r=F;t=t+(A?Global.GetScrollLeft():0)+"px";r=r+(A?Global.GetScrollTop():0)+"px";return[t,r]}var k=false,j=[],l=0,n=0,m=0,o=0,q=1E4,s=false,u=false,p,E,y,F,D,v,x,w,G,C,A;if(e){s=e.topmost;u=e.modal;p=e.move==undefined?true:e.move;E=e.top;y=e.right;F=e.bottom;D=e.left;v=e.width;x=e.height;w=typeof e.downFunc=="function"?e.downFunc:null;G=typeof e.moveFunc=="function"?e.moveFunc:null;C=typeof e.upFunc=="function"?
e.upFunc:null;A=typeof e.relateBody=="undefined"?true:e.relateBody}b.ondrag=function(){return false};b.onselectstart=function(){return false};var B=null;Events.AttachEvent(b,"mousedown",g);Events.AttachEvent(document,"mousemove",f);Events.AttachEvent(b,"mouseup",h);d.RemoveEvent=function(){Events.RemoveEvent(b,"mousedown",g);Events.RemoveEvent(document,"mousemove",f);Events.RemoveEvent(b,"mouseup",h)};if(d.style.position!="absolute"){e=Global.GetOffsetLeft(d);var H=Global.GetOffsetTop(d);d.style.position=
"absolute";d.style.zIndex=1;d.style.left=e+"px";d.style.top=H+"px"}if(p&&b)b.style.cursor="move"};
function userMsg(){var b=$("user_msg");if(b){var d=b.tip;if(!d)if($("user_message")&&$("user_msg_close")){function e(){var h=Global.GetOffsetLeft(b)-287+75,i=Global.GetOffsetTop(b)+15;PopUp.SetXY(d,h,i)}$("user_message")._html=$("user_message").innerHTML;$("user_message").innerHTML="";var g=$("user_message")._html;d=b.tip=PopUp.Panel(g);PopUp.AddPopUp(d,false,document.forms[0]);PopUp.AddMask(d);e();Events.AttachEvent(window,"resize",e);var f=userMsg.close=function(h){Events.RemoveEvent(window,"resize",
e);Events.RemoveEvent($("user_msg_close"),"click",f);PopUp.RemovePopUp(d,d.parentNode);h&&Events.CancelAll(h)}}}}function userMsgReply(b,d){var e=b.parentNode.parentNode,g=$("user_message_reply");oNode.RemoveNode(g,g.parentNode);b.parentNode.parentNode.nextSibling?oNode.InsertBefore(g,b.parentNode.parentNode.nextSibling):oNode.AddNode(g,e.parentNode);g.style.display="";$("topHiddenMessageID").value=d}BindPopup.currentMenu=null;BindPopup.back=null;
function BindPopup(b,d,e,g,f,h){function i(){q&&clearTimeout(q);BindPopup.currentMenu&&BindPopup.currentMenu!=m&&BindPopup.currentMenu.hide();m.style.zIndex=10;m.style.display="";k();BindPopup.currentMenu=m}function k(){m.style.top=Global.GetOffsetTop(n)+n.offsetHeight+"px";var s=Global.GetOffsetLeft(n);e=e||"left";switch(e.toString().toLowerCase()){case "left":break;case "center":s+=(n.offsetWidth-m.offsetWidth)/2;break;case "right":s+=n.offsetWidth-m.offsetWidth;break}m.style.left=s+g+"px";if(o){o.style.left=
m.style.left;o.style.top=m.style.top;o.style.width=m.offsetWidth+"px";o.style.height=m.offsetHeight+"px"}}function j(){q=setTimeout(l,500)}function l(){m.style.display="none";m.style.zIndex=1;if(o){o.style.left="-1000px";o.style.top="-1000px"}Events.RemoveEvent(window,"resize",k)}var n=$(b);if(n){var m=$(d);if(m){m.style.position="absolute";m.style.visibility="visible";m.style.zIndex=10;g||(g=0);f||(f=0);var o=BindPopup.back;if(Browser.IsIE56&&!o){o=BindPopup.back=oNode.CreateNode("iframe");oNode.InsertBefore(o,
m);o.style.position="absolute";o.style.left="-1000px";o.style.top="-1000px";CSS.SetAlpha(o,0)}var q;Events.AttachEvent(n,"mouseover",function(){if(h)n.interval=setTimeout(i,500);else i()});Events.AttachEvent(n,"mouseout",function(){h&&clearTimeout(n.interval);j()});Events.AttachEvent(m,"mouseover",function(){clearTimeout(q)});Events.AttachEvent(m,"mouseout",function(){j()});m.hide=l}}}
function resetPopup(b){if(b.tagName.toLowerCase()=="div")return b;var d=document.createElement("div");d.innerHTML=b.innerHTML;oNode.RemoveNode(b);oNode.AddNode(d);d.style.display="none";return d}function Switch(b,d){for(var e=1;e<b;e++){for(var g=[],f=$("head_"+e).getElementsByTagName("a"),h=$("body_"+e).getElementsByTagName(d?d[e-1]:"ul"),i=0,k=f.length;i<k;i++)g[i]=[f[i],h[i]];Effects.Switch(g,"current","")}}function FormSubmit(b){setTimeout(function(){b.disabled=true},100);return true}
function itemClick(b){try{var d=b.parentNode.parentNode;b.checked?CSS.AddClass(d,"current"):CSS.RemoveClass(d,"current")}catch(e){}}function itemMouseOver(b){CSS.AddClass(b,"hover");b.onmouseout||(b.onmouseout=function(){CSS.RemoveClass(b,"hover")})}
function imageScale(b,d,e,g){var f=b.offsetWidth,h=b.offsetHeight;b.ow=f;b.oh=h;if(f/h>d/e)if(f>d){b.style.width=d+"px";b.style.height=d/f*h+"px";g||(b.style.marginTop=(e-d/f*h)/2+"px")}else g||(b.style.marginTop=(e-h)/2+"px");else if(h>e){b.style.height=e+"px";b.style.width=e/h*f+"px"}else g||(b.style.marginTop=(e-h)/2+"px")}
function imageTip(b){var d=new Tip;d.Condition=function(e){for(var g=$EO(e);g;){if(g.className&&g.className.indexOf(b)>-1)break;g=g.parentNode}if(g)g=$EO(e);if(!g||g.tagName.toLowerCase()!="img")this.display=false;else{if(imageTip.src!=g.src){imageTip.src=g.src;this.text='<img src="'+g.src+'" />'}this.display=true}return true};d.Change=function(e,g){if((e=g.getElementsByTagName("img"))&&e[0]){g=e[0].width;var f=e[0].height;if(300<g){e[0].width=280;e[0].height=280/g*f}}};d.Create();d.css.tip="image-tip"}
function clearEditorContent(b){b=b.replace(/(<img[^>]+?)onload="[^"]+?"([^>]*?>)/gi,"$1$2");return b=b.replace(/(<img[^>]+?)onerror="[^"]+?"([^>]*?>)/gi,"$1$2")}function validateClear(b,d,e){validateReset(b);d=document.getElementsByName(d);d.length>0&&(d[0].value="");AjaxRequest.Clear("ap_checkvcode")}function validateReset(b){if(b=$(b))if(b=b.getElementsByTagName("img")[0]){if(!b._src)b._src=b.src;b.src=b._src+"&rnd="+Math.random()}}
function reloadImage(b){if(!b._src)b._src=b.src;var d=b._src+(b._src.indexOf("?")>-1?"&":"?");b.src=d+"rnd="+Math.random()}DomEvent.events={};DomEvent.list=[];DomEvent.saved=true;DomEvent.EventExecuteAble=true;DomEvent.EventExecuteFunc=new Function;
function DomEvent(){function b(h){var i=0;d=h.shiftKey;e=h.ctrlKey;g=h.altKey;var k=DomEvent.events;for(var j in k)if(!k[j][0].isShift&&!k[j][0].isCtrl&&!k[j][0].isAlt&&!d&&!e&&!g&&k[j][0].keyCode==h.keyCode&&h.keyCode==13&&(f=1)||d&&d==k[j][0].isShift&&k[j][0].keyCode==h.keyCode&&(f=2)||e&&e==k[j][0].isCtrl&&k[j][0].keyCode==h.keyCode&&(f=3)||g&&g==k[j][0].isAlt&&k[j][0].keyCode==h.keyCode&&(f=4)){i++;if(f==1&&!DomEvent.EventExecuteAble){DomEvent.EventExecuteFunc&&DomEvent.EventExecuteFunc();return false}if(f==
1&&$EO(h).tagName.toLowerCase()=="textarea"){if(Widget.InfoNum==1){Events.CancelAll(h);DomEvent.DefaultClose()}return false}if(Widget.InfoNum==1){DomEvent.DefaultClose();Events.CancelAll(h);return false}else f==1&&k[j][2]&&$(k[j][2])&&$(k[j][2]).type=="submit"||(k[j][2]&&$(k[j][2])?k[j][1].call($(k[j][2])):k[j][1]())}}var d,e,g,f=0;Browser.IsOpera?Events.AttachEvent(document,"keypress",b):Events.AttachEvent(document,"keydown",b);DomEvent.AttachDefault()}
DomEvent.AttachDefault=function(){DomEvent.events["InfoClose_"+Global.Random()]=[{isShift:false,isCtrl:false,isAlt:false,keyCode:13},DomEvent.DefaultClose]};DomEvent.DefaultClose=function(){Widget&&Widget.InfoClose();AjaxRequest.IsSubmited=false};DomEvent.Clear=function(b){this.events={};this.saved=false;if(b){this.saved=true;b=0;for(var d=this.list.length;b<d;b++)setShortcut.apply(null,this.list[b])}DomEvent.AttachDefault()};
function setShortcut(b,d,e,g){b=b&&b.id||b;this.saved&&this.list.push([b,d,e,g]);if(typeof e=="string")e=[e.toLowerCase()];for(var f=0,h=e.length;f<h;f++){var i=/(shift|ctrl|alt)\+([a-z0-9]+)/i.exec(e[f]);if(!i&&e[f]!="enter")return;if(e[f]=="enter")i=["","","enter"];i[1]=i[1].toLowerCase();i[2]=i[2].toLowerCase();i={isShift:i[1]=="shift",isCtrl:i[1]=="ctrl",isAlt:i[1]=="alt",keyCode:i[2]=="enter"?13:i[2].charCodeAt(0)};if(i.keyCode>=97&&i.keyCode<=121)i.keyCode-=32;var k=false;for(var j in DomEvent.events)if(j[1])if(j[1].toString()==
g.toString()&&j[0].isShift==i.isShift&&j[0].isCtrl==i.isCtrl&&j[0].isAlt==i.isAlt&&j[0].keyCode==i.key){k=true;break}k||(DomEvent.events[b+"_"+Global.Random()]=[i,g,b])}(b=b&&$(b))&&Events.AttachEvent(b,d,g)}function ubbCopy(b){b=b.parentNode.parentNode.getElementsByTagName("code")[0].innerHTML;b=b.replace(/&lt;/g,"<");b=b.replace(/&gt;/g,">");b=b.replace(/&nbsp;/g," ");b=b.replace(/&amp;/g,"&");copyToClipboard(b)}
function ubbRun(b){b=b.parentNode.parentNode.getElementsByTagName("code")[0].innerHTML;var d=window.open("about:blank");b=b.replace(/&lt;/g,"<");b=b.replace(/&gt;/g,">");b=b.replace(/&amp;/g,"&");d.document.open();d.document.write(b);d.document.close()}function hideMenu(b){Events.AttachEvent(b,"click",function(){this.style.visibility="hidden";Events.AttachEvent(this,"click",arguments.callee)})}
function selectedMenuItem(){var b=$("sidebar_content");if(b){b=b.getElementsByTagName("a");for(var d=b.length-1;d>-1;d--)if(location.href.indexOf(b[d].href)>-1){CSS.AddClass(b[d],"current");break}}}function undisabledSubmit(){for(var b=document.getElementsByTagName("input"),d=0,e=b.length;d<e;d++)if(b[d].type=="submit")b[d].disabled=false}
function postTo(b){b=b.toLowerCase();if(b.indexOf(root.toLowerCase()+"/?")==0)b=b.replace("/?","/default.aspx?");else if(b.indexOf("?")==0)b=b.replace("?","default.aspx?");document.forms[0].action=b;document.forms[0].submit()}function go(b){location.href=b}
function Reload(b){var d=Url.ClearAnchor(location.href),e=/^http(?:s)?:\/\/[^\/]+\:(\d+)\//i.exec(d);e="://"+location.host+(e&&e[1]?":"+e[1]:"")+Url.ClearAnchor(b);location.href=d=="http"+e||d=="https"+e?b.indexOf("#")==-1?b:"/go.aspx?url="+encodeURIComponent(b):b}function QQChat(b){openFile("Tencent://Message/?menu=yes&exe=&uin="+b+"&websiteName=bbsmax&info=")}function WLMChat(b){openFile("msnim:chat?contact="+b)}function WangWang(b){openFile("wangwang:SendIM?"+b+"&uid_t="+b)}
function Skype(b){openFile("skype:"+b+"?call")}function Gtalk(b){openFile("gtalk:chat?jid="+b)}function openFile(b){var d=arguments.callee,e=d.frame;if(!e){e=d.frame=oNode.CreateIframe("im_"+Global.Random());oNode.AddNode(e);e.style.display="none"}window.open(b,e.name)}Events.AttachEvent(window,"load",function(){if(typeof pageID!="undefined")pageID=pageID.toLowerCase();DomEvent();selectedMenuItem();undisabledSubmit()});onlineUserTip.xOffset=2;onlineUserTip.yOffset=2;onlineUserTip.Event=false;
onlineUserTip.flow=null;onlineUserTip.hasOver=false;onlineUserTip.nonHideUser=false;onlineUserTip.interval=0;onlineUserTip.delay=200;onlineUserTip.userLoading=false;onlineUserTip.userLoaded=false;onlineUserTip.guestLoading=false;onlineUserTip.guestLoaded=false;
function onlineUserTip(b,d){var e=false,g=false,f=d;if(/.{32}/.test(d)){g=true;d="online_guest_"+d}else{e=true;d="online_user_"+d}if(e&&!onlineUserTip.userLoading){onlineUserTip.userLoading=true;AjaxRequest.Render("","ap_online_users",function(){onlineUserTip.userLoaded=true;onlineUserTip(b,f)})}if(g&&!onlineUserTip.guestLoading){onlineUserTip.guestLoading=true;AjaxRequest.Render("","ap_online_guests",function(){onlineUserTip.guestLoaded=true;onlineUserTip(b,f)})}if(!(!onlineUserTip.userLoaded&&e||
!onlineUserTip.guestLoaded&&g)){var h=onlineUserTip.flow;if(!h){h=onlineUserTip.flow=PopUp.Panel($("online_tip"));PopUp.AddPopUp(h);PopUp.AddMask(h);h.onmouseover=function(){clearTimeout(onlineUserTip.interval)};h.onmouseout=function(){onlineUserTip.interval=setTimeout(function(){onlineUserTip.hide(h)},onlineUserTip.delay)}}if(d=$(d)){if(e&&!d.isChange){d.isChange=true;var i=d.getElementsByTagName("li")[0];oNode.RemoveNode(i);if(i.innerHTML.Trim()!=""){d.isShow=true;g=oNode.CreateNode("li");oNode.AddNode(g,
d);CSS.AddClass(g,"member-info-buttons");g.innerHTML=$("online_tip_btn").innerHTML.replace(/\{realname\}/gi,i.innerHTML);if(i=g.getElementsByTagName("a")[2])i.href=i.href.replace(/userid=\d+/i,"UserID="+f);else g.style.display="none"}}onlineUserTip.nonHideUser=e&&d.isShow;h.getElementsByTagName("ul")[0].innerHTML=d.innerHTML;if(!b.isCreate){b.isCreate=true;b.onmouseout=function(){onlineUserTip.hasOver=false;if(onlineUserTip.nonHideUser)onlineUserTip.interval=setTimeout(function(){onlineUserTip.hide(h)},
onlineUserTip.delay);else onlineUserTip.hide(h)}}onlineUserTip.hasOver=true;onlineUserTip.hasShow=false;clearTimeout(onlineUserTip.interval);if(!onlineUserTip.Event){onlineUserTip.Event=true;h.style.display="";Events.AttachEvent(document,"mousemove",function(k){if(onlineUserTip.hasOver){for(var j=$EO(k),l=false;j;){if(j.onmouseover&&/onlineUserTip/.test(j.onmouseover.toString())){l=true;break}j=j.parentNode}if(l){onlineUserTip.hasShow||onlineUserTip.show(k,onlineUserTip.flow);if(onlineUserTip.nonHideUser)onlineUserTip.hasShow=
true}}})}}}}onlineUserTip.show=function(b,d){var e=b.clientX+onlineUserTip.xOffset,g=b.clientY+onlineUserTip.yOffset,f=Global.GetClientWidth(),h=Global.GetClientHeight(),i=d.offsetWidth,k=d.offsetHeight;if(e+i>f)e=b.clientX-i-onlineUserTip.xOffset;if(e<0)e=0;if(g+k>h)g=b.clientY-k-onlineUserTip.yOffset;if(g<0)g=0;e+=Global.GetScrollLeft();g+=Global.GetScrollTop();PopUp.SetXY(d,e,g)};onlineUserTip.hide=function(b){b.style.left="-1000px";b.style.top="-1000px"};
function sameSetting(b,d){$(d).style.display=!b.checked?"":"none"}
function copyToClipboard(b){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",b)}else if(navigator.userAgent.indexOf("Opera")!=-1)window.location=b;else if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(d){alert("\u88ab\u6d4f\u89c8\u5668\u62d2\u7edd\uff01\n\u8bf7\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165'about:config'\u5e76\u56de\u8f66\n\u7136\u540e\u5c06'signed.applets.codebase_principal_support'\u8bbe\u7f6e\u4e3a'true'");return}var e=
Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!e)return;var g=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!g)return;g.addDataFlavor("text/unicode");var f={};f={};f=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);f.data=b;g.setTransferData("text/unicode",f,b.length*2);if(!e)return;e.setData(g,null,Components.interfaces.nsIClipboard.kGlobalClipboard)}alert("\u590d\u5236\u6210\u529f\uff01")}
function AvatarLoaded(b,d){function e(){if(b.width==0&&b.height==0)setTimeout(e,10);else{b.style.visibility="inherit";var g=b.width,f=b.height;b.style.width="auto";b.style.height="auto";g&&f&&imageScale(b,g,f,!!d);b.parentNode&&(b.parentNode.style.backgroundImage="url("+BBSMAX.SpaceImage+")")}}b.onload=null;b.onerror=null;e()}
function AvatarError(b,d){b.onload=null;b.onerror=null;b.src=BBSMAX.SpaceImage;b.parentNode&&(b.parentNode.style.background="url("+(d||BBSMAX.AvatarDefault)+") no-repeat center center")}function PictureError(b){var d=b.src.lastIndexOf(".");b.parentNode.innerHTML='<img src="'+(BBSMAX.NetExistsPath+"exe.gif")+'" style="margin: '+(BBSMAX.NetDefaultHeight-BBSMAX.NetExistsHeight)+'px 0 0;" />'}
function ImageLoaded(b,d,e){function g(){var m=window.open("about:blank");m.document.open();m.document.write('<img src="'+b.src+'">');m.document.close()}if(b.width==0&&b.height==0)setTimeout(function(){ImageLoaded(b,d,e)},10);else{if(typeof ImageLoaded.List=="undefined")ImageLoaded.List=[];ImageLoaded.List.push({src:b.src,ow:b.width,oh:b.height});b.index=ImageLoaded.List.length-1;if(typeof ImageLoaded.container=="undefined")(ImageLoaded.container=oNode.CreateNode("div")).innerHTML=['<!-- \u5e16\u5b50\u56fe\u7247\u6d6e\u52a8\u63d0\u793a\u5c42 --\><div id="image_tip_container" class="imageviewer-tips" style="position:absolute;left:0;top:0;display:none;">    <span id="image_tip_save_container"><a href="javascript:;" id="image_tip_save">\u4fdd\u5b58</a> - </span><a href="javascript:;" id="image_tip_newin">\u5728\u65b0\u7a97\u53e3\u6253\u5f00</a></div><!-- \u5e16\u5b50\u56fe\u7247\u6d4f\u89c8 --\><div id="image_viewer_container" style="position:absolute;left:0;top:0;"><div id="image_viewer" class="imageviewer" style="display:none;">    <p class="imageviewer-control" style="position:absolute;z-index:1;">        <a href="javascript:;" id="image_viewer_zoomin" class="imageviewer-zoomin" title="\u653e\u5927">\u653e\u5927</a>        <a href="javascript:;" id="image_viewer_zoomout" class="imageviewer-zoomout" title="\u7f29\u5c0f">\u7f29\u5c0f</a>        <a href="javascript:;" id="image_viewer_origin" class="imageviewer-origin" title="\u5b9e\u9645\u5927\u5c0f">\u539f\u59cb\u5927\u5c0f</a>        <a href="javascript:;" id="image_viewer_intro" class="imageviewer-screensize" title="\u63a8\u8350\u5927\u5c0f">\u539f\u59cb\u63a8\u8350\u5927\u5c0f</a>        <a href="javascript:;" id="image_viewer_open" class="imageviewer-open" title="\u65b0\u7a97\u53e3\u6253\u5f00">\u65b0\u7a97\u53e3\u6253\u5f00</a>        <a href="javascript:;" id="image_viewer_close" class="imageviewer-closer" title="\u5173\u95ed">\u5173\u95ed</a>    </p>',
'    <div id="image_viewer_move" style="position:absolute;left:0;top:0;background-image:url(\''+BBSMAX.SpaceImage+"');\"></div>",'    <div id="image_viewer_img"></div></div></div>'].join("");Events.OnLoadTasks[Events.OnLoadTasks.length]=function(){function m(){if(ImageLoaded.interval){clearTimeout(ImageLoaded.interval);ImageLoaded.intervalFunc()}b.style.background="#fff";b.style.borderColor="#666";q&&(q.style.display="")}function o(){ImageLoaded.intervalFunc=function(){q&&(q.style.display="none");
b.style.background="transparent";b.style.borderColor="#fff"};ImageLoaded.interval=setTimeout(ImageLoaded.intervalFunc,100)}oNode.AddNode(ImageLoaded.container);if(!(j.w<=100&&j.w<=100)){b.style.border="1px solid #fff";b.style.padding="2px";var q=$("image_tip_container");b.onmouseover=function(){m();q.style.left=Global.GetOffsetLeft(this)+"px";q.style.top=Global.GetOffsetTop(this)+"px";q.onmouseover=function(){m()};q.onmouseout=function(){o()};var s=/Attachment\.aspx\?ID=\d+(?:&\?mode=image)?/i.test(b.src);
$("image_tip_save_container").style.display=s?"":"none";$("image_tip_save").onclick=function(){window.open(b.src.replace(/&?mode=image/i,""),Browser.IsIE56?"_blank":"_self")};$("image_tip_newin").onclick=function(){g()}};b.onmouseout=function(){o()}}};b.onload=null;b.onerror=null;b.style.backgroundImage="url("+BBSMAX.SpaceImage+")";var f=new Image;f.src=b.src;var h=f.width;f=f.height;var i=d=b.width,k=e=b.height,j=oImage.Scale(d,e,Global.GetClientWidth()*0.9,e);b.width=j.w;b.height=j.h;j=oImage.Scale(d,
e,Global.GetClientWidth()*0.9,Global.GetClientHeight()*0.9);var l=d=j.w,n=e=j.h;if(h>100||f>100)b.onclick=function(){function m(){p.RemoveEvent();G.RemoveEvent();var r=p.$D,t=D,z=function(){if(t<0){p.$D.Hide();CSS.SetAlpha(r,0);PopUp.RestorePopUp(p)}else{CSS.SetAlpha(r,t);t-=25;setTimeout(z,0)}};z();p.style.display="none"}function o(){x+=x*0.1;w+=w*0.1;if(x>=1.5*d||w>=1.5*e){x=1.5*d;w=1.5*e;C="150"}else C="";s()}function q(){x-=x*0.1;w-=w*0.1;if(x<=d/2||w<=e/2){x=d/2;w=e/2;C="50"}else C="";s()}function s(){clearTimeout(A);
CSS.SetAlpha(v,y=60);var r=$("image_viewer_object");r.style.width=x+"px";r.style.height=w+"px";p.style.left=B-p.offsetWidth/2+"px";p.style.top=H-p.offsetHeight/2+"px";v.style.width=p.offsetWidth+"px";v.style.height=p.offsetHeight+"px";v.style.lineHeight=p.offsetHeight+"px";v.innerHTML='<strong style="padding: 50px;background:transparent url('+BBSMAX.ImagePreviewBg+') no-repeat center center;">'+(C||Math.floor(x*100/i))+"%</strong>";PopUp.ResetSize(p);A=setTimeout(u,2E3)}function u(){if(!(y<=0)){y-=
5;CSS.SetAlpha(v,y);A=setTimeout(u,8)}}var p=PopUp.Panel($("image_viewer"));PopUp.AddPopUp(p,true);PopUp.AddMask(p);p.style.display="";p.style.backgroundColor="#fff";$("image_viewer_img").innerHTML='<img id="image_viewer_object" src="'+b.src+'" width="'+d+'" height="'+e+'" />';p.Center(true);var E=$("image_viewer_object"),y=0,F=function(){if(y>100)CSS.SetAlpha(E,100);else{CSS.SetAlpha(E,y);y+=15;setTimeout(F,0)}};F();p.$D.style.background="#000";var D=60;CSS.SetAlpha(p.$D,D);var v=$("image_viewer_move");
Effects.Move(v,p,{modal:false,relateBody:true,upFunc:function(r,t){if(t[0]==t[2]&&t[1]==t[3])m();else{B=parseInt(p.style.left)+p.offsetWidth/2;H=parseInt(p.style.top)+p.offsetHeight/2}}});v.style.width=p.offsetWidth+"px";v.style.height=p.offsetHeight+"px";v.style.lineHeight=p.offsetHeight+"px";v.style.fontWeight="bolder";v.style.textAlign="center";v.style.color="#fff";PopUp.ResetSize(p);Events.AttachEvent(window,"resize",function(){p.$D.Show();PopUp.ResetXY(p)});$("image_viewer_zoomin").onclick=function(){o()};
$("image_viewer_zoomout").onclick=function(){q()};$("image_viewer_origin").onclick=function(){x=i;w=k;s()};$("image_viewer_intro").onclick=function(){x=l;w=n;s()};$("image_viewer_open").onclick=function(){g()};$("image_viewer_close").onclick=function(){m()};var x=d,w=e,G=new MouseWheel;G.Handle=function(r){r<0?q():o()};var C="",A,B=parseInt(p.style.left)+p.offsetWidth/2,H=parseInt(p.style.top)+p.offsetHeight/2;y=60}}}
function ImageError(b){b.error=true;b.onload=null;b.onerror=null;b.src=BBSMAX.ImageDefault;b.style.width="auto";b.style.height="auto";b.style.background="url()"}function showAttachment(b){function d(){e.style.display="none";Events.RemoveEvent(b,"mouseout",d)}var e=$("attachment");if(!e.ispopup){e.ispopup=true;PopUp.Panel(e);PopUp.AddPopUp(e)}e.style.display="block";e.style.left=Global.GetOffsetLeft(b)+"px";e.style.top=Global.GetOffsetTop(b)+20+"px";Events.AttactEvent(b,"mouseout",d)}showVCode.c=null;
showVCode.current=null;showVCode.tip=null;
function showVCode(b,d){var e=showVCode.c;if(e&&showVCode.current!=b){showVCode.current=b;showVCode.tip.style.display="";e.src=d;e._src="";reloadImage(e)}if(!e){e=showVCode.c=oNode.CreateNode("img");oNode.AddNode(e);e.style.position="absolute";e.style.cursor="pointer";e.style.left="-100px";e.style.top="-100px";e.title="\u770b\u4e0d\u6e05\uff0c\u70b9\u51fb\u5237\u65b0";e.src=d;Events.AttachEvent(e,"click",function(){reloadImage(e)});e.onload=function(){e.style.border="1px solid #ccc";showVCode.show(e,
b);showVCode.tip.style.display="none"};d=showVCode.mousedown=function(g){g=$EO(g);g==showVCode.current||g==showVCode.c||showVCode.hide()};Events.AttachEvent(document,"mousedown",d)}d=showVCode.tip;if(!d){d=showVCode.tip=oNode.CreateNode("div");oNode.AddNode(d);CSS.AddClass(d,"validcode-loader");d.style.position="absolute";d.style.zIndex=11;d.innerHTML="\u8f7d\u5165\u9a8c\u8bc1\u7801...";d.style.left=Global.GetOffsetLeft(b)+"px";d.style.top=Global.GetOffsetTop(b)-d.offsetHeight+"px";e.style.display=
"none"}if(showVCode.current!=b){reloadImage(e);showVCode.current=b}e.style.zIndex=10;showVCode.show(e,b)}showVCode.show=function(){c=showVCode.c;th=showVCode.current;c.style.display="block";c.style.left=Global.GetOffsetLeft(th)+"px";c.style.top=Global.GetOffsetTop(th)-c.offsetHeight+"px"};showVCode.hide=function(){this.c.style.display="none"};
showVCode.clear=function(){this.current=this.c=null;this.tip&&oNode.RemoveNode(this.tip);this.tip=null;this.mousedown&&Events.RemoveEvent(document,"mousedown",this.mousedown)};function selectListAll(b,d){d=document.getElementsByName(d);for(var e=0,g=d.length;e<g;e++){d[e].checked=b.checked;var f=d[e].parentNode.parentNode;d[e].c=b;b.checked?CSS.AddClass(f,"current"):CSS.RemoveClass(f,"current")}}
function selectListOne(b){var d=b.parentNode.parentNode;b.checked?CSS.AddClass(d,"current"):CSS.RemoveClass(d,"current");b.c&&(b.c.checked=false)}function cancelSelected(){$("selecteAll").checked=false}PostViewStyle.current_css="";
function PostViewStyle(b,d){for(var e=PostViewStyle.current_css;b;){if(b.tagName.toLowerCase()=="table"){b=b.getElementsByTagName("div");for(var g=0,f=b.length;g<f;g++)if(b[g].className.indexOf("post-content")>-1||b[g].className.indexOf("post-attach")>-1){CSS.RemoveClass(b[g],e);CSS.AddClass(b[g],d);PostViewStyle.current_css=d;break}break}b=b.parentNode}}
function ImageScalePost(){for(var b=[],d=document.getElementsByTagName("div"),e=0,g=d.length;e<g;e++)if(d[e].className.indexOf("post-content")>-1||d[e].className.indexOf("post-attach")>-1)b.push(d[e]);e=0;for(g=b.length;e<g;e++){d=b[e].getElementsByTagName("img");for(var f=0,h=d.length;f<h;f++){var i=parseInt(d[f].style.borderWidth)*2;i=isNaN(i)?0:i;d[f].w=d[f].width-i;d[f].h=d[f].height-i;d[f].width=1}}e=0;for(g=b.length;e<g;e++){i=b[e].offsetWidth;d=b[e].offsetHeight;d=b[e].getElementsByTagName("img");
f=0;for(h=d.length;f<h;f++){var k,j;if(d[f].w>i){k=i*0.9;j=d[f].h*i/d[f].w*0.9}else{k=d[f].w;j=d[f].h}d[f].width=k;d[f].height=j}}}
function showMemberInfo(b){var d=function(f){g()},e=function(){if(!b.display){b.display=true;if(Browser.IsIE)b.parentNode.style.height=b.parentNode.offsetHeight+"px";else{b.parentNode.style.borderWidth="1px";b.parentNode.style.height=b.parentNode.offsetHeight-2+"px"}if(b.parentNode!=null)b.parentNode.style.position="relative";b.style.zIndex=10;CSS.AddClass(b,"author-infolist-expand")}},g=function(){clearTimeout(b.interval);b.process=false;b.display=false;b.style.zIndex=0;if(b.parentNode!=null)b.parentNode.style.position=
"static";CSS.RemoveClass(b,"author-infolist-expand");if(b.parentNode!=null)b.parentNode.style.height="auto"};b.onmouseover=function(f){if(!b.process){b.process=true;b.interval=setTimeout(e,200)}};Events.AttachEvent(document,"mousemove",function(f){for(f=$EO(f);f;){if(f==b)break;f=f.parentNode}f||g()})}
function scrollFaceTitle(){var b=$("face_title_list");if(b){for(var d=0,e=b.getElementsByTagName("div"),g=0;g<e.length;g++){if(g==0){e[g].className="focus";viewGroup.current=e[g]}d+=e[g].offsetWidth+2}d+=2;b.style.width=d+"px";b.style.left="0";$("face_title").style.overflow="hidden";var f=$("face_title").offsetWidth-$("control").offsetWidth;if(d<f){$("face_prev").style.display="none";$("face_next").style.display="none"}else{$("face_prev").onclick=function(){var h=parseInt(b.style.left);if(h+60>0)h=
0;else h+=60;b.style.left=h+"px"};$("face_next").onclick=function(){var h=parseInt(b.style.left);if(h-60+d<f)h=f-d;else h-=60;b.style.left=h+"px"}}}}function viewGroup(b,d){if(viewGroup.current)viewGroup.current.className="";viewGroup.current=b;b.className="focus";AjaxRequest.Render(d)}function addFace(b,d){if($("enableEmoticon").checked)(d=$("Editor"))&&(d.value+=b)}
function showPreview(b,d){var e=$("face_preview"),g=$("preview_container"),f=oNode.CreateNode("img");oNode.AddNode(f,g);f.onload=function(){if(this.parentNode){AvatarLoaded(this);e.style.visibility="visible"}};f.width=e.offsetWidth;f.height=e.offsetHeight;f.src=d;d=Global.GetOffsetLeft(b,$("face_list"));e.style.left=d>100?"10px":"auto";e.style.right=d>100?"auto":"10px";b.onmouseout||(b.onmouseout=hidePreview)}
function hidePreview(){$("preview_container").innerHTML="";$("face_preview").style.visibility="hidden"}var AjaxRequest={FormIndex:0};AjaxRequest.SetFormIndex=function(b){if(typeof b=="number")this.FormIndex=b;else if(b=="last")this.FormIndex=document.forms.length-1};
AjaxRequest.Callback=function(b,d,e,g){var f,h="",i="",k={index:-1,url:"",time:0};if(/^\[(success|error|alert|url)\][\s\S]+?\[returnurl(?:=\d+)?\][\s\S]+?/i.test(b)){(f=/\[(success|error|alert|url)\]([\s\S]+?)\[returnurl(?:=\d+)?\]([\s\S]+?)\{.{8}\-.{4}\-.{4}\-.{4}\-.{12}\}/.exec(b))||(f=/\[(success|error|alert|url)\]([\s\S]+?)\[returnurl(?:=\d+)?\]([\s\S]+)/.exec(b));h=f[1];for(var j=b.match(/\[returnurl(?:=\d+)?\]/gi),l=0,n=j.length;l<n;l++){var m=/\[returnurl=(\d+)\]/i.exec(j[l]);if(m){k={index:l,
url:"",time:m[1]};break}}var o=f[3].split(/\[returnurl(?:=\d+)?\]/i);l=0;for(n=o.length;l<n;l++){m=o[l].split("|");i+='<a href="'+m[1]+'"';if(m[1].indexOf("javascript:")!=0)i+=' onclick="Url.Reload(this.href);return false;"';i+=">"+m[0]+"</a><br />";if(l==k.index)k.url=m[1]}i=f[2]+"<p>"+i+"</p>";Widget.InfoCloseAble=false;DomEvent.EventExecuteAble=false;DomEvent.EventExecuteFunc=function(){Url.Reload(o[0].split("|")[1])}}else if(/\{.{8}\-.{4}\-.{4}\-.{4}\-.{12}\}/.test(b)){f=/^\[(success|error|alert|url)\]([\s\S]+?)\{.{8}\-.{4}\-.{4}\-.{4}\-.{12}\}/i.exec(b);
n=0;if(f){h=f[1];i=f[2];n=h.length+2+i.length}b=b.substr(n)}else{if(f=/^\[(success|error|alert|url)\]([\s\S]*)/i.exec(b)){h=f[1];i=f[2]}b=""}if(h=="url")Url.Reload(i);else{Widget.HideLoading();b=b==""?[]:b.split(b.substr(0,38));l=0;for(n=b.length;l<n;l++)if(b[l]){f=b[l].indexOf("|");j="ajaxpanel_"+b[l].substr(0,f);if(j=$(j))j.innerHTML=b[l].substr(f+1)}k.index>-1&&setTimeout(function(){Url.Reload(k.url)},k.time*1E3);e?e(h,i,g):Widget.Auto(h,i,g);Widget.Resize();if(b!=""){l=0;for(n=document.forms.length;l<
n;l++)d&&(document.forms[l].action=d)}}};
AjaxRequest.Render=function(b){if(!Widget.InfoNum){var d=ToArray(arguments,1),e=d[d.length-1];if(typeof e=="function")d=d.slice(0,d.length-1);else e=null;var g=d.length>0?d.join(","):"*";b=b||document.forms[this.FormIndex]&&document.forms[this.FormIndex].action||this.ClearUrl(location.href);var f=new oAjax;f.url=b;f.content="_AjaxPanelId="+g;f.action="post";f.error=false;f.callback=function(i){setTimeout(function(){AjaxRequest.Callback(i,b,e);for(var k=0,j=d.length;k<j;k++){var l=$("ajaxpanel_"+d[k]);
if(l)(l=$("ajaxloading_"+l.loadingid))&&(l.style.display="none")}},0)};f.send();g=0;for(f=d.length;g<f;g++){var h=$("ajaxpanel_"+d[g]);if(h){if(!h._lastupdate)h._lastupdate=0;h._lastupdate2=(new Date).getTime()}}}};AjaxRequest.IsSubmited=false;
AjaxRequest.Submit=function(b){if(!Widget.InfoNum)if(!this.IsSubmited){this.IsSubmited=true;var d=document.forms[this.FormIndex];if(d){var e=Array.prototype.slice.apply(arguments).slice(1),g=e[e.length-1];if(typeof g=="function")e=e.slice(0,e.length-1);else g=null;var f=e.length>0?e.join(","):"*",h;if(this.FormIndex)for(var i=0;i<2;i++){var k=this.GetFieldEnum(document.forms[i]);for(var j in k)if(h)h[j]=k[j];else h=k}else h=this.GetFieldEnum(d);if(b!=""){b=h.ButtonProxy=[b=="*"?this.GetFirstSubmit(d):
b];b=b[0]}AjaxRequest.DisableButton(b,true);k="";for(j in h){i=0;for(var l=h[j].length;i<l;i++){if(k!="")k+="&";k+=j+"="+encodeURIComponent(h[j][i])}}var n=d.action||this.ClearUrl(location.href);i=new oAjax;i.url=n;i.content=k+"&_AjaxPanelId="+f;i.action="post";i.error=false;i.callback=function(m){setTimeout(function(){AjaxRequest.Callback(m,n,g,b);AjaxRequest.IsSubmited=false},0)};i.send();i=0;for(l=e.length;i<l;i++)if(f=$("ajaxpanel_"+e[i])){if(!f._lastupdate)f._lastupdate=0;f._lastupdate2=(new Date).getTime()}}}};
AjaxRequest.GetFieldEnum=function(b){for(var d={},e=0,g=b.elements.length;e<g;e++){var f=b.elements[e],h=f.name;if(!f.disabled){d[h]||(d[h]=[]);switch(f.tagName.toLowerCase()){case "input":switch(f.type){case "text":case "hidden":case "password":d[h].push(f.value);case "radio":case "checkbox":f.checked&&d[h].push(f.value);break}break;case "textarea":d[h].push(f.value);break;case "select":d[h].push(f.options[f.selectedIndex].value);break}}}return d};
AjaxRequest.GetFirstSubmit=function(b){b=b.getElementsByTagName("input");for(var d=0,e=b.length;d<e;d++)if(b[d].type=="submit"||b[d].type=="image")return b[d].name;return""};AjaxRequest.DisableButton=function(b,d){try{var e=b&&$(b);if(e)if(e.disabled=d){e._onclick||(e._onclick=e.onclick);e._href||(e._href=e.href);e.onclick=function(){};e.href="javascript:void(0);"}else{e.onclick=e._onclick;e.href=e._href}}catch(g){}};AjaxRequest.ClearUrl=function(b){return b=b.substring(0,b.indexOf("#"))||b};
AjaxRequest.Clear=function(){for(var b=0,d=arguments.length;b<d;b++){var e=$("ajaxpanel_"+arguments[b]);e&&(e.innerHTML="")}};var Request={FormIndex:0};Request.Submit=function(b,d){var e=document.forms[this.FormIndex];if(e){d&&(e.target=d);if(!e.elements.ButtonProxy){d=oNode.CreateInput("ButtonProxy");d.type="hidden";oNode.AddNode(d,e)}e.elements.ButtonProxy.value=[b||AjaxRequest.GetFirstSubmit(e)];e.method="post";e.submit();this.FormIndex=0}};
var Widget={InfoNum:0,InfoCloseAble:true,Success:function(b,d,e){b=this.Info(b,d,e);d=$("popup_info_canel");CSS.RemoveClass(b,"error","alert");CSS.AddClass(b,"valid");CSS.SetDisplay(d,false)},Error:function(b,d,e){b=this.Info(b,d,e);d=$("popup_info_canel");CSS.RemoveClass(b,"valid","alert");CSS.AddClass(b,"error");CSS.SetDisplay(d,false)},Alert:function(b,d,e){b=this.Info(b,d,e);d=$("popup_info_canel");CSS.RemoveClass(b,"valid","error");CSS.AddClass(b,"alert");CSS.SetDisplay(d,false)},Confirm:function(b,
d,e,g){var f=this.Info(b,d,function(){var h=false;if(f._returnValue){h=true;e()}g&&g(h)});CSS.RemoveClass(f,"valid","error");CSS.AddClass(f,"alert");b=$("popup_info_canel");CSS.SetDisplay(b,true)},Info:function(b,d,e){function g(){PopUp.SetXY(f,f.style.left,Global.GetScrollTop()+(Global.GetClientHeight()-f.offsetHeight)/2)}var f=$("popup_info"),h=$("popup_info_bar"),i=$("popup_info_title"),k=$("popup_info_content"),j=$("popup_info_close"),l=$("popup_info_confirm"),n=$("popup_info_canel");j.style.display=
"";l.style.display="";f._display&&PopUp.RestorePopUp(f);f._returnValue=false;i.innerHTML=b;d&&(k.innerHTML=d);if(this.InfoCloseAble){function m(){f._returnValue=true;o()}var o=Widget.InfoClose=function(q){f._display=false;Widget.InfoNum=0;q&&Events.CancelAll(q);PopUp.RestorePopUp(f);Events.RemoveEvent(j,"click",o);Events.RemoveEvent(n,"click",o);Events.RemoveEvent(l,"click",m);Events.RemoveEvent(window,"scroll",g);e&&e()};Events.AttachEvent(j,"click",o);Events.AttachEvent(n,"click",o);Events.AttachEvent(l,
"click",m);l.parentNode.style.display=""}else{j.style.display="none";l.parentNode.style.display="none"}Effects.Move(h,f,{modal:false});PopUp.Panel(f,0,0,true);PopUp.AddPopUp(f,true);PopUp.AddMask(f);f.style.zIndex=10;f._display=true;f.focus();Events.AttachEvent(window,"scroll",g);this.InfoNum=1;return f},InfoClose:function(){},ContentNum:0,Content:function(b,d,e,g){DomEvent.Clear();AjaxRequest.SetFormIndex(1);this.ContentNum=1;var f=$("popup_win");$("popup_win_bar");var h=$("popup_win_title"),i=$("popup_win_content"),
k=$("popup_win_close");if(oNode.IsNode(d)){if(!d._innerHTML){d._innerHTML=d.innerHTML;d.innerHTML=""}d=d._innerHTML}f._display&&PopUp.RestorePopUp(f);b&&(h.innerHTML=b);d&&(i.innerHTML=d);f.style.width=(e||400)+"px";f._close=function(j){DomEvent.Clear(true);Widget.ContentNum=0;AjaxRequest.FormIndex=0;g&&g();f.RemoveEvent();f._display=false;j&&Events.CancelAll(j);i.innerHTML="";PopUp.RestorePopUp(f);Events.RemoveEvent(k,"click",f._close)};this.Close=f._close;Events.AttachEvent(k,"click",f._close);
f.gradual=false;PopUp.Panel(f,0,0,true);PopUp.AddPopUp(f,true);PopUp.AddMask(f);f._display=true;this.Resize();Effects.Move(h,f,{modal:false});this.Focus(f);return f},Focus:function(b){b=b||$("popup_win");(b=b.getElementsByTagName("input"))&&b[0]&&b[0].type=="text"&&b[0].focus()},Resize:function(b){if(this.ContentNum)b||$("popup_win").$Move()},Show:function(){PopUp.SetVisible($("popup_win"),true)},Hide:function(){PopUp.SetVisible($("popup_win"),false)},Close:function(){},Auto:function(b,d,e){AjaxRequest.DisableButton(e,
false);if(b=="success")try{Widget.Close()}catch(g){}switch(b){case "success":Widget.Success("\u64cd\u4f5c\u6210\u529f",d);break;case "error":Widget.Error("\u9519\u8bef",d);break;case "alert":Widget.Alert("\u8b66\u544a",d);break}},LoadingNum:0,ShowLoading:function(b,d){b=b||"popup_loading";var e=$(b);if(e){this.HideLoading();this.LoadingNum++;var g=$(b+"_close"),f=$(b+"_back");b=$(b+"_retry");if(e&&g&&f&&b){PopUp.Panel(e,0,0,true);PopUp.AddPopUp(e,true);PopUp.AddMask(e);d&&PopUp.SetXY(e,Global.GetOffsetLeft($(d)),
Global.GetOffsetTop($(d)));d=this.HideLoading=function(){this.HideLoading1(e)};Events.AttachEvent(g,"click",d)}else{e.style.display="";if(d){e.style.left=Global.GetOffsetLeft($(d))+"px";e.style.top=Global.GetOffsetTop($(d))+"px"}this.HideLoading=function(){this.HideLoading2(e)}}}},HideLoading:function(){},HideLoading1:function(b){this.LoadingNum--;if(!(this.LoadingNum>1&&this.HideLoading==this.HideLoading1)){this.LoadingNum=0;b&&PopUp.RestorePopUp(b)}},HideLoading2:function(b){this.LoadingNum--;b.style.display=
"none"}};$Defined("Roll");var Roll={};Roll.Left=function(){};Roll.Right=function(){};
Roll.Top=function(b,d,e){function g(){if(!h()||parseInt(f.style.top)!=0&&parseInt(j.style.top)!=0){if(s==0){n=1;if(l)return;if(parseInt(f.style.top)<-f.offsetHeight)f.style.top=parseInt(j.style.top)+j.offsetHeight+"px";if(parseInt(j.style.top)<-j.offsetHeight)j.style.top=parseInt(f.style.top)+f.offsetHeight+"px";s=q;u=setTimeout(g,o);return}n=0;s--;if(parseInt(f.style.top)>parseInt(j.style.top)){j.style.top=parseInt(j.style.top)-1+"px";f.style.top=parseInt(j.style.top)+j.offsetHeight+"px"}else{f.style.top=
parseInt(f.style.top)-1+"px";j.style.top=parseInt(f.style.top)+f.offsetHeight+"px"}}u=setTimeout(g,m)}if(b&&d){if(typeof e!="object")e={};if(typeof e.scrollamount!="number")e.scrollamount=30;if(typeof e.scrolldelaymin!="number")e.scrolldelaymin=50;if(typeof e.scrolldelaymax!="number")e.scrolldelaymax=2E3;with(b.style){position="relative";overflow="hidden"}var f;if(oNode.IsNode(d))f=d;else{f=oNode.CreateNode("div");oNode.AddNode(f,b);f.innerHTML=d}with(f.style){position="absolute";top=0}var h=function(){return Math.floor(f.offsetHeight/
e.scrollamount)<2};d=f.getElementsByTagName("li");for(var i=0,k=d.length;i<k;i++)d[i].style.height=e.scrollamount+"px";var j=f.cloneNode(true);oNode.AddNode(j,b);with(f.style){position="absolute";top=f.offsetHeight+"px"}var l=false,n=0,m=e.scrolldelaymin,o=e.scrolldelaymax,q=e.scrollamount||20,s=0,u;g();Events.AttachEvent(window,"resize",function(){clearTimeout(u);g()});Events.AttachEvent(b,"mouseover",function(){l=true;n==1&&clearTimeout(u)});Events.AttachEvent(b,"mouseout",function(){l=false;if(n==
1){clearTimeout(u);u=setTimeout(g,o)}})}};Roll.Bottom=function(){};$Defined("oImage");var oImage={};oImage.Scale=function(b,d,e,g,f){var h={w:0,h:0,mt:0};if(b/d>e/g)if(b>e){h.w=e;h.h=e/b*d;f&&(f=(g-e/b*d)/2)}else{h.w=b;h.h=d;f&&(f=(g-d)/2)}else if(d>g){h.h=g;h.w=g/d*b}else{h.w=b;h.h=d;f&&(f=(g-d)/2)}f&&(h.mt=Math.floor(f));return h};$Defined("Cookie");var Cookie={cookies:{},path:"/",domain:typeof cookieDomain!="undefined"?cookieDomain:""};
Cookie.Get=function(){var b=document.cookie;if(b){b=b.replace(/\s+/g,"");b=b.split(";");for(var d=0;d<b.length;d++){if(b[d].indexOf("=")==-1)return;var e=b[d].split("=");this.cookies[e[0]]=unescape(e[1])}}};Cookie.Set=function(b,d,e,g,f){e||(e=new Date((new Date).getTime()+7884E8));f=(f=f||this.domain||"")?";domain="+f:"";document.cookie=b+"="+escape(d)+";expires="+e.toGMTString()+";path="+(g||this.path)+f};Cookie.Del=function(b){Cookie.Set(b,"",new Date((new Date).getTime()-1))};Cookie.Get();
function MouseWheel(){var b=this,d=this.wheel=function(e){b.Wheel(e)};window.addEventListener&&window.addEventListener("DOMMouseScroll",d,false);Events.AttachEvent(document,"mousewheel",d)}MouseWheel.prototype.RemoveEvent=function(){window.addEventListener&&window.removeEventListener("DOMMouseScroll",this.wheel,false);Events.RemoveEvent(document,"mousewheel",this.wheel)};
MouseWheel.prototype.Wheel=function(b){var d=0;if(b.wheelDelta)d=b.wheelDelta/120;else if(b.detail)d=-b.detail/3;d&&this.Handle(d);Events.CancelEvent(b)};MouseWheel.prototype.Handle=function(){};var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function encode64(b){b=escape(b);var d="",e,g,f="",h,i,k="",j=0;do{e=b.charCodeAt(j++);g=b.charCodeAt(j++);f=b.charCodeAt(j++);h=e>>2;e=(e&3)<<4|g>>4;i=(g&15)<<2|f>>6;k=f&63;if(isNaN(g))i=k=64;else if(isNaN(f))k=64;d=d+keyStr.charAt(h)+keyStr.charAt(e)+keyStr.charAt(i)+keyStr.charAt(k)}while(j<b.length);return d}
function decode64(b){var d="",e,g,f="",h,i="",k=0;/[^A-Za-z0-9\+\/\=]/g.exec(b)&&alert("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.");b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=keyStr.indexOf(b.charAt(k++));g=keyStr.indexOf(b.charAt(k++));h=keyStr.indexOf(b.charAt(k++));i=keyStr.indexOf(b.charAt(k++));e=e<<2|g>>4;g=(g&15)<<4|h>>2;f=(h&3)<<6|i;d+=String.fromCharCode(e);if(h!=64)d+=String.fromCharCode(g);
if(i!=64)d+=String.fromCharCode(f)}while(k<b.length);return unescape(d)}function processUrl(b){window.open(decode64(b));return false}function displayUrl(b,d){if(b.onmouseout)return false;b.href=decode64(d);b.onmouseout=function(){window.status=""};return true}a=String.prototype;a.contains=function(b){return this.indexOf(b)>-1};a.trim=function(b){return b?this.trimEnd(b).trimStart(b):this.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"")};
a.trimEnd=function(b){if(this.endsWith(b))return this.substring(0,this.length-b.length);return this};a.trimStart=function(b){if(this.startsWith(b))return this.slice(b.length);return this};a.startsWith=function(b){return this.indexOf(b)==0};a.endsWith=function(b){return b.length<=this.length&&this.substr(this.length-b.length,b.length)==b};String.format=function(){for(var b=arguments[0],d=1;d<arguments.length;d++)b=b.replace(new RegExp("\\{"+(d-1)+"\\}","ig"),arguments[d]);return b};
String.isNullOrEmpty=function(b){return b};
var stringBuilder=function(b){this.arr=[];this.length=0;if(b){this.arr.push(b);this.length+=b.length}if(!stringBuilder.created){stringBuilder.prototype.append=function(d){this.arr.push(d);this.length+=d.length;return this};stringBuilder.prototype.clear=function(){this.arr.splice(0,this.arr.length);this.length=0;return this};stringBuilder.prototype.insert=function(d,e){var g=0,f=0;if(d==0)this.arr.unshift(e);else for(var h=0;h<this.arr.length;h++){g+=this.arr[h].length;if(g>=d){f=g-d;d=this.arr[h];
f=d.length-f;d=d.substring(0,f)+e+d.substring(f,d.length);this.arr[h]=d;break}}return this};stringBuilder.prototype.remove=function(d,e){var g=0,f=-1,h=-1,i=0,k=d+e;if(e<=0)return this;for(e=0;e<this.arr.length;e++){g+=this.arr[e].length;if(g>=d&&f==-1){f=e+1;var j=this.arr[e];i=j.length-(g-d);if(i<j.length){var l=j.substring(i,j.length);j=j.substring(0,i);this.arr[e]=j;if(this.arr.length==e+1)this.arr.push(l);else this.arr[e+1]=l+this.arr[e+1];g-=l.length}}else if(g>=k){h=e;i=k-g;if(i>0){j=this.arr[e];
i=j.length-i;l=j.substring(i,j.length);j=j.substring(0,j.length-i);this.arr[e]=j;this.arr.splice(e,0,l)}this.arr.splice(f,h-f);break}}return this};stringBuilder.prototype.toString=function(){return this.arr.join("")};stringBuilder.created=true}},max={browser:{isIE:navigator.userAgent.toLowerCase().contains("msie"),isIE5:navigator.userAgent.toLowerCase().contains("msie 5"),isIE6:navigator.userAgent.toLowerCase().contains("msie 6"),isIE7:navigator.userAgent.toLowerCase().contains("msie 7"),isGecko:navigator.userAgent.toLowerCase().contains("gecko"),
isSafari:navigator.userAgent.toLowerCase().contains("safari"),isOpera:navigator.userAgent.toLowerCase().contains("opera")},global:{getClientWidth:function(){return document.documentElement&&document.documentElement.clientWidth||document.body.clientWidth},getClientHeight:function(){return document.documentElement&&document.documentElement.clientHeight||document.body.clientHeight},getScrollTop:function(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop},getScrollLeft:function(){return document.documentElement&&
document.documentElement.scrollLeft||document.body.scrollLeft},getFullHeight:function(){return document.documentElement.clientHeight>document.documentElement.scrollHeight?document.documentElement.clientHeight:document.documentElement.scrollHeight},getFullWidth:function(){return document.documentElement.scrollWidth},getBrowserRect:function(){var b={};b.left=this.getScrollLeft();b.top=this.getScrollTop();b.width=this.getClientWidth();b.height=this.getClientHeight();b.bottom=b.top+b.height;b.right=b.left+
b.width;return b}},coor:{left:function(b,d){if(typeof d=="number"){b.style.position="absolute";b.style.left=d+"px"}else{d=b.offsetLeft;if(b.offsetParent!=null)d+=Left(b.offsetParent);return d}},top:function(b,d){if(typeof d=="number"){b.style.position="absolute";b.style.top=d+"px"}else{d=b.offsetTop;if(b.offsetParent!=null)d+=Top(b.offsetParent);return d}},width:function(b,d){if(typeof d=="number")b.style.width=d+"px";else return b.offsetWidth},height:function(b,d){if(typeof d=="number")b.style.height=
d+"px";else return b.offsetHeight},getRect:function(b){var d={};d.left=getLeft(b);d.top=getTop(b);d.width=getWidth(b);d.height=getHeight(b);d.bottom=d.top+d.height;d.right=d.left+d.width;return d}}};function $(b){return typeof b=="string"?document.getElementById(b):b}function $$(b){return typeof b=="string"?document.getElementsByName(b):null}function $T(b){return typeof b=="string"?document.getElementsByTagName(b):null}function setStyle(b,d){for(var e in d)b.style[e]=d[e]}
function addElement(b,d){b=document.createElement(b);typeof d!="undefined"?d.appendChild(b):document.body.appendChild(b);return b}function removeElement(b){if(typeof b=="string")b=$(b);b.parentNode.removeChild(b)}function attr(b,d,e){if(e)b.setAttribute(d,e);else return b.getAttribute(d)}function addHandler(b,d,e){if(d.indexOf("on",0)>=0)d=d.substring(2,d.length);max.browser.isIE?b.attachEvent("on"+d,e):b.addEventListener(d,e,false)}
function opacity(b,d){setStyle(b,{opacity:d/100,MozOpacity:d/100,KhtmlOpacity:d/100,filter:"alpha(opacity="+d+")"})}function removeHandler(b,d,e){if(d.indexOf("on",0)>=0)d=d.substring(2,d.length);max.browser.isIE?b.detachEvent("on"+d,e):b.removeEventListener(d,e,false)}function isUndefined(b){return typeof b=="undefined"?true:false}function getTop(b){var d=b.offsetTop;if(b.offsetParent!=null)d+=getTop(b.offsetParent);return d}
function getLeft(b){var d=b.offsetLeft;if(b.offsetParent!=null)d+=getLeft(b.offsetParent);return d}function getWidth(b){return b.offsetWidth}function getHeight(b){return b.offsetHeight}var timer=function(b,d){this.counter=0;this.interval=b;this.ontick=d};timer.prototype.start=function(){var b=this;if(this.interval>0){this.ontick!=null&&this.ontick(++this.counter);window.setTimeout(function(){b.start()},b.interval)}};timer.prototype.stop=function(){this.interval=0};
function hasQuery(b){if(b.contains("/?")){var d=b.toString().indexOf("/?");return b.toString().indexOf("?",d+2)!=-1}else return b.contains("?")}openDialog.obj=null;
function openDialog(){var b=arguments;if(b.length<1)return true;var d;if(typeof b[0]=="string"){d={src:b[0]};if(b.length=2)if(typeof b[1]=="function")d.return_handler=b[1];else if(typeof(b[1]=="object"))d.trigger=b[1];if(b.length=2)if(typeof b[1]=="function"){d.return_handler=b[1];d.trigger=b[2]}else{d.return_handler=b[2];d.trigger=b[1]}}else d=b[0];d.src+=hasQuery(d.src)?"&isdialog=1":"?isdialog=1";if(openDialog.obj)openDialog.obj.setSettings(d);else openDialog.obj=new max.dialog(d);openDialog.obj.load_complete_handler=
function(){var e=openDialog.obj.iframePage.dialog;if(d.width)openDialog.obj.resize(d.width,d.height);else e&&openDialog.obj.resize(e.width,e.height)};openDialog.obj.show();return false}var popupCollection=function(){if(!popupCollection.innerList)popupCollection.innerList=[]};popupCollection.prototype.add=function(b){b.onShow=this.onshow;b.onHide=this.onhide;popupCollection.innerList.push(b)};popupCollection.prototype.onhide=function(b){if(b.focus)b.focus=false};
popupCollection.prototype.onshow=function(b){for(var d,e=0;e<popupCollection.innerList.length;e++){d=popupCollection.innerList[e];d.list.id!=b.list.id&&d.hide()}};
var popup=function(b,d,e,g,f){this.focus=false;if(!window.popupMenuCollection)window.popupMenuCollection=new popupCollection;this.list=$(b);this.trigger=$(d);this.triggerStyle=g;this.position=f?f:"auto";var h=this;b=this.list.style;b.position="absolute";b.zIndex=100;addHandler(this.trigger,e?"mouseover":"click",function(){h.show()});if(e){addHandler(this.list,e?"mouseover":"click",function(){h.focus=true});addHandler(this.trigger,"mouseout",function(){hideList(h)});addHandler(this.list,"mouseout",
function(){hideList(h)})}else{addHandler(this.trigger,"mouseout",function(){h.focus=false});addHandler(this.list,"mouseout",function(){h.focus=false});addHandler(this.trigger,"mouseover",function(){h.focus=true});addHandler(this.list,"mouseover",function(){h.focus=true});addHandler(document.documentElement,"click",function(){h.focus==false&&h.hide()})}window.popupMenuCollection.add(this)};function hideList(b){window.setTimeout(function(){b.focus==false&&b.hide()},1E3);b.focus=false}
popup.prototype.onShow=null;popup.prototype.onHide=null;
popup.prototype.show=function(){var b=this.list.style;b.display="";var d,e;e=max.coor.getRect(this.trigger);var g=max.coor.getRect(this.list),f=max.global.getBrowserRect();d=e.bottom+g.height>f.bottom?e.top-g.height:e.bottom;e=this.position=="auto"?e.left+g.width>f.right?e.right-g.width:e.left:e.left+e.width/2-g.width/2;this.focus=true;b.left=e+"px";b.top=d+"px";if(b=this.triggerStyle)if(this.trigger.className.indexOf(b)<0)this.trigger.className+=" "+b;this.onShow&&this.onShow.call(window.popupMenuCollection,
this)};popup.prototype.hide=function(){this.list.style.display="none";var b=this.triggerStyle;if(b)if(this.trigger.className.indexOf(b)>=0)this.trigger.className=this.trigger.className.replace(b,"").trim();this.onHide&&this.onHide.call(window.popupMenuCollection,this)};
var background=function(){function b(){var i=max.global;d.style.height=i.getFullHeight()+"px";d.style.width=i.getFullWidth()+"px"}var d,e=false;d=addElement("div");setStyle(d,{backgroundColor:"black",position:"absolute",top:"0px",left:"0px",zIndex:50});b();opacity(d,10);addHandler(window,"resize",b);if(max.browser.isIE6){var g;g=$T("select");if(g.length>0){e=[];for(var f,h=0;h<g.length;h++){f=g[h];if(f.style.display!="none"&&f.style.visibility!="hidden"){e.push(f);f.style.visibility="hidden"}}}g=
null}return{destroy:function(){removeHandler(window,"resize",b);if(e){for(var i=0;i<e.length;i++)e[i].style.visibility="";e=null}removeElement(d);d=null}}},maxdialog=max.dialog=function(b){this.setSettings(b);this.init()};a=maxdialog.prototype;
a.setSettings=function(b){b=b;var d=max.dialog.defaultSettings;b||(b={});d||(d={});this.x=b.x||d.x;this.y=b.y||d.y;this.panelId=b.panelId||d.panelId||"";this.src=b.src||d.src||"";this.isajax=b.isajax||d.isajax||false;this.width=d.width;this.height=d.height;this.template=b.template||d.template;this.template_closeButton=b.template_closeButton||d.template_closeButton;this.template_moveArea=b.template_moveArea||d.template_moveArea;this.init_handler=b.init_handler||d.init_handler;this.before_show_handler=
b.before_show_handler||d.before_show_handler;this.after_show_handler=b.after_show_handler||d.after_show_handler;this.load_start_handler=b.load_start_handler||d.load_start_handler;this.load_complete_handler=b.load_complete_handler||d.load_complete_handler;this.before_close_handler=b.before_close_handler||d.before_close_handler;this.after_close_handler=b.after_close_handler||d.after_close_handler;this.return_handler=b.return_handler||d.return_handler;this.canDrag=b.canDrag||d.canDrag;this.loadingTemplate=
b.loadingTemplate||d.loadingTemplate;this.showMask=b.showMask||d.showMask;this.timeoutTemplate=b.timeoutTemplate||d.timeoutTemplate;this.ownerDocument=document;this.ownerWindow=window;this.trigger=b.trigger;this.form=b.form;this.formdata=b.formdata;this.param=b.param};
a.init=function(){var b=this,d;this.loadingNode=null;this.innerFrmaeId="max_dialog_iframe_1";this.maskLayer=null;this.inited=false;d=b.obj=$("max_dialog1");if(!d){d=b.obj=document.createElement("div");d.id="max_dialog1";setStyle(d,{display:"none",position:"absolute",zIndex:999});var e=b.template.replace("{loading}",'<div id="_dialogloading1"></div>');e=e.replace("{body}",'<iframe style="display : none ;" id="'+this.innerFrmaeId+'" name="'+this.innerFrmaeId+'" src="about:blank" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>');
d.innerHTML=e;try{document.body.insertBefore(d,document.body.firstChild)}catch(g){}this.loadingNode=$("_dialogloading1");this.loadingNode.innerHTML=this.loadingTemplate;b.iframeObj=$("max_dialog_iframe_1");b.iframePage=b.iframeObj.contentWindow;b.init_handler&&b.init_handler()}};
a.show=function(){function b(){h&&h();if(n)max.browser.isOpera||addHandle(window.frames[l].document.body,window.frames[l],k);d.call(q)}function d(){if(this.showMask)if(!this.maskLayer)this.maskLayer=new background}var e=this.before_show_handler,g=this.after_show_handler,f=this.load_start_handler,h=this.load_complete_handler,i=this.iframeObj,k=this.obj,j=this.height,l=this.innerFrmaeId,n=this.canDrag;this.cancel=false;var m=max.global.getBrowserRect();if(j==-1)j=35;if(this.trigger){var o=max.coor.getRect(this.trigger);
this.x=o.left;this.y=o.bottom;if(max.browser.isIE6)if(document.body.childNodes[1].className=="iefix"){this.x=event.clientX+8;this.y=event.clientY+8}}k.style.width=this.width+"px";k.style.height=j+"px";if(this.x){if(this.x+this.width>m.right)this.x=m.right-this.width-5;k.style.left=this.x+"px"}else if(this.inited==false)k.style.left=(max.global.getClientWidth()-this.width)/2+max.global.getScrollLeft()+"px";if(this.y){if(this.y+j>m.bottom)this.y=m.bottom-j-5;k.style.top=this.y+"px"}else if(this.inited==
false)k.style.top=(max.global.getClientHeight()-j)/2+max.global.getScrollTop()+"px";e&&e();k.style.display="";if(max.browser.isIE)i.onreadystatechange=function(){if("complete"==i.readyState||i.readyState=="loaded")b()};else i.onload=b;e={};j=null;if(this.form){j=document.forms[this.form];e.target=j.target;e.method=j.method;e.action=j.action;j.target=l;j.method="post";if(this.src)j.action=this.src;j.submit();j.target=e.target;j.method=e.method;j.action=e.action}else i.src=this.src;g&&g();f&&f();var q=
this};
a.resize=function(b,d){this.isOpen=true;var e=this.obj,g=this.iframeObj,f=this.loadingNode;this.animation=null;if(d==null||d==0){g.style.display="";d=window.frames[this.innerFrmaeId].document.body.offsetHeight+30}if(!this.cancel){if(this.inited==false)f.style.display="none";else{f=e.style;f.width=b+"px";if(max.browser.isIE6){e=$("dialog_body");e.style.height=d+"px";g.height=d;$("dialog_container").style.height=d+"px"}else f.height=d+"px";if(this.x)f.left=this.x+"px";if(this.y)f.top=this.y+"px"}var h;if(this.animation)h=
this.animation;else this.animation=h=new animation(e);h.oncomplete(function(){g.style.display="";h=null});h.open(b,d,this.x,this.y)}};
a.close=function(){var b=this.before_close_handler,d=this.after_close_handler,e=this.return_handler,g=this.loadingNode,f,h;h=this.obj;f=this.iframeObj;b&&b();var i;try{i=this.iframePage.result}catch(k){}if(max.browser.isIE)this.iframeObj.onreadystatechange=null;else this.iframeObj.onload=null;f.src="about:blank";f.style.display="none";d&&d();h=this.obj;var j;j=this.animation?this.animation:new animation(h);f.style.display="none";g.style.display="none";j.oncomplete(function(){g.style.display="";h.style.display=
"none";j=null;e&&i&&e(i)});j.close();if(this.showMask){this.maskLayer.destroy();this.maskLayer=null}this.inited=false};a.closetimeout=function(b){var d=this;b<1&&d.close();setTimeout(function(){d.close()},b*1E3)};
var animation=function(b){var d=null,e=max.coor.getRect(b),g=e.width,f=e.height,h=e.left,i=e.top,k,j,l,n,m=g/10,o=f/10;action=function(q){var s=max.global.getBrowserRect();if(q<0){h=parseInt(b.style.left);i=parseInt(b.style.top)}var u=0;for((new Date).getTime();;){u++;g+=m*q;f+=o*q;h=k?k:(h-=m*q/2);i=j?j:(i-=o*q/2);if(h+g>s.right)h=s.right-g-5;if(i+f>s.bottom)i=s.bottom-f-12;g=Math.floor(g);f=Math.floor(f);h=Math.floor(h);i=Math.floor(i);if(u>10||g<0||f<0||g>l||f>n){d&&d();if(q>0){k||(h=(e.width-
l)/2+e.left);j||(i=(e.height-n)/2+e.top);setStyle(b,{width:l+"px",height:n+"px",left:h+"px",top:i+"px"})}return}setStyle(b,{width:g+"px",height:f+"px",left:h+"px",top:i+"px"})}};return{close:function(){action(-1)},open:function(q,s,u,p){l=q;n=s;m=(l-g)/10;o=(n-f)/10;k=u;j=p;action(1)},oncomplete:function(q){d=q}}},dragging=false,iframeObject={},iframeMouseLeft={},iframeMouseTop={},pageMouseLeft={},pageMouseTop={},handles=null,allowDragOffScreen=false,frameParent=null,mover=null;
function addHandle(b,d,e){if(arguments.length==2&&d==window)for(var g=d;g=g.parent;){if(g.addHandle){g.addHandle(b,d,true);return}if(g==d.top)return}else{frameParent=e;g=d;for(var f="window";g.parent&&g.parent!=window;){g=g.parent;f+=".parent"}if(typeof d.DIF_mainHandlersAdded=="undefined"||!d.DIF_mainHandlersAdded)with(d){eval("function OnMouseDownHandler(evt) { if(typeof(evt)=='undefined'){evt=event;}"+f+".parent.DIF_begindrag(evt, "+f+") }");addHandler(document.body,"mousedown",OnMouseDownHandler);
eval("function OnMouseUpHandler(evt) { if(typeof(evt)=='undefined'){evt=event;}"+f+".parent.DIF_enddrag(evt, "+f+") }");addHandler(document.body,"mouseup",OnMouseUpHandler);eval("function OnMouseMoveHandler(evt) { if(typeof(evt)=='undefined'){evt=event;}"+f+".parent.DIF_iframemove(evt, "+f+") }");addHandler(document.body,"mousemove",OnMouseMoveHandler);d.DIF_handlersAdded=true;d.DIF_mainHandlersAdded=true}if(typeof window.DIF_handlersAdded!="undefined"||!window.DIF_handlersAdded){eval("function OnMouseMoveHandler(evt) { if(typeof(evt)=='undefined'){evt=event;}DIF_mouseMove(evt, window) }");
addHandler(document.body,"mousemove",OnMouseMoveHandler);window.DIF_handlersAdded=true}g=d.document.getElementById("dialogTitleBar");handles=g!=null?g:b}}
function DIF_getEventPosition(b){var d={};d.x=0;d.y=0;b=b||window.event;if(typeof b.pageX=="number"){d.x=b.pageX;d.y=b.pageY}else{d.x=b.clientX;d.y=b.clientY;if(!top.opera)if(!window.document.compatMode||window.document.compatMode=="BackCompat"){d.x+=window.document.body.scrollLeft;d.y+=window.document.body.scrollTop}else{d.x+=window.document.documentElement.scrollLeft;d.y+=window.document.documentElement.scrollTop}}return d}
function DIF_getObjectXY(b){var d={};d.x=0;d.y=0;if(b!=null){d.x=parseInt(frameParent.style.left);d.y=parseInt(frameParent.style.top)}return d}function getSrcElement(b){for(b=b.target;b.nodeType!=1;)b=b.parentNode;return b}function isHandleClicked(b,d){if(b==d)return true;for(;d.parentNode!=null;){if(d==b)return true;d=d.parentNode}return false}
function DIF_begindrag(b,d){if(handles!=null){d=false;var e=b.srcElement||getSrcElement(b);if(isHandleClicked(handles,e))d=true;if(!d)return false;dragging=true;b=DIF_getEventPosition(b);iframeMouseLeft=b.x;iframeMouseTop=b.y;d=DIF_getObjectXY(iframeObject);pageMouseLeft=d.x-0+b.x;pageMouseTop=d.y-0+b.y}}function DIF_enddrag(b){dragging=false}function DIF_mouseMove(b){if(dragging){b=DIF_getEventPosition(b);DIF_drag(b.x-pageMouseLeft,b.y-pageMouseTop)}}
function DIF_iframemove(b){if(dragging){b=DIF_getEventPosition(b);DIF_drag(b.x-iframeMouseLeft,b.y-iframeMouseTop)}}function DIF_drag(b,d){var e=DIF_getObjectXY(iframeObject),g=e.y-0+d;frameParent.style.left=e.x-0+b+"px";frameParent.style.top=g+"px";pageMouseLeft+=b;pageMouseTop+=d}
max.dialog.defaultSettings={template:'<div class="dialog" id="dialog_container"><div class="dialog-inner" id="dialog_body">    {loading}    {body}</div></div>',loadingTemplate:'<div style="position:relative;width:270px;height:90px;overflow:hidden;"><p style="position:absolute;top:50%;left:70px;margin-top:-20px;height:40px;line-height:40px;padding-left:50px;background:url('+root+'/max-assets/images/loading.gif) no-repeat 0 50%;">\u6b63\u5728\u52a0\u8f7d...</p></div>',timeoutTemplate:'\u6253\u5f00\u9875\u9762\u8d85\u65f6, \u8bf7\u5237\u65b0\u9875\u9762. <a href="jsvascript:void(dialog.close())>\u70b9\u51fb\u5173\u95ed</a>"',
template_closeButton:"max_dialog_close",template_moveArea:"max_dialog_title",width:280,height:90,init_handler:null,before_show_handler:null,after_show_handler:null,load_start_handler:null,load_complete_handler:null,before_close_handler:null,after_close_handler:null,return_handler:null,canDrag:true,showMask:false,timeout:40};function refresh(){var b=location.href;if(b.indexOf("#",0)>-1)b=b.substring(0,b.indexOf("#",0));location.replace(b)}function initEditor(b){KE.init(b);KE.create(b.id)}
popupCollection=function(){var b=popupCollection;if(!b.innerList)b.innerList=[]};popupCollection.prototype.add=function(b){b.onShow=this.onshow;popupCollection.innerList.push(b)};popupCollection.prototype.onshow=function(b){for(var d=popupCollection,e=0;e<d.innerList.length;e++)d.innerList[e]!=b&&d.innerList[e].hide()};popupCollection.instance=function(){if(!window.dropCollection)window.dropCollection=new popupCollection;return window.dropCollection};
var popupBase=function(b,d,e){this.list=$(b);this.auto=e;this.trigger=d instanceof Object?d:$(d)};popupBase.prototype.show=null;popupBase.prototype.hide=null;popupBase.prototype.onShow=null;popupBase.prototype.onHide=null;
popup=function(b,d,e,g,f){this.focus=false;popupBase.call(this,b,d,e);this.triggerStyle=g;this.position=f?f:"auto";var h=this;b=this.list.style;b.position="absolute";b.zIndex=9999;addHandler(this.trigger,this.auto?"mouseover":"click",function(){h.show()});if(this.auto){addHandler(this.list,"mouseover",function(){h.focus=true});addHandler(this.trigger,"mouseout",function(){hideList(h)});addHandler(this.list,"mouseout",function(){hideList(h)})}else{addHandler(this.trigger,"mouseout",function(){h.focus=
false});addHandler(this.list,"mouseout",function(){h.focus=false});addHandler(this.trigger,"mouseover",function(){h.focus=true});addHandler(this.list,"mouseover",function(){h.focus=true});addHandler(document.documentElement,"click",function(){h.focus==false&&h.hide()})}popupCollection.instance().add(this)};function hideList(b){window.setTimeout(function(){b.focus==false&&b.hide()},1E3);b.focus=false}
popup.prototype.show=function(){var b=this.list.style;b.display="";var d,e;rt=max.coor.getRect(this.trigger);rl=max.coor.getRect(this.list);rw=max.global.getBrowserRect();d=rt.bottom+rl.height>rw.bottom?rt.top-rl.height:rt.bottom;e=this.position=="auto"?rt.left+rl.width>rw.right?rt.right-rl.width:rt.left:rt.left+rt.width/2-rl.width/2;this.focus=true;b.left=e+"px";b.top=d+"px";b.zIndex=50;if(b=this.triggerStyle)if(this.trigger.className.indexOf(b)<0)this.trigger.className+=" "+b;this.onShow&&this.onShow.call(popupCollection.instance(),
this)};popup.prototype.hide=function(){this.list.style.display="none";var b=this.triggerStyle;if(b)if(this.trigger.className.indexOf(b)>=0)this.trigger.className=this.trigger.className.replace(b,"").trim();this.onHide&&this.onHide.call(popupCollection.instance(),this)};
var userMenus={},userMenu=function(b,d,e){var g,f="user_menu_"+(new Date).getMilliseconds(),h=new stringBuilder;g=addElement("ul");g.className="usermenu";g.id=f;for(var i in menuItems)i!=e&&menuItems[i]&&h.append(String.format(menuItems[i],b));g.innerHTML=h.toString();g.style.display="none";return new popup(g.id,d,false)};
function createUserMenu(b,d,e){function g(){try{var k=new userMenu(d,this,e);f.push(this);k.show()}catch(j){}}var f=userMenus[d.toString()];if(f){for(var h=false,i=0;i<f.length;i++)if(f[i]==b){h=true;break}h==false&&g.call(b)}else{f=[];userMenus[d.toString()]=f;g.call(b)}return false}function HTMLEncode(b){var d=document.createElement("div");d.textContent!=null?(d.textContent=b):(d.innerText=b);return d.innerHTML}function getInnerText(b){return b.textContent!=null?b.textContent:b.innerText};
