var MopHi=MopHi||{};MopHi.UI=MopHi.UI||{};MopHi.loads=function(d){if(jQuery.isArray(d)){jQuery.each(d,function(){MopHi.loads(this)});return}var b=""+d;if(b.lastIndexOf(".js")>0){var a=document.createElement("script");a.type="text/javascript";a.src=b;document.getElementsByTagName("head")[0].appendChild(a)}else{if(b.lastIndexOf(".css")>0){var c=document.createElement("link");c.href=b;c.type="text/css";c.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(c)}}};jQuery.cookie=function(b,l,o){if(typeof l!="undefined"){o=o||{};if(l===null){l="";o.expires=-1}var f="";if(o.expires&&(typeof o.expires=="number"||o.expires.toUTCString)){var g;if(typeof o.expires=="number"){g=new Date();g.setTime(g.getTime()+(o.expires*24*60*60*1000))}else{g=o.expires}f="; expires="+g.toUTCString()}var n=o.path?("; path="+o.path):"";var h=o.domain?("; domain="+o.domain):"";var a=o.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(l),f,n,h,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var m=document.cookie.split(";");
for(var j=0;j<m.length;j++){var c=jQuery.trim(m[j]);if(c.substring(0,b.length+1)==(b+"=")){d=c.substring(b.length+1);try{d=decodeURIComponent(d)}catch(k){}break}}}return d}};MopHi.log=function(b,c){var a="http://share.hi.mop.com/ajaxJsLog.do?item="+b;new Image(0,0).src=c?(a+"&"+jQuery.param(c)):a};jQuery.ajaxSetup({global:false,cache:true,dataType:"text",error:function(c,e,b){if(Math.random()>0.05){return}var a=this;var d={};d.page=""+document.location;d.post=a.url;if(a.data){d.post+="?"+a.data}if(c){d.status=c.status}if(e){d.text=e}if(b){d.err=b.name+":"+b.message+"@"+b.fileName+":"+b.lineNumber}MopHi.log("ajaxErr",d)}});MopHi.UI.slide={moveDiv:null,create:function(b,a){this.moveDiv=jQuery('<div style="position:absolute;z-index:9999;"></div>');if(a){this.moveDiv.css(a)}else{this.moveDiv.css({background:"none repeat scroll 0 0 #EBF8FE",width:"281px",height:"35px"})}this.move();this.moveDiv.appendTo("body").html(b);jQuery(window).resize(this.move).scroll(this.move)},move:function(){var c=MopHi.UI.slide.moveDiv;
var a=(document.compatMode.toLowerCase()=="css1compat")?document.documentElement:document.body;c.css({left:a.clientWidth+a.scrollLeft-c.width(),top:a.clientHeight+a.scrollTop-c.height()})}};MopHi.UI.dialog=function(a,b){function c(){jQuery("<div></div>").dialog();jQuery(".ui-dialog-content").html(a);jQuery("#ui-dialog-title-1").html(b)}if(jQuery.isFunction(jQuery("body").dialog)){c()}else{MopHi.loads("http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css");jQuery.getScript("http://mopimg.cn/openjs/jquery-ui.min.js",c)}};MopHi.UI.RoundedCorner=function(){MopHi.UI.RoundedCorner.radius=0.16;MopHi.UI.RoundedCorner.setup();jQuery("img.js-rounded-corner, img.js-yuanjiao").each(MopHi.UI.RoundedCorner.callback)};MopHi.UI.RoundedCorner.setup=function(){if(jQuery.browser.msie){MopHi.UI.RoundedCorner.radiusOnIE=(MopHi.UI.RoundedCorner.radius*100)+"%";if(!document.namespaces.v){var c=["group","fill","roundrect"];var b=document.createStyleSheet();for(var a=0;a<c.length;
a++){b.addRule("v\\:"+c[a],"behavior: url(#default#VML);")}document.namespaces.add("v","urn:schemas-microsoft-com:vml")}}else{MopHi.UI.RoundedCorner.roundedRect=function(g,f,i,h,e){var d=Math.min(h,e)*MopHi.UI.RoundedCorner.radius;g.moveTo(f,i+d);g.lineTo(f,i+e-d);g.quadraticCurveTo(f,i+e,f+d,i+e);g.lineTo(f+h-d,i+e);g.quadraticCurveTo(f+h,i+e,f+h,i+e-d);g.lineTo(f+h,i+d);g.quadraticCurveTo(f+h,i,f+h-d,i);g.lineTo(f+d,i);g.quadraticCurveTo(f,i,f,i+d)}}MopHi.UI.RoundedCorner.callback=jQuery.browser.msie?function(e,d){var g=MopHi.UI.RoundedCorner.apply;d.readyState=="complete"?g(d):(d.onreadystatechange=function(){if(d.readyState=="complete"){g(d)}})}:function(e,d){var g=MopHi.UI.RoundedCorner.apply;d.complete?g(d):d.onload=function(){g(d)}};MopHi.UI.RoundedCorner.apply=jQuery.browser.msie?function(f){f=f||this;var g=f.width;var e=f.height;var h=(f.currentStyle.display.toLowerCase()=="block")?"block":"inline-block";var d=document.createElement(['<var style="overflow:hidden;display:',h,";width:",g,"px;height:",e,'px;padding:0;">'].join(""));
var i=f.currentStyle.styleFloat.toLowerCase();h=(i=="left"||i=="right")?"inline":h;d.innerHTML=['<v:group style="zoom:1; display:',h,"; margin:-1px 0 0 -1px; padding:0; position:relative; width:",g,"px;height:",e,'px;" coordsize="',g,",",e,'">','<v:roundrect arcsize="',MopHi.UI.RoundedCorner.radiusOnIE,'" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:',g,"px;height:",e,'px;">','<v:fill src="',f.src,'" type="frame" />',"</v:roundrect></v:group>"].join("");d.className=f.className;d.style.cssText=f.style.cssText;d.style.height=f.height+"px";d.style.width=f.width+"px";d.height=e;d.width=g;d.src=f.src;d.alt=f.alt;if(f.id!=""){d.id=f.id}if(f.title!=""){d.title=f.title}if(f.getAttribute("onclick")!=""){d.setAttribute("onclick",f.getAttribute("onclick"))}f.parentNode.replaceChild(d,f)}:function(d){var e=document.createElement("canvas");if(e.getContext){e.className=d.className;e.style.cssText=d.style.cssText;e.style.height=d.height+"px";
e.style.width=d.width+"px";e.height=d.height;e.width=d.width;e.src=d.src;e.alt=d.alt;if(d.id!=""){e.id=d.id}if(d.title!=""){e.title=d.title}if(d.getAttribute("onclick")!=""){e.setAttribute("onclick",d.getAttribute("onclick"))}var f=e.getContext("2d");d.parentNode.replaceChild(e,d);f.clearRect(0,0,e.width,e.height);f.save();MopHi.UI.RoundedCorner.roundedRect(f,0,0,e.width,e.height);f.clip();f.fillStyle="rgba(0,0,0,0)";f.fillRect(0,0,e.width,e.height);f.drawImage(d,0,0,e.width,e.height);e.style.visibility="visible"}}};function randomValue(a,b){return Math.floor(Math.random()*(1+b-a)+a)}function hasAppid(a,c){var b=true;jQuery.each(a.split(":"),function(d,e){if(e==c){return b=false}});return !b}function installApp(b,a){if(!hasAppid(Hi_appIds,a)){b.href="http://app.hi.mop.com/apps/install.do?id="+a}return true}function addfavorite(){var a="http://hi.mop.com/SysHome.do?ss=favorite";var b="猫扑Hi";XN.Browser.addBookMark(a,b)}var isArray=jQuery.isArray;var isFunction=jQuery.isFunction;function isUndefined(a){return typeof a=="undefined"
}function isString(a){return typeof a=="string"}function isElement(a){return a&&a.nodeType==1}function isObject(a){return typeof a=="object"}function isNumber(a){return typeof a=="number"}function isJSON(a){if(!isString(a)||a===""){return false}a=a.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)}var XN={};XN.FUNC={empty:function(){}};XN.STRING=XN.String={nl2br:function(a){return a.replace(/([^>])\n/g,"$1<br />")},trim:function(a){return a.replace(/^\s+|\s+$/g,"")},ltrim:function(a){return a.replace(/^\s+/,"")},rtrim:function(a){return a.replace(/\s+$/,"")},strip:function(a){return a.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(a){return a.replace(/<\/?[^>]+>/gi,"")},escapeHTML:function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(a){return a.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;/g," ").replace(/&quot;/g,'"')},include:function(b,a){return b.indexOf(a)>-1
},startsWith:function(b,a){return b.indexOf(a)===0},endsWith:function(c,a){var b=c.length-a.length;return b>=0&&c.lastIndexOf(a)===b},isBlank:function(a){return XN.STRING.strip(a)==""},isEmail:function(a){return/^[A-Z_a-z0-9-\.]+@([A-Z_a-z0-9-]+\.)+[a-z0-9A-Z]{2,4}$/.test(a)},isPhone:function(a){return/^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/.test(a)},isMobile:function(a){return/^((\(\d{2,3}\))|(\d{3}\-))?((1[35]\d{9})|(18[89]\d{8}))$/.test(a)},isUrl:function(a){return/^(http:|ftp:)\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"])*$/.test(a)},isIp:function(a){return/^(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])$/.test(a)},isNum:function(a){return/^\d+$/.test(a)},isZip:function(a){return/^[1-9]\d{5}$/.test(a)},isEN:function(a){return/^[A-Za-z]+$/.test(a)}};XN.ARRAY=XN.Array={toQueryString:function(c,f){var b=[],e;for(var d in c){e=c[d];
if(isFunction(e)){continue}if(isObject(e)){b.push(XN.ARRAY.toQueryString(e,d))}else{if(/^\d+$/.test(d)){b.push(encodeURIComponent(f||d)+"="+encodeURIComponent(e))}else{b.push(encodeURIComponent(d)+"="+encodeURIComponent(e))}}}return b.join("&")},each:function(b,f){if(!isUndefined(b.length)||!isUndefined(b[0])){for(var e=0,c=b.length;e<c;e++){if(f(e,b[e])===false){break}}}else{for(var d in b){if(!isFunction(b[d])){if(f(d,b[d])===false){break}}}}},include:function(b,e){var d=false;for(var c in b){if(b[c]==e){d=true;break}}return d}};if(isUndefined($A)){var $A=function(d){var a=[];for(var c=0,b=d.length;c<b;c++){a.push(d[c])}return a}}function _reload$_(){xn_getEl=$=function(c,b){if(!c){return false}var a;b==b||1;if(isString(c)){a=document.getElementById(c)}else{a=c}if(!a){return null}if(!a._extendLevel){XN.ELEMENT.extend(a,1)}if(b==2&&a._extendLevel!=2){XN.ELEMENT.extend(a,2)}return a}}_reload$_();function $X(a){return $(a,2)}function $extend(a,c){for(var b in c){a[b]=c[b]}return a}function $element(a){a=a.toLowerCase();
if(!XN.DOM._elementsCache[a]){XN.DOM._elementsCache[a]=document.createElement(a)}return $(XN.DOM._elementsCache[a].cloneNode(false))}function $xElement(a){return $($element(a),2)}if(!Function.prototype.bind){Function.prototype.bind=function(a){var b=this;return function(){b.apply(a,arguments)}}}XN.DEBUG_MODE=false;XN.staticPath="http://mopimg.cn/";XN.ENV=XN.Env={domain:"hi.mop.com",staticRoot:"http://mopimg.cn/",swfRoot:"http://mopimg.cn/",wwwRoot:"http://hi.mop.com/"};XN.Browser=XN.BROWSER={IE:!!(window.attachEvent&&!window.opera),IE6:navigator.userAgent.indexOf("MSIE 6.0")>-1,IE7:navigator.userAgent.indexOf("MSIE 7.0")>-1,Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,copy:function(d){if(isElement(d)){d=d.value}if(window.clipboardData&&clipboardData.setData){if(clipboardData.setData("Text",d)){return true}}else{var b="flashId-HKxmj5";var a=XN.staticPath+"swf/clipboard.swf";
if(!document.getElementById(b)){var e=document.createElement("div");e.id=b;document.body.appendChild(e)}document.getElementById(b).innerHTML="";var c='<embed src="'+a+'" FlashVars="clipboard='+encodeURIComponent(d)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';document.getElementById(b).innerHTML=c;alert("您的浏览器不支持脚本复制,请尝试手动复制");return false}alert("您的浏览器设置已经禁止脚本访问剪切板\n请重试,或者尝试手动复制");return false},addHomePage:function(a){if(XN.BROWSER.IE){document.body.style.behavior="url(#default#homepage)";document.body.setHomePage(a)}else{XN.BROWSER.copy(a);XN.DO.alert("网址已经拷贝到剪切板,请您打开浏览器的选项,<br/>把地址粘到主页选项中即可~")}},addBookMark:function(a,d){var b=(navigator.userAgent.toLowerCase()).indexOf("mac")!=-1?"Command/Cmd":"CTRL";try{window.external.addFavorite(a,d||"猫扑Hi-因为真实,所以精彩")}catch(c){try{window.sidebar.addPanel(a,d||"猫扑Hi-因为真实,所以精彩")}catch(c){XN.DO.alert("您可以尝试通过快捷键"+b+" + D 添加书签~")}}}};XN.COOKIE=XN.Cookie={get:function(a){return jQuery.cookie(a)},set:function(c,e,h,g,d,f){var a;
if(isNumber(h)){var b=new Date();b.setTime(b.getTime()+(h*24*60*60*1000));a=b.toGMTString()}else{if(isString(h)){a=h}else{a=false}}document.cookie=c+"="+encodeURIComponent(e)+(a?"; expires="+a:"")+(g?"; path="+g:"")+(d?"; domain="+d:"")+(f?"; secure":"")},del:function(a,d,b,c){XN.COOKIE.set(a,null,-1,d,b,c)}};XN.Do=XN.DO={};XN.DO._alert=null;XN.DO._alertDefaultButton=null;XN.DO._alertCallBack=null;XN.DO.alert=function(p,m,l,d,b,n,i,f){var j,g,c={},o=XN.DO,a;if(isObject(arguments[0])){c=arguments[0]}o._alertCallBack=c.callBack||f||XN.FUNC.empty;if(!o._alert){j=o._alert=new XN.UI.panel();o._alertDefaultButton=g=new XN.UI.button({text:"确定",onclick:function(){if(!XN.DOM._isable){XN.DOM.enable()}if(a!==null){clearTimeout(a);a=null}XN.DO._alert.hide();XN.DO._alertCallBack.call(XN.DO._alert)}});j.setFooter(g)}else{j=o._alert}j.header.show();j.body.show();j.footer.show();j.setHeader(false);j.setBody(false);l=c.type||l||"normal";if(l=="error"){j.setHeader(c.title||m||"错误提示")}else{j.setHeader(c.title||m||"提示")
}XN.DO._alertDefaultButton.setText(c.button||"确定");j.setBody(c.message||c.msg||p||"未指定提示信息");j.setWidth(c.width||n||400);j.setHeight(c.height||i||false);j.setType(l);j.setX(c.X||d||false);j.setY(c.Y||b||XN.EVENT.scrollTop()+200);if(c.noHeader){j.header.hide()}if(c.noFooter){j.footer.hide()}j.show();try{XN.DO._alertDefaultButton.focus()}catch(k){}if(c.autoHide){a=setTimeout(function(){j.hide()},(c.autoHide*1000))}return j};XN.DO._confirm=null;XN.DO._confirmYesButton=null;XN.DO._confirmNoButton=null;XN.DO._confirmCallBack=null;XN.DO.confirm=function(q,m,f,d,o,c,a,n,i){var j,g,k,p=XN.DO,b={};if(isObject(arguments[0])){b=arguments[0]}p._confirmCallBack=b.callBack||f||XN.FUNC.empty;if(!p._confirm){j=p._confirm=new XN.UI.panel();p._confirmYesButton=g=new XN.UI.button({text:(d||"确定"),onclick:function(){if(!XN.DOM._isable){XN.DOM.enable()}XN.DO._confirm.hide();XN.DO._confirmCallBack.call(XN.DO._confirm,true)}});p._confirmNoButton=k=new XN.UI.button({text:(o||"取消"),className:"gray",onclick:function(){if(!XN.DOM._isable){XN.DOM.enable()
}XN.DO._confirm.hide();XN.DO._confirmCallBack.call(XN.DO._confirm,false)}});j.setFooter(g);j.setFooter(k)}else{j=XN.DO._confirm}j.header.show();j.body.show();j.footer.show();j.setWidth(b.width||n||400);j.setHeight(b.height||i||false);j.setX(b.X||c||false);j.setY(b.Y||a||XN.EVENT.scrollTop()+200);j.setHeader(false);j.setHeader(b.title||m||"提示");j.setBody(false);j.setBody(b.message||b.msg||q||"未指定提示信息");p._confirmYesButton.setText(b.yes||d||"确定");p._confirmNoButton.setText(b.no||o||"取消");j.show();try{p._confirmYesButton.focus()}catch(l){}return j};XN.DO.showMessage=XN.DO.showMsg=function(c,b,a){XN.DO.alert({msg:c,title:(b||"提示"),noFooter:true,autoHide:(a||2)})};XN.DO.showError=function(c,b,a){XN.DO.alert({msg:c,type:"error",title:(b||"错误提示"),noFooter:true,autoHide:(a||2)})};XN.Dom=XN.DOM={loaded:false,_timer:null,_shadow:null,_elementsCache:[],_currentElement:null,_isable:true,hooks:{onload:[],onunload:[]},disable:function(b){if(!XN.DOM._isable){return}if(XN.DOM._shadow===null){var c=$element("div");
c.setStyle("background:#000;position:absolute;width:100%;height:100%;z-index:2000;top:0;left:0;");XN.DOM._shadow=c;document.body.appendChild(c)}XN.ELEMENT.setOpacity(XN.DOM._shadow,b||0.3);XN.DOM._shadow.show();var d=XN.EVENT.pageHeight();var a=XN.EVENT.winHeight();XN.DOM._shadow.style.height=Math.max(d,a)+"px";XN.DOM._isable=false},enable:function(){if(XN.DOM._isable){return}XN.DOM._shadow.hide();XN.DOM._isable=true},insertAfter:function(b,a){var c=a.parentNode;if(c.lastChild==a){c.appendChild(b)}else{c.insertBefore(b,a.nextSibling)}},getElementsByClassName:function(d,c){var b=($(c)||document).getElementsByTagName("*")||document.all;var e=[];var g=new RegExp("\\b"+d+"\\b");for(var a=0,f;f=b[a];a++){if(g.test(f.className)){e.push(f)}}return e},readyDo:function(a){jQuery(a)},unloadDo:function(a){jQuery(window).unload(a)},preloadImg:function(b){function a(d){var c=$element("img");c.style.display="none";c.src=d;c.onload=function(){XN.Element.remove(this)};document.body.appendChild(c)}if(isString(b)){a(b)
}else{if(isArray(b)){XN.ARRAY.each(b,function(d,c){a(c)})}}},preloadPage:function(a){function b(c){var d=$element("iframe");XN.DOM.setStyle(d,"position:absolute;width:0;height:0;left:-9999px;");d.src=c;d.onload=function(){XN.Element.remove(this)};document.body.appendChild(d)}if(isString(a)){b(a)}else{if(isArray(a)){XN.ARRAY.each(a,function(d,c){b(c)})}}}};XN.ELEMENT=XN.Element={extend:function(d,e){if(!d||!d.tagName||d.nodeType==3||d==window){return d}var c;if(e==1){c=XN.ELEMENT.regularMethods}if(e==2){c=XN.ELEMENT.methods}var b=XN.ELEMENT.extend.cache;for(var a in c){if(!(a in d)){d[a]=b.findOrStore(c[a])}}d._extendLevel=e;return d}};XN.ELEMENT.extend.cache={findOrStore:function(a){return this[a]=this[a]||function(){return a.apply(null,[this].concat($A(arguments)))}}};XN.ELEMENT.regularMethods={hover:function(a,c,b){a=$(a);b=b?$(b):a;XN.EVENT.addEvent(a,"mouseover",function(){b.addClass(c)},false);XN.EVENT.addEvent(a,"mouseleave",function(){b.delClass(c)},false)},scrollTo:function(a,b){a=$(a);
b=b||"normal";switch(b){case"slow":XN.EFFECT.scrollTo(a);break;default:window.scrollTo(0,a.realTop());break}return a},visible:function(a){a=$(a);return a.style.display!="none"},addClass:function(a,b){a=$(a);if((new RegExp("\\b"+b+"\\b")).test(a.className)){return}a.className+=" "+b;return a},delClass:function(a,b){a=$(a);a.className=a.className.replace(new RegExp("\\b"+b+"\\b"),"");return a},show:function(a,b){a=$(a);if(a.style.display!="none"){return}b=b||"normal";switch(b){case"normal":a.style.display="";break;case"fade":XN.EFFECT.fadeIn(a,function(c){c.style.display=""});break;case"slide":XN.EFFECT.slideOpen(a);break;case"delay":setTimeout(function(){a.style.display=""},2000);break}return a},hide:function(a,b){a=$(a);if(a.style.display=="none"){return}b=b||"normal";switch(b){case"normal":a.style.display="none";break;case"fade":XN.EFFECT.fadeOut(a,function(c){c.style.display="none"});break;case"slide":XN.EFFECT.slideClose(a);break;case"delay":setTimeout(function(){a.style.display="none"
},2000);break}return a},remove:function(a){var a=$(a);a.parentNode.removeChild(a);return a},setStyle:function(a,b){var a=$(a);a.style.cssText+=";"+b;return a},getStyle:function(b,c){b=$(b);c=c=="float"?"cssFloat":c;var d=b.style[c];if(!d){var a=document.defaultView.getComputedStyle(b,null);d=a?a[c]:null}if(c=="opacity"){return d?parseFloat(d):1}return d=="auto"?null:d},addEvent:function(){XN.EVENT.addEvent.apply(XN.EVENT,arguments);return arguments[0]},delEvent:function(b,c,d,a){XN.EVENT.delEvent.apply(XN.EVENT,arguments);return arguments[0]}};(function(){if(XN.BROWSER.IE){XN.ELEMENT.regularMethods.getStyle=function(a,b){a=$(a);b=(b=="float"||b=="cssFloat")?"styleFloat":b;var c=a.style[b];if(!c&&a.currentStyle){c=a.currentStyle[b]}if(b=="opacity"){if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(c[1]){return parseFloat(c[1])/100}}return 1}if(c=="auto"){if((b=="width"||b=="height")&&(a.getStyle("display")!="none")){return a["offset"+(b=="width"?"Width":"Height")]+"px"}return null
}return c}}})();XN.ELEMENT.methods={addChild:function(a,c){a=$(a);if(isString(c)){var b=(c.substring(0,1)=="#")?$(c.substring(1,c.length)):c;if(isString(b)){a.innerHTML+=c}else{if(b.parentNode){a.appendChild(b.cloneNode(true).removeAttribute("id"))}else{a.appendChild(c)}}}else{if(isElement(c)){a.appendChild(c)}else{if(c.haveFather==false){a.appendChild(c.frame);c.haveFather=true}else{if(c.iAmXmlhttp){c.fillTo=a;a.startLoading()}}}}return a},setContent:function(a,b){a=$(a);a.innerHTML="";if(b){a.addChild(b)}return a},clean:function(a){var b;a=$(a);b=a.firstChild;while(b){if(b.nodeType==3&&!/\S/.test(b.nodeValue)){a.removeChild(b)}b=b.nextSibling}return a},startLoading:function(a,b){a=$(a);a.innerHTML='<center><img src="'+XN.ENV.staticRoot+'img/indicator.gif" />'+(b||"加载中...")+"</center>";return a},stopLoading:function(a){a=$(a);return a}};(function(){if(document.addEventListener){XN.ELEMENT.regularMethods.setOpacity=function(b,a){b=$(b);b.style.opacity=a;return b}}else{XN.ELEMENT.regularMethods.setOpacity=function(b,a){b=$(b);
b.style.zoom=1;b.style.filter="Alpha(opacity="+Math.ceil(a*100)+")";return b}}})();XN.Event=XN.EVENT={isCapsLockOn:function(b){var d=b.keyCode||b.which;var a=b.shiftKey;return((d>=65&&d<=90)&&!a)||((d>=97&&d<=122)&&a)},element:function(a){var b=a.target||a.srcElement;return XN.EVENT.resolveTextNode(b)},relatedTarget:function(b){var a=b.relatedTarget;if(!a){if(b.type=="mouseout"||b.type=="mouseleave"){a=b.toElement}else{if(b.type=="mouseover"){a=b.fromElement}}}return XN.EVENT.resolveTextNode(a)},resolveTextNode:function(b){try{if(b&&3==b.nodeType){return b.parentNode}}catch(a){}return b},pointerX:function(a){return a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(a){return a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},pageHeight:function(){if(window.innerHeight&&window.scrollMaxY){return window.innerHeight+window.scrollMaxY}else{return document.body.scrollHeight}},pageWidth:function(){if(window.innerWidth&&window.scrollMaxX){return window.innerWidth+window.scrollMaxX
}else{return document.body.scrollWidth}},winWidth:function(){return window.innerWidth||document.body.clientWidth},winHeight:function(){return window.innerHeight||document.body.clientHeight},scrollTop:function(){if(document.documentElement){return document.documentElement.scrollTop}return document.body.scrollTop},scrollLeft:function(){if(document.documentElement){return document.documentElement.scrollLeft}return document.body.scrollLeft},stop:null,addEvent:function(){return false},delEvent:function(){return false},_mouseleave:function(){},enableCustomEvent:function(a){$extend(a,{addEvent:function(c,d){if(!this._customEventListeners){this._customEventListeners={}}var b=this._customEventListeners;if(isUndefined(b[c])){b[c]=[]}b[c].push(d);return this},delEvent:function(d,e){var b=this._customEventListeners[d];if(b){for(var c=b.length-1;c>=0;c--){if(b[c]==e){b[c]=null;break}}}return this},fireEvent:function(e){if(!this._customEventListeners||!this._customEventListeners[e]){return}var b=this._customEventListeners[e],d=this,f=$A(arguments);
f.shift();for(var c=b.length-1;c>=0;c--){if(b[c]){b[c].apply(d,f)}}}})}};(function(){if(XN.BROWSER.IE){XN.EVENT.stop=function(a){a.returnValue=false;a.cancelBubble=true}}else{XN.EVENT.stop=function(a){a.preventDefault();a.stopPropagation()}}XN.ELEMENT.regularMethods.realLeft=function(b,c){c=$(c)||document.body;b=$(b);if(!b.offsetParent||b.offsetParent==c){return b.offsetLeft}else{var a=0;var d=b;while(d!=null&&d!=c){a+=d.offsetLeft;d=d.offsetParent}return a}};XN.ELEMENT.regularMethods.realTop=function(b,c){c=$(c)||document.body;b=$(b);if(!b.offsetParent||b.offsetParent==c){return b.offsetTop}else{var a=0;var d=b;while(d!=null&&d!=c){a+=d.offsetTop;d=d.offsetParent}return a}};if(window.attachEvent&&!XN.BROWSER.Opera){XN.EVENT.addEvent=function(b,a,c){if(a=="keypress"){a="keydown"}if(a=="input"){a="propertychange"}return $(b).attachEvent("on"+a,c)};XN.EVENT.delEvent=function(b,a){if(a=="keypress"){a="keydown"}if(a=="input"){a="propertychange"}return $(b).detachEvent("on"+a,func)}}else{if(window.addEventListener){XN.EVENT._mouseleave=function(b){var c=b.relatedTarget;
while(c&&c!=this){try{c=c.parentNode}catch(a){c=this}}if(c!=this){this.onmouseleave(b)}};XN.EVENT.addEvent=function(c,b,d,a){c=$(c);if(b=="mouseleave"){c.onmouseleave=d;c.addEventListener("mouseout",XN.EVENT._mouseleave,a);return c}if(b=="keypress"&&XN.BROWSER.WebKit){b="keydown"}c.addEventListener(b,d,a);return c};XN.EVENT.delEvent=function(c,b,d,a){c=$(c);if(b=="mouseleave"){c.onmouseleave=null;c.removeEventListener("mouseout",XN.EVENT._mouseleave,a);return c}if(b=="keypress"&&XN.BROWSER.WebKit){b="keydown"}c.removeEventListener(b,d,a);return c}}else{XN.EVENT.addEvent=function(b,a,c){if(a=="keypress"){a="keydown"}$(b)["on"+a]=c;return b};XN.EVENT.delEvent=function(b,a){if(a=="keypress"){a="keydown"}$(b)["on"+a]=null;return b}}}})();$extend(XN.ELEMENT,XN.ELEMENT.regularMethods);$extend(XN.ELEMENT,XN.ELEMENT.methods);XN.Json=XN.JSON={_ESCAPES:/\\["\\\/bfnrtu]/g,_VALUES:/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS:/(?:^|:|,)(?:\s*\[)+/g,_INVALID:/^[\],:{}\s]*$/,_SPECIAL_CHARS:/["\\\x00-\x1f\x7f-\x9f]/g,_PARSE_DATE:/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/,_CHARS:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},dateToString:function(b){function a(c){return c<10?"0"+c:c
}return'"'+b.getUTCFullYear()+"-"+a(b.getUTCMonth()+1)+"-"+a(b.getUTCDate())+"T"+a(b.getUTCHours())+":"+a(b.getUTCMinutes())+":"+a(b.getUTCSeconds())+'Z"'},stringToDate:function(b){if(XN.JSON._PARSE_DATE.test(b)){var a=new Date();a.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);a.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return a}},parse:function(str){return eval("("+str+")")},build:function(c,i,f){var e=XN.JSON._CHARS,a=XN.JSON._SPECIAL_CHARS,b=[];var h=function(l){if(!e[l]){var d=l.charCodeAt();e[l]="\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16)}return e[l]};var k=function(d){return'"'+d.replace(a,h)+'"'};var j=XN.JSON.dateToString;var g=function(l,u,r){var z=typeof l,p,q,n,m,x,y,s;if(z==="string"){return k(l)}if(z==="boolean"||l instanceof Boolean){return String(l)}if(z==="number"||l instanceof Number){return isFinite(l)?String(l):"null"}if(l instanceof Date){return j(l)}if(isArray(l)){for(p=b.length-1;p>=0;--p){if(b[p]===l){return"null"}}b[b.length]=l;s=[];if(r>0){for(p=l.length-1;
p>=0;--p){s[p]=g(l[p],u,r-1)||"null"}}b.pop();return"["+s.join(",")+"]"}if(z==="object"){if(!l){return"null"}for(p=b.length-1;p>=0;--p){if(b[p]===l){return"null"}}b[b.length]=l;s=[];if(r>0){if(u){for(p=0,n=0,q=u.length;p<q;++p){if(typeof u[p]==="string"){x=g(l[u[p]],u,r-1);if(x){s[n++]=k(u[p])+":"+x}}}}else{n=0;for(m in l){if(typeof m==="string"&&typeof l[m]!="undefined"){x=g(l[m],u,r-1);if(x){s[n++]=k(m)+":"+x}}}}}b.pop();return"{"+s.join(",")+"}"}return undefined};f=f>=0?f:1/0;return g(c,i,f)}};XN.NET=XN.Net={};XN.NET.xmlhttp=function(a,c,d,b){if(isObject(a)){$extend(this,a)}else{this.url=a||"";this.data=c||"";this.onSuccess=d;$extend(this,b)}this.init()};XN.NET.xmlhttp.prototype={url:null,data:"",onSuccess:null,onFailure:null,onError:null,fillTo:null,method:"post",asynchronous:true,transport:null,headers:null,iAmXmlhttp:true,isRuning:false,init:function(){this.transport=this.getTransport();if(this.url!==""){this.send(this.method)}},get:function(a,c,d,b){if(this.isRuning){return false
}if(isObject(a)){$extend(this,b);this.send("get");return this}this.url=a;this.data=c||"";this.onSuccess=d;$extend(this,b);this.send("get");return this},post:function(a,c,d,b){if(this.isRuing){return false}if(isObject(a)){$extend(this,b);this.send("post");return this}this.url=a;this.data=c||"";this.onSuccess=d;$extend(this,b);this.send("post");return this},sendForm:function(f,c,e,d){if(this.isRuing){return false}if(isObject(f)){$extend(this,d);this.data=XN.FORM.serialize(this.id);this.send(this.method);return this}var b=XN.FORM.serialize(f);this.data=b||"";this.url=c;this.onSuccess=e;$extend(this,d);this.send(this.method);return this},send:function(c){this.isRuning=true;var b;if(c=="get"&&this.data!==""){b=this.url+(/\?/.test(this.url)?"&":"?")+this.data}if(this.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this)}this.transport.open(c,this.url,this.asynchronous);this.transport.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(this.headers!==null){for(var a in this.headers){this.transport.setRequestHeader(a,this.headers[a])
}}this.transport.send(c=="post"?this.data:null)},onStateChange:function(){if(this.transport.readyState==4){try{(this.onComplete||XN.FUNC.empty)(this.transport)}catch(a){if(XN.DEBUG_MODE){throw a}}if(this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300)){if(this.fillTo!==null){try{this.fillTo.stopLoading()}catch(a){}this.fillTo.innerHTML=this.transport.responseText}try{(this.onSuccess||XN.FUNC.empty)(this.transport)}catch(a){if(XN.DEBUG_MODE){throw a}}}else{try{(this.onError||this.onFailure||XN.FUNC.empty)(this.transport)}catch(a){if(XN.DEBUG_MODE){throw a}}}this.isRuning=false}}};(function(){if(XN.BROWSER.IE){XN.NET.xmlhttp.prototype.getTransport=function(){try{return new ActveXObject("Msxml2.XMLHTTP")}catch(a){return new ActiveXObject("Microsoft.XMLHTTP")}}}else{XN.NET.xmlhttp.prototype.getTransport=function(){return new XMLHttpRequest()}}})();XN.EFFECT=XN.Effect={fadeIn:function(a,b){if(a.fadetimer){return}b=b||XN.FUNC.empty;
var c=0;a.setOpacity(0);a.style.display="";a.fadetimer=setInterval(function(){XN.Element.setOpacity(a,(c+=0.2));if(c>=1){clearInterval(a.fadetimer);a.fadetimer=null;b(a)}},60)},fadeOut:function(a,b){if(a.fadetimer){return}b=b||XN.FUNC.empty;var c=1;a.setOpacity(1);a.fadetimer=setInterval(function(){XN.Element.setOpacity(a,(c-=0.2));if(c<=0){clearInterval(a.fadetimer);a.fadetimer=null;b(a);a.setOpacity(1)}},60)},gradient:function(c,e,d,a,f){if(c.gradientTimer){return}f=f||XN.FUNC.empty;c.style.backgroundColor="#fff";c.style.backgroundColor="rgb("+e+","+d+","+a+")";c.gradientTimer=setInterval(function(){a+=10;c.style.backgroundColor="rgb("+e+","+d+","+(a>255?255:a)+")";if(a>255){clearInterval(c.gradientTimer);c.gradientTimer=null;f(c)}},60)},slideOpen:function(a){if(a.slidetimer){return}if(!a.slideHeight){a.style.display="";return}var d=a.slideHeight,b=0;var c=parseInt(d/10);a.style.height="0px";a.style.display="";a.style.overflow="hidden";a.slidetimer=setInterval(function(){a.style.height=(b+=c)+"px";
if(b>=d){clearInterval(a.slidetimer);a.slidetimer=null;a.style.height=d;a.style.overflow=a.slideOverflow}},50)},slideClose:function(a){if(a.slidetimer){return}var d=a.offsetHeight,b=d;a.slideHeight=d;a.slideOverflow=a.getStyle("overflow");a.style.overflow="hidden";var c=parseInt(d/10);a.slidetimer=setInterval(function(){a.style.height=(b-=c)+"px";if(b<=0){clearInterval(a.slidetimer);a.slidetimer=null;a.style.display="none";a.style.height=d;a.style.overflow=a.slideOverflow}},50)},scrollTo:function(e,k,j){if(e.scrolltimer){return}k=k||10;j=j||XN.FUNC.empty;var l=e.realTop();var c=XN.EVENT.winHeight();var g=document.body.scrollHeight;var b=XN.EVENT.scrollTop();var f=null;if(l>b){if(l+e.offsetHeight<c+b){return}e.scrolltimer=setInterval(function(){b+=Math.ceil((l-b)/k)||1;window.scrollTo(0,b);if(b==l){clearInterval(e.scrolltimer);e.scrolltimer=null}},10)}else{e.scrolltimer=setInterval(function(){b+=Math.ceil((l-b)/k)||-1;window.scrollTo(0,b);if(b==l){clearInterval(e.scrolltimer);e.scrolltimer=null
}},10)}}};XN.TEMPLATE=XN.Template={mediaPlayer:function(a){return'<object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width="'+(a.width||"352")+'" height="'+(a.height||"70")+'" >\n<param name="autostart" value="'+(a.autostart||"1")+'" >\n<param name="showstatusbar" value="'+(a.showstatusbar||"1")+'">\n<param name="filename" value="'+a.filename+'">\n<embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp"autostart="'+(a.autostart||"1")+'" showstatusbar="'+(a.showstatusbar||"1")+'" src="'+a.filename+'" width="'+(a.width||"352")+'" height="'+(a.height||"70")+'"></embed>'},flashPlayer:function(a){return'<embed src="'+XN.ENV.staticRoot+'/swf/player.swf" flashvars="url='+a.filename+"&Rwid="+(a.width||"450")+"&Autoplay="+(a.autostart||"1")+'" wmode="'+(a.wmode||"transparent")+'" loop="false" menu="false" quality="high" scale="noscale" salign="lt" bgcolor="#ffffff" width="'+(a.width||"450")+'" height="'+(a.height||"30")+'" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'
},flash:function(a){return'&nbsp;<embed src="'+a.filename+'" type="application/x-shockwave-flash" width="'+(a.width||"320")+'" height="'+(a.height||"240")+'" allowFullScreen="true" wmode="'+(a.wmode||"transparent")+'" allowScriptAccess="always"></embed>'}};XN.UI=XN.Ui={};XN.APP=XN.App={};XN.PAGE=XN.Page={};XN.CONFIG=XN.Config={};XN.UTIL=XN.Util={};XN.DOM.readyDo(_reload$_);XN.UTIL.cache=function(a){$extend(this,a);this.init()};XN.UTIL.cache.prototype={cacheLength:null,_cacheData:null,init:function(){this._cacheData=[]},isExist:function(a){return this.get(a)},add:function(a,b){if(!isUndefined(this.isExist(a))){return}if(this.cacheLength&&this.cacheLength==this._cacheData.length){this._cacheData.shift()}this._cacheData.push({key:a,value:b})},get:function(b){for(var a=this._cacheData.length-1;a>=0;a--){if(this._cacheData[a].key==b){return this._cacheData[a].value}}},clear:function(){this._cacheData=[]}};var dialog;closeDialog=function(){dialog.remove()};XN.UI.Element={haveFather:false,frame:null,addClass:function(a){this.frame.addClass(a)
},delClass:function(a){this.frame.delClass(a)},show:function(){this.frame.show()},hide:function(){this.frame.hide()},remove:function(){this.frame.remove();this.haveFather=false}};XN.UI.Content={container:null,addChild:function(a){this.container.addChild(a)},delChild:function(a){this.container.delChild(a)},setContent:function(a){this.container.setContent(a)},clear:function(){this.container.innerHTML=""}};$extend(XN.UI.Content,XN.UI.Element);XN.UI.fixPositionMethods={"1-1":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+"px";c.style.top=e+b.realTop()-d.realTop()+"px"},"1-2":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()-c.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()+"px"},"1-3":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()-c.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()-c.offsetHeight+"px"},"1-4":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+"px";c.style.top=e+b.realTop()-d.realTop()-c.offsetHeight+"px"},"2-1":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+b.offsetWidth+"px";
c.style.top=e+b.realTop()-d.realTop()+"px"},"2-2":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+b.offsetWidth-c.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()},"2-3":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+b.offsetWidth-c.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()-c.offsetHeight+"px"},"2-4":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+b.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()-c.offsetHeight+"px"},"3-1":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+b.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()+b.offsetHeight+"px"},"3-2":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+b.offsetWidth-c.offsetWidth+"px";c.style.top=e+b.realTop(d)+b.offsetHeight+"px"},"3-3":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+b.offsetWidth-c.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()+b.offsetHeight-c.offsetHeight+"px"},"3-4":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+b.offsetWidth+"px";
c.style.top=e+b.realTop()-d.realTop()+b.offsetHeight-c.offsetHeight+"px"},"4-1":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+"px";c.style.top=e+b.realTop()-d.realTop()+b.offsetHeight+"px"},"4-2":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()-c.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()+b.offsetHeight+"px"},"4-3":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()-c.offsetWidth+"px";c.style.top=e+b.realTop()-d.realTop()+b.offsetHeight-c.offsetHeight+"px"},"4-4":function(c,b,a,e,d){c.style.left=a+b.realLeft()-d.realLeft()+"px";c.style.top=e+b.realTop()-d.realTop()+b.offsetHeight-c.offsetHeight+"px"}};XN.UI.fixPositionElement=function(a){this.options={};$extend(this.options,a);this.init()};XN.UI.fixPositionElement.prototype=$extend({},XN.UI.Content);$extend(XN.UI.fixPositionElement.prototype,{alignWith:null,alignType:"4-1",offsetX:0,offsetY:0,alignParent:"dropmenuHolder",left:null,top:null,init:function(){var b=this.options,c,a,d;if(b.id){this.frame=this.container=c=$X(b.id);
a=c.realLeft();d=c.realTop();if(c.parentNode){c.parentNode.removeChild(c)}}else{if(b.tagName){this.frame=this.container=c=$xElement(b.tagName)}else{throw new Error("need id or tagName")}}if(b.alignType){this.alignType=b.alignType}if(!isUndefined(b.offsetX)){this.offsetX=b.offsetX}if(!isUndefined(b.offsetY)){this.offsetY=b.offsetY}c.style.position="absolute";this.hide();c.style.display="block";c.style.zIndex=10001;this.alignParent=$(b.alignParent)||$(this.alignParent)||$(document.body);if(b.father){b.father.appendChild(c)}else{this.alignParent.appendChild(c)}if(b.alignWith){this.alignWith=$(b.alignWith)}else{if(a){this.moveTo(a,d)}}this.options=null},refresh:function(){this.moveTo()},setOffsetX:function(a){this.offsetX=a;this.refresh()},setOffsetY:function(a){this.offsetY=a;this.refresh()},setAlignType:function(a){this.alignType=a;this.refresh()},setAlignParent:function(a){this.alignParent=a;this.frame.remove();this.alignParent.appendChild(this.frame);this.refresh()},hide:function(){var a=this.frame;
this.left=a.offsetLeft;this.top=a.offsetTop;a.style.left="-9999px";a.style.top="-9999px"},show:function(){if(this.alignWith){this.moveTo(this.alignWith)}else{this.frame.style.left=this.left+"px";this.frame.style.top=this.top+"px"}},moveTo:function(a,c){if(isNumber(a)||isNumber(c)){this.alignWith=null;if(a){this.left=a;this.frame.style.left=a+"px"}if(c){this.top=c;this.frame.style.top=c+"px"}}else{if(a&&$(a)!=this.alignWith){this.alignWith=$(a)}if(this.alignWith){var b=this;XN.UI.fixPositionMethods[b.alignType](b.frame,b.alignWith,b.offsetX,b.offsetY,this.alignParent)}else{this.frame.style.left=this.left+"px";this.frame.style.top=this.top+"px"}}}});XN.UI.dragAndDrop=function(a){$extend(this,a)};XN.UI.dragAndDrop.prototype={originalPosition:null,originalLeft:null,originalTop:null,X:null,Y:null,over:null,groupIndex:-1,dragGroup:[],initDrag:function(d){var a=d.element;var b=d.hander;var c=d.poxy;this.originalLeft=a.offsetLeft;this.originalTop=a.offsetTop;this.element=a;this.hander=b},enable:function(c,a,d){var b=this;
group=this.dragGroup;c=$(c);c.style.position="relative";a=$(a||c);a.setAttribute("dragGroupIndex",(++this.groupIndex));group.push({hander:a,element:c,poxy:(d||false)});c.onselectstart=function(){return false};c.setStyle("-moz-user-select:none;");a.style.cursor="move";a.onmousedown=function(f){f=f||window.event;b.initDrag(group[parseInt(this.getAttribute("dragGroupIndex"))]);b.startDrag(f)}},startDrag:function(b){var a=this;this.X=XN.EVENT.pointerX(b);this.Y=XN.EVENT.pointerY(b);document.onmousemove=function(c){c=c||window.event;a.drag(c)};document.onmouseup=function(c){c=c||window.event;a.stopDrag(c)}},drag:function(c){var b=this.element;var a=XN.EVENT.pointerX(c);var d=XN.EVENT.pointerY(c);b.style.left=a-this.X+parseInt(b.getStyle("left"))+"px";b.style.top=d-this.Y+parseInt(b.getStyle("top"))+"px";this.X=a;this.Y=d},stopDrag:function(b){var a=this.element;document.onmousemove=null;document.onmouseup=null;this.element.style.top=this.originalTop;this.element.style.left=this.originalLeft},onmousedown:function(a){return true
},onmousemove:function(a){},onDragEnter:function(b,a){},onDragOver:function(b,a){},onDragOut:function(b,a){}};XN.UI.toolTip=function(a){this.options={};$extend(this.options,a);this.init()};XN.UI.toolTip.prototype=$extend($extend({},XN.UI.Content),XN.UI.Content);$extend(XN.UI.toolTip.prototype,{type:"normal",keep:2,isShow:true,alignType:"1-4",alignWith:null,_fixElement:null,_iframe:null,_timer:null,setType:function(a){a=a||"normal";if(a=="normal"){this.frame.delClass("error");this.frame.addClass("normal")}else{if(a=="error"){this.frame.delClass("normal");this.frame.addClass("error")}}},moveTo:function(a,b){this._fixElement.moveTo(a,b)},refresh:function(){this.moveTo()},show:function(a){if(a){this.setContent(a)}if(this.isShow){clearTimeout(this._timer)}if(this.alignWith){this.moveTo(this.alignWith)}else{this._fixElement.show()}if(this._iframe!==null){this._iframe.style.height=this.frame.offsetHeight}this.isShow=true;if(this.keep){setTimeout(this.hide.bind(this),this.keep*1000)}},hide:function(){if(!this.isShow){return
}this.isShow=false;this._fixElement.hide()},init:function(){var d=this.options,e,g,a;this._fixElement=new XN.UI.fixPositionElement({tagName:"div",alignType:this.alignType});e=this._fixElement.frame;this.frame=e;g=$xElement("div");this.container=g;g.setStyle("background:#000;color:#fff;z-index:1000,width:100%,height:100%");e.appendChild(g);if(XN.BROWSER.IE6){var b=$element("iframe");b.src="";b.setStyle("position:absolute;border:0px;left:0px;top:0px;width:100%;z-index:-1");this._iframe=b;e.appendChild(b)}this.setContent(d.text);this.setType(d.type);if(d.y){this.moveTo(d.x,d.y)}else{if(d.alignWith){this.alignWith=$(d.alignWith);this.moveTo(this.alignWith)}}this.keep=d.keep?d.keep:this.keep;this.hide();this.options=null}});XN.UI.button=function(a){this.options={};if(isString(a)){this.options.text=a}else{this.options=a}this.init()};XN.UI.button.prototype=$extend({},XN.UI.Element);$extend(XN.UI.button.prototype,{init:function(){var d=this.options,a,c=this;if(d.id){this.frame=$(d.id)}else{this.frame=$element("input");
if(d.container){d.container.appendChild(this.frame);this.haveFather=true}}a=this.frame;switch(d.type){case"button":default:a.type="button";a.className="input-submit";break}if(d.className){this.addClass(d.className)}this.onclick=d.onclick||XN.FUNC.empty;this.setText(d.text);this.frame.addEvent("click",function(){c.onclick()},false);this.options=null},setText:function(a){if(a){this.frame.value=a}},disable:function(){this.frame.blur();this.frame.disabled=true;this.frame.addClass("gray")},enable:function(){this.frame.disabled=false;this.frame.delClass("gray")},focus:function(){this.frame.focus()},blur:function(){this.frame.blur()}});XN.UI.menu=function(a){this.options=a;this.init()};XN.UI.menu.prototype=$extend({},XN.UI.Content);$extend(XN.UI.menu.prototype,{fireOn:"click",alignType:"4-1",isShow:true,barOnshowClass:"",tagName:"div",_menu:null,_canAddItem:true,_menuList:null,_iframe:null,_mouseInBar:false,_mouseInMenu:false,_timer:null,_keepTimer:null,keep:0.3,init:function(){var e=this,c=this.options,d,a,b,g;
if(c.text){this.frame=d=$xElement(c.tagName||this.tagName);d.addChild(c.text)}else{if(c.bar){this.frame=d=$(c.bar);if(d.parentNode){this.haveFather=true}}else{throw new Error("XN.UI.menu:need text or bar")}}if(c.alignType){this.alignType=c.alignType}if(c.barOnshowClass){this.barOnshowClass=c.barOnshowClass}if(c.menu){this._menu=new XN.UI.fixPositionElement({id:c.menu,alignType:this.alignType,alignWith:(c.alignWith||this.frame)});this._canAddItem=false}else{this._menu=new XN.UI.fixPositionElement({tagName:"div",alignType:this.alignType,alignWith:(c.alignWith||this.frame)});this.container=g=$xElement("div");this._menu.frame.appendChild(g)}this._menu.frame.style.zIndex=10001;this._menu.frame.onclick=function(h){h=h||window.event;var f=XN.EVENT.element(h).tagName.toLowerCase();e.fireEvent("menuOnClick",h);if(f!="a"&&f!="input"){XN.EVENT.stop(h)}};if(XN.BROWSER.IE6){var b=$element("iframe");b.src="about:blank";b.frameBorder=0;b.setStyle("position:absolute;border:0px;left:0px;top:0px;z-index:-1");
this._iframe=b;this._menu.frame.appendChild(b)}if(c.offsetX){this._menu.offsetX=c.offsetX}if(c.offsetY){this._menu.offsetY=c.offsetY}this.fireOn=c.fireOn||"click";if(!isUndefined(c.keep)){this.keep=c.keep}if(this.fireOn=="click"){this.frame.onclick=function(f){f=f||window.event;XN.EVENT.stop(f);if(e.isShow){e.hide()}else{e.show()}};XN.EVENT.addEvent(document,"click",this.hide.bind(this),false)}else{if(this.fireOn=="mouseover"){XN.EVENT.addEvent(this.frame,"mouseover",function(f){f=f||window.event;e._mouseInBar=true;if(e._keepTimer){clearTimeout(e._keepTimer);e._keepTimer=null}if(e.keep){e._keepTimer=setTimeout(function(){if(e._mouseInBar){e.show()}},e.keep*1000)}else{e.show()}XN.EVENT.stop(f)},false);XN.EVENT.addEvent(this.frame,"mouseleave",function(){e._barMouseleave()},false);XN.EVENT.addEvent(this._menu.frame,"mouseleave",function(){e._menuMouseleave()},false);XN.EVENT.addEvent(this._menu.frame,"mouseover",function(f){e._mouseInMenu=true},false)}else{if(this.fireOn=="manual"){}}}this.hide();
this.options=null},addSubMenu:function(a){try{if(!a.haveFather){this._menu.addChild(a)}a._menu.setAlignParent(this.frame)}catch(b){throw new Error(" you must add an available Menu Object")}},_barMouseleave:function(){this._mouseInBar=false;var a=this;if(this._timer){clearTimeout(this._timer);this._timer=null}setTimeout(function(){if(!a._mouseInMenu){a.hide()}},50)},_menuMouseleave:function(){this._mouseInMenu=false;var a=this;if(this._timer){clearTimeout(this._timer);this._timer=null}setTimeout(function(){if(!a._mouseInBar){a.hide()}},50)},setWidth:function(a){this._menu.frame.style.width=a+"px";if(this._iframe){this._iframe.style.width=this._menu.frame.offsetWidth+"px"}},onShow:function(){},onHide:function(){},show:function(){if(this.isShow){return}this._menu.show();if(this._iframe){this._iframe.style.height=this._menu.frame.offsetHeight-2+"px";this._iframe.style.width=this._menu.frame.offsetWidth+"px"}this._menu.refresh();if(this.barOnshowClass!==""){this._menu.alignWith.addClass(this.barOnshowClass)
}this.onShow();this.isShow=true},hide:function(){if(!this.isShow){return}this._menu.hide();if(this.barOnshowClass!==""){this._menu.alignWith.delClass(this.barOnshowClass)}this.onHide();this.isShow=false}});XN.EVENT.enableCustomEvent(XN.UI.menu.prototype);XN.UI.toggleView=function(a){this.options=a;this.init()};XN.UI.toggleView.prototype={bar:null,div:null,onShow:null,onHide:null,isShow:true,init:function(){var b=this.options,c,a=this;this.bar=$(b.bar);this.div=$(b.div);this.onShow=b.onShow||XN.FUNC.empty;this.onHide=b.onHide||XN.FUNC.empty;c=b.original||"hide";if(c=="show"){this.isShow=true;XN.Element.show(this.div)}else{this.isShow=false;XN.Element.hide(this.div)}this.fireOn=b.fireOn||"click";switch(this.fireOn){case"mouseover":XN.EVENT.addEvent(this.bar,"mouseover",this.toggle.bind(this),false);XN.EVENT.addEvent(this.bar,"mouseleave",this.toggle.bind(this),false);break;default:XN.EVENT.addEvent(this.bar,"click",function(d){d=d||window.event;XN.EVENT.stop(d);a.toggle()},false);break}},toggle:function(){this[(this.isShow?"hide":"show")]()
},show:function(){this.div.style.display="block";this.isShow=true;this.onShow()},hide:function(){XN.Element.hide(this.div);this.isShow=false;this.onHide()},onShow:function(){},onHide:function(){}};XN.UI.tabView=function(a){this._tabs=[];$extend(this,a)};XN.UI.tabView.prototype={selectedClass:"select",_currentTab:null,addTab:function(c){var a,b={};a=b.label=$(c.label);b.content=$(c.content);b.onActive=c.onActive||XN.FUNC.empty;b.onClick=c.onclick||c.onClick||XN.FUNC.empty;b.onInactive=c.onInactive||XN.FUNC.empty;this._tabs[a.id]=b;a.tabView=this;if(c.active&&this._currentTab===null){if(b.content){b.content.show()}a.addClass(this.selectedClass);this._currentTab=a.id}else{if(b.content){b.content.hide()}}a.onclick=this._showTab},showTab:function(c){var a=this;a._tabs[c].onClick();$(c).addClass(a.selectedClass);if(a._currentTab&&a._currentTab==c){return}try{a._tabs[a._currentTab].onInactive(a._tabs[a._currentTab]);a._tabs[a._currentTab].label.delClass(a.selectedClass);a._tabs[a._currentTab].content.hide()
}catch(b){}try{a._tabs[c].content.show()}catch(b){}a._tabs[c].onActive(a._tabs[c]);a._currentTab=c},hideAll:function(){var a=this;try{a._tabs[a._currentTab].onInactive(a._tabs[a._currentTab]);a._tabs[a._currentTab].label.delClass(a.selectedClass);a._currentTab=null;a._tabs[a._currentTab].content.hide()}catch(b){}},_showTab:function(b){b=b||window.event;XN.EVENT.stop(b);var a=this.tabView;a.showTab(this.id)}};XN.UI.DS_JSON=function(a){$extend(this,a)};XN.UI.DS_JSON.prototype={url:null,useCache:false,queryParam:"query",attachParam:"",rootKey:null,_request:null,query:function(a,c){var b=this;try{this._request.abort()}catch(d){}function f(i){i=i.responseText;var h;try{var g=XN.JSON.parse(i);if(b.rootKey&&g[b.rootKey]){h=g[b.rootKey]}else{h=g}}catch(j){h=[]}c(h)}this._request=new XN.NET.xmlhttp({url:this.url,data:this.queryParam+"="+encodeURIComponent(a)+"&"+this.attachParam,onSuccess:f})}};XN.UI.DS_Array=function(a){$extend(this,a);this.init()};XN.UI.DS_Array.prototype={DS_TYPE:"array",data:null,searchKey:null,init:function(){var b=this.searchKey,a=this._index=[];
XN.ARRAY.each(this.data,function(d,c){a.push(c[b])})},query:function(a,b){b(this._search(a))},_search:function(b){var d=this._index,e=this.data,a=[],c=new RegExp("^"+b,"i");XN.ARRAY.each(d,function(g,f){if(c.test(f)){a.push(e[g])}});return a}};XN.UI.DS_XHR=function(a){$extend(this,a)};XN.UI.DS_XHR.prototype={url:null,useCache:false,queryParam:"query",_request:null,query:function(a,f){var c=this;try{this._request.abort()}catch(g){}function b(j){j=j.responseXML;var h=[];function l(m){var e={};XN.ARRAY.each(m.childNodes,function(o,n){e[n.tagName]=n.firstChild.nodeValue});return e}try{var i=j.getElementsByTagName("Result");XN.ARRAY.each(i,function(m,e){h.push(l(e))})}catch(k){h=[]}f(h)}var d=new XN.NET.xmlhttp({url:this.url,data:this.queryParam+"="+encodeURIComponent(a),onSuccess:b})}};XN.UI.autoComplete=function(a){$extend(this,a);this.initAutoComplete()};XN.UI.autoComplete.prototype={input:null,inputTip:"",searchDelay:0.2,DS:null,enableCache:false,maxCache:10,_inputTimer:null,_cache:null,_lastInput:null,_haveInput:false,initAutoComplete:function(){if(this.enableCache){this._cache=new XN.UTIL.cache({cacheLength:this.maxCache})
}var a=this.input=$(this.input);var c=this;if(this.inputTip){(new XN.FORM.inputHelper(a)).setDefaultValue(this.inputTip)}var b=false;XN.EVENT.addEvent(a,"focus",function(){c.fireEvent("focus")},false);XN.EVENT.addEvent(a,"blur",function(){c.fireEvent("blur")},false);XN.EVENT.addEvent(a,"keydown",function(d){b=true;d=d||window.event;if(d.keyCode==13){XN.EVENT.stop(d)}c.fireEvent("keydown",d)},false);a.setAttribute("AutoComplete","off");XN.EVENT.addEvent(document,"keydown",function(){b=true});this.addEvent("focus",function(){this._inputTimer=setInterval(function(){if(b){b=false;return}c._checkInput()},this.searchDelay*1000)});this.addEvent("blur",function(){clearInterval(this._inputTimer);this._inputTimer=null})},_checkInput:function(){var d=this;var b=this.input.value;var c=this._keyCache,e=this._resultCache;if(XN.STRING.isBlank(b)){if(this._lastInput===""){return}this.fireEvent("noinput");this._lastInput="";return}if(b==this._lastInput){return}this._lastInput=b;this.fireEvent("searchbegin");
if(this.enableCache){var a=this._cache.get(b);if(a){this.fireEvent("searchover",a);return}}this.DS.query(b,function(f){if(d.enableCache){d._cache.add(b,f)}d.fireEvent("searchover",f)})}};XN.EVENT.enableCustomEvent(XN.UI.autoComplete.prototype);XN.UI.autoCompleteMenu=function(a){$extend(this,a);this.initAutoComplete();this.initAutoCompleteMenu()};XN.UI.autoCompleteMenu.prototype=$extend($extend({},XN.UI.autoComplete.prototype),{highLight:true,ulClass:"",liClass:"",liMouseoverClass:"m-autosug-hover",aClass:"",noResult:"无匹配结果...",noInput:null,autoSelectFirst:false,_menu:null,_menuList:null,_ul:null,_liHasLight:null,_highLightMenu:function(a){if(a==this._liHasLight){return}if(this._liHasLight!==null){XN.ELEMENT.delClass(this._liHasLight,this.liMouseoverClass)}XN.ELEMENT.addClass(a,this.liMouseoverClass);this._liHasLight=a},_inputOnkeydown:function(b){var a;if(b.keyCode==13){if(this._menu.isShow&&this._liHasLight){var c=this._liHasLight.getAttribute("aid");if(c){this._selectMenu(parseInt(c))
}}return false}if(b.keyCode==38){if(this._liHasLight&&this._liHasLight.previousSibling){a=this._liHasLight.previousSibling}else{a=this._ul.lastChild}this._highLightMenu(a);return false}if(b.keyCode==40){if(this._liHasLight&&this._liHasLight.nextSibling){a=this._liHasLight.nextSibling}else{a=this._ul.firstChild}this._highLightMenu(a);return false}return true},_menuOnclick:function(b){var a=XN.EVENT.element(b);if(a.tagName.toLowerCase()=="li"){}else{if(a.parentNode.tagName.toLowerCase()=="li"){a=a.parentNode}else{if(a.parentNode.parentNode.tagName.toLowerCase()=="li"){a=a.parentNode.parentNode}}}if(!a.getAttribute("aid")){return}this._selectMenu(parseInt(a.getAttribute("aid")));return false},_menuOnmouseover:function(c){var b=XN.EVENT.element(c);var a;if(b.tagName.toLowerCase()=="li"){a=b}else{if(b.parentNode.tagName.toLowerCase()=="li"){a=b.parentNode}else{if(b.parentNode.parentNode.tagName.toLowerCase()=="li"){a=b.parentNode.parentNode}}}if(a&&a.tagName&&a.getAttribute("aid")){this._highLightMenu(a)
}return false},_selectMenu:function(a){this._menu.hide();this.input.focus();this.fireEvent("select",this.result[a]);this._lastInput=this.input.value},initAutoCompleteMenu:function(){var b=this.input;var e=this;var a=$element("div");this._menuList=a;a.className="m-autosug";a.innerHTML='<span class="x1"><span class="x1a"></span></span><span class="x2"><span class="x2a"></span></span>';var f=$element("div");f.className="m-autosug-minwidth";var d=$element("div");d.className="m-autosug-content";var c=$element("ul");c.className=this.ulClass;d.appendChild(c);f.appendChild(d);a.appendChild(f);this._ul=this._menuList.getElementsByTagName("ul")[0];this._menu=new XN.UI.menu({bar:b,menu:a,fireOn:"manual"});this.addEvent("keydown",this._inputOnkeydown);this._ul.onclick=function(g){g=g||window.event;return e._menuOnclick(g)};this._ul.onmousemove=function(g){g=g||window.event;return e._menuOnmouseover(g)};XN.EVENT.addEvent(document,"click",function(){e._menu.hide()},false);this._menu.hide();this.addEvent("noinput",function(){if(!this.noInput){this._menu.hide();
return}this._ul.innerHTML="<li><p>"+this.noInput+"</p></li>";if(this.autoSelectFirst){this._highLightMenu(this._ul.firstChild)}this._menu.show()});this.addEvent("searchover",this._buildMenu)},setMenuWidth:function(a){this._menu.setWidth(a)},_buildMenu:function(a){var c=this;this.result=a;if(a.length==0){var d;if(this.noResult){if(isString(this.noResult)){d=this.noResult}else{d=this.noResult()}}else{d="无匹配结果..."}this._ul.innerHTML="<li>"+d+"</li>";this._menu.show();this._liHasLight=null;return}var b=[];XN.ARRAY.each(a,function(f,e){b.push('<li aid="'+f+'">'+c.buildMenu(e)+"</li>")});this._ul.innerHTML=b.join("");if(this.autoSelectFirst){this._highLightMenu(this._ul.firstChild)}this._menu.show()},buildMenu:function(a){return"<li>"+a.name+"</li>"}});XN.UI.friendSelector=function(a){$extend(this,a);this.init()};XN.UI.friendSelector.prototype=$extend({},XN.UI.Element);$extend(XN.UI.friendSelector.prototype,{init:function(){var a=this;if(this.id){this.frame=$(this.id);this.haveFather=true}else{this.frame=$element("input");
this.haveFather=false}var b=new XN.UI.DS_JSON({url:"/getfriendsinputajax.do",attachParam:"limit=24",rootKey:"list",searchKey:"name"});this.autoComplete=new XN.UI.autoCompleteMenu({DS:b,enableCache:true,input:this.frame,searchDelay:0.2,noResult:(this.noResult||null),inputTip:(this.inputTip||null),noInput:"请输入好友姓名(支持拼音输入)"});this.autoComplete.buildMenu=function(c){return"<p>"+c.name+"</p>"};this.autoComplete.setMenuWidth(this.frame.offsetWidth);this.autoComplete.addEvent("select",function(c){this.input.value=c.name;if(a.onSelectOne){a.onSelectOne({id:c.id,name:c.name,head:c.head,profile:"http://"+XN.ENV.domain+"/profile.do?id="+c.id})}})},setMenuWidth:function(a){this.autoComplete.setMenuWidth(a)}});XN.UI.friendSearchBar=function(h){var b=$(h.input);var g=$(h.submit||null);var d=$(h.form);var f=h.tip||"找人...";var e=h.action||function(i){window.location.href="http://"+XN.ENV.domain+"/profile.do?id="+i.id+"&logsign=searchFriend"};var a=false;(new XN.FORM.inputHelper(b)).setDefaultValue(f).onEnter(function(i){if(a){return
}if(!XN.STRING.isBlank(i.value)){d.submit()}});var c=new XN.UI.friendSelector({id:b,noResult:function(){return'搜索"'+this.input.value+'"'}});c.onSelectOne=function(i){a=true;e(i)};if(g){g.onclick=function(){if(a){return}var i=b.value;if(i!=f&&!XN.STRING.isBlank(i)){d.submit()}}}};XN.UI.multiFriendSelector=function(a){$extend(this,a);this.init()};XN.UI.multiFriendSelector.friends=null;XN.UI.multiFriendSelector.pre=0;XN.UI.multiFriendSelector.prototype=$extend({},XN.UI.Element);$extend(XN.UI.multiFriendSelector.prototype,{idInputName:"ids",nameInputName:"names",selectedFriends:"",friendsC:null,inputC:null,getFriendsNum:function(){return this.friendsC.getElementsByTagName("a").length},getIds:function(){var c=[],b=this.friendsC.getElementsByTagName("a");for(var e=0,d=b.length;e<d;e++){c.push(b[e].uid+"")}return c},deSelectAll:function(){var c=$A(this.friendsC.getElementsByTagName("a"));for(var b=0,a=c.length;b<a;b++){this.friendsC.removeChild(c[b])}},getEl:function(a){var b={input:"input",inputContainer:"inputC"};
return $(this[b[a]])},initContainer:function(){var a=[],d=this.frame,b=this;XN.UI.multiFriendSelector.pre++;this._idPre="mfs_"+XN.UI.multiFriendSelector.pre+"_";a.push('<div  class="tokenizer friendAutoSelector">');a.push('<span class="tokenizer_stretcher">^_^</span>');a.push('<span class="tab_stop"><input/></span>');a.push('<span class="tokenizer_input"><input type="text" /></span>');a.push('<span class="frsAutoUp"></span></div>');d.innerHTML=a.join("");d.onclick=this._frameOnclick.bind(this);this.input=d.getElementsByTagName("input")[1];this.friendsC=d.firstChild;this.tapStop=d.getElementsByTagName("span")[1];this.inputC=d.getElementsByTagName("span")[2];this.selectBar=d.getElementsByTagName("span")[3];this.selectBar.onclick=this.initSelectMenu.bind(this)},_frameOnclick:function(){this.input.focus()},selectFriend:function(a){if($(this._idPre+"friend_"+a.id)){return}this.friendsC.insertBefore(this.newFriendC(a.id,a.name),this.inputC);this.fireEvent("select",a.id)},deSelectFriend:function(a){if($(this._idPre+"friend_"+a)){$(this._idPre+"friend_"+a).remove();
this.fireEvent("deselect",a)}},newFriendC:function(e,d){var c=$element("a"),b;c.id=this._idPre+"friend_"+e;c.uid=e;c.uname=d;c.href="#nogo";c.className="token";c.tabindex="-1";c.innerHTML='<span>\n<span>\n<span>\n<span>\n<input type="hidden" value="'+e+'" name="'+this.idInputName+'" />\n<input type="hidden" value="'+d+'" name="'+this.nameInputName+'" />\n'+d+'<span class="x" onmouseout="this.className=\'x\'" onmouseover="this.className=\'x_hover\'" >\n</span>\n</span>\n</span>\n</span>\n</span>';b=c.getElementsByTagName("span")[4];b.multiFriendSelector=this;b.uid=e;b.onclick=function(){var a=this.multiFriendSelector;a.deSelectFriend(this.uid)};return c},_onInputKeydown:function(e){var c=this.inputC,d=c.previousSibling,a=c.nextSibling,b=this.input;if(e.keyCode==8&&this.input.value==""){if(d){this.friendsC.removeChild(d);this.deSelectFriend(d.aid)}return true}else{if(e.keyCode==37&&this.input.value==""){if(d&&d.tagName.toLowerCase()=="a"){c.parentNode.removeChild(c);this.friendsC.insertBefore(c,d);
setTimeout(function(){b.focus()},0)}return true}else{if(e.keyCode==39&&this.input.value==""){if(a&&a.tagName.toLowerCase()=="a"){c.parentNode.removeChild(c);XN.DOM.insertAfter(c,a);setTimeout(function(){b.focus()},0)}return true}}}return false},initSearchMenu:function(){var a=this;var b=new XN.UI.DS_JSON({url:"/getfriendsinputajax.do",attachParam:"limit=24",rootKey:"list",searchKey:"name"});this.autoComplete=new XN.UI.autoCompleteMenu({DS:b,enableCache:true,input:$(this.input),searchDelay:0.2,noResult:(this.noResult||null),inputTip:(this.inputTip||null),noInput:"请输入好友姓名"});this.autoComplete.buildMenu=function(c){return"<p>"+c.name+"</p>"};this.autoComplete.setMenuWidth(this.input.offsetWidth);this.autoComplete.addEvent("keydown",function(c){a._onInputKeydown(c)});this.autoComplete.setMenuWidth(this.frame.offsetWidth);this.autoComplete.addEvent("select",function(c){this.input.value="";a.selectFriend({id:c.id,name:c.name,head:c.head,profile:"http://"+XN.ENV.domain+"/profile.do?id="+c.id})
})},initSelectMenu:function(){var b=this;this.selectBar.onclick=null;this._selectMenu=new XN.UI.menu({bar:this.selectBar,fireOn:"click"});this._selectMenu.addEvent("menuOnClick",function(f){var d=XN.EVENT.element(f);try{f.stopPropagation()}catch(c){f.cancelBubble=true}});function a(d){var c=['<form id="MFS_select_form_'+b.idPre+'">'];XN.ARRAY.each(d,function(f,e){c.push('<span class="userCell"><input id="MFS_form_friend_'+b.idPre+"_"+e.id+'" type="checkbox" value="'+e.id+'" /><label for="MFS_form_friend_'+b.idPre+"_"+e.id+'">'+e.name+"</label></span>")});c.push("</form>");return c.join("")}new XN.NET.xmlhttp({url:"/getfriendsinputajax.do",data:"limit=-1",onSuccess:function(c){c=XN.JSON.parse(c.responseText);b._selectMenu.setContent(a(c.list));b._selectMenu.show()}})},init:function(){this.idPre=++XN.UI.multiFriendSelector.pre;this.frame=$element("div");this.haveFather=false;this.initContainer();this.initSearchMenu()}});XN.EVENT.enableCustomEvent(XN.UI.multiFriendSelector.prototype);XN.UI.panel=function(a){$extend(this.options,a);
this.init()};XN.UI.panel.prototype={width:400,height:null,X:null,Y:null,header:null,body:null,footer:null,frame:null,container:null,options:{},_fixElement:null,_table:null,init:function(){var e,a,i,f,k,g,h,d,c,j,b=this.options;e=$element("div");e.style.position="absolute";e.style.textAlign="left";e.style.zIndex=200008;this.frame=e;a=$element("table");a.style.width="100%";a.style.height="100%";a.className="pop_dialog_table";this._table=a;i=$element("tbody");f=$element("tr");k=$element("td");k.className="pop_topleft";f.appendChild(k);k=k.cloneNode(false);k.className="pop_border";f.appendChild(k);k=k.cloneNode(false);k.className="pop_topright";f.appendChild(k);i.appendChild(f);f=$element("tr");k=$element("td");k.className="pop_border";f.appendChild(k);k=k.cloneNode(false);this.container=k;k.className="pop_content";g=$element("h2");h=$xElement("span");this.header=h;h.hide=function(){g.hide()};h.show=function(){g.show()};g.appendChild(h);k.appendChild(g);d=$element("div");d.className="dialog_content";
c=$xElement("div");this.body=c;c.className="dialog_body";d.appendChild(c);c=$xElement("div");this.footer=c;c.className="dialog_buttons";d.appendChild(c);k.appendChild(d);f.appendChild(k);k=$element("td");k.className="pop_border";f.appendChild(k);i.appendChild(f);f=$element("tr");k=$element("td");k.className="pop_bottomleft";f.appendChild(k);k=k.cloneNode(false);k.className="pop_border";f.appendChild(k);k=k.cloneNode(false);k.className="pop_bottomright";f.appendChild(k);i.appendChild(f);a.appendChild(i);e.appendChild(a);if(XN.BROWSER.IE6){this._iframe=j=$element("iframe");j.frameBorder=0;j.setStyle("position:absolute;border:0px;left:0px;top:0px;z-index:-1");e.appendChild(j)}this._fixElement=new XN.UI.fixPositionElement({id:e});this.frame.style.zIndex=10000;this.setWidth(b.width||this.width);if(b.height){this.setHeight(b.height)}if(b.header){this.setHeader(b.header)}if(b.body){this.setBody(b.body)}if(b.footer){this.setFooter(b.footer)}if(b.X){this.setX(b.X)}else{this.setX()}if(b.Y){this.setY(b.Y)
}else{this.setY(XN.EVENT.scrollTop()+200)}if(b.type){this.setType(b.type)}this.options=null},setType:function(a){a=a||"normal";if(a=="normal"){XN.Element.delClass(this._table,"errorDialog")}else{if(a=="error"){XN.Element.addClass(this._table,"errorDialog")}}},setWidth:function(a){this.width=a;this.frame.style.width=a+"px";if(this.X===null){this.setX()}},setHeight:function(a){if(!a){return}this.height=a;this.frame.style.height=a+"px"},resizeTo:function(a,b){this.setWidth(a);this.setHeight(b)},setOffsetX:function(a){this._fixElement.setOffsetX(a)},setOffsetY:function(a){this._fixElement.setOffsetY(a)},refresh:function(){this._fixElement.refresh()},setAlignType:function(a){this._fixElement.setAlignType(a)},setX:function(a){if(isUndefined(a)||!a){this.moveTo(parseInt(((this._fixElement.alignParent.offsetWidth-(this.width||this.frame.offsetWidth||400))/2),10))}else{this.X=a;this.moveTo(a,null)}},setY:function(a){if(isUndefined(a)||!a){this.moveTo(null,XN.EVENT.scrollTop()+200)}else{this.Y=a;
this.moveTo(null,a)}},moveTo:function(a,b){this._fixElement.moveTo(a,b)},show:function(){this.frame.show();if(this._iframe){this._iframe.style.width=this.frame.offsetWidth-10+"px";this._iframe.style.height=this.frame.offsetHeight-10+"px"}},hide:function(){this.frame.hide()},clear:function(){this.setHeader(false);this.setBody(false);this.setFooter(false)},remove:function(){this.frame.parentNode.removeChild(this.frame)},setHeader:function(a){if(a&&a!==""){this.header.addChild(a)}else{this.header.innerHTML=""}},setBody:function(a){if(a&&a!==""){this.body.addChild(a)}else{this.body.innerHTML=""}},setFooter:function(a){if(a&&a!==""){this.footer.addChild(a)}else{this.footer.innerHTML=""}},setIndex:function(a){this.frame.style.zIndex=a}};XN.UI.pngfix=function(){if(navigator.userAgent.indexOf("MSIE 6.0")>-1){for(var c=0;c<document.images.length;c++){var d=document.images[c];var e=d.width;var a=d.height;var b=d.src.toUpperCase();if(b.substring(b.length-4,b.length)==".PNG"){d.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+d.src+", sizingmethod=scale);";
d.src="http://mopimg.cn/img/transparent.gif";d.width=e;d.height=a}}}};if(XN.FORM){XN.FORM=null}XN.Form=XN.FORM={fillWithJSON:function(form,json){form=$(form);var a="";eval("(a="+json+")");XN.FORM.fillWithArray(form,a)},fillWithArray:function(c,b){c=$(c);for(var d in b){XN.FORM.Element.setValue(d,b[d],c)}},setValue:function(a,b){return XN.FORM.Element.setValue(a,b)},getValue:function(a){return XN.FORM.Element.getValue(a)},serialize:function(b,a){return this.serializeElements(this.getElements(b),a||"string")},serializeElements:function(a,k,h){k=k||"array";if(isUndefined(h)){h=false}var f=[],b,l;for(var g=0,d=a.length;g<d;g++){if(!a[g].disabled&&a[g].name){b=a[g].name;l=h?encodeURIComponent(XN.FORM.Element.getValue(a[g])):XN.FORM.Element.getValue(a[g]);if(l!==null){if(b in f){if(!isArray(f[b])){f[b]=[f[b]]}f[b].push(l)}else{f[b]=l}}}}if(k=="array"){return f}else{if(k=="string"){return XN.ARRAY.toQueryString(f)}else{if(k=="hash"){var e={};for(var c in f){if(!isFunction(f[c])){e[c]=f[c]}}return e
}}}},getElements:function(d){d=$(d);var e=[];var c=d.getElementsByTagName("*");for(var b=0,a=c.length;b<a;b++){if(!isUndefined(XN.FORM.Element.Serializers[c[b].tagName.toLowerCase()])){e.push(c[b])}}return e}};$F=function(c,b){var a=$(c);if(a.tagName.toLowerCase()=="form"){return XN.FORM.serialize(a,b)}else{return XN.FORM.getValue(a)}};XN.FORM.richTextEditor=function(a,b){this.mode=a;this.id=b;this.init()};XN.FORM.richTextEditor.prototype={mode:null,id:null,init:function(){if(this.mode=="advanced"){tinyMCE.init({theme:"advanced",mode:"exact",width:"618",height:"450",elements:this.id,language:"zh_cn",plugins:"safari,emotions,media",theme_advanced_buttons1:"bold,italic,underline,|,forecolor,backcolor,emotions,|,image,media,changeMode",theme_advanced_buttons2:"fontselect,fontsizeselect,removeformat,justifyleft,justifycenter,bullist,numlist,link,unlink",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_path:false,theme_advanced_statusbar_location:"bottom",theme_advanced_resizing:true,theme_advanced_resize_horizontal:false,theme_advanced_resizing_use_cookie:1,theme_advanced_more_colors:false,theme_advanced_font_sizes:"3,4,5,6,7",theme_advanced_fonts:"楷体_GB2312=楷体_GB2312;黑体=黑体;隶书=隶书;Times New Roman=Times New Roman;Arial=Arial;",invalid_elements:"applet,base,basefont,bgsound,blink,body,embed,frame,frameset,head,html,ilayer,iframe,link,meta,object,script,style",custom_undo_redo:false})
}else{if(mode=="simple"){tinyMCE.init({})}}},save:function(){tinyMCE.get(this.id).save()},focus:function(){tinyMCE.execCommand("mceFocus",false,this.id)},resizeTo:function(a,b){tinyMCE.get(this.id).theme.resizeTo(a,b)},resizeBy:function(a,b){tinyMCE.get(this.id).theme.resizeBy(a,b)},show:function(){tinyMCE.get(this.id).show()},hide:function(){tinyMCE.get(this.id).hide()}};XN.FORM.inputShadow=null;XN.FORM.inputMethods={maxSize:9000,minSize:30,timer:null,countSize:function(b,a,f){var d=this;b=$(b);a=a||999999;if(isUndefined(f)){f=true}var c=this.element;function e(){b.innerHTML=c.value.length+(f?"/"+((a==999999)?"":a):"")}e();XN.EVENT.addEvent(this.element,"focus",e);XN.EVENT.addEvent(this.element,"keyup",function(){setTimeout(function(){var g=c.value;if(g.length>=a){c.value=g.substr(0,a);XN.Element.addClass(b,"full")}else{XN.Element.delClass(b,"full")}e()},0)},false);return this},setDefaultValue:function(a){var b=this.element;a=a||b.value;if(document.activeElement==this.element){b.value=""
}else{b.value=a}b.style.color="#888";XN.EVENT.addEvent(b,"focus",function(){if(b.value==a){b.value="";b.style.color="#333"}},false);XN.EVENT.addEvent(b,"blur",function(){if(b.value==""){b.value=a;b.style.color="#888"}},false);return this},focus:function(c){var b=this.element;if(b.value.length==0){b.focus();return}if(b.setSelectionRange){b.focus();b.setSelectionRange(b.value.length,b.value.length)}else{if(b.createTextRange){var a=b.createTextRange();a.moveStart("character",b.value.length);a.collapse(true);a.select()}else{b.focus()}}},onEnter:function(c){var a=this.element;var b=a.tagName.toLowerCase()=="textarea";XN.EVENT.addEvent(a,"keydown",function(d){d=d||window.event;if(d.keyCode==13){if(b&&!d.ctrlKey){return false}c(a);return false}},false);return this},onEsc:function(b){var a=this.element;XN.EVENT.addEvent(a,"keydown",function(c){c=c||window.event;if(c.keyCode==27){b(a);return false}},false);return this},_autoResize:function(f,b,a){var e=this,c=this.element;this.minSize=b||this.minSize;
this.maxSize=a||this.maxSize;this.type=f;if(XN.FORM.inputShadow===null){var g=$element("div");g.setStyle("position:absolute;left:-99999px;top:-99999px");document.body.appendChild(g);XN.FORM.inputShadow=g}this.shadow=XN.FORM.inputShadow;setTimeout(function(){if(b){return}e.minSize=f=="width"?c.offsetWidth:c.offsetHeight},10);c.style.overflow="hidden";if(XN.BROWSER.IE){c.style.fontSize="12px";c.style.fontFamily="'lucida grande',tahoma,verdana,arial,simsun,sans-serif"}XN.EVENT.addEvent(c,"focus",function(){e.timer=setInterval(e.resize.bind(e),200)});XN.EVENT.addEvent(c,"blur",function(){clearInterval(e.timer);e.timer=null})},resize:function(d){var c=this.element,a=this.shadow,e,b=this.type;a.style.fontSize=c.getStyle("fontSize");a.style.fontFamily=c.getStyle("fontFamily");(b=="width")?a.style.height=c.offsetHeight:a.style.width=c.offsetWidth;a.innerHTML=XN.STRING.escapeHTML(c.value).replace(/\r\n/mg,"<br>").replace(/\r/mg,"<br>").replace(/\n/mg,"<br>");(b=="width")?e=a.offsetWidth:e=a.offsetHeight+27;
if(e>this.minSize&&e<this.maxSize){c.style[b]=e+"px"}else{if(e<this.minSize){c.style[b]=this.minSize+"px"}else{if(e>this.maxSize){c.style[b]=this.maxSize+"px"}}}}};XN.FORM.inputHelper=function(a){this.element=$(a)};XN.FORM.inputHelper.prototype={autoResize:function(b,a){this._autoResize("width",b,a);return this}};$extend(XN.FORM.inputHelper.prototype,XN.FORM.inputMethods);XN.FORM.textAreaHelper=function(a){this.element=$(a)};XN.FORM.textAreaHelper.prototype={element:null,autoResize:function(b,a){this._autoResize("height",b,a);return this}};$extend(XN.FORM.textAreaHelper.prototype,XN.FORM.inputMethods);XN.FORM.Element={getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return XN.FORM.Element.Serializers[b](a)},setValue:function(c,e,d){if(d){c=d[c];if((isElement(c)&&c.tagName.toLowerCase()=="select")){XN.FORM.Element.Serializers.select(c,e)}else{if(isElement(c)){XN.FORM.Element.Serializers[c.tagName.toLowerCase()](c,e)}else{if(c[0]){var f=c[0].tagName.toLowerCase();for(var b=0,a=c.length;
b<a;b++){XN.FORM.Element.Serializers[f](c[b],(e[b]||e||""))}}}}}else{c=$(c);var f=c.tagName.toLowerCase();XN.FORM.Element.Serializers[f](c,e);return c}}};XN.FORM.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case"checkbox":case"radio":return XN.FORM.Element.Serializers.inputSelector(a,b);default:return XN.FORM.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(isUndefined(b)){return a.checked?a.value:null}else{a.checked=!!b}},textarea:function(a,b){if(isUndefined(b)){return a.value}else{a.value=b}},select:function(d,a){if(isUndefined(a)){return this[d.type=="select-one"?"selectOne":"selectMany"](d)}else{var c,f,g=!isArray(a);for(var b=0,e=d.length;b<e;b++){c=d.options[b];f=this.optionValue(c);if(g){if(f==a){c.selected=true;return}}else{c.selected=XN.ARRAY.include(a,f)}}}},selectOne:function(b){var a=b.selectedIndex;return a>=0?this.optionValue(b.options[a]):null},selectMany:function(d){var a=[],e=d.length;if(!e){return null}for(var c=0;c<e;c++){var b=d.options[c];
if(b.selected){a.push(this.optionValue(b))}}return a},optionValue:function(a){return a.value||a.text}};XN.FORM.tipMethods={alert:function(b,a){XN.DO.alert(b,"提示")},div:function(b,a){a.innerHTML=b;XN.Element.show(a)},tip:function(b,a){var c;if(!this.tipElement){c=this.tipElement=new XN.UI.fixPositionElement({tagName:"div",alignType:"2-1",offsetY:-10,offsetX:110})}else{c=this.tipElement}c.addClass("form-tip");if(XN.FORM.alertMethods.tipElement&&XN.FORM.alertMethods.tipElement.isShow){return}c.setContent('<div>										<div class="regbox-t">											<div class="box-outer">												<div class="box-inner">'+b+"</div>											</div>										</div>									</div>");c.moveTo(a);try{$(a.name+"_err").hide()}catch(d){}}};XN.FORM.alertMethods={alert:function(b,a){XN.DO.alert(b,"出错提示","error")},div:function(b,a){try{a.innerHTML='<img height="24" width="18" src="'+XN.ENV.staticRoot+'imgpro/reg/th_ju.gif"/>'+b;XN.Element.show(a);a.show();a.delClass("hide")}catch(c){}},tip:function(b,a){var c;
if(!this.tipElement){c=this.tipElement=new XN.UI.fixPositionElement({tagName:"div",alignType:"2-1",offsetY:-10,offsetX:110});c.hide()}else{c=this.tipElement}c.setContent('<div>										<div class="regbox">											<div class="box-outer">												<div class="box-inner">'+b+"</div>											</div>										</div>									</div>");c.moveTo(a);try{$(a.name+"_err").show();$(a.name+"_err").delClass("hide")}catch(d){}}};XN.FORM._helpTip=null;XN.FORM._errorTip=null;XN.FORM.autoChecker=function(g){var f=this;this.form=$(g.id);if(this.form.autoChecker){return}this.submitBar=$(g.submit)||null;if(this.submitBar){this.submitBar.onclick=function(h){h=h||window.event;XN.EVENT.stop(h);f.submit();return false}}this.checkers=[];var a,d=XN.FORM.getElements(this.form),e;for(var c=0,b=d.length;c<b;c++){e=d[c];if(!e.disabled&&e.name&&e.type!="hidden"){var a=new XN.FORM.elementChecker({id:d[c],checkMethod:(g.checkMethod||"auto"),alertMethod:(g.alertMethod||"alert"),alertDiv:(g.alertDiv||null),tipDiv:(g.tipDiv||null),tipMethod:(g.tipMethod||"div")});
a.form=this.form;a.formControl=this;this.checkers.push(a)}}this.form.autoChecker=true};XN.FORM.autoChecker.prototype={smartSubmit:false,submit:function(){if(this.isAllRight(true,true)){this.form.submit()}},enableSmartSubmit:function(){this.smartSubmit=true},disableSmartSubmit:function(){this.smartSubmit=false},isAllRight:function(b,e){var a=true,f=this.checkers;for(var d=0,c=f.length;d<c;d++){f[d].check(b,e);if(!f[d].passed){a=false;break}}return a},check:function(a){a=a||false;var c=this.checkers;for(var b=c.length-1;b>=0;b--){c[b].check(a)}},_onupdate:function(){if(this.smartSubmit){if(this.submitBar){var a=this.submitBar;if(this.isAllRight()){a.disabled=false;XN.Element.delClass(a,"gray")}else{a.disabled=true;XN.Element.addClass(a,"gray")}}}this.onupdate()},onupdate:function(){}};