Current_Pagination=0;Total_number=0;function refreshPagination(B,A){loadingId("loading_haut");loadingId("loading_bas");Current_Pagination=A;url=Url_Pagination+"&begin="+A;new Ajax.Request(url,{method:"get",onComplete:function(D){$(B).appear();var C=D.responseText||"no response text";new Effect.Opacity(B,{from:0,to:1});document.getElementById(B).innerHTML=C;endLoadingId("loading_haut");endLoadingId("loading_bas")}});return false}function nextPagination(A){Current_Pagination=parseInt(Current_Pagination)+1;if(Current_Pagination<Nbr_Pagination){url=Url_Pagination+"&begin="+Current_Pagination;new Ajax.Request(url,{method:"get",onComplete:function(C){new Effect.Opacity(A,{from:1,to:0});$(A).appear();var B=C.responseText||"no response text";new Effect.Opacity(A,{from:0,to:1});document.getElementById(A).innerHTML=B}});return false}}function prevPagination(A){Current_Pagination=parseInt(Current_Pagination)-1;if(Current_Pagination>=0){url=Url_Pagination+"&begin="+Current_Pagination;new Ajax.Request(url,{method:"get",onComplete:function(C){new Effect.Opacity(A,{from:1,to:0});$(A).appear();var B=C.responseText||"no response text";new Effect.Opacity(A,{from:0,to:1});document.getElementById(A).innerHTML=B}});return false}}function hideLoading(){if($$("loading_Pagination")){new Effect.Opacity("loading",{from:1,to:0})}}function showLoading(){if($$("loading_Pagination")){new Effect.Opacity("loading",{from:0,to:1})}}if(typeof addEvent!="function"){var addEvent=function(B,J,F,E){var G="addEventListener",C="on"+J,I=B,H=J,D=F,A=E;if(B[G]&&!E){return B[G](J,F,false)}if(!B._evts){B._evts={}}if(!B._evts[J]){B._evts[J]=B[C]?{b:B[C]}:{};B[C]=new Function("e",'var r=true,o=this,a=o._evts["'+J+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r');if(J!="unload"){addEvent(window,"unload",function(){removeEvent(I,H,D,A)})}}if(!F._i){F._i=addEvent._i++}B._evts[J][F._i]=F};addEvent._i=1;var removeEvent=function(E,B,C,A){var D="removeEventListener";if(E[D]&&!A){return E[D](B,C,false)}if(E._evts&&E._evts[B]&&C._i){delete E._evts[B][C._i]}}}function cancelEvent(A,B){A.returnValue=false;if(A.preventDefault){A.preventDefault()}if(B){A.cancelBubble=true;if(A.stopPropagation){A.stopPropagation()}}}function SuperNote(B,A){var E={myName:B,allowNesting:false,cssProp:"visibility",cssVis:"inherit",cssHid:"hidden",IESelectBoxFix:true,showDelay:0,hideDelay:500,animInSpeed:0.1,animOutSpeed:0.1,animations:[],mouseX:0,mouseY:0,notes:{},rootElm:null,onshow:null,onhide:null};for(var D in E){this[D]=(typeof A[D]=="undefined")?E[D]:A[D]}var C=this;addEvent(document,"mouseover",function(F){C.mouseHandler(F,1)});addEvent(document,"click",function(F){C.mouseHandler(F,2)});addEvent(document,"mousemove",function(F){C.mouseTrack(F)});addEvent(document,"mouseout",function(F){C.mouseHandler(F,0)});this.instance=SuperNote.instances.length;SuperNote.instances[this.instance]=this}SuperNote.instances=[];SuperNote.prototype.bTypes={};SuperNote.prototype.pTypes={};SuperNote.prototype.pTypes.mouseoffset=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){note.ref.style.left=checkWinX(mouseX,note)+"px";note.ref.style.top=checkWinY(mouseY,note)+"px"}}};SuperNote.prototype.pTypes.mousetrack=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){var posString="with("+myName+'){var note=notes["'+noteID+'"];note.ref.style.left=checkWinX(mouseX,note)+"px";note.ref.style.top=checkWinY(mouseY,note)+"px"}';eval(posString);obj.IEFrameFix(noteID,1);if(!note.trackTimer){note.trackTimer=setInterval(posString,50)}}else{if(!nextVis&&!nextAnim){clearInterval(note.trackTimer);note.trackTimer=null}}}};SuperNote.prototype.pTypes.triggeroffset=function(obj,noteID,nextVis,nextAnim){with(obj){var note=notes[noteID];if(nextVis&&!note.animating&&!note.visible){var x=0,y=0,elm=note.trigRef;while(elm){x+=elm.offsetLeft;y+=elm.offsetTop;elm=elm.offsetParent}note.ref.style.left=checkWinX(x,note)+"px";note.ref.style.top=checkWinY(y,note)+"px"}}};SuperNote.prototype.bTypes.pinned=function(obj,noteID,nextVis){with(obj){return(!nextVis)?false:true}};SuperNote.prototype.docBody=function(){return document[(document.compatMode&&document.compatMode.indexOf("CSS")>-1)?"documentElement":"body"]};SuperNote.prototype.getWinW=function(){return this.docBody().clientWidth||window.innerWidth||0};SuperNote.prototype.getWinH=function(){return this.docBody().clientHeight||window.innerHeight||0};SuperNote.prototype.getScrX=function(){return this.docBody().scrollLeft||window.scrollX||0};SuperNote.prototype.getScrY=function(){return this.docBody().scrollTop||window.scrollY||0};SuperNote.prototype.checkWinX=function(newX,note){with(this){return Math.max(getScrX(),Math.min(newX,getScrX()+getWinW()-note.ref.offsetWidth-8))}};SuperNote.prototype.checkWinY=function(newY,note){with(this){return Math.max(getScrY(),Math.min(newY,getScrY()+getWinH()-note.ref.offsetHeight-8))}};SuperNote.prototype.mouseTrack=function(evt){with(this){mouseX=evt.pageX||evt.clientX+getScrX()||0;mouseY=evt.pageY||evt.clientY+getScrY()||0}};SuperNote.prototype.mouseHandler=function(evt,show){with(this){if(!document.documentElement){return true}var srcElm=evt.target||evt.srcElement,trigRE=new RegExp(myName+"-(hover|click)-([a-z0-9]+)","i"),targRE=new RegExp(myName+"-(note)-([a-z0-9]+)","i"),trigFind=1,foundNotes={};if(srcElm.nodeType!=1){srcElm=srcElm.parentNode}var elm=srcElm;while(elm&&elm!=rootElm){if(targRE.test(elm.id)||(trigFind&&trigRE.test(elm.className))){if(!allowNesting){trigFind=0}var click=RegExp.$1=="click"?1:0,noteID=RegExp.$2,ref=document.getElementById(myName+"-note-"+noteID),trigRef=trigRE.test(elm.className)?elm:null;if(ref){if(!notes[noteID]){notes[noteID]={click:click,ref:ref,trigRef:null,visible:0,animating:0,timer:null};ref._sn_obj=this;ref._sn_id=noteID}var note=notes[noteID];if(!note.click||(trigRef!=srcElm)){foundNotes[noteID]=true}if(!note.click||(show==2)){if(trigRef){notes[noteID].trigRef=notes[noteID].ref._sn_trig=elm}display(noteID,show);if(note.click&&(srcElm==trigRef)){cancelEvent(evt)}}}}if(elm._sn_trig){trigFind=1;elm=elm._sn_trig}else{elm=elm.parentNode}}if(show==2){for(var n in notes){if(notes[n].click&&notes[n].visible&&!foundNotes[n]){display(n,0)}}}}};SuperNote.prototype.display=function(noteID,show){with(this){with(notes[noteID]){clearTimeout(timer);if(!animating||(show?!visible:visible)){var tmt=animating?1:(show?showDelay||1:hideDelay||1);timer=setTimeout("SuperNote.instances["+instance+'].setVis("'+noteID+'",'+show+",false)",tmt)}}}};SuperNote.prototype.checkType=function(noteID,nextVis,nextAnim){with(this){var note=notes[noteID],bType,pType;if((/snp-([a-z]+)/).test(note.ref.className)){pType=RegExp.$1}if((/snb-([a-z]+)/).test(note.ref.className)){bType=RegExp.$1}if(nextAnim&&bType&&bTypes[bType]&&(bTypes[bType](this,noteID,nextVis)==false)){return false}if(pType&&pTypes[pType]){pTypes[pType](this,noteID,nextVis,nextAnim)}return true}};SuperNote.prototype.setVis=function(noteID,show,now){with(this){var note=notes[noteID];if(note&&checkType(noteID,show,1)||now){note.visible=show;note.animating=1;animate(noteID,show,now)}}};SuperNote.prototype.animate=function(noteID,show,now){with(this){var note=notes[noteID];if(!note.animTimer){note.animTimer=0}if(!note.animC){note.animC=0}with(note){clearTimeout(animTimer);var speed=(animations.length&&!now)?(show?animInSpeed:animOutSpeed):1;if(show&&!animC){if(onshow){this.onshow(noteID)}IEFrameFix(noteID,1);ref.style[cssProp]=cssVis}animC=Math.max(0,Math.min(1,animC+speed*(show?1:-1)));if(document.getElementById&&speed<1){for(var a=0;a<animations.length;a++){animations[a](ref,animC)}}if(!show&&!animC){if(onhide){this.onhide(noteID)}IEFrameFix(noteID,0);ref.style[cssProp]=cssHid}if(animC!=parseInt(animC)){animTimer=setTimeout(myName+'.animate("'+noteID+'",'+show+")",50)}else{checkType(noteID,animC?1:0,0);note.animating=0}}}};SuperNote.prototype.IEFrameFix=function(noteID,show){with(this){if(!window.createPopup||!IESelectBoxFix){return }var note=notes[noteID],ifr=note.iframe;if(!ifr){ifr=notes[noteID].iframe=document.createElement("iframe");ifr.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";ifr.style.position="absolute";ifr.style.borderWidth="0";note.ref.parentNode.insertBefore(ifr,note.ref.parentNode.firstChild)}if(show){ifr.style.left=note.ref.offsetLeft+"px";ifr.style.top=note.ref.offsetTop+"px";ifr.style.width=note.ref.offsetWidth+"px";ifr.style.height=note.ref.offsetHeight+"px";ifr.style.visibility="inherit"}else{ifr.style.visibility="hidden"}}};var MaxSize=200;function sizeContent(B){var A=window.event?B.keyCode:B.which;if($("nbSpaceDesc").value.length>MaxSize){$("MsgContent").setAttribute("style","color:#FFA70F;font-size:14px;")}else{$("MsgContent").setAttribute("style","color:#CDFF00;")}}function deleteDocument(A,B){document.getElementById(B).innerHTML='<span id="loadingimg" >Chargement en cours <img  border="0" style="margin-left:5px;" src="/xwiki/skins/nearbee/KBFiles/images/ajax%2Dloader.gif" title="Forum Home"/></span>';new Ajax.Request(A,{method:"get",onSuccess:function(){Effect.Squish(B)}});return false}function verifSizeMsgForum(){if($("nbSpaceDesc").value.length>MaxSize){new Effect.Shake("MsgContent");return false}return true}function PostuleForum(D,E){if(verifSizeMsgForum()){space=document.getElementById("nbSpaceForum").value;desc=document.getElementById("nbSpaceDesc").value;parent=document.getElementById("nbSpaceParent").value;desc=htmlentities(desc);desc=nl2br(desc,true);var C=document.getElementById(E).innerHTML;var B=document.getElementById("oldAdd").innerHTML;document.getElementById("oldAdd").innerHTML=B+C;$(E).hide();new Effect.Opacity(E,{from:1,to:0.5,duration:0.5});var A=document.getElementById(E).innerHTML;new Ajax.Request(D,{method:"get",parameters:{"xpage":"plain","act":"addReply","space":space,"desc":desc,"parent":parent},onComplete:function(G){$(E).appear();var F=G.responseText||"no response text";document.getElementById(E).innerHTML=F;document.getElementById("nbSpaceDesc").value=""}});return false}}function PostuleForumWithAttachmentTest(D){var C=window.parent.document.getElementById(D).innerHTML;var B=window.parent.document.getElementById("oldAdd").innerHTML;window.parent.document.getElementById("oldAdd").innerHTML=B+C;$(D).hide();new Effect.Opacity(D,{from:1,to:0.5,duration:0.5});var A=window.parent.document.getElementById(D).innerHTML;$(D).appear();window.parent.document.getElementById(D).innerHTML=window.parent.document.getElementById("upload_target").innerHTML;window.parent.document.getElementById("nbSpaceDesc").value="";return false}function PostuleForumWithAttachment(H,E,G,A,F){var D=$(H).innerHTML;var C=$("oldAdd").innerHTML;$("oldAdd").innerHTML=C+D;$(H).hide();var B=$(H).innerHTML;new Ajax.Request(E,{method:"get",parameters:{"xpage":"plain","act":"getDetailsMember","member":G,"document":A,"space":F},onComplete:function(J){$(H).appear();var I=J.responseText||"no response text";if($("noReplys")){$("noReplys").hide()}endLoadingId("loadingAddReply");$(H).innerHTML=I;$("desc").value="";$("upload").value=""}});return false}function repConfirm(A,C,B){new Effect.Opacity("u_"+A,{from:1,to:0});$("u_"+A).hide();$("c_"+A).appear()}function cancelConf(A){new Effect.Opacity("c_"+A,{from:1,to:0});$("c_"+A).hide();$("u_"+A).appear()}function nl2br(B,A){breakTag="<br />";if(typeof A!="undefined"&&!A){breakTag="<br>"}return(B+"").replace(/([^>]?)\n/g,"$1"+breakTag+"\n")}function htmlentities(B,F){var E={},D="",A="",C=0;A=B.toString();if(false===(E=get_html_translation_table("HTML_ENTITIES",F))){return false}for(D in E){entity=E[D];A=A.split(D).join(entity)}return A}function get_html_translation_table(I,F){var D={},H={},C=0,A="";var E={},B={};var J={},G={};J=(I?I.toUpperCase():"HTML_SPECIALCHARS");G=(F?F.toUpperCase():"ENT_COMPAT");E[0]="HTML_SPECIALCHARS";E[1]="HTML_ENTITIES";B[0]="ENT_NOQUOTES";B[2]="ENT_COMPAT";B[3]="ENT_QUOTES";if(!isNaN(J)){J=E[J]}if(!isNaN(G)){G=B[G]}if(J=="HTML_SPECIALCHARS"){D["60"]="&lt;";D["62"]="&gt;";D["38"]="&amp;"}else{if(J=="HTML_ENTITIES"){D["38"]="&amp;";D["60"]="&lt;";D["62"]="&gt;";D["160"]="&nbsp;";D["161"]="&iexcl;";D["162"]="&cent;";D["163"]="&pound;";D["164"]="&curren;";D["165"]="&yen;";D["166"]="&brvbar;";D["167"]="&sect;";D["168"]="&uml;";D["169"]="&copy;";D["170"]="&ordf;";D["171"]="&laquo;";D["172"]="&not;";D["173"]="&shy;";D["174"]="&reg;";D["175"]="&macr;";D["176"]="&deg;";D["177"]="&plusmn;";D["178"]="&sup2;";D["179"]="&sup3;";D["180"]="&acute;";D["181"]="&micro;";D["182"]="&para;";D["183"]="&middot;";D["184"]="&cedil;";D["185"]="&sup1;";D["186"]="&ordm;";D["187"]="&raquo;";D["188"]="&frac14;";D["189"]="&frac12;";D["190"]="&frac34;";D["191"]="&iquest;";D["192"]="&Agrave;";D["193"]="&Aacute;";D["194"]="&Acirc;";D["195"]="&Atilde;";D["196"]="&Auml;";D["197"]="&Aring;";D["198"]="&AElig;";D["199"]="&Ccedil;";D["200"]="&Egrave;";D["201"]="&Eacute;";D["202"]="&Ecirc;";D["203"]="&Euml;";D["204"]="&Igrave;";D["205"]="&Iacute;";D["206"]="&Icirc;";D["207"]="&Iuml;";D["208"]="&ETH;";D["209"]="&Ntilde;";D["210"]="&Ograve;";D["211"]="&Oacute;";D["212"]="&Ocirc;";D["213"]="&Otilde;";D["214"]="&Ouml;";D["215"]="&times;";D["216"]="&Oslash;";D["217"]="&Ugrave;";D["218"]="&Uacute;";D["219"]="&Ucirc;";D["220"]="&Uuml;";D["221"]="&Yacute;";D["222"]="&THORN;";D["223"]="&szlig;";D["224"]="&agrave;";D["225"]="&aacute;";D["226"]="&acirc;";D["227"]="&atilde;";D["228"]="&auml;";D["229"]="&aring;";D["230"]="&aelig;";D["231"]="&ccedil;";D["232"]="&egrave;";D["233"]="&eacute;";D["234"]="&ecirc;";D["235"]="&euml;";D["236"]="&igrave;";D["237"]="&iacute;";D["238"]="&icirc;";D["239"]="&iuml;";D["240"]="&eth;";D["241"]="&ntilde;";D["242"]="&ograve;";D["243"]="&oacute;";D["244"]="&ocirc;";D["245"]="&otilde;";D["246"]="&ouml;";D["247"]="&divide;";D["248"]="&oslash;";D["249"]="&ugrave;";D["250"]="&uacute;";D["251"]="&ucirc;";D["252"]="&uuml;";D["253"]="&yacute;";D["254"]="&thorn;";D["255"]="&yuml;"}else{throw Error("Table: "+J+" not supported");return false}}if(G!="ENT_NOQUOTES"){D["34"]="&quot;"}if(G=="ENT_QUOTES"){D["39"]="&#039;"}for(C in D){A=String.fromCharCode(C);H[A]=D[C]}return H}function ShowHide(A){if($(A).style.display=="none"){Effect.SlideDown(A);return false}else{Effect.SlideUp(A);return false}}function PostuleComment(B,D){var L="newAdd"+D;var H="oldAdd"+D;var F="nbReplyDoc_"+D;var I="nbReplyComment_"+D;var A=document.getElementById("nbSpaceForum").value;var G=document.getElementById(I).value;var K=document.getElementById(F).value;G=htmlentities(G);G=nl2br(G,true);var C=document.getElementById(L).innerHTML;var J=document.getElementById(H).innerHTML;document.getElementById(H).innerHTML=J+C;$(L).hide();new Effect.Opacity(L,{from:1,to:0.5,duration:0.5});var E=document.getElementById(L).innerHTML;new Ajax.Request(B,{method:"get",parameters:{"xpage":"plain","act":"addComment","space":A,"desc":G,"parent":K,"commentCount":commentCount},onComplete:function(N){$(L).appear();var M=N.responseText||"no response text";document.getElementById(L).innerHTML=M;document.getElementById(I).value=""}});return false}var nbrComment=0;function PostuleComment(B,D,A){nbrComment++;var M="newAdd"+D;var H="oldAdd"+D;var L="cl_"+D;loadingId("cmt_l_"+D);var F="nbReplyDoc_"+D;var I="nbReplyComment_"+D;var G=document.getElementById(I).value;var K=document.getElementById(F).value;G=htmlentities(G);G=nl2br(G,true);var C=document.getElementById(M).innerHTML;var J=document.getElementById(H).innerHTML;document.getElementById(H).innerHTML=J+C;$(M).hide();new Effect.Opacity(M,{from:1,to:0.5,duration:0.5});var E=document.getElementById(M).innerHTML;new Ajax.Request(B,{method:"get",parameters:{"xpage":"plain","act":"addComment","space":A,"desc":G,"parent":K,"commentCount":nbrComment,"cl":$(L).value},onComplete:function(O){$(M).appear();var N=O.responseText||"no response text";document.getElementById(M).innerHTML=N;document.getElementById(I).value="";if($(L).value=="#ffffff"){$(L).value="#F4F4F4"}else{$(L).value="#ffffff"}replyCommentSize(D,A);endLoadingId("cmt_l_"+D)}});return false}function SearchReplyId(B,A){loadingId("loading_haut");loadingId("loading_bas");if($(A)){Effect.ScrollTo(A);new Effect.Highlight(A,{startcolor:"#ffff99",duration:1.5,endcolor:"#ffff99"});endLoadingId("loading_haut");endLoadingId("loading_bas")}else{Current_Pagination=parseInt(Current_Pagination)+1;if(Current_Pagination<Nbr_Pagination){url=Url_Pagination+"&begin="+Current_Pagination;new Ajax.Request(url,{method:"get",onComplete:function(D){new Effect.Opacity(B,{from:1,to:0});$(B).appear();var C=D.responseText||"no response text";new Effect.Opacity(B,{from:0,to:1});document.getElementById(B).innerHTML=C;SearchReplyId(B,A)}})}}}function archiver(C,A,B){url="/xwiki/bin/view/NBForum/ForumAction";url+="?xpage=plain&act=archiver&space="+C+"&topic="+A+"&state="+B;new Ajax.Request(url,{method:"get",onComplete:function(E){var D=E.responseText||"no response text";$(A).fade();if(!$("ArchiveBtn")){urlArchiv=document.location.href+"?state=archiv";html='<div style="float:right; margin-right:10px;" id="ArchiveBtn">';html+='<input value="Discussions fermées" style="width:150px" type="button" onclick="document.location.href=\''+urlArchiv+'\'" class="NBForumbutton" />';html+="</div>";new Insertion.Before("CreatTopicsBtn",html);new Effect.Opacity("ArchiveBtn",{from:0.5,to:1,duration:0.5})}}});return false}function NotificationSubscriber(D,A,C,B){url="/xwiki/bin/view/NBForum/ForumAction";url+="?xpage=plain&act=notifSuscriber&space="+D+"&topic="+A+"&state="+C+"&type="+B;new Ajax.Request(url,{method:"get",onComplete:function(F){var E=F.responseText||"no response text";new Effect.Opacity("NotifBloc",{from:0,to:1});$("NotifBloc").innerHTML=E}});return false}reportAbuse=function(A){new Ajax.Request(A,{method:"get",onComplete:function(C){var B=C.responseText||"no response text"}});return false};deleteReply=function(B,A){loadingId("l_"+A);new Ajax.Request("/xwiki/bin/view/NBForum/ForumAction?xpage=plain&act=deleteReply&reply="+A+"&space="+B,{method:"get",onComplete:function(D){var C=D.responseText||"no response text";Effect.Squish(A)}});return false};function repConfirm(A){new Effect.Opacity("u_"+A,{from:1,to:0});$("u_"+A).hide();$("c_"+A).appear()}function cancelConf(A){new Effect.Opacity("c_"+A,{from:1,to:0});$("c_"+A).hide();$("u_"+A).appear()}deleteTopic=function(A){if(confirm("Etes-vous sure de vouloir supprimer ce topic ? ")){document.location.href=A}else{return false}};function updateTopic(C,D,B,A){A=htmlentities(A);A=nl2br(A,true);loadingId("descriptionValue");new Ajax.Request(C,{parameters:{"xpage":"plain","act":"modifiyTopic","space":D,"newContent":A,"topic":B},method:"get",onComplete:function(F){var E=F.responseText||"no response text";endLoadingId("descriptionValue");if(E!="no response text"){$("descriptionValue").innerHTML=E}}});return false}function updateReply(C,E,D,A,B){A=htmlentities(A);A=nl2br(A,true);loadingId(B);new Ajax.Request(C,{parameters:{"xpage":"plain","act":"modifyReply","space":E,"newContent":A,"reply":D},method:"get",onComplete:function(G){var F=G.responseText||"no response text";endLoadingId(B);if(F!="no response text"){$(B).innerHTML=F}}});return false}function checkTitle(){if($("actaddtheme").value==""){alert("Le champ titre ne doit pas être vide");return false}return true}function getLastTheme(){var A=$$(".ForumThemeTr");var B=0;A.each(function(C){B++;if(B==A.length){return C}})}function hideLastTheme(){getLastTheme().remove()}function addTheme(B,C,E,D,A){loadingId("loading_haut");E=htmlentities(E);D=htmlentities(D);D=nl2br(D,true);new Ajax.Request(B,{method:"get",parameters:{"xpage":"plain","act":"addTheme","space":C,"title":E,"desc":D,"cl":A},onComplete:function(H){var G=H.responseText||"no response text";if($("noReplys")){$("noReplys").hide()}var F=G+$("themesBody").innerHTML;$("themesBody").update(F);$("title").value="";$("desc").value="";Effect.SlideUp("slidedown");endLoadingId("loading_haut");if($("cl").value=="#ffffff"){$("cl").value="#F4F4F4"}else{$("cl").value="#ffffff"}}})}Control_champs=function(A){if($("warn-error")){$("warn-error").remove()}if($(A).value==""){new Insertion.After($(A),"<div id='warn-error' style='color:#F57A1A;margin-top:2px;text-align:right;'>ce champ est obligatoire</div>");return false}return true};function addThemeAndRefreshPagination(G,B,F,C,E,D,A){if(Control_champs("title")){lastPagination=Current_Pagination;Current_Pagination=B;url=Url_Pagination+"&begin="+B;if(lastPagination!=0){loadingId("loading_haut");new Ajax.Request(url,{method:"get",onComplete:function(I){$(G).appear();var H=I.responseText||"no response text";new Effect.Opacity(G,{from:0,to:1});document.getElementById(G).innerHTML=H;addTheme(F,C,E,D,A)}})}else{addTheme(F,C,E,D,A)}if($$(".ForumThemeTr").length>15){hideLastTheme()}return false}else{return false}}function addTopicAndRefreshPagination(B,A){if(Control_champs("title")){lastPagination=Current_Pagination;Current_Pagination=A;url=Url_Pagination+"&begin="+A;loadingId("loading_haut");if(lastPagination!=0){alert("go to pagination 1");new Ajax.Request(url,{method:"get",onComplete:function(D){$(B).appear();var C=D.responseText||"no response text";new Effect.Opacity(B,{from:0,to:1});document.getElementById(B).innerHTML=C;return true}})}else{return true}}else{return false}}function addNewCreatedTopic(A,B){getTopicEntry(A,B,space,docName,cl)}function setTopicEntry(B,E,C,D,A){new Ajax.Request(B,{parameters:{"xpage":"plain","act":"getTopicTR","space":C,"docName":D,"cl":A},method:"get",onComplete:function(H){var G=H.responseText||"no response text";var F=G+$(E).innerHTML;$(E).update(F);$("title").value="";$("desc").value="";Effect.SlideUp("displayAddTopicForm");endLoadingId("loading_haut");if($("noReplys")){$("noReplys").hide()}if($("cl").value=="#ffffff"){$("cl").value="#F4F4F4"}else{$("cl").value="#ffffff"}}})}function replyCommentSize(A,B){url="/xwiki/bin/view/NBForum/ForumAction";url+="?xpage=plain&act=replyCommentSize&space="+B+"&reply="+A;id=A+"CommentCount";new Ajax.Request(url,{method:"get",onComplete:function(D){var C=D.responseText||"no response text";new Effect.Opacity("NotifBloc",{from:0,to:1});$(id).innerHTML=C}});return false}SuperNote.prototype.getScrY=function(){return document.body.scrollTop||window.scrollY||0};function loadingId(B){if($(B)){$(B).innerHTML='<span style="color:#BABABA;font-size:12px;line-height:21px;" >Chargement en cours <img  border="0" style="margin-left:5px;" src="/xwiki/skins/albatross/images13/ajax%2Dloader.gif" title="Chargement"/></span>'}}function endLoadingId(B){if($(B)){$(B).innerHTML=""}}