var all_js_version="1.24";window.isIE=function(){if(document.frames){return true;}else{return false;}};document.getFrame=function(B){var A;if(document.frames){A=document.frames[B];}else{A=document.getElementById(B).contentWindow;}return A;};var Bbs={init:"",gotopage:function(B,A){var E;if(typeof (event)=="undefined"){var C=(Bbs.gotopage.caller);E=C.arguments[0];}else{E=event;}var D=E.keyCode;if(D!=13){return ;}if(A==""){alert("请输入页码.");return false;}window.location.href=B+"&pageid="+A;},doSearch:function(){var C=document.getElementById("so_keyword").value;var A=document.getElementById("so_nickname").value;var B=document.getElementById("so_range").value;var E=document.getElementById("so_title").checked;if(A=="输入昵称"){A="";}if(C=="输入关键字"){C="";}var D="";if(E){D="title:";}if(C!=""){D=D+C+" ";}if(B!=""){D=D+B+" ";}if(A!=""){D=D+"nickname:"+A;}document.forms.so.q.value=D;return true;},checkLogin:function(){if(BoardConfig.isAllowGuestPostReply()){return true;}if(!BbsCookie.isLogined()){this.showLoginDialog();return false;}else{return true;}},showLoginDialog:function(){Dialog.show("登录网易论坛","/bbs/loginDialog.inc.html",true,true);},showLostDialog:function(){Bbs.loadDwr();Dialog.show("帖子丢失处理","/bbs/lostDialog.inc.html",true,true);},postArticle:function(A){if(!BbsCookie.isLogined()&&!BoardConfig.isAllowGuestPostThread()){this.showLoginDialog();}else{window.location.href="/bbs/post.jsp?boardid="+A;}},editArticle:function(B,C,A){if(!C){return this.editReply(B,A);}if(!BbsCookie.isLogined()){this.showLoginDialog();}else{window.location.href="/bbs/post.jsp?boardid="+B+"&articleid="+A;}},editReply:function(B,A){if(!BbsCookie.isLogined()){this.showLoginDialog();}else{BbsAdmin.showDialog("编辑回复","/bbs/dialog/reply_post.jsp?boardid="+B+"&articleid="+A);Dialog.setWidth(600);}},logout:function(){var A="/bbs/user/logout.jsp?url=null";new Ajax.Request(A,{method:"get",requestHeaders:["If-Modified-Since","0"],onComplete:function(C){try{Userinfo.reloadUserinfo();webPopoLogout();BbsBoardAdmin.delCookie();}catch(B){}window.location.reload();}});},checkDwr:function(){if(typeof (Dwr)=="undefined"){}},loadDwr:function(){if(1==1){return ;}if(typeof (Dwr)=="undefined"){this.loadJs("http://bbs.163.com/bbs/dwrinterfaceDwr.js");this.loadJs("http://bbs.163.com/bbs/dwrengine.js");this.loadJs("http://bbs.163.com/bbs/dwrutil.js");}},loadJs:function(B){var A=document.createElement("script");A.src=B;if(document.frames){document.body.insertAdjacentElement("BeforeBegin",A);}else{document.body.appendChild(A);}},loadCss:function(A){var B=document.getElementsByTagName("HEAD").item(0);var C=document.createElement("link");C.href=A;C.rel="stylesheet";C.type="text/css";B.appendChild(C);},showMessage:function(A){if(typeof (A)=="undefined"){A=1;}BbsAdmin.showDialog("我的纸条","/bbs/dialog/msg_list.jsp?pageid="+A);Dialog.setWidth(600);if(A==1){Userinfo.reloadUserinfo();}},sendMessage:function(A){if(typeof (A)=="undefined"){A="";}BbsAdmin.showDialog("发送纸条","/bbs/dialog/msg_write.jsp?userid="+A);},delMessage:function(A,B){Dwr.delMessage(B,function(C){if(C!=null&&typeof C=="object"){alert(dwr.util.toDescriptiveString(C,2));}else{Bbs.showMessage(A);}});},getChannel:function(){var A=window.location.host.replace(/(.*?)([a-z0-9]+)\.163\.com/gi,"$2");if("bbs"==A){A="news";}else{if("money"==A){A="stock";}}return A;}};var Thread={init:"",sleeping:false,ok:function(){document.title="sleep:ok";this.sleeping=true;var A=(this.arguments.length);if(A==0){Thread.func();}else{if(A==1){Thread.func(this.arguments[0]);}else{if(A==2){Thread.func(this.arguments[0],this.arguments[1]);}else{if(A==3){Thread.func(this.arguments[0],this.arguments[1],this.arguments[2]);}else{alert("使用sleep不能超过3个参数");}}}}Thread.func=null;},func:null,"arguments":null,sleep:function(A){document.title="sleep:"+A;if(this.sleeping){this.sleeping=false;return false;}else{this.sleeping=true;}this.func=this.sleep.caller;this.arguments=this.func.arguments;setTimeout("Thread.ok()",A);return true;}};var BbsUtil={init:"",showLoginButton:function(){var C="";if(BbsCookie.isLogined()){C+=('<span style="line-height:24px">');C+=(' <a href="javascript:BbsBoardAdmin.checkMaster()" id="boardadmin">管理模式</a>');C+=' <a href="/bbs/list.jsp?boardid='+global_boardid+"&plugin=y&username="+BbsCookie.getPassport()+'" title="我在当前版面发表的帖子">我的帖子</a> ';var A=Userinfo.getMessageCount();if(A>0){var B=18;var F=-30;if(!window.isIE()){B=0;F=90;}C+=('<div style="position:absolute"><div style="height:20px;width:120px;position:relative;left:'+F+"px;top:"+B+'px;background-color:#FFFFE1;border:1px solid #858585;color:#333333;font-size:13px;padding:1px;text-align:center;"><a href="javascript:Bbs.showMessage()">您有<strong>'+A+"</strong>条新纸条</a></div></div>");}C+=(' <a href="javascript:Bbs.showMessage()">查看纸条('+A+")</a>");C+=(' <a href="javascript:Bbs.logout()">退出</a></span>');}else{C+=('<a href="javascript:Bbs.showLoginDialog()"><img src="/bbs/img07/btbg02.gif" width="87" height="22" alt="登录论坛" /></a>');}var E=document.getElementById("myLoginButton");E.innerHTML=C;try{BbsBoardAdmin.load();}catch(D){}},showLoginInfo:function(){var D=document.getElementById("myLoginInfo");if(D==null){return this.showLoginButton();}var C="";if(BbsCookie.isLogined()){C+=('<a class="cRed">'+Userinfo.getNickname()+"</a> 欢迎来到网易！");var A=Userinfo.getMessageCount();if(A>0){var B=18;var E=-30;if(!window.isIE()){B=0;E=90;}C+=('<div style="position:absolute"><div style="height:14px;width:120px;position:relative;left:'+E+"px;top:"+B+'px;background-color:#FFFFE1;border:1px solid #858585;color:#333333;font-size:13px;padding:3px;text-align:center;"><a href="javascript:Bbs.showMessage()" style="text-decoration:none;color:#000">您有<strong>'+A+"</strong>条新纸条</a></div></div>");}C+=('<span id="mymsg">您有<a href="javascript:Bbs.showMessage()" class="cRed">'+A+"</a>个未读纸条 </span>");C+=('<a href="javascript:Bbs.logout()" class="c1">安全退出</a>');}else{C+=('<a class="cRed">游客</a> 欢迎来到网易！请先<a href="javascript:Bbs.showLoginDialog()" class="c1">登陆</a>');}D.innerHTML=C;},copyText:function(B){try{clipboardData.setData("Text",B);}catch(A){alert("“复制到剪贴板功能”还不兼容您使用的浏览器.");}},format:function(B){var A="\n"+B.value;A=A.replace(/ |　/ig,"");A=A.replace(/\r\n/ig,"\n");A=A.replace(/\n\n/ig,"\n");A=A.replace(/\n\n/ig,"\n");A=A.replace(/\n\n/ig,"\n");A=A.replace(/\n\n/ig,"\n");A=A.replace(/\n/ig,"\n\n　　");A=A.replace("\n\n","");B.value=A;},reloadCode:function(){document.getElementById("imgcheckcode").src="/bbs/checkcode.jsp?"+(new Date().getTime());},loadCheckcode:function(C){var B=document.forms.frmpost;var A=B.checkcode;if(typeof (A)=="object"){if(A.value==""){this.reloadCheckcode();}}},reloadCheckcode:function(A){if(typeof (A)=="undefined"){A="imgcheckcode";}document.getElementById(A).src="http://guba.money.163.com/bbs/checkcode.jsp?"+(new Date().getTime());return false;},checkReplyPost:function(){var D=document.forms.frmpost;if(D.content.value==""){alert("回复内容不能为空.");D.content.focus();return false;}if(1==1){var C=D.checkcode;if(typeof (C)=="object"){if(C.value==""){alert("验证码还没有输入.");C.focus();return false;}if(C.value.length!=4){alert("验证码的位数不对哦.");C.focus();return false;}}else{var A;if(BbsCookie.isLogined()){A=this.isWantVerify();}else{A="您是匿名发帖，需要输入验证码.";}if(A!=""){var B='<div>验证码:<a href="javascript:BbsUtil.reloadCode();"><img id="imgcheckcode" src="/bbs/checkcode.jsp" alt="单击图片更换验证码"/></a>:<input type="text" size="6" name="checkcode" value="" class="input007" maxlength="4"/>,您发表回复需要输入验证码。<br/>(<font color="#ff0000">'+A+"</font>)</div>";new Insertion.Before("frmpost_upload",B);D.checkcode.focus();return false;}}}document.getElementById("btnSubmit").style.visibility="hidden";},isWantVerify:function(){DWREngine.setAsync(false);var A="";Dwr.isWantVerify(global_boardid,function(C){var B=(dwr.util.toDescriptiveString(C,1));A=B;});DWREngine.setAsync(true);return A;},isChecked:function(A){if(typeof (A.length)=="undefined"){return A.checked;}for(var B=0;B<A.length;B++){if(A[B].checked){return true;}}return false;},getRadioValue:function(F,B){var D=document.forms[F];var A=D[B];var E=null;for(var C=0;C<A.length;C++){if(A[C].checked){E=A[C].value;}}return E;},getValues:function(G,D){var F=document.forms[G];var A=F[D];var B=new Array();var C=-1;for(var E=0;E<A.length;E++){if(A[E].type=="checkbox"||A[E].type=="radio"){if(A[E].checked){C++;B[C]=A[E].value;}}else{C++;B[C]=A[E].value;}}return B;},addFavorite:function(){window.external.addFavorite(document.location.href,document.title);},inputFocus:function(A){if(A.title==""){A.title=A.value;A.onfocus=function(){if(this.value==this.title){this.value="";}};A.onblur=function(){if(this.value==""){this.value=this.title;}};}A.value="";},getBoardName:function(B){DWREngine.setAsync(false);var A=null;Dwr.getBoardName(B,function(D){if(D!=null&&typeof D=="object"){alert(dwr.util.toDescriptiveString(D,2));}else{var C=(dwr.util.toDescriptiveString(D,1));A=C;}});DWREngine.setAsync(true);return A;}};var Userinfo={init:"",userinfo:null,getUrl:function(){var A="/bbs/dialog/userinfo.jsp?username="+BbsCookie.getPassport();return A;},loadUserinfo:function(){if(this.userinfo==null){Bbs.loadJs(this.getUrl());}},reloadUserinfo:function(){this.userinfo=null;var A=this.getUrl();new Ajax.Request(A,{method:"get",requestHeaders:["If-Modified-Since","0"],onComplete:function(B){Userinfo.loadUserinfo();}});},removeUserinfo:function(){this.userinfo=null;var A=this.getUrl();new Ajax.Request(A,{method:"get",requestHeaders:["If-Modified-Since","0"],onComplete:function(B){}});},getUserinfo:function(){if(this.userinfo==null){return{};}else{return this.userinfo;}},setUserinfo:function(A){this.userinfo=A;},getNickname:function(){var A=this.getUserinfo().nickname;if(A==null||A==""){A=BbsCookie.getPassport();}return A;},getMessageCount:function(){var A=this.getUserinfo().messageCount;if(A==null||A==""){return"0";}else{return A;}}};var Editor={init:"",dopost:function(){if(1==1){try{var A=plugin_submit_before();if(A==false){return false;}}catch(C){}}if(this.validate()==false){return false;}else{try{var A=plugin_submit();if(A==false){return false;}}catch(C){}var B=this.getForm();if(B.isautocopy.checked){BbsUtil.copyText(B.content.value);}document.getElementById("btnSubmit").style.visibility="hidden";return true;}},getForm:function(){return document.forms.frmpost;},getContentObject:function(){return document.forms.frmpost.content;},validate:function(){var C=this.getForm();if(1==1){var B=(document.forms.frmpost.cid);if(typeof (B)=="object"){if(!BbsUtil.isChecked(B)){alert("您还未选择帖子的类别,请在帖子标题下方选择.");return false;}}}if(C.title.value==""){alert("随便在标题框输入点什么吧.");C.title.focus();return false;}if(C.content.value==""){alert("发贴不能不填内容的哦,^_^");C.content.focus();return false;}if(1==1){var A=C.checkcode;if(typeof (A)=="object"){if(A.value==""){alert("验证码还没有输入.");A.focus();return false;}if(A.value.length!=4){alert("验证码的位数不对哦.");A.focus();return false;}}}},insertFace:function(A){this.inertContent("[face]"+A+"[/face]");},showFaceDialog:function(){Dialog.show("插入表情","/bbs/dialog/face.jsp",false,false);},inertContent:function(A){if(A==null||A==""){alert("没有需要添加的内容！");return ;}this.getForm().content.value+=A;},openme:function(A){A.style.background="#CCCCCC";},closeme:function(A){A.style.background="";},focus:function(){this.getForm().content.focus();},onBold:function(){this.focus();var A=document.selection.createRange();if(A.text){A.text="[b]"+A.text+"[/b]";}else{alert("请在内容框选中要加粗的文字，要不我不知道该做什么.");}},onItalic:function(){this.focus();var A=document.selection.createRange();if(A.text){A.text="[i]"+A.text+"[/i]";}else{alert("请在内容框选中要倾斜的文字，要不我不知道该做什么.!");}},onUnderline:function(){this.focus();var A=document.selection.createRange();if(A.text){A.text="[u]"+A.text+"[/u]";}else{alert("请在内容框选中要加下划线的文字，要不我不知道该做什么.!");}},insertHyperLink:function(){var B=prompt("请输入超链接地址):","http://");if((B!=null)&&(B!="http://")){this.focus();var A=document.selection.createRange();if(A.text){A.text='[url="'+B+'"]'+A.text+"[/url]";}else{this.getForm().content.value=this.getForm().content.value+"[url]"+B+"[/url]";}}},insertImg:function(){var A=this.getForm();if(A.insertimg.value==""){alert("请填写图片地址！");return ;}A.content.value=A.content.value+"\n[img]"+A.insertimg.value+"[/img]\n";A.insertimg.value="";},insertImage:function(){var A=prompt("输入图片的超链接):","http://");if((A!=null)&&(A!="http://")){var B=this.getContentObject();B.value=B.value+"\n[img]"+A+"[/img]\n";}},insertMedia:function(){if(!BbsCookie.isLogined()){alert("您还没有登录，请先登录.");return ;}BbsAdmin.showDialog("插入视频","/bbs/dialog/insert_media.jsp?boardid="+global_boardid);},insertRm:function(){if(!BbsCookie.isLogined()){alert("您还没有登录，请先登录.");return ;}BbsAdmin.showDialog("插入视频","/bbs/dialog/insert_rm.jsp?boardid="+global_boardid);},insertVote:function(){if(!BbsCookie.isLogined()){alert("您还没有登录，请先登录.");return ;}var D=0;if(1==1){var C=this.getForm().content.value;var B=/\[plugin:vote\]([0-9]+)\[\/plugin:vote\]/gi;var A=new RegExp(B).exec(C);if(A!=null){D=parseInt(A[1]);}}if(D<=0){BbsAdmin.showDialog("插入投票","/bbs/plugin/vote_post.jsp?boardid="+global_boardid);}else{BbsAdmin.showDialog("修改投票","/bbs/plugin/vote_post.jsp?boardid="+global_boardid+"&id="+D);}Dialog.setWidth(460);},insertHtml:function(){if(!BbsCookie.isLogined()){alert("您还没有登录，请先登录.");return ;}var D=0;if(1==1){var C=this.getForm().content.value;var B=/\[plugin:html\]([0-9]+)\[\/plugin:html\]/gi;var A=new RegExp(B).exec(C);if(A!=null){D=parseInt(A[1]);}}if(D<=0){BbsAdmin.showDialog("插入HTML","/bbs/plugin/html_post.jsp?boardid="+global_boardid);}else{BbsAdmin.showDialog("修改HTML","/bbs/plugin/html_post.jsp?boardid="+global_boardid+"&id="+D);}Dialog.setWidth(600);},html2ubb:function(A){A=A.replace(/\r/g,"");A=A.replace(/on(load|click|dbclick|mouseover|mousedown|mouseup)="[^"]+"/ig,"");A=A.replace(/<script[^>]*?>([\w\W]*?)<\/script>/ig,"");A=A.replace(/<a[^>]+href="([^"]+)"[^>]*>(.*?)<\/a>/ig,'\n[url="$1"]$2[/url]\n');A=A.replace(/<font[^>]+color=([^ >]+)[^>]*>(.*?)<\/font>/ig,'\n[color="$1"]$2[/color]\n');A=A.replace(/<img[^>]+src="([^"]+)"[^>]*>/ig,"\n[img]$1[/img]\n");A=A.replace(/<([\/]?)b>/ig,"[$1b]");A=A.replace(/<([\/]?)strong>/ig,"[$1b]");A=A.replace(/<([\/]?)u>/ig,"[$1u]");A=A.replace(/<([\/]?)i>/ig,"[$1i]");A=A.replace(/&nbsp;/g," ");A=A.replace(/&amp;/g,"&");A=A.replace(/&quot;/g,'"');A=A.replace(/&lt;/g,"<");A=A.replace(/&gt;/g,">");A=A.replace(/<br>/ig,"\n");A=A.replace(/<[^>]*?>/g,"");A=A.replace(/\[url=([^\]]+)\]\n(\[img\]\1\[\/img\])\n\[\/url\]/g,"$2");A=A.replace(/\n+/g,"\n");return A;},paste:function(){if(!window.isIE()){alert("该功能只能在IE下使用.");return ;}var B=document.getFrame("rtf");B.focus();B.document.body.innerHTML="";B.document.execCommand("paste");var C=B.document.body.innerHTML;if(C.length==0){alert("剪切版不存在超文本数据！");return"";}var A=this.html2ubb(C);this.inertContent(A);},initPaste:function(){if(window.isIE()){document.getFrame("rtf").document.designMode="On";document.getElementById("rtf").style.display="";document.getElementById("btnPaste").style.display="";}},isEditing:function(){var A=parseInt(this.getForm()["articleid"].value);return(A>0);},voteChangeOptions:function(){var D=document.forms.frminsertvote;var A=D.num.value;var E=$("vote_options");var C=E.childNodes.length;if(A>=100){alert("选项数量最大99个.");return ;}else{if(A<2){alert("选项数量最小2个.");return ;}}if(A<C){if(!confirm("选项里的内容会被删除，提交后将永久被删除，是否确认减少选项操作？")){return ;}for(var B=C;B>A;B--){this.voteDelOptions();}}else{for(var B=C;B<A;B++){this.voteAddOptions();}}},voteAddOptions:function(){var D=$("vote_options");var A=D.childNodes;var B=A.length+1;var C="<li>选项"+(B<10?"0"+B:B)+'：<input name="options" size="48" type="text" value=""/></li>';new Insertion.Bottom("vote_options",C);},voteDelOptions:function(){var C=$("vote_options");var A=C.childNodes;var B=A.length-1;C.removeChild(A[B]);}};var BbsCookie={init:"",getValue:function(A){},getCookieValue:function(B){var A=document.cookie.indexOf(";",B);if(A==-1){A=document.cookie.length;}return unescape(document.cookie.substring(B,A));},getCookie:function(D){var B=D+"=";var F=B.length;var A=document.cookie.length;var E=0;while(E<A){var C=E+F;if(document.cookie.substring(E,C)==B){return this.getCookieValue(C);}E=document.cookie.indexOf(" ",E)+1;if(E==0){break;}}return null;},getExpires:function(B){var A=new Date();A.setTime(A.getTime()+B);return A;},deleteCookie:function(A){this.setCookie(A,"",0);},setCookie:function(B,C,A){var C=B+"="+escape(C)+"; domain=163.com";if(A>0){C+=" expires="+this.getExpires(A).toGMTString();}document.cookie=C;},getPassport:function(){var A=this.getCookie("P_INFO");if(A==null||(A=A.split("|")[0])==null){return"";}else{if(A.length>8&&A.substr(A.length-8)=="@163.com"){A=A.substr(0,A.length-8);}return A;}},isLogined:function(){var B=BbsCookie.getCookie("NTES_SESS");var A=(B!=null&&B!="");return A;}};var BbsAdmin={init:"",showDialog:function(B,A){Bbs.loadDwr();if(!BbsCookie.isLogined()){Bbs.showLoginDialog();}else{Dialog.show(B,A,false,false);}},showIP:function(B,A){this.showDialog("查看IP","/bbs/dialog/showip.jsp?boardid="+B+"&articleid="+A);},topThread:function(B,A){this.showDialog("置顶帖子","/bbs/dialog/topthread.jsp?boardid="+B+"&threadid="+A);},pushThread:function(B,A){this.showDialog("推荐帖子","/bbs/dialog/pushthread.jsp?boardid="+B+"&threadid="+A);},eliteThread:function(B,A){this.showDialog("帖子加精华","/bbs/dialog/elitethread.jsp?boardid="+B+"&threadid="+A);},lockThread:function(B,A){this.showDialog("帖子加锁","/bbs/dialog/lockthread.jsp?boardid="+B+"&threadid="+A);},rubbishThread:function(B,A){this.showDialog("垃圾帖子","/bbs/dialog/rubbishthread.jsp?boardid="+B+"&threadid="+A);},reply:function(F,E,D,A){if(!Bbs.checkLogin()){return ;}if($("div_reply").style.display=="none"){alert("当前帖子不允许发表评论.");return ;}var C="【回复";if(D>0){C+=D+"楼";}C+=" "+A+" 】:\n";$("frmpost_toolbar").style.display="block";$("frmpost_upload").style.display="block";var B=document.getFrame("frmupload");if(typeof (B)=="object"){B.setUploadBoardid(global_boardid);}document.forms.frmpost.content.focus();document.forms.frmpost.content.value=C;document.documentElement.scrollTop=600000;},quoteReply:function(C,B){if($("div_reply").style.display=="none"){alert("当前帖子不允许发表评论.");return ;}if(!Bbs.checkLogin()){return ;}var A="/bbs/dialog/quotereply.jsp?boardid="+C+"&articleid="+B;new Ajax.Request(A,{onComplete:function(E){var D=(E.responseText);if(E.status==200){$("frmpost_toolbar").style.display="block";$("frmpost_upload").style.display="block";document.forms.frmpost.content.focus();document.forms.frmpost.content.value=D;document.documentElement.scrollTop=600000;}else{alert("请求出错.");}}});},sayGood:function(B,A){Dwr.sayGood(B,A,function(C){if(C!=null&&typeof C=="object"){alert(dwr.util.toDescriptiveString(C,2));}else{alert(dwr.util.toDescriptiveString(C,1));var D=document.getElementById("text"+A+"_goodnum");D.innerHTML=parseInt(D.innerHTML)+1;}});},sayBad:function(B,A){Dwr.sayBad(B,A,function(C){if(C!=null&&typeof C=="object"){alert(dwr.util.toDescriptiveString(C,2));}else{alert(dwr.util.toDescriptiveString(C,1));var D=document.getElementById("text"+A+"_badnum");D.innerHTML=parseInt(D.innerHTML)+1;}});},delPost:function(B,A){this.showDialog("删除帖子","/bbs/dialog/delpost.jsp?boardid="+B+"&articleid="+A);},addBlackList:function(A,B){this.showDialog("加黑名单","/bbs/dialog/addblacklist.jsp?boardid="+A+"&username="+B);},chargePost:function(C,A,B){this.showDialog("投诉帖子","/bbs/dialog/chargepost.jsp?boardid="+C+"&articleid="+A+"&floor="+B);},copyThread:function(B,A){this.showDialog("复制主贴","/bbs/dialog/copythread.jsp?boardid="+B+"&threadid="+A);}};var BbsAdminButton={init:"",articleid:0,show:function(A){this.articleid=A;var B=$("admin_"+A);B.style.display="block";B.onmouseout=BbsAdminButton.closeOut;B.onmouseover=BbsAdminButton.closeOver;},curShow:null,closeOut:function(){this.curShow=setTimeout("BbsAdminButton.close()",100);},closeOver:function(){clearTimeout(this.curShow);},close:function(){var A=$("admin_"+this.articleid);A.style.display="none";}};var Nav={init:function(){if(document.body.offsetWidth<800){Nav.close();}else{if(BbsCookie.getCookie("shownav")=="false"){Nav.close();}}},close:function(){var A=document.getElementById("switchPoint");A.alt="展开左侧导航栏";A.src="/bbs/images/nav_middle_show.gif";document.getElementById("frmTitle").style.display="none";BbsCookie.setCookie("shownav","false",0);},open:function(){var A=document.getElementById("switchPoint");A.alt="收起左侧导航栏";A.src="/bbs/images/nav_middle_hide.gif";document.getElementById("frmTitle").style.display="";BbsCookie.setCookie("shownav","true",0);},isOpen:function(){var A=document.getElementById("switchPoint");return(A.alt=="收起左侧导航栏");},switchSysBar:function(){if(this.isOpen()){this.close();}else{this.open();}},show:function(){BbsCookie.setCookie("nav_show","y",-1);},hide:function(){BbsCookie.setCookie("nav_show","n",-1);},isHidden:function(){return(("n"==BbsCookie.getCookie("nav_show")));}};var BbsPlugin={init:""};var MyXml={init:"",getValue:function(B,A){return B.getElementsByTagName(A)[0].firstChild.data;}};String.prototype.isDigit=function(){var A=/^([0-9])+$/;if(A.exec(this)){return true;}return false;};function inertContent(A){Editor.inertContent(A);}var Version={init:"",check:function(){try{if(typeof (js_version)=="string"){if(js_version!=all_js_version){this.autoReload();}}}catch(A){}},autoReload:function(){var A=document.createElement("FRAME");A.src="http://bbs.163.com/bbs/other/reload_js.jsp";if(document.frames){document.body.insertAdjacentElement("BeforeBegin",A);}else{document.body.appendChild(A);}},checkLastReply:function(B,A){if(1==1){return ;}DwrAlarm.checkLastReply(global_boardid,B,A,function(C){});}};var BbsBoardAdmin={init:"",load:function(){if(this.getMode()=="admin"){this.showCheckBox();return ;}},getList:function(){var B=$("articleRows").getElementsByTagName("input");if(B==null||typeof (B)=="undefined"||B.length==0){return null;}else{var C=[];for(var A=0;A<B.length;A++){if(B[A].type=="checkbox"&&B[A].className=="admin"){C.push(Element.extend(B[A]));}}if(C.length==0){return null;}return C;}},checkMaster:function(){if(!BbsCookie.isLogined()){Bbs.showLoginDialog();return ;}if(this.getMode()=="user"){this.showCheckBox();return ;}else{if(this.getMode()=="admin"){this.hideCheckBox();return ;}else{if(this.isMaster()){this.showCheckBox();}else{alert("您不是版主，不能使用管理模式.");return ;}}}},isMaster:function(){var A=false;DWREngine.setAsync(false);DwrBoardAdmin.isBoardAdmin(global_boardid,function(B){A=B;});DWREngine.setAsync(true);return A;},setMode:function(A){var B="y";if(!A){B="n";}BbsCookie.setCookie("admin_mode",B,0);},getMode:function(){var A=BbsCookie.getCookie("admin_mode");if(A=="y"){return"admin";}else{if(A=="n"){return"normal";}else{return"";}}},delCookie:function(){BbsCookie.setCookie("admin_mode","",0);},showCheckBox:function(){var B=this.getList();if(B!=null){for(var A=0;A<B.length;A++){B[A].style.display="";}}var C=$("boardadmin");C.style.display="";C.innerHTML="正常模式";C.href="javascript:BbsBoardAdmin.hideCheckBox()";this.showAdminButton();},hideCheckBox:function(){var B=this.getList();if(B!=null){for(var A=0;A<B.length;A++){B[A].style.display="none";}}var C=$("boardadmin");C.style.display="";C.innerHTML="管理模式";C.href="javascript:BbsBoardAdmin.showCheckBox()";this.hideAdminButton();},showAdminButton:function(){var C=document.getElementById("adminButton");var B=document.getElementById("adminButton_top");var A='<div style="text-align:left">';A+='<input  type="button" onclick="javascript:BbsBoardAdmin.delArticles();" value="删除"/>';A+='<input type="button" onclick="javascript:BbsBoardAdmin.selectAll();" value="全选" />';A+='<input type="button" onclick="javascript:BbsBoardAdmin.reverse();" value="反向选择" />';A+="</div>";C.innerHTML=A;B.innerHTML=A;C.style.display="";B.style.display="";this.setMode(true);},hideAdminButton:function(){var B=document.getElementById("adminButton");var A=document.getElementById("adminButton_top");B.style.display="none";A.style.display="none";this.setMode(false);},selectAll:function(){var A=this.getList();for(var B=0;B<A.length;B++){A[B].checked=true;}},reverse:function(){var A=this.getList();for(var B=0;B<A.length;B++){A[B].checked=!A[B].checked;}},delArticles:function(){if(!window.confirm("是否确认删除")){return false;}var D=new Array();var C=this.getList();if(C==null){alert("当前列表没有帖子");return ;}var A=0;for(var B=0;B<C.length;B++){if(C[B].className=="admin"&&C[B].checked){D[A]=C[B].value;A++;}}if(D==null||D.length==0){alert("您没有选中要删除的帖子.");return ;}DwrBoardAdmin.delArticle(D,function(H){var G=BbsBoardAdmin.getList();var E=H.split(", ");for(var F=0;F<E.length;F++){if(E[F]!=null&&E[F].length>0){BbsBoardAdmin.displayArticle(G,E[F]);}}G=BbsBoardAdmin.getList();if(G==null){window.location.reload();}});},displayArticle:function(C,A){for(var B=0;B<C.length;B++){if(C[B].value.indexOf("/"+A)>0){var E=C[B].parentNode.parentNode;try{E.style.display="none";E.outerHTML="";}catch(D){E.innerHTML="";}}}}};var ChangeSelect={init:"",load:function(A,C,B,D){new Ajax.Request(C,{method:"GET",onSuccess:function(K){var H=K.responseXML;if(H==null){return ;}var F=H.getElementsByTagName("row");DWRUtil.removeAllOptions(A);var J=D!=null&&typeof (D)!="undefined";if(J){A.add(D);}var E=0;for(i=0;i<F.length;i++){var I=F[i];var L=MyXml.getValue(I,"id");var G=MyXml.getValue(I,"name");A.add(new Option(G,L));if(B==L){if(J){E=i+1;}else{E=i;}}}A.selectedIndex=E;}});}};var Drag={obj:null,init:function(A,B){A.onmousedown=Drag.start;A.root=B;if(isNaN(parseInt(A.root.style.left))){A.root.style.left="0px";}if(isNaN(parseInt(A.root.style.top))){A.root.style.top="0px";}A.root.onDragStart=new Function();A.root.onDragEnd=new Function();A.root.onDrag=new Function();},start:function(B){var A=Drag.obj=this;B=Drag.fixE(B);var D=parseInt(A.root.style.top);var C=parseInt(A.root.style.left);A.root.onDragStart(C,D,B.clientX,B.clientY);A.lastMouseX=B.clientX;A.lastMouseY=B.clientY;document.onmousemove=Drag.drag;document.onmouseup=Drag.end;return false;},drag:function(B){B=Drag.fixE(B);var A=Drag.obj;var H=B.clientY;var G=B.clientX;var F=parseInt(A.root.style.top);var E=parseInt(A.root.style.left);var C,D;C=E+G-A.lastMouseX;D=F+H-A.lastMouseY;A.root.style.left=C+"px";A.root.style.top=D+"px";A.lastMouseX=G;A.lastMouseY=H;A.root.onDrag(C,D,B.clientX,B.clientY);return false;},end:function(){document.onmousemove=null;document.onmouseup=null;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style.left),parseInt(Drag.obj.root.style.top));Drag.obj=null;},fixE:function(A){if(typeof A=="undefined"){A=window.event;}if(typeof A.layerX=="undefined"){A.layerX=A.offsetX;}if(typeof A.layerY=="undefined"){A.layerY=A.offsetY;}return A;}};Object.printAll=function(B){var C="";var A=0;for(dd in B){C+=dd+"  ";if((A+1)%5==0){C+="\n";}A++;}alert(C);};var Dialog={init:"",dialogBox:null,defWidth:400,width:0,show:function(D,B,C,A){if(this.dialogBox==null){this.create();}this.setWidth(this.defWidth);this.dialogBox.style.display="block";this.setTitle(D);this.loading=setTimeout("Dialog.setLoading()",200);Drag.init(document.getElementById("draghead"),this.dialogBox);this.dialogBox.onDragEnd=function(E,F){Dialog.dialogBox.ox=E-Dialog.getRange().left;Dialog.dialogBox.oy=F-Dialog.getRange().top;};this.center();this.loadContent(B,C,A);},setWidth:function(A){if(A!=this.width){this.width=A;this.dialogBox.style.width=A+"px";this.center();}},loading:null,setLoading:function(){this.setContent("数据加载中...");},clearLoading:function(){if(this.loading!=null){clearTimeout(this.loading);this.loading=null;}},loadContent:function(B,C,A){var D="?"+(new Date().getTime());new Ajax.Request(B,{method:"post",onComplete:function(E){Dialog.clearLoading();$("dialogBox_content").innerHTML=(E.responseText);if(C){Dialog.loadCss(B+".css");}if(A){Dialog.loadJs(B+".js");}}});},setContent:function(A){document.getElementById("dialogBox_content").innerHTML="<div class='dialogBox_Content'>"+A+"</div>";},close:function(){if(this.dialogBox!=null){this.dialogBox.style.display="none";}},setTitle:function(A){document.getElementById("dialogBox_title").innerHTML=A;},create:function(){this.loadCss("http://bbs.ent.163.com/bbs/dialog/dialog.css");var A=document.createElement("DIV");A.id="dialogBox";A.className="dialogBoxBg";var B='<div class="dialogBox" style="cursor:pointer"><div id="draghead" class="title"><h2 id="dialogBox_title"></h2><span><a href="javascript:Dialog.close()"><img src="http://cimg2.163.com/dl/bbs/login01_div.gif" style="cursor:pointer" height="18" width="49" border="0" alt="关闭窗口" /></a></span></div><div class="content" id="dialogBox_content"></div></div>';A.innerHTML=B;document.body.appendChild(A);this.dialogBox=document.getElementById("dialogBox");this.center();window.onscroll=Dialog.onBodyScroll;},loadCss:function(A){var B=document.getElementsByTagName("HEAD").item(0);var C=document.createElement("link");C.href=A;C.rel="stylesheet";C.type="text/css";B.appendChild(C);},loadJs:function(B){var A=document.getElementById("js1");if(A==null){A=document.createElement("script");}A.id="js1";A.src=B;if(document.frames){document.body.insertAdjacentElement("BeforeBegin",A);}else{document.body.appendChild(A);}},onBodyScroll:function(){var A=Dialog.getRange();var C=(A.top+Dialog.dialogBox.oy);var B=(A.left+Dialog.dialogBox.ox);if(C<5){C=5;}if(B<5){B=5;}Dialog.dialogBox.style.top=C+"px";Dialog.dialogBox.style.left=B+"px";},center:function(){var A=Dialog.getRange();var C=(A.width-this.width)/2;var B=(A.height-400)/2;this.dialogBox.ox=C;this.dialogBox.oy=B;if(A.left>C){C=A.left+C;}if(A.top>B){B=A.top+B;}this.dialogBox.style.left=C+"px";this.dialogBox.style.top=B+"px";},move:function(B,A){this.dialogBox.ox=B;this.dialogBox.oy=A;this.dialogBox.style.left=B+"px";this.dialogBox.style.top=A+"px";},getRange:function(){var D=document.documentElement.scrollTop;var C=document.documentElement.scrollLeft;var A=document.documentElement.clientHeight;var B=document.documentElement.clientWidth;if(D==0&&C==0&&A==0&&B==0){D=document.body.scrollTop;C=document.body.scrollLeft;A=document.body.clientHeight;B=document.body.clientWidth;}return{top:D,left:C,height:A,width:B};}};var Request={init:"",getParameter:function(B){var A=document.location.href;var G=A.indexOf("?")+1;if(G==0){return"";}var E="";var F=A.substring(G);var D=F.split("&");for(var C=0;C<D.length;C++){if(B==this.getParameterName(D[C])){E=this.getParameterValue(D[C]);}}return E;},getParameterName:function(A){var B=A.indexOf("=");if(B==-1){return A;}return A.substring(0,B);},getParameterValue:function(A){var B=A.indexOf("=");if(B==-1){return"";}return A.substring(B+1);}};if(dwr==null){var dwr={};}if(dwr.engine==null){dwr.engine={};}if(DWREngine==null){var DWREngine=dwr.engine;}if(DwrSystemAdmin==null){var DwrSystemAdmin={};}DwrSystemAdmin._path="/bbs/dwr/";DwrSystemAdmin.main=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","main",B,A);};DwrSystemAdmin.isEditor=function(A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","isEditor",false,A);};DwrSystemAdmin.boardClose=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","boardClose",B,false,A);};DwrSystemAdmin.boardAudit=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","boardAudit",B,false,A);};DwrSystemAdmin.boardReplyAudit=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","boardReplyAudit",B,false,A);};DwrSystemAdmin.updateDirectory=function(D,B,A,C){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","updateDirectory",D,B,A,false,C);};DwrSystemAdmin.delDirectory=function(C,A,B){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","delDirectory",C,A,false,B);};DwrSystemAdmin.addMaster=function(C,A,B){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","addMaster",C,A,false,B);};DwrSystemAdmin.delMaster=function(C,A,B){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","delMaster",C,A,false,B);};DwrSystemAdmin.moveMaster=function(D,B,A,C){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","moveMaster",D,B,A,false,C);};DwrSystemAdmin.updateMasterHtml=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","updateMasterHtml",B,false,A);};DwrSystemAdmin.auditArticle=function(D,B,A,C){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","auditArticle",D,B,A,false,C);};DwrSystemAdmin.allAuditArticle=function(D,B,A,C){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","allAuditArticle",D,B,A,false,C);};DwrSystemAdmin.batchAuditArticle=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","batchAuditArticle",B,false,A);};DwrSystemAdmin.delSignBlack=function(C,A,B){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","delSignBlack",C,A,false,B);};DwrSystemAdmin.changeGuestIp=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","changeGuestIp",B,false,A);};DwrSystemAdmin.postKeyword=function(D,B,A,C){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","postKeyword",D,B,A,false,C);};DwrSystemAdmin.delKeyword=function(C,A,B){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","delKeyword",C,A,false,B);};DwrSystemAdmin.delIpLimit=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","delIpLimit",B,false,A);};DwrSystemAdmin.delBlackList=function(C,A,B){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","delBlackList",C,A,false,B);};DwrSystemAdmin.postWebmasterPurview=function(C,A,B){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","postWebmasterPurview",C,A,false,B);};DwrSystemAdmin.delWebmaster=function(B,A){dwr.engine._execute(DwrSystemAdmin._path,"DwrSystemAdmin","delWebmaster",B,false,A);};if(dwr==null){var dwr={};}if(dwr.engine==null){dwr.engine={};}if(DWREngine==null){var DWREngine=dwr.engine;}if(DwrBoardAdmin==null){var DwrBoardAdmin={};}DwrBoardAdmin._path="/bbs/dwr/";DwrBoardAdmin.isBoardAdmin=function(B,A){dwr.engine._execute(DwrBoardAdmin._path,"DwrBoardAdmin","isBoardAdmin",B,false,A);};DwrBoardAdmin.delArticle=function(B,A){dwr.engine._execute(DwrBoardAdmin._path,"DwrBoardAdmin","delArticle",B,false,A);};if(dwr==null){var dwr={};}if(dwr.engine==null){dwr.engine={};}if(DWREngine==null){var DWREngine=dwr.engine;}if(DwrAlarm==null){var DwrAlarm={};}DwrAlarm._path="/bbs/dwr/";DwrAlarm.main=function(B,A){dwr.engine._execute(DwrAlarm._path,"DwrAlarm","main",B,A);};DwrAlarm.oldJsVersion=function(E,C,B,A,D){dwr.engine._execute(DwrAlarm._path,"DwrAlarm","oldJsVersion",E,C,B,A,false,D);};DwrAlarm.checkLastReply=function(D,B,A,C){dwr.engine._execute(DwrAlarm._path,"DwrAlarm","checkLastReply",D,B,A,false,C);};if(dwr==null){var dwr={};}if(dwr.engine==null){dwr.engine={};}if(DWREngine==null){var DWREngine=dwr.engine;}if(DwrPlugin==null){var DwrPlugin={};}DwrPlugin._path="/bbs/dwr/";DwrPlugin.main=function(B,A){dwr.engine._execute(DwrPlugin._path,"DwrPlugin","main",B,A);};DwrPlugin.saveHtml=function(E,C,B,A,D){dwr.engine._execute(DwrPlugin._path,"DwrPlugin","saveHtml",E,C,B,A,false,D);};DwrPlugin.saveTravel=function(O,N,L,K,J,I,H,G,F,E,D,C,B,A,M){dwr.engine._execute(DwrPlugin._path,"DwrPlugin","saveTravel",O,N,L,K,J,I,H,G,F,E,D,C,B,A,false,M);};DwrPlugin.saveXiangQin=function(L,K,I,H,G,F,E,D,C,B,A,J){dwr.engine._execute(DwrPlugin._path,"DwrPlugin","saveXiangQin",L,K,I,H,G,F,E,D,C,B,A,false,J);};if(dwr==null){var dwr={};}if(dwr.engine==null){dwr.engine={};}if(DWREngine==null){var DWREngine=dwr.engine;}if(Dwr==null){var Dwr={};}Dwr._path="/bbs/dwr/";Dwr.main=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","main",B,A);};Dwr.getUserinfo=function(A){dwr.engine._execute(Dwr._path,"Dwr","getUserinfo",false,A);};Dwr.getUsername=function(A){dwr.engine._execute(Dwr._path,"Dwr","getUsername",false,A);};Dwr.topThread=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","topThread",C,A,false,B);};Dwr.lockThread=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","lockThread",C,A,false,B);};Dwr.vote=function(E,C,B,A,D){dwr.engine._execute(Dwr._path,"Dwr","vote",E,C,B,A,false,D);};Dwr.eliteThread=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","eliteThread",C,A,false,B);};Dwr.pushThread=function(D,B,A,C){dwr.engine._execute(Dwr._path,"Dwr","pushThread",D,B,A,false,C);};Dwr.rubbishThread=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","rubbishThread",C,A,false,B);};Dwr.sayGood=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","sayGood",C,A,false,B);};Dwr.sayBad=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","sayBad",C,A,false,B);};Dwr.isWantVerify=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","isWantVerify",B,false,A);};Dwr.nodes=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","nodes",C,A,B);};Dwr.isBoardMaster=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","isBoardMaster",B,false,A);};Dwr.allTopThread=function(D,B,A,C){dwr.engine._execute(Dwr._path,"Dwr","allTopThread",D,B,A,false,C);};Dwr.copyThread=function(F,D,C,B,A,E){dwr.engine._execute(Dwr._path,"Dwr","copyThread",F,D,C,B,A,false,E);};Dwr.delPost=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","delPost",C,A,false,B);};Dwr.addBlackList=function(E,C,B,A,D){dwr.engine._execute(Dwr._path,"Dwr","addBlackList",E,C,B,A,false,D);};Dwr.lostPost=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","lostPost",B,false,A);};Dwr.chargePost=function(D,B,A,C){dwr.engine._execute(Dwr._path,"Dwr","chargePost",D,B,A,false,C);};Dwr.delMessage=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","delMessage",B,false,A);};Dwr.sendMessage=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","sendMessage",C,A,false,B);};Dwr.getQuoteReply=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","getQuoteReply",C,A,B);};Dwr.editReply=function(D,B,A,C){dwr.engine._execute(Dwr._path,"Dwr","editReply",D,B,A,false,C);};Dwr.updateVote=function(G,E,D,C,B,A,F){dwr.engine._execute(Dwr._path,"Dwr","updateVote",G,E,D,C,B,A,false,F);};Dwr.getBoardName=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","getBoardName",B,false,A);};Dwr.loadBoardList=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","loadBoardList",B,false,A);};Dwr.getChildBoards=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","getChildBoards",B,false,A);};Dwr.getChildBoardsByDbname=function(C,A,B){dwr.engine._execute(Dwr._path,"Dwr","getChildBoardsByDbname",C,A,false,B);};Dwr.getAutoHeader=function(B,A){dwr.engine._execute(Dwr._path,"Dwr","getAutoHeader",B,false,A);};if(dwr==null){var dwr={};}if(dwr.engine==null){dwr.engine={};}if(DWREngine==null){var DWREngine=dwr.engine;}dwr.engine.setErrorHandler=function(A){dwr.engine._errorHandler=A;};dwr.engine.setWarningHandler=function(A){dwr.engine._warningHandler=A;};dwr.engine.setTextHtmlHandler=function(A){dwr.engine._textHtmlHandler=A;};dwr.engine.setTimeout=function(A){dwr.engine._timeout=A;};dwr.engine.setPreHook=function(A){dwr.engine._preHook=A;};dwr.engine.setPostHook=function(A){dwr.engine._postHook=A;};dwr.engine.setHeaders=function(A){dwr.engine._headers=A;};dwr.engine.setParameters=function(A){dwr.engine._parameters=A;};dwr.engine.XMLHttpRequest=1;dwr.engine.IFrame=2;dwr.engine.ScriptTag=3;dwr.engine.setRpcType=function(A){if(A!=dwr.engine.XMLHttpRequest&&A!=dwr.engine.IFrame&&A!=dwr.engine.ScriptTag){dwr.engine._handleError(null,{name:"dwr.engine.invalidRpcType",message:"RpcType must be one of dwr.engine.XMLHttpRequest or dwr.engine.IFrame or dwr.engine.ScriptTag"});return ;}dwr.engine._rpcType=A;};dwr.engine.setHttpMethod=function(A){if(A!="GET"&&A!="POST"){dwr.engine._handleError(null,{name:"dwr.engine.invalidHttpMethod",message:"Remoting method must be one of GET or POST"});return ;}dwr.engine._httpMethod=A;};dwr.engine.setOrdered=function(A){dwr.engine._ordered=A;};dwr.engine.setAsync=function(A){dwr.engine._async=A;};dwr.engine.setActiveReverseAjax=function(A){if(A){if(dwr.engine._activeReverseAjax){return ;}dwr.engine._activeReverseAjax=true;dwr.engine._poll();}else{if(dwr.engine._activeReverseAjax&&dwr.engine._pollReq){dwr.engine._pollReq.abort();}dwr.engine._activeReverseAjax=false;}};dwr.engine.setPollType=function(A){if(A!=dwr.engine.XMLHttpRequest&&A!=dwr.engine.IFrame){dwr.engine._handleError(null,{name:"dwr.engine.invalidPollType",message:"PollType must be one of dwr.engine.XMLHttpRequest or dwr.engine.IFrame"});return ;}dwr.engine._pollType=A;};dwr.engine.defaultErrorHandler=function(B,A){dwr.engine._debug("Error: "+A.name+", "+A.message,true);if(B==null||B==""){alert("A server error has occured. More information may be available in the console.");}else{if(B.indexOf("0x80040111")!=-1){dwr.engine._debug(B);}else{alert(B);}}};dwr.engine.defaultWarningHandler=function(B,A){dwr.engine._debug(B);};dwr.engine.beginBatch=function(){if(dwr.engine._batch){dwr.engine._handleError(null,{name:"dwr.engine.batchBegun",message:"Batch already begun"});return ;}dwr.engine._batch=dwr.engine._createBatch();};dwr.engine.endBatch=function(B){var A=dwr.engine._batch;if(A==null){dwr.engine._handleError(null,{name:"dwr.engine.batchNotBegun",message:"No batch in progress"});return ;}dwr.engine._batch=null;if(A.map.callCount==0){return ;}if(B){dwr.engine._mergeBatch(A,B);}if(dwr.engine._ordered&&dwr.engine._batchesLength!=0){dwr.engine._batchQueue[dwr.engine._batchQueue.length]=A;}else{dwr.engine._sendData(A);}};dwr.engine.setPollMethod=function(A){dwr.engine.setPollType(A);};dwr.engine.setMethod=function(A){dwr.engine.setRpcType(A);};dwr.engine.setVerb=function(A){dwr.engine.setHttpMethod(A);};dwr.engine._origScriptSessionId="A056E6E7397145A487B6833F53B4C055";dwr.engine._sessionCookieName="JSESSIONID";dwr.engine._allowGetForSafariButMakeForgeryEasier="false";dwr.engine._scriptTagProtection="throw 'crossDomainSessionSecurity is on.';";dwr.engine._defaultPath="/bbs/dwr/";dwr.engine._scriptSessionId=null;dwr.engine._getScriptSessionId=function(){if(dwr.engine._scriptSessionId==null){dwr.engine._scriptSessionId=dwr.engine._origScriptSessionId+Math.floor(Math.random()*1000);}return dwr.engine._scriptSessionId;};dwr.engine._errorHandler=dwr.engine.defaultErrorHandler;dwr.engine._warningHandler=dwr.engine.defaultWarningHandler;dwr.engine._preHook=null;dwr.engine._postHook=null;dwr.engine._batches={};dwr.engine._batchesLength=0;dwr.engine._batchQueue=[];dwr.engine._rpcType=dwr.engine.XMLHttpRequest;dwr.engine._httpMethod="POST";dwr.engine._ordered=false;dwr.engine._async=true;dwr.engine._batch=null;dwr.engine._timeout=0;dwr.engine._DOMDocument=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];dwr.engine._XMLHTTP=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];dwr.engine._activeReverseAjax=false;dwr.engine._pollType=dwr.engine.XMLHttpRequest;dwr.engine._outstandingIFrames=[];dwr.engine._pollReq=null;dwr.engine._pollCometInterval=200;dwr.engine._pollRetries=0;dwr.engine._maxPollRetries=0;dwr.engine._textHtmlHandler=null;dwr.engine._headers=null;dwr.engine._parameters=null;dwr.engine._postSeperator="\n";dwr.engine._defaultInterceptor=function(A){return A;};dwr.engine._urlRewriteHandler=dwr.engine._defaultInterceptor;dwr.engine._contentRewriteHandler=dwr.engine._defaultInterceptor;dwr.engine._replyRewriteHandler=dwr.engine._defaultInterceptor;dwr.engine._nextBatchId=0;dwr.engine._propnames=["rpcType","httpMethod","async","timeout","errorHandler","warningHandler","textHtmlHandler"];dwr.engine._partialResponseNo=0;dwr.engine._partialResponseYes=1;dwr.engine._partialResponseFlush=2;dwr.engine._execute=function(K,B,I,H){var E=false;if(dwr.engine._batch==null){dwr.engine.beginBatch();E=true;}var D=dwr.engine._batch;var G=[];for(var C=0;C<arguments.length-3;C++){G[C]=arguments[C+3];}if(D.path==null){D.path=K;}else{if(D.path!=K){dwr.engine._handleError(D,{name:"dwr.engine.multipleServlets",message:"Can't batch requests to multiple DWR Servlets."});return ;}}var A;var J=G[G.length-1];if(typeof J=="function"||J==null){A={callback:G.pop()};}else{A=G.pop();}dwr.engine._mergeBatch(D,A);D.handlers[D.map.callCount]={exceptionHandler:A.exceptionHandler,callback:A.callback};var F="c"+D.map.callCount+"-";D.map[F+"scriptName"]=B;D.map[F+"methodName"]=I;D.map[F+"id"]=D.map.callCount;for(C=0;C<G.length;C++){dwr.engine._serializeAll(D,[],G[C],F+"param"+C);}D.map.callCount++;if(E){dwr.engine.endBatch();}};dwr.engine._poll=function(B){if(!dwr.engine._activeReverseAjax){return ;}var A=dwr.engine._createBatch();A.map.id=0;A.map.callCount=1;A.isPoll=true;if(navigator.userAgent.indexOf("Gecko/")!=-1){A.rpcType=dwr.engine._pollType;A.map.partialResponse=dwr.engine._partialResponseYes;}else{if(document.all){A.rpcType=dwr.engine.IFrame;A.map.partialResponse=dwr.engine._partialResponseFlush;}else{A.rpcType=dwr.engine._pollType;A.map.partialResponse=dwr.engine._partialResponseNo;}}A.httpMethod="POST";A.async=true;A.timeout=0;A.path=(B)?B:dwr.engine._defaultPath;A.preHooks=[];A.postHooks=[];A.errorHandler=dwr.engine._pollErrorHandler;A.warningHandler=dwr.engine._pollErrorHandler;A.handlers[0]={callback:function(C){dwr.engine._pollRetries=0;setTimeout("dwr.engine._poll()",C);}};dwr.engine._sendData(A);if(A.map.partialResponse!=dwr.engine._partialResponseNo){dwr.engine._checkCometPoll();}};dwr.engine._pollErrorHandler=function(B,A){dwr.engine._pollRetries++;dwr.engine._debug("Reverse Ajax poll failed (pollRetries="+dwr.engine._pollRetries+"): "+A.name+" : "+A.message);if(dwr.engine._pollRetries<dwr.engine._maxPollRetries){setTimeout("dwr.engine._poll()",10000);}else{dwr.engine._debug("Giving up.");}};dwr.engine._createBatch=function(){var A={map:{callCount:0,page:window.location.pathname+window.location.search,httpSessionId:dwr.engine._getJSessionId(),scriptSessionId:dwr.engine._getScriptSessionId()},charsProcessed:0,paramCount:0,isPoll:false,headers:{},handlers:{},preHooks:[],postHooks:[],rpcType:dwr.engine._rpcType,httpMethod:dwr.engine._httpMethod,async:dwr.engine._async,timeout:dwr.engine._timeout,errorHandler:dwr.engine._errorHandler,warningHandler:dwr.engine._warningHandler,textHtmlHandler:dwr.engine._textHtmlHandler};if(dwr.engine._preHook){A.preHooks.push(dwr.engine._preHook);}if(dwr.engine._postHook){A.postHooks.push(dwr.engine._postHook);}var C,B;if(dwr.engine._headers){for(C in dwr.engine._headers){B=dwr.engine._headers[C];if(typeof B!="function"){A.headers[C]=B;}}}if(dwr.engine._parameters){for(C in dwr.engine._parameters){B=dwr.engine._parameters[C];if(typeof B!="function"){A.parameters[C]=B;}}}return A;};dwr.engine._mergeBatch=function(A,D){var E,C;for(var B=0;B<dwr.engine._propnames.length;B++){E=dwr.engine._propnames[B];if(D[E]!=null){A[E]=D[E];}}if(D.preHook!=null){A.preHooks.unshift(D.preHook);}if(D.postHook!=null){A.postHooks.push(D.postHook);}if(D.headers){for(E in D.headers){C=D.headers[E];if(typeof C!="function"){A.headers[E]=C;}}}if(D.parameters){for(E in D.parameters){C=D.parameters[E];if(typeof C!="function"){A.map["p-"+E]=""+C;}}}};dwr.engine._getJSessionId=function(){var C=document.cookie.split(";");for(var B=0;B<C.length;B++){var A=C[B];while(A.charAt(0)==" "){A=A.substring(1,A.length);}if(A.indexOf(dwr.engine._sessionCookieName+"=")==0){return A.substring(11,A.length);}}return"";};dwr.engine._checkCometPoll=function(){for(var B=0;B<dwr.engine._outstandingIFrames.length;B++){var E="";var C=dwr.engine._outstandingIFrames[B];try{E=dwr.engine._getTextFromCometIFrame(C);}catch(A){dwr.engine._handleWarning(C.batch,A);}if(E!=""){dwr.engine._processCometResponse(E,C.batch);}}if(dwr.engine._pollReq){var D=dwr.engine._pollReq;var E=D.responseText;dwr.engine._processCometResponse(E,D.batch);}if(dwr.engine._outstandingIFrames.length>0||dwr.engine._pollReq){setTimeout("dwr.engine._checkCometPoll()",dwr.engine._pollCometInterval);}};dwr.engine._getTextFromCometIFrame=function(B){var A=B.contentWindow.document.body;if(A==null){return"";}var C=A.innerHTML;if(C.indexOf("<PRE>")==0||C.indexOf("<pre>")==0){C=C.substring(5,C.length-7);}return C;};dwr.engine._processCometResponse=function(D,E){if(E.charsProcessed==D.length){return ;}if(D.length==0){E.charsProcessed=0;return ;}var B=D.indexOf("//#DWR-START#",E.charsProcessed);if(B==-1){E.charsProcessed=D.length;return ;}var A=D.lastIndexOf("//#DWR-END#");if(A==-1){return ;}if(D.charCodeAt(A+11)==13&&D.charCodeAt(A+12)==10){E.charsProcessed=A+13;}else{E.charsProcessed=A+11;}var C=D.substring(B+13,A);dwr.engine._receivedBatch=E;dwr.engine._eval(C);dwr.engine._receivedBatch=null;};dwr.engine._sendData=function(E){E.map.batchId=dwr.engine._nextBatchId++;dwr.engine._batches[E.map.batchId]=E;dwr.engine._batchesLength++;E.completed=false;for(var D=0;D<E.preHooks.length;D++){E.preHooks[D]();}E.preHooks=null;if(E.timeout&&E.timeout!=0){E.interval=setInterval(function(){dwr.engine._abortRequest(E);},E.timeout);}if(E.rpcType==dwr.engine.XMLHttpRequest){if(window.XMLHttpRequest){E.req=new XMLHttpRequest();}else{if(window.ActiveXObject&&!(navigator.userAgent.indexOf("Mac")>=0&&navigator.userAgent.indexOf("MSIE")>=0)){E.req=dwr.engine._newActiveXObject(dwr.engine._XMLHTTP);}}}var A,C;if(E.req){if(E.async){E.req.onreadystatechange=function(){dwr.engine._stateChange(E);};}if(E.isPoll){dwr.engine._pollReq=E.req;E.req.batch=E;}var B=navigator.userAgent.indexOf("Safari/");if(B>=0){var G=navigator.userAgent.substring(B+7);if(parseInt(G,10)<400){if(dwr.engine._allowGetForSafariButMakeForgeryEasier=="true"){E.httpMethod="GET";}else{dwr.engine._handleWarning(E,{name:"dwr.engine.oldSafari",message:"Safari GET support disabled. See getahead.org/dwr/server/servlet and allowGetForSafariButMakeForgeryEasier."});}}}E.mode=E.isPoll?dwr.engine._ModePlainPoll:dwr.engine._ModePlainCall;C=dwr.engine._constructRequest(E);try{E.req.open(E.httpMethod,C.url,E.async);try{for(A in E.headers){var I=E.headers[A];if(typeof I=="string"){E.req.setRequestHeader(A,I);}}if(!E.headers["Content-Type"]){E.req.setRequestHeader("Content-Type","text/plain");}}catch(H){dwr.engine._handleWarning(E,H);}E.req.send(C.body);if(!E.async){dwr.engine._stateChange(E);}}catch(H){dwr.engine._handleError(E,H);}}else{if(E.rpcType!=dwr.engine.ScriptTag){var F=E.isPoll?"dwr-if-poll-"+E.map.batchId:"dwr-if-"+E.map["c0-id"];E.div=document.createElement("div");E.div.innerHTML="<iframe src='javascript:void(0)' frameborder='0' style='width:0px;height:0px;border:0;' id='"+F+"' name='"+F+"'></iframe>";document.body.appendChild(E.div);E.iframe=document.getElementById(F);E.iframe.batch=E;E.mode=E.isPoll?dwr.engine._ModeHtmlPoll:dwr.engine._ModeHtmlCall;if(E.isPoll){dwr.engine._outstandingIFrames.push(E.iframe);}C=dwr.engine._constructRequest(E);if(E.httpMethod=="GET"){E.iframe.setAttribute("src",C.url);}else{E.form=document.createElement("form");E.form.setAttribute("id","dwr-form");E.form.setAttribute("action",C.url);E.form.setAttribute("target",F);E.form.target=F;E.form.setAttribute("method",E.httpMethod);for(A in E.map){var I=E.map[A];if(typeof I!="function"){var J=document.createElement("input");J.setAttribute("type","hidden");J.setAttribute("name",A);J.setAttribute("value",I);E.form.appendChild(J);}}document.body.appendChild(E.form);E.form.submit();}}else{E.httpMethod="GET";E.mode=E.isPoll?dwr.engine._ModePlainPoll:dwr.engine._ModePlainCall;C=dwr.engine._constructRequest(E);E.script=document.createElement("script");E.script.id="dwr-st-"+E.map["c0-id"];E.script.src=C.url;document.body.appendChild(E.script);}}};dwr.engine._ModePlainCall="/call/plaincall/";dwr.engine._ModeHtmlCall="/call/htmlcall/";dwr.engine._ModePlainPoll="/call/plainpoll/";dwr.engine._ModeHtmlPoll="/call/htmlpoll/";dwr.engine._constructRequest=function(A){var B={url:A.path+A.mode,body:null};if(A.isPoll==true){B.url+="ReverseAjax.dwr";}else{if(A.map.callCount==1){B.url+=A.map["c0-scriptName"]+"."+A.map["c0-methodName"]+".dwr";}else{B.url+="Multiple."+A.map.callCount+".dwr";}}var D=location.href.match(/jsessionid=([^?]+)/);if(D!=null){B.url+=";jsessionid="+D[1];}var C;if(A.httpMethod=="GET"){A.map.callCount=""+A.map.callCount;B.url+="?";for(C in A.map){if(typeof A.map[C]!="function"){B.url+=encodeURIComponent(C)+"="+encodeURIComponent(A.map[C])+"&";}}B.url=B.url.substring(0,B.url.length-1);}else{B.body="";for(C in A.map){if(typeof A.map[C]!="function"){B.body+=C+"="+A.map[C]+dwr.engine._postSeperator;}}B.body=dwr.engine._contentRewriteHandler(B.body);}B.url=dwr.engine._urlRewriteHandler(B.url);return B;};dwr.engine._stateChange=function(C){var B;if(C.completed){dwr.engine._debug("Error: _stateChange() with batch.completed");return ;}var F=C.req;try{if(F.readyState!=4){return ;}}catch(D){dwr.engine._handleWarning(C,D);dwr.engine._clearUp(C);return ;}try{var E=F.responseText;E=dwr.engine._replyRewriteHandler(E);var A=F.status;if(E==null||E==""){dwr.engine._handleWarning(C,{name:"dwr.engine.missingData",message:"No data received from server"});}else{if(A!=200){dwr.engine._handleError(C,{name:"dwr.engine.http."+A,message:F.statusText});}else{var G=F.getResponseHeader("Content-Type");if(!G.match(/^text\/plain/)&&!G.match(/^text\/javascript/)){if(G.match(/^text\/html/)&&typeof C.textHtmlHandler=="function"){C.textHtmlHandler();}else{dwr.engine._handleWarning(C,{name:"dwr.engine.invalidMimeType",message:"Invalid content type: '"+G+"'"});}}else{if(C.isPoll&&C.map.partialResponse==dwr.engine._partialResponseYes){dwr.engine._processCometResponse(E,C);}else{if(E.search("//#DWR")==-1){dwr.engine._handleWarning(C,{name:"dwr.engine.invalidReply",message:"Invalid reply from server"});}else{B=E;}}}}}}catch(D){dwr.engine._handleWarning(C,D);}dwr.engine._callPostHooks(C);dwr.engine._receivedBatch=C;if(B!=null){B=B.replace(dwr.engine._scriptTagProtection,"");}dwr.engine._eval(B);dwr.engine._receivedBatch=null;dwr.engine._clearUp(C);};dwr.engine._remoteHandleCallback=function(A,F,E){var C=dwr.engine._batches[A];if(C==null){dwr.engine._debug("Warning: batch == null in remoteHandleCallback for batchId="+A,true);return ;}try{var B=C.handlers[F];if(!B){dwr.engine._debug("Warning: Missing handlers. callId="+F,true);}else{if(typeof B.callback=="function"){B.callback(E);}}}catch(D){dwr.engine._handleError(C,D);}};dwr.engine._remoteHandleException=function(A,E,D){var C=dwr.engine._batches[A];if(C==null){dwr.engine._debug("Warning: null batch in remoteHandleException",true);return ;}var B=C.handlers[E];if(B==null){dwr.engine._debug("Warning: null handlers in remoteHandleException",true);return ;}if(D.message==undefined){D.message="";}if(typeof B.exceptionHandler=="function"){B.exceptionHandler(D.message,D);}else{if(typeof C.errorHandler=="function"){C.errorHandler(D.message,D);}}};dwr.engine._remoteHandleBatchException=function(C,A){var B=(dwr.engine._receivedBatch==null&&A!=null);if(B){dwr.engine._receivedBatch=dwr.engine._batches[A];}if(C.message==undefined){C.message="";}dwr.engine._handleError(dwr.engine._receivedBatch,C);if(B){dwr.engine._receivedBatch=null;dwr.engine._clearUp(dwr.engine._batches[A]);}};dwr.engine._remotePollCometDisabled=function(C,A){dwr.engine.setActiveReverseAjax(false);var B=(dwr.engine._receivedBatch==null&&A!=null);if(B){dwr.engine._receivedBatch=dwr.engine._batches[A];}if(C.message==undefined){C.message="";}dwr.engine._handleError(dwr.engine._receivedBatch,C);if(B){dwr.engine._receivedBatch=null;dwr.engine._clearUp(dwr.engine._batches[A]);}};dwr.engine._remoteBeginIFrameResponse=function(B,A){if(B!=null){dwr.engine._receivedBatch=B.batch;}dwr.engine._callPostHooks(dwr.engine._receivedBatch);};dwr.engine._remoteEndIFrameResponse=function(A){dwr.engine._clearUp(dwr.engine._receivedBatch);dwr.engine._receivedBatch=null;};dwr.engine._eval=function(script){if(script==null){return null;}if(script==""){dwr.engine._debug("Warning: blank script",true);return null;}return eval(script);};dwr.engine._abortRequest=function(A){if(A&&!A.completed){clearInterval(A.interval);dwr.engine._clearUp(A);if(A.req){A.req.abort();}dwr.engine._handleError(A,{name:"dwr.engine.timeout",message:"Timeout"});}};dwr.engine._callPostHooks=function(A){if(A.postHooks){for(var B=0;B<A.postHooks.length;B++){A.postHooks[B]();}A.postHooks=null;}};dwr.engine._clearUp=function(B){if(!B){dwr.engine._debug("Warning: null batch in dwr.engine._clearUp()",true);return ;}if(B.completed=="true"){dwr.engine._debug("Warning: Double complete",true);return ;}if(B.div){B.div.parentNode.removeChild(B.div);}if(B.iframe){for(var C=0;C<dwr.engine._outstandingIFrames.length;C++){if(dwr.engine._outstandingIFrames[C]==B.iframe){dwr.engine._outstandingIFrames.splice(C,1);}}B.iframe.parentNode.removeChild(B.iframe);}if(B.form){B.form.parentNode.removeChild(B.form);}if(B.req){if(B.req==dwr.engine._pollReq){dwr.engine._pollReq=null;}delete B.req;}if(B.map&&B.map.batchId){delete dwr.engine._batches[B.map.batchId];dwr.engine._batchesLength--;}B.completed=true;if(dwr.engine._batchQueue.length!=0){var A=dwr.engine._batchQueue.shift();dwr.engine._sendData(A);}};dwr.engine._handleError=function(A,B){if(typeof B=="string"){B={name:"unknown",message:B};}if(B.message==null){B.message="";}if(B.name==null){B.name="unknown";}if(A&&typeof A.errorHandler=="function"){A.errorHandler(B.message,B);}else{if(dwr.engine._errorHandler){dwr.engine._errorHandler(B.message,B);}}dwr.engine._clearUp(A);};dwr.engine._handleWarning=function(A,B){if(typeof B=="string"){B={name:"unknown",message:B};}if(B.message==null){B.message="";}if(B.name==null){B.name="unknown";}if(A&&typeof A.warningHandler=="function"){A.warningHandler(B.message,B);}else{if(dwr.engine._warningHandler){dwr.engine._warningHandler(B.message,B);}}dwr.engine._clearUp(A);};dwr.engine._serializeAll=function(B,D,C,A){if(C==null){B.map[A]="null:null";return ;}switch(typeof C){case"boolean":B.map[A]="boolean:"+C;break;case"number":B.map[A]="number:"+C;break;case"string":B.map[A]="string:"+encodeURIComponent(C);break;case"object":if(C instanceof String){B.map[A]="String:"+encodeURIComponent(C);}else{if(C instanceof Boolean){B.map[A]="Boolean:"+C;}else{if(C instanceof Number){B.map[A]="Number:"+C;}else{if(C instanceof Date){B.map[A]="Date:"+C.getTime();}else{if(C&&C.join){B.map[A]=dwr.engine._serializeArray(B,D,C,A);}else{B.map[A]=dwr.engine._serializeObject(B,D,C,A);}}}}}break;case"function":break;default:dwr.engine._handleWarning(null,{name:"dwr.engine.unexpectedType",message:"Unexpected type: "+typeof C+", attempting default converter."});B.map[A]="default:"+C;break;}};dwr.engine._lookup=function(E,C,A){var D;for(var B=0;B<E.length;B++){if(E[B].data==C){D=E[B];break;}}if(D){return"reference:"+D.name;}E.push({data:C,name:A});return null;};dwr.engine._serializeObject=function(C,H,G,B){var F=dwr.engine._lookup(H,G,B);if(F){return F;}if(G.nodeName&&G.nodeType){return dwr.engine._serializeXml(C,H,G,B);}var E="Object_"+dwr.engine._getObjectClassName(G)+":{";var D;for(D in G){if(typeof G[D]!="function"){C.paramCount++;var A="c"+dwr.engine._batch.map.callCount+"-e"+C.paramCount;dwr.engine._serializeAll(C,H,G[D],A);E+=encodeURIComponent(D)+":reference:"+A+", ";}}if(E.substring(E.length-2)==", "){E=E.substring(0,E.length-2);}E+="}";return E;};dwr.engine._errorClasses={Error:Error,EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError};dwr.engine._getObjectClassName=function(C){if(C&&C.constructor&&C.constructor.toString){var D=C.constructor.toString();var A=D.match(/function\s+(\w+)/);if(A&&A.length==2){return A[1];}}if(C&&C.constructor){for(var B in dwr.engine._errorClasses){if(C.constructor==dwr.engine._errorClasses[B]){return B;}}}if(C){var D=Object.prototype.toString.call(C);var A=D.match(/\[object\s+(\w+)/);if(A&&A.length==2){return A[1];}}return"Object";};dwr.engine._serializeXml=function(C,F,E,B){var D=dwr.engine._lookup(F,E,B);if(D){return D;}var A;if(window.XMLSerializer){A=new XMLSerializer().serializeToString(E);}else{if(E.toXml){A=E.toXml;}else{A=E.innerHTML;}}return"XML:"+encodeURIComponent(A);};dwr.engine._serializeArray=function(C,H,G,B){var F=dwr.engine._lookup(H,G,B);if(F){return F;}var E="Array:[";for(var D=0;D<G.length;D++){if(D!=0){E+=",";}C.paramCount++;var A="c"+dwr.engine._batch.map.callCount+"-e"+C.paramCount;dwr.engine._serializeAll(C,H,G[D],A);E+="reference:";E+=A;}E+="]";return E;};dwr.engine._unserializeDocument=function(A){var C;if(window.DOMParser){var E=new DOMParser();C=E.parseFromString(A,"text/xml");if(!C.documentElement||C.documentElement.tagName=="parsererror"){var B=C.documentElement.firstChild.data;B+="\n"+C.documentElement.firstChild.nextSibling.firstChild.data;throw B;}return C;}else{if(window.ActiveXObject){C=dwr.engine._newActiveXObject(dwr.engine._DOMDocument);C.loadXML(A);return C;}else{var D=document.createElement("div");D.innerHTML=A;return D;}}};dwr.engine._newActiveXObject=function(A){var D;for(var C=0;C<A.length;C++){try{D=new ActiveXObject(A[C]);break;}catch(B){}}return D;};dwr.engine._debug=function(F,D){var A=false;try{if(window.console){if(D&&window.console.trace){window.console.trace();}window.console.log(F);A=true;}else{if(window.opera&&window.opera.postError){window.opera.postError(F);A=true;}}}catch(C){}if(!A){var B=document.getElementById("dwr-debug");if(B){var E=F+"<br/>"+B.innerHTML;if(E.length>2048){E=E.substring(0,2048);}B.innerHTML=E;}}};if(dwr==null){var dwr={};}if(dwr.util==null){dwr.util={};}if(DWRUtil==null){var DWRUtil=dwr.util;}dwr.util._escapeHtml=true;dwr.util.setEscapeHtml=function(A){dwr.util._escapeHtml=A;};dwr.util._shouldEscapeHtml=function(A){if(A&&A.escapeHtml!=null){return A.escapeHtml;}return dwr.util._escapeHtml;};dwr.util.escapeHtml=function(A){var C=document.createElement("div");var B=document.createTextNode(A);C.appendChild(B);return C.innerHTML;};dwr.util.unescapeHtml=function(A){var B=document.createElement("div");B.innerHTML=A.replace(/<\/?[^>]+>/gi,"");return B.childNodes[0]?B.childNodes[0].nodeValue:"";};dwr.util.replaceXmlCharacters=function(A){A=A.replace("&","+");A=A.replace("<","\u2039");A=A.replace(">","\u203A");A=A.replace("'","\u2018");A=A.replace('"',"\u201C");return A;};dwr.util.containsXssRiskyCharacters=function(A){return(A.indexOf("&")!=-1&&A.indexOf("<")!=-1&&A.indexOf(">")!=-1&&A.indexOf("'")!=-1&&A.indexOf('"')!=-1);};dwr.util.onReturn=function(A,B){if(!A){A=window.event;}if(A&&A.keyCode&&A.keyCode==13){B();}};dwr.util.selectRange=function(C,D,A){C=dwr.util._getElementById(C,"selectRange()");if(C==null){return ;}if(C.setSelectionRange){C.setSelectionRange(D,A);}else{if(C.createTextRange){var B=C.createTextRange();B.moveStart("character",D);B.moveEnd("character",A-C.value.length);B.select();}}C.focus();};if(document.getElementById){dwr.util.byId=function(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.getElementById(A);}if(arguments.length==1){return A;}C.push(A);}return C;};}else{if(document.all){dwr.util.byId=function(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof A=="string"){A=document.all[A];}if(arguments.length==1){return A;}C.push(A);}return C;};}}var $;if(!$){$=dwr.util.byId;}dwr.util.toDescriptiveString=function(H,C,F){var D="";var I=0;var L;var G;if(C==null){C=0;}if(F==null){F=0;}if(H==null){return"null";}if(dwr.util._isArray(H)){if(H.length==0){D+="[]";}else{if(C!=0){D+="[\n";}else{D="[";}for(I=0;I<H.length;I++){try{G=H[I];if(G==null||typeof G=="function"){continue;}else{if(typeof G=="object"){if(C>0){L=dwr.util.toDescriptiveString(G,C-1,F+1);}else{L=dwr.util._detailedTypeOf(G);}}else{L=""+G;L=L.replace(/\/n/g,"\\n");L=L.replace(/\/t/g,"\\t");}}}catch(K){L=""+K;}if(C!=0){D+=dwr.util._indent(C,F+2)+L+", \n";}else{if(L.length>13){L=L.substring(0,10)+"...";}D+=L+", ";if(I>5){D+="...";break;}}}if(C!=0){D+=dwr.util._indent(C,F)+"]";}else{D+="]";}}return D;}if(typeof H=="string"||typeof H=="number"||dwr.util._isDate(H)){return H.toString();}if(typeof H=="object"){var E=dwr.util._detailedTypeOf(H);if(E!="Object"){D=E+" ";}if(C!=0){D+="{\n";}else{D="{";}var A=dwr.util._isHTMLElement(H);for(var B in H){if(A){if(B.toUpperCase()==B||B=="title"||B=="lang"||B=="dir"||B=="className"||B=="form"||B=="name"||B=="prefix"||B=="namespaceURI"||B=="nodeType"||B=="firstChild"||B=="lastChild"||B.match(/^offset/)){continue;}}L="";try{G=H[B];if(G==null||typeof G=="function"){continue;}else{if(typeof G=="object"){if(C>0){L="\n";L+=dwr.util._indent(C,F+2);L=dwr.util.toDescriptiveString(G,C-1,F+1);}else{L=dwr.util._detailedTypeOf(G);}}else{L=""+G;L=L.replace(/\/n/g,"\\n");L=L.replace(/\/t/g,"\\t");}}}catch(K){L=""+K;}if(C==0&&L.length>13){L=L.substring(0,10)+"...";}var J=B;if(J.length>30){J=J.substring(0,27)+"...";}if(C!=0){D+=dwr.util._indent(C,F+1);}D+=B+":"+L+", ";if(C!=0){D+="\n";}I++;if(C==0&&I>5){D+="...";break;}}D+=dwr.util._indent(C,F);D+="}";return D;}return H.toString();};dwr.util._indent=function(D,C){var B="";if(D!=0){for(var A=0;A<C;A++){B+="\u00A0\u00A0";}B+=" ";}return B;};dwr.util.useLoadingMessage=function(A){var B;if(A){B=A;}else{B="Loading";}dwr.engine.setPreHook(function(){var D=dwr.util.byId("disabledZone");if(!D){D=document.createElement("div");D.setAttribute("id","disabledZone");D.style.position="absolute";D.style.zIndex="1000";D.style.left="0px";D.style.top="0px";D.style.width="100%";D.style.height="100%";document.body.appendChild(D);var C=document.createElement("div");C.setAttribute("id","messageZone");C.style.position="absolute";C.style.top="0px";C.style.right="0px";C.style.background="red";C.style.color="white";C.style.fontFamily="Arial,Helvetica,sans-serif";C.style.padding="4px";D.appendChild(C);var E=document.createTextNode(B);C.appendChild(E);dwr.util._disabledZoneUseCount=1;}else{dwr.util.byId("messageZone").innerHTML=B;D.style.visibility="visible";dwr.util._disabledZoneUseCount++;}});dwr.engine.setPostHook(function(){dwr.util._disabledZoneUseCount--;if(dwr.util._disabledZoneUseCount==0){dwr.util.byId("disabledZone").style.visibility="hidden";}});};dwr.util.setHighlightHandler=function(A){dwr.util._highlightHandler=A;};dwr.util.yellowFadeHighlightHandler=function(A){dwr.util._yellowFadeProcess(A,0);};dwr.util._yellowFadeSteps=["d0","b0","a0","90","98","a0","a8","b0","b8","c0","c8","d0","d8","e0","e8","f0","f8"];dwr.util._yellowFadeProcess=function(A,B){A=dwr.util.byId(A);if(B<dwr.util._yellowFadeSteps.length){A.style.backgroundColor="#ffff"+dwr.util._yellowFadeSteps[B];setTimeout("dwr.util._yellowFadeProcess('"+A.id+"',"+(B+1)+")",200);}else{A.style.backgroundColor="transparent";}};dwr.util.borderFadeHighlightHandler=function(A){A.style.borderWidth="2px";A.style.borderStyle="solid";dwr.util._borderFadeProcess(A,0);};dwr.util._borderFadeSteps=["d0","b0","a0","90","98","a0","a8","b0","b8","c0","c8","d0","d8","e0","e8","f0","f8"];dwr.util._borderFadeProcess=function(A,B){A=dwr.util.byId(A);if(B<dwr.util._borderFadeSteps.length){A.style.borderColor="#ff"+dwr.util._borderFadeSteps[B]+dwr.util._borderFadeSteps[B];setTimeout("dwr.util._borderFadeProcess('"+A.id+"',"+(B+1)+")",200);}else{A.style.backgroundColor="transparent";}};dwr.util.focusHighlightHandler=function(B){try{B.focus();}catch(A){}};dwr.util._highlightHandler=null;dwr.util.highlight=function(B,A){if(A&&A.highlightHandler){A.highlightHandler(dwr.util.byId(B));}else{if(dwr.util._highlightHandler!=null){dwr.util._highlightHandler(dwr.util.byId(B));}}};dwr.util.setValue=function(E,F,B){if(F==null){F="";}if(B==null){B={};}if(dwr.util._shouldEscapeHtml(B)&&typeof (F)=="string"){F=dwr.util.escapeHtml(F);}var G=E;var A,D,C;E=dwr.util.byId(E);if(E==null){A=document.getElementsByName(G);if(A.length>=1){E=A.item(0);}}if(E==null){dwr.util._debug("setValue() can't find an element with id/name: "+G+".");return ;}dwr.util.highlight(E,B);if(dwr.util._isHTMLElement(E,"select")){if(E.type=="select-multiple"&&dwr.util._isArray(F)){dwr.util._selectListItems(E,F);}else{dwr.util._selectListItem(E,F);}return ;}if(dwr.util._isHTMLElement(E,"input")){if(E.type=="radio"){if(A==null){A=document.getElementsByName(G);}if(A!=null&&A.length>1){for(C=0;C<A.length;C++){D=A.item(C);if(D.type=="radio"){D.checked=(D.value==F);}}}else{E.checked=(F==true);}}else{if(E.type=="checkbox"){E.checked=F;}else{E.value=F;}}return ;}if(dwr.util._isHTMLElement(E,"textarea")){E.value=F;return ;}if(F.nodeType){if(F.nodeType==9){F=F.documentElement;}F=dwr.util._importNode(E.ownerDocument,F,true);E.appendChild(F);return ;}E.innerHTML=F;};dwr.util._selectListItems=function(D,E){var C=false;var B;var A;for(B=0;B<D.options.length;B++){D.options[B].selected=false;for(A=0;A<E.length;A++){if(D.options[B].value==E[A]){D.options[B].selected=true;}}}if(C){return ;}for(B=0;B<D.options.length;B++){for(A=0;A<E.length;A++){if(D.options[B].text==E[A]){D.options[B].selected=true;}}}};dwr.util._selectListItem=function(C,D){var B=false;var A;for(A=0;A<C.options.length;A++){if(C.options[A].value==D){C.options[A].selected=true;B=true;}else{C.options[A].selected=false;}}if(B){return ;}for(A=0;A<C.options.length;A++){if(C.options[A].text==D){C.options[A].selected=true;}else{C.options[A].selected=false;}}};dwr.util.getValue=function(G,B){if(B==null){B={};}var H=G;G=dwr.util.byId(G);var A=document.getElementsByName(H);if(G==null&&A.length>=1){G=A.item(0);}if(G==null){dwr.util._debug("getValue() can't find an element with id/name: "+H+".");return"";}if(dwr.util._isHTMLElement(G,"select")){if(G.type=="select-multiple"){var C=new Array();for(i=0;i<G.options.length;i++){var E=G.options[i];if(E.selected){if(E.value!=null&&E.value!=""){C.push(E.value);}else{C.push(E.text);}}}return C;}else{var F=G.selectedIndex;if(F!=-1){var E=G.options[F];if(E.value!=null&&E.value!=""){return E.value;}return E.text;}else{return"";}}}if(dwr.util._isHTMLElement(G,"input")){if(G.type=="radio"){var D;for(i=0;i<A.length;i++){D=A.item(i);if(D.type=="radio"){if(D.checked){if(A.length>1){return D.value;}else{return true;}}}}}switch(G.type){case"checkbox":case"check-box":case"radio":return G.checked;default:return G.value;}}if(dwr.util._isHTMLElement(G,"textarea")){return G.value;}if(dwr.util._shouldEscapeHtml(B)){if(G.textContent){return G.textContent;}else{if(G.innerText){return G.innerText;}}}return G.innerHTML;};dwr.util.getText=function(B){B=dwr.util._getElementById(B,"getText()");if(B==null){return null;}if(!dwr.util._isHTMLElement(B,"select")){dwr.util._debug("getText() can only be used with select elements. Attempt to use: "+dwr.util._detailedTypeOf(B)+" from  id: "+orig+".");return"";}var A=B.selectedIndex;if(A!=-1){return B.options[A].text;}else{return"";}};dwr.util.setValues=function(C,A){var B="";if(A&&A.prefix){B=A.prefix;}if(A&&A.idPrefix){B=A.idPrefix;}dwr.util._setValuesRecursive(C,B);};dwr.util._setValuesRecursive=function(C,E){if(dwr.util._isArray(C)&&C.length>0&&dwr.util._isObject(C[0])){for(var B=0;B<C.length;B++){dwr.util._setValuesRecursive(C[B],E+"["+B+"]");}}else{if(dwr.util._isObject(C)&&!dwr.util._isArray(C)){for(var D in C){var A=E?E+"."+D:D;if(dwr.util._isObject(C[D])&&!dwr.util._isArray(C[D])||dwr.util._isArray(C[D])&&C[D].length>0&&dwr.util._isObject(C[D][0])){dwr.util._setValuesRecursive(C[D],A);}else{if(typeof C[D]=="function"){}else{if(dwr.util.byId(A)!=null||document.getElementsByName(A).length>=1){dwr.util.setValue(A,C[D]);}}}}}}};dwr.util.getValues=function(D,A){var C;if(typeof D=="string"){C=dwr.util.byId(D);}if(dwr.util._isHTMLElement(D)){C=D;}if(C!=null){return dwr.util.getFormValues(C);}else{var B="";if(A!=null&&A.prefix){B=A.prefix;}if(A!=null&&A.idPrefix){B=A.idPrefix;}dwr.util._getValuesRecursive(D,B);return D;}};dwr.util.getFormValues=function(D){D=dwr.util.byId(D);if(D!=null){if(D.elements==null){alert("getFormValues() requires an object or reference to a form element.");return null;}var B={};var C;for(var A=0;A<D.elements.length;A++){if(D[A].type in {button:0,submit:0,reset:0,image:0,file:0}){continue;}if(D[A].id!=null){C=D[A].id;}else{if(D[A].value!=null){C=D[A].value;}else{C="element"+A;}}B[C]=dwr.util.getValue(D[A]);}return B;}};dwr.util._getValuesRecursive=function(C,E){if(dwr.util._isArray(C)&&C.length>0&&dwr.util._isObject(C[0])){for(var B=0;B<C.length;B++){dwr.util._getValuesRecursive(C[B],E+"["+B+"]");}}else{if(dwr.util._isObject(C)&&!dwr.util._isArray(C)){for(var D in C){var A=E?E+"."+D:D;if(dwr.util._isObject(C[D])&&!dwr.util._isArray(C[D])||dwr.util._isArray(C[D])&&C[D].length>0&&dwr.util._isObject(C[D][0])){dwr.util._getValuesRecursive(C[D],A);}else{if(typeof C[D]=="function"){}else{if(dwr.util.byId(A)!=null||document.getElementsByName(A).length>=1){C[D]=dwr.util.getValue(A);}}}}}}};dwr.util.addOptions=function(I,C){I=dwr.util._getElementById(I,"addOptions()");if(I==null){return ;}var B=dwr.util._isHTMLElement(I,"select");var E=dwr.util._isHTMLElement(I,["ul","ol"]);if(!B&&!E){dwr.util._debug("addOptions() can only be used with select/ul/ol elements. Attempt to use: "+dwr.util._detailedTypeOf(I));return ;}if(C==null){return ;}var H,F,G;if(dwr.util._isArray(C)){for(var D=0;D<C.length;D++){if(B){if(arguments[2]!=null){if(arguments[3]!=null){H=dwr.util._getValueFrom(C[D],arguments[3]);F=dwr.util._getValueFrom(C[D],arguments[2]);}else{H=F=dwr.util._getValueFrom(C[D],arguments[2]);}}else{H=F=dwr.util._getValueFrom(C[D],arguments[3]);}if(H!=null||F){I.options[I.options.length]=new Option(H,F);}}else{G=document.createElement("li");F=dwr.util._getValueFrom(C[D],arguments[2]);if(F!=null){G.innerHTML=F;I.appendChild(G);}}}}else{if(arguments[3]!=null){if(!B){alert("dwr.util.addOptions can only create select lists from objects.");return ;}for(var A in C){F=dwr.util._getValueFrom(C[A],arguments[2]);H=dwr.util._getValueFrom(C[A],arguments[3]);if(H||F){I.options[I.options.length]=new Option(H,F);}}}else{if(!B){dwr.util._debug("dwr.util.addOptions can only create select lists from objects.");return ;}for(var A in C){if(typeof C[A]!="function"){if(arguments[2]){I.options[I.options.length]=new Option(A,C[A]);}else{I.options[I.options.length]=new Option(C[A],A);}}}}}dwr.util.highlight(I,null);};dwr.util._getValueFrom=function(A,B){if(B==null){return A;}else{if(typeof B=="function"){return B(A);}else{return A[B];}}};dwr.util.removeAllOptions=function(B){B=dwr.util._getElementById(B,"removeAllOptions()");if(B==null){return ;}var A=dwr.util._isHTMLElement(B,"select");var C=dwr.util._isHTMLElement(B,["ul","ol"]);if(!A&&!C){dwr.util._debug("removeAllOptions() can only be used with select, ol and ul elements. Attempt to use: "+dwr.util._detailedTypeOf(B));return ;}if(A){B.options.length=0;}else{while(B.childNodes.length>0){B.removeChild(B.firstChild);}}};dwr.util.addRows=function(E,D,A,B){E=dwr.util._getElementById(E,"addRows()");if(E==null){return ;}if(!dwr.util._isHTMLElement(E,["table","tbody","thead","tfoot"])){dwr.util._debug("addRows() can only be used with table, tbody, thead and tfoot elements. Attempt to use: "+dwr.util._detailedTypeOf(E));return ;}if(!B){B={};}if(!B.rowCreator){B.rowCreator=dwr.util._defaultRowCreator;}if(!B.cellCreator){B.cellCreator=dwr.util._defaultCellCreator;}var C,F;if(dwr.util._isArray(D)){for(F=0;F<D.length;F++){B.rowData=D[F];B.rowIndex=F;B.rowNum=F;B.data=null;B.cellNum=-1;C=dwr.util._addRowInner(A,B);if(C!=null){E.appendChild(C);}}}else{if(typeof D=="object"){F=0;for(var G in D){B.rowData=D[G];B.rowIndex=G;B.rowNum=F;B.data=null;B.cellNum=-1;C=dwr.util._addRowInner(A,B);if(C!=null){E.appendChild(C);}F++;}}}dwr.util.highlight(E,B);};dwr.util._addRowInner=function(A,B){var D=B.rowCreator(B);if(D==null){return null;}for(var E=0;E<A.length;E++){var C=A[E];if(typeof C=="function"){B.data=C(B.rowData,B);}else{B.data=C||"";}B.cellNum=E;var F=B.cellCreator(B);if(F!=null){if(B.data!=null){if(dwr.util._isHTMLElement(B.data)){F.appendChild(B.data);}else{if(dwr.util._shouldEscapeHtml(B)&&typeof (B.data)=="string"){F.innerHTML=dwr.util.escapeHtml(B.data);}else{F.innerHTML=B.data;}}}D.appendChild(F);}}return D;};dwr.util._defaultRowCreator=function(A){return document.createElement("tr");};dwr.util._defaultCellCreator=function(A){return document.createElement("td");};dwr.util.removeAllRows=function(C,A){C=dwr.util._getElementById(C,"removeAllRows()");if(C==null){return ;}if(!A){A={};}if(!A.filter){A.filter=function(){return true;};}if(!dwr.util._isHTMLElement(C,["table","tbody","thead","tfoot"])){dwr.util._debug("removeAllRows() can only be used with table, tbody, thead and tfoot elements. Attempt to use: "+dwr.util._detailedTypeOf(C));return ;}var D=C.firstChild;var B;while(D!=null){B=D.nextSibling;if(A.filter(D)){C.removeChild(D);}D=B;}};dwr.util.setClassName=function(B,A){B=dwr.util._getElementById(B,"setClassName()");if(B==null){return ;}B.className=A;};dwr.util.addClassName=function(B,A){B=dwr.util._getElementById(B,"addClassName()");if(B==null){return ;}B.className+=" "+A;};dwr.util.removeClassName=function(C,A){C=dwr.util._getElementById(C,"removeClassName()");if(C==null){return ;}var B=new RegExp("(^|\\s)"+A+"(\\s|$)","g");C.className=C.className.replace(B,"");};dwr.util.toggleClassName=function(C,A){C=dwr.util._getElementById(C,"toggleClassName()");if(C==null){return ;}var B=new RegExp("(^|\\s)"+A+"(\\s|$)");if(B.test(C.className)){C.className=C.className.replace(B,"");}else{C.className+=" "+A;}};dwr.util.cloneNode=function(B,A){B=dwr.util._getElementById(B,"cloneNode()");if(B==null){return null;}if(A==null){A={};}var C=B.cloneNode(true);if(A.idPrefix||A.idSuffix){dwr.util._updateIds(C,A);}else{dwr.util._removeIds(C);}B.parentNode.insertBefore(C,B);return C;};dwr.util._updateIds=function(D,A){if(A==null){A={};}if(D.id){D.setAttribute("id",(A.idPrefix||"")+D.id+(A.idSuffix||""));}var C=D.childNodes;for(var B=0;B<C.length;B++){var E=C.item(B);if(E.nodeType==1){dwr.util._updateIds(E,A);}}};dwr.util._removeIds=function(C){if(C.id){C.removeAttribute("id");}var B=C.childNodes;for(var A=0;A<B.length;A++){var D=B.item(A);if(D.nodeType==1){dwr.util._removeIds(D);}}};dwr.util.cloneNodeForValues=function(A,C,B){A=dwr.util._getElementById(A,"cloneNodeForValues()");if(A==null){return null;}if(B==null){B={};}var D="";if(B.idPrefix){D=B.idPrefix;}return dwr.util._cloneNodeForValuesRecursive(A,C,D,B);};dwr.util._cloneNodeForValuesRecursive=function(A,C,E,I){if(dwr.util._isArray(C)){var G=[];for(var D=0;D<C.length;D++){var H=C[D];var F=dwr.util._cloneNodeForValuesRecursive(A,H,E+"["+D+"]",I);G.push(F);}return G;}else{if(dwr.util._isObject(C)&&!dwr.util._isArray(C)){var F=A.cloneNode(true);if(I.updateCloneStyle&&F.style){for(var B in I.updateCloneStyle){F.style[B]=I.updateCloneStyle[B];}}dwr.util._replaceIds(F,A.id,E);A.parentNode.insertBefore(F,A);dwr.util._cloneSubArrays(C,E,I);return F;}}return null;};dwr.util._replaceIds=function(F,H,C){if(F.id){var B=null;if(F.id==H){B=C;}else{if(F.id.length>H.length){if(F.id.substr(0,H.length)==H){var A=F.id.charAt(H.length);if(A=="."||A=="["){B=C+F.id.substr(H.length);}}}}if(B){F.setAttribute("id",B);}else{F.removeAttribute("id");}}var E=F.childNodes;for(var D=0;D<E.length;D++){var G=E.item(D);if(G.nodeType==1){dwr.util._replaceIds(G,H,C);}}};dwr.util._cloneSubArrays=function(C,F,A){for(prop in C){var B=C[prop];if(dwr.util._isArray(B)){if(B.length>0&&dwr.util._isObject(B[0])){var E=F+"."+prop;var D=dwr.util.byId(E);if(D!=null){dwr.util._cloneNodeForValuesRecursive(D,B,E,A);}}}else{if(dwr.util._isObject(B)){dwr.util._cloneSubArrays(B,F+"."+prop,A);}}}};dwr.util._getElementById=function(B,A){var C=B;B=dwr.util.byId(B);if(B==null){dwr.util._debug(A+" can't find an element with id: "+C+".");}return B;};dwr.util._isHTMLElement=function(C,E){if(C==null||typeof C!="object"||C.nodeName==null){return false;}if(E!=null){var D=C.nodeName.toLowerCase();if(typeof E=="string"){return D==E.toLowerCase();}if(dwr.util._isArray(E)){var A=false;for(var B=0;B<E.length&&!A;B++){if(D==E[B].toLowerCase()){A=true;}}return A;}dwr.util._debug("dwr.util._isHTMLElement was passed test node name that is neither a string or array of strings");return false;}return true;};dwr.util._detailedTypeOf=function(A){var B=typeof A;if(B=="object"){B=Object.prototype.toString.apply(A);B=B.substring(8,B.length-1);}return B;};dwr.util._isObject=function(A){return(A&&typeof A=="object");};dwr.util._isArray=function(A){return(A&&A.join);};dwr.util._isDate=function(A){return(A&&A instanceof Date);};dwr.util._importNode=function(F,E,B){var D;if(E.nodeType==1){D=F.createElement(E.nodeName);for(var C=0;C<E.attributes.length;C++){var A=E.attributes[C];if(A.nodeValue!=null&&A.nodeValue!=""){D.setAttribute(A.name,A.nodeValue);}}if(typeof E.style!="undefined"){D.style.cssText=E.style.cssText;}}else{if(E.nodeType==3){D=F.createTextNode(E.nodeValue);}}if(B&&E.hasChildNodes()){for(C=0;C<E.childNodes.length;C++){D.appendChild(dwr.util._importNode(F,E.childNodes[C],true));}}return D;};dwr.util._debug=function(F,D){var A=false;try{if(window.console){if(D&&window.console.trace){window.console.trace();}window.console.log(F);A=true;}else{if(window.opera&&window.opera.postError){window.opera.postError(F);A=true;}}}catch(C){}if(!A){var B=document.getElementById("dwr-debug");if(B){var E=F+"<br/>"+B.innerHTML;if(E.length>2048){E=E.substring(0,2048);}B.innerHTML=E;}}};