Prototype.Browser.versionString="";Prototype.Browser.KHTML=!Prototype.Browser.WebKit&&(navigator.appVersion.indexOf("KHTML/")>0);Prototype.Browser.Chrome=navigator.appVersion.indexOf("Chrome/")>0;Prototype.Browser.Safari=navigator.appVersion.indexOf("Safari/")>0;if(Prototype.Browser.WebKit){iOffset=navigator.appVersion.indexOf("AppleWebKit/");Prototype.Browser.webkitVersionString=navigator.appVersion.substring(iOffset+12);if((iOffset=Prototype.Browser.versionString.indexOf(" "))>0){Prototype.Browser.webkitVersionString=Prototype.Browser.webkitVersionString.substring(0,iOffset)}Prototype.Browser.webkitVersion=parseFloat(Prototype.Browser.webkitVersionString)}if(Prototype.Browser.IE){if((iOffset=navigator.appVersion.indexOf("MSIE "))>0){Prototype.Browser.versionString=navigator.appVersion.substring(iOffset+5);if((iOffset=Prototype.Browser.versionString.indexOf(";"))>0){Prototype.Browser.versionString=Prototype.Browser.versionString.substring(0,iOffset)}}}else{if(Prototype.Browser.Gecko){if((iOffset=navigator.userAgent.indexOf("Firefox/"))>0){Prototype.Browser.versionString=navigator.userAgent.substring(iOffset+8);if((iOffset=Prototype.Browser.versionString.indexOf(" "))>0){Prototype.Browser.versionString=Prototype.Browser.versionString.substring(0,iOffset)}}}else{if(Prototype.Browser.Safari){if((iOffset=navigator.appVersion.indexOf("Version/"))>0){Prototype.Browser.versionString=navigator.appVersion.substring(iOffset+8);if((iOffset=Prototype.Browser.versionString.indexOf(" "))>0){Prototype.Browser.versionString=Prototype.Browser.versionString.substring(0,iOffset)}}else{Prototype.Browser.Safari=false}}else{if(Prototype.Browser.KHTML){if((iOffset=navigator.appVersion.indexOf("KHTML/"))>0){Prototype.Browser.versionString=navigator.appVersion.substring(iOffset+6);if((iOffset=Prototype.Browser.versionString.indexOf(" "))>0){Prototype.Browser.versionString=Prototype.Browser.versionString.substring(0,iOffset)}}}}}}if(Prototype.Browser.versionString.length==0){if(Prototype.Browser.Chrome){if((iOffset=navigator.appVersion.indexOf("Chrome/"))>0){Prototype.Browser.versionString=navigator.appVersion.substring(iOffset+7);if((iOffset=Prototype.Browser.versionString.indexOf(" "))>0){Prototype.Browser.versionString=Prototype.Browser.versionString.substring(0,iOffset)}}}else{if(Prototype.Browser.WebKit){if((iOffset=navigator.appVersion.indexOf("Version/"))>0){Prototype.Browser.versionString=navigator.appVersion.substring(iOffset+8);if((iOffset=Prototype.Browser.versionString.indexOf(" "))>0){Prototype.Browser.versionString=Prototype.Browser.versionString.substring(0,iOffset)}}}}}if(Prototype.Browser.versionString.length==0){oRegexp=new RegExp("([\\.\\d]+)");aMatches=navigator.appVersion.match(oRegexp);if(aMatches.length){Prototype.Browser.versionString=aMatches[1]}else{Prototype.Browser.versionString=navigator.appVersion}}Prototype.Browser.version=parseFloat(Prototype.Browser.versionString);Prototype.Browser.log=function(a,c){try{if(c&&console[c]){console[c](a)}else{console.log(a)}}catch(b){}};Prototype.Browser.backtrace=function(){var k=[];try{invalid.code.exception+=0}catch(c){if(c.stack){var m=c.stack.split("\n");for(var d=0,f=m.length;d<f;d++){if(m[d].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){k.push(m[d])}}k.shift()}else{if(window.opera&&c.message){var m=e.message.split("\n");for(var d=0,f=m.length;d<f;d++){if(m[d].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){var j=m[d];if(m[d+1]){j+=" at "+m[d+1];d++}k.push(j)}}k.shift()}else{var b=arguments.callee.caller;while(b){var g=b.toString();var a=g.substring(g.indexOf("function")+8,g.indexOf("("))||"anonymous";k.push(a);b=b.caller}}}}return k};if(Prototype.BrowserFeatures.SelectorsAPI&&((Prototype.Browser.Safari&&Prototype.Browser.version<4)||(Prototype.Browser.Chrome&&Prototype.Browser.version<5))){Prototype.Browser.log("Prototype selectorsAPI disabled, app version: "+Prototype.Browser.version);Prototype.BrowserFeatures.SelectorsAPI=false}Prototype.Browser.getDimensions=function(){if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight}else{if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight}}if(self.pageYOffset){l=self.pageXOffset;t=self.pageYOffset}var a=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;var b=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;if(!Prototype.Browser.IE){if(w>a){b-=Prototype.Browser.getScrollBarDimension();if(b>h){b-=Prototype.Browser.getScrollBarDimension()}}if(h>b){a-=Prototype.Browser.getScrollBarDimension();if(a>w){a-=Prototype.Browser.getScrollBarDimension()}}}return{offsetX:l,offsetY:t,width:w,height:h,clientWidth:a,clientHeight:b}};Prototype.Browser.iScrollBarDimension=-1;Prototype.Browser.getScrollBarDimension=function(){if(Prototype.Browser.iScrollBarDimension==-1){var d=new Element("p");d.setStyle({width:"100%",height:"200px"});var b=new Element("div");b.setStyle({position:"absolute",top:"0px",left:"0px",visibility:"hidden",overflow:"hidden",width:"200px",height:"150px"});b.appendChild(d);document.body.appendChild(b);var c=d.offsetWidth;b.setStyle({overflow:"scroll"});var a=d.offsetWidth;if(c==a){a=b.clientWidth}b.remove();Prototype.Browser.iScrollBarDimension=c-a+(Prototype.Browser.KHTML?4:0)}return Prototype.Browser.iScrollBarDimension};Prototype.Browser.loaded=false;Prototype.Browser.onLoadCallBack=new Array();Prototype.Browser.onLoad=function(b){if(Prototype.Browser.loaded){try{b()}catch(a){Prototype.alertError("Prototype.Browser.onLoad: "+a+" - "+a.description+"\n"+Prototype.Browser.backtrace().join("\n"));Prototype.alertError("Prototype.Browser.onLoad: "+b)}}else{Prototype.Browser.onLoadCallBack.push(b)}};Prototype.Browser.domReady=function(){if(Prototype.Browser.loaded){return}Prototype.Browser.loaded=true;for(var a=0;a<Prototype.Browser.onLoadCallBack.length;a++){try{Prototype.Browser.onLoadCallBack[a]()}catch(b){Prototype.alertError("Prototype.Browser.domReady: "+b+" - "+b.description+"\n"+Prototype.Browser.backtrace().join("\n"));Prototype.alertError("Prototype.Browser.domReady: ["+a+"]="+Prototype.Browser.onLoadCallBack[a])}}Prototype.Browser.onLoadCallBack.clear()};Event.observe(window,"load",Prototype.Browser.domReady);Event.observe(document,"DOMContentLoaded",Prototype.Browser.domReady);var OverlappingFix=Class.create();if(Prototype.Browser.IE&&Prototype.Browser.version<7){OverlappingFix.addMethods({oIFrame:null,initialize:function(){this.oIFrame=new Element("iframe",{src:"javascript:false;",frameborder:0,scrolling:"no"});this.oIFrame.setStyle({position:"absolute",filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"});this.oIFrame.hide();var a=document.getElementsByTagName("body")[0];a.appendChild(this.oIFrame)},hide:function(){this.oIFrame.hide()},show:function(c){var a=arguments.length==2&&arguments[1];if(a){if(this.oIFrame.up()!=c.up()){this.oIFrame.remove();c.insert({after:this.oIFrame})}}try{this.oIFrame.clonePosition(c);this.oIFrame.setStyle({zIndex:this.getTargetIndex(c)-1,display:"block"})}catch(b){}},update:function(b){b=$(b);var a=b.cumulativeOffset();this.oIFrame.setStyle({width:b.offsetWidth+"px",height:b.offsetHeight+"px",top:a.top+"px",left:a.left+"px",zIndex:this.getTargetIndex(b)-1})},remove:function(){this.oIFrame.remove()},getTargetIndex:function(a){if(a.getStyle("z-index")){return a.getStyle("z-index")}else{if(a.parentNode){return this.getTargetIndex(a.parentNode)}}return 0}})}else{OverlappingFix.addMethods({initialize:function(){},hide:function(){},show:function(){},remove:function(){},update:function(){}})}Prototype.Browser.activateFlashOverlappingFix=function(){if(Prototype.Browser.Gecko&&navigator.userAgent.indexOf("Linux")>-1){var a=0;if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){var b=navigator.plugins["Shockwave Flash"].description;var d=b.indexOf(".");var c=b.indexOf(" ",d);if(c>0){b=b.substring(0,c-1)}c=b.lastIndexOf(" ",d);if(c>0){b=b.substring(c+1,b.length-1);a=parseFloat(b)}}if(a<10){OverlappingFix.addMethods({oIFrame:null,initialize:function(){this.oIFrame=new Element("iframe",{src:"javascript:false;",frameborder:0,scrolling:"no",allowTransparency:"true"});this.oIFrame.setStyle({position:"absolute",opacity:0});this.oIFrame.hide();var f=document.getElementsByTagName("body")[0];f.appendChild(this.oIFrame)},hide:function(){this.oIFrame.hide()},show:function(g){var f=arguments.length==2&&arguments[1];if(f){if(this.oIFrame.up()!=g.up()){this.oIFrame.remove();g.insert({after:this.oIFrame})}}this.oIFrame.clonePosition(g);this.oIFrame.setStyle({zIndex:this.getTargetIndex(g)-1,display:"block"})},update:function(g){g=$(g);var f=g.cumulativeOffset();this.oIFrame.setStyle({width:g.offsetWidth+"px",height:g.offsetHeight+"px",top:f.top+"px",left:f.left+"px",zIndex:this.getTargetIndex(g)-1})},remove:function(){this.oIFrame.remove()},getTargetIndex:function(f){if(f.getStyle("z-index")){return f.getStyle("z-index")}else{if(f.parentNode){return this.getTargetIndex(f.parentNode)}}return 0}})}}};Prototype.Browser.history={lastLocation:"",callbacks:new Hash(),separator:":",timer:null,html5StateSupport:typeof(window.history.pushState)!="undefined",useHtml5:false};Prototype.Browser.addHistory=function(c,a){if(Prototype.Browser.history.html5StateSupport&&Prototype.Browser.history.useHtml5){try{window.history.pushState(c+Prototype.Browser.history.separator+a,document.title,a);Prototype.Browser.history.lastLocation=c+Prototype.Browser.history.separator+a}catch(b){Prototype.Browser.history.html5StateSupport=false}}if(!Prototype.Browser.history.html5StateSupport||!Prototype.Browser.history.useHtml5){if(Prototype.Browser.history.lastLocation!=(c+Prototype.Browser.history.separator+a)){if(Prototype.Browser.IE){if($("ajaxHistory")){$("ajaxHistory").src="/shared/history/"+c+Prototype.Browser.history.separator+a}}if(Prototype.Browser.history.timer!=null){clearTimeout(Prototype.Browser.history.timer)}if(Prototype.Browser.WebKit){document.location.hash="#"+c+Prototype.Browser.history.separator+a}else{document.location.hash="#"+c+Prototype.Browser.history.separator+escape(a)}Prototype.Browser.history.lastLocation=c+Prototype.Browser.history.separator+a;if(!Prototype.Browser.IE){Prototype.Browser.checkHistoryChange()}}}};Prototype.Browser.checkHistoryChange=function(){if(Prototype.Browser.history.html5StateSupport&&Prototype.Browser.history.useHtml5){if((Prototype.Browser.Gecko&&Prototype.Browser.versionString.indexOf("4.0b")<=0)||(Prototype.Browser.Safari&&(Prototype.Browser.version!=0&&Prototype.Browser.version<5.1&&(!Prototype.Browser.version==5||Prototype.Browser.versionString<"5.0.6")))){Element.observe(window,"popstate",function(a){Prototype.Browser.historyChanged(a.state);Event.stop(a)})}else{Prototype.Browser.history.ready=false;Element.observe(window,"popstate",function(a){if(!Prototype.Browser.history.ready){Prototype.Browser.history.ready=true}else{Prototype.Browser.historyChanged(a.state)}Event.stop(a)})}}else{if(Prototype.Browser.IE){if($("ajaxHistory")){iOffset=$("ajaxHistory").contentWindow.document.location.lastIndexOf("/shared/history/");if(iOffset>=0){sCurrentPage=unescape($("ajaxHistory").contentWindow.document.location.substring(iOffset+16))}else{sCurrentPage=""}}else{sCurrentPage=unescape(document.location.hash.substring(1));oIFrame=new Element("IFRAME",{src:"/shared/history/"+sCurrentPage,id:"ajaxHistory",name:"ajaxHistory"});oIFrame.hide();$$("BODY")[0].appendChild(oIFrame)}}else{sCurrentPage=document.location.hash.substring(1);if(Prototype.Browser.Opera){sCurrentPage=unescape(sCurrentPage)}Prototype.Browser.historyChanged(sCurrentPage);Prototype.Browser.history.timer=setTimeout("Prototype.Browser.checkHistoryChange()",200)}}};Prototype.Browser.getCurrentHistoryPage=function(){var b=arguments.length==1?arguments[0]:document.location.hash.substring(1);if(Prototype.Browser.IE||Prototype.Browser.Opera){b=unescape(b)}var a=b.indexOf(Prototype.Browser.history.separator);if(a>0){return{hash:b.substring(0,a),location:b.substring(a+1)}}return null};Prototype.Browser.getCurrentPage=function(){oPage=Prototype.Browser.getCurrentHistoryPage();if(oPage==null){oPage={hash:"",location:document.location.href}}return oPage};Prototype.Browser.historyChanged=function(d){if(Prototype.Browser.history.lastLocation!=d){d=d||"";var b=d.indexOf(Prototype.Browser.history.separator);var c="";var f=null;var a="";if(b>0){c=d.substring(0,b);a=d.substring(b+1)}else{a=d}f=Prototype.Browser.history.callbacks.get(c);if(typeof(f)!="function"){f=Prototype.Browser.history.callbacks.get("*")}if(typeof(f)=="function"){f(c,a)}else{document.location.href=document.location.href}Prototype.Browser.history.lastLocation=d}};Prototype.Browser.registerHistoryCallback=function(a,b){if(a==""){a="*"}if(b==null){Prototype.Browser.history.callbacks.unset(a)}else{Prototype.Browser.history.callbacks.set(a,b)}};Prototype.requireVars={regexpFixEmptyVariable:new RegExp("var\\s+([^=;,]+);","g"),regexpFunction:new RegExp("function\\s+([^\\s\\('\"]+)\\s*\\(","g"),regexpFixBlock:new RegExp("(if|for)[s]*\\([^;]+\\)[s]\\{*$"),regexpFixIf:new RegExp("if[\\s]*\\(!([^\\)=\\+\\-]+)\\)[\\s]*(\\{?)(var[\\s]+)?([^=;]+=\\s*(\\{|\\[))","g"),regexpFixVariable:new RegExp("var\\s+","g"),path:null,included:document.alreadyIncluded||[]};Prototype.requireVars.included.push("prototype.js","jojoPrototype.js");$req=Prototype.require=function(c){testScriptName=c;if(c.indexOf(".php")<0){if((iOffset=c.indexOf("?"))>0){testScriptName=c.substring(0,iOffset)}}if(Prototype.requireVars.included.indexOf(testScriptName)<0){if(c.indexOf(".css")>0){var a=$$("LINK[href*="+c+"]");if(!a.length){Prototype.requireVars.included.push(testScriptName);if(c.charAt(0)!="/"){c="/shared/styles/"+c;Prototype.requireVars.included.push("/shared/styles/"+testScriptName)}oLink=new Element("link",{rel:"stylesheet",type:"text/css",href:c});aRoot=$$("HEAD");if(aRoot.length>0){oHead=aRoot[0]}else{oHead=new Element("HEAD");document.appendChild(oHead)}oHead.appendChild(oLink)}}else{var b=$$('SCRIPT[src*="'+testScriptName+'"]');if(!b.length){Prototype.requireVars.included.push(testScriptName);if(c.charAt(0)!="/"){if(Prototype.requireVars.path==null){b=$$("SCRIPT[src*=jojoPrototype.js]");if(b.length){iOffset=b[0].src.indexOf("jojoPrototype.js");Prototype.requireVars.path=b[0].src.substring(0,iOffset)}}c=(Prototype.requireVars.path||"/shared/scripts/")+c}return Prototype.loadScript(c)}}}return true};Prototype.loadScript=function(scriptName){var bAsynchronous=arguments.length==2?(parseInt(arguments[2])?true:false):false;var bSuccess=false;tagScriptName=scriptName;var aRoot=$$("HEAD");if(aRoot.length>0){oHead=aRoot[0]}else{oHead=new Element("HEAD");document.appendChild(oHead)}new Ajax.Request(scriptName,{method:"GET",evalScripts:false,evalJS:false,asynchronous:bAsynchronous,onSuccess:function(transport){if(typeof(window.execScript)!="undefined"&&!Prototype.Browser.WebKit){try{window.execScript(transport.responseText);bSuccess=true}catch(e){Prototype.alertError("Prototype.loadScript ["+scriptName+"]: "+e+" - "+e.description+"\n"+Prototype.Browser.backtrace().join("\n"))}}else{try{if(Prototype.Browser.WebKit||Prototype.Browser.KHTML){var oScript2=new Element("script",{type:"text/javascript"});if(Prototype.Browser.WebKit){oScript2.text=transport.responseText}else{oScript2.innerText=transport.responseText}try{oHead.appendChild(oScript2);bSuccess=true}catch(e){Prototype.alertError("Prototype.loadScript ["+scriptName+"]: "+e+" - "+e.description+"\n"+Prototype.Browser.backtrace().join("\n"))}}else{var oScript=new Element("script",{type:'text/javascript"',src:tagScriptName});oHead.appendChild(oScript);if(Prototype.Browser.Gecko&&Prototype.Browser.version<3.5){window.eval(transport.responseText)}else{eval.call(window,transport.responseText)}bSuccess=true}}catch(ex){try{eval(transport.responseText,window);bSuccess=true}catch(e){Prototype.alertError("Prototype.loadScript ["+scriptName+"]: "+e+" - "+e.description+"\n"+Prototype.Browser.backtrace().join("\n"))}}}},onFailure:function(transport){Prototype.Browser.log(scriptName+": loading failed")}});return bSuccess};Prototype.sprintf=function(){if(arguments===undefined||arguments===null||arguments.length===0){Prototype.alertWarning("sprintf without text");return""}else{if(arguments.length==1){return arguments[0]}else{text=arguments[0];var b=1,a=arguments;return text.replace(/%s/g,function(c){var d=(b in a)?a[b]:c;b++;return d})}}};if(Prototype.debugLevel===undefined||Prototype.debugLevel===null){Prototype.debugLevel=0}Prototype.errorLevel={NODEBUG:0,ERROR:1,WARNING:2,INFO:3};Prototype.getDebugLevel=function(a){if(a==0){return"No debug"}else{if(a==1){return"Erreur"}else{if(a==2){return"Warning"}else{if(a==3){return"Information"}}}}};Prototype.getConsoleDebugLevel=function(a){if(!a){return null}else{if(a==Prototype.errorLevel.ERROR){return"error"}else{if(a==Prototype.errorLevel.WARNING){return"warn"}else{if(a==Prototype.errorLevel.INFO){return"info"}}}}};Prototype.alert=function(b,a){if(Prototype.debugLevel>=b){alert(Prototype.getDebugLevel(b)+" - "+a)}};Prototype.alertError=function(a){Prototype.alert(1,a)};Prototype.alertWarning=function(a){Prototype.alert(2,a)};Prototype.alertInfo=function(a){Prototype.alert(3,a)};Prototype.log=function(b,a){if(Prototype.debugLevel>=b){Prototype.Browser.log(Prototype.getDebugLevel(b)+" - "+a,Prototype.getConsoleDebugLevel(b))}};Prototype.logError=function(a){Prototype.log(Prototype.errorLevel.ERROR,a)};Prototype.logWarning=function(a){Prototype.log(Prototype.errorLevel.WARNING,a)};Prototype.logInfo=function(a){Prototype.log(Prototype.errorLevel.INFO,a)};Prototype.overlayAlert=function(c,b){try{Prototype.require("superadmin/overlay.css");Prototype.require("jojoPopup.js");Prototype.require("langs/superadmin."+(typeof sJavascriptLang!="undefined"?sJavascriptLang:"fr")+".js");options={title:"Confirmation",onValid:function(){},zIndex:666};Object.extend(options,b||{});container=new Element("div",{id:"divOverlayAlert","class":"Overlay",style:"display:none"});containerShadow=new Element("div",{"class":"ombrage_interieur"});containerBlock=new Element("div",{id:"overlay_divOverlayAlert",display:"block"});containerHeader=new Element("div",{id:"overlay_header_divOverlayAlert","class":"headerOverlay headerOverlayBlue"});containerHeaderTitle=new Element("div",{id:"overlay_title_divOverlayAlert","class":"titleOverlay"});containerHeader.appendChild(containerHeaderTitle.update(options.title));containerBlock.appendChild(containerHeader);containerContent=new Element("div",{id:"overlay_content_divOverlayAlert","class":"contentOverlay",style:"text-align:center"});containerContent.update("<h4>"+c+"</h4>");containerBlock.appendChild(containerContent);containerFooter=new Element("div",{id:"overlay_bottom_divOverlayAlert","class":"footerOverlay"});containerFooterBlock=new Element("div",{id:"overlay_bottom_content_divOverlayAlert","class":"footerOverlay_content"});btnValid=new Element("button",{id:"BtnOverlayAlertValid",type:"button","class":"shortValidButton",onstartselect:"return false",onmousedown:"return false"});btnValid.observe("click",function(){$("divOverlayAlert").object.hide();this.onValid()}.bind(btnValid));btnValid.onValid=options.onValid;btnValid.appendChild(new Element("img",{src:"/shared/images/superadmin/icons/16x16/ico-apply.png",style:"vertical-align: middle;"}));btnValid.appendChild(new Element("span").update(Overlay_translation.valider));containerFooterBlock.appendChild(btnValid);containerFooter.appendChild(containerFooterBlock);containerBlock.appendChild(containerFooter);containerShadow.appendChild(containerBlock);container.appendChild(containerShadow);$$("BODY")[0].appendChild(container);$("divOverlayAlert").object=new Popup("divOverlayAlert",{fadeBackground:true,shadow:true,showEffect:{method:"appear",options:{duration:0.3}},hideEffect:{method:"fade",options:{duration:0.3}},onHide:function(){$("divOverlayAlert").remove()},zIndex:options.zIndex});$("divOverlayAlert").object.show()}catch(a){Prototype.alertError(a)}};Prototype.overlayConfirm=function(c,b){try{Prototype.require("superadmin/overlay.css");Prototype.require("jojoPopup.js");Prototype.require("langs/superadmin."+(typeof sJavascriptLang!="undefined"?sJavascriptLang:"fr")+".js");options={title:"Confirmation",onValid:function(){},onCancel:function(){},zIndex:666};Object.extend(options,b||{});container=new Element("div",{id:"divOverlayConfirm","class":"Overlay",style:"display:none"});containerShadow=new Element("div",{"class":"ombrage_interieur"});containerBlock=new Element("div",{id:"overlay_divOverlayConfirm",display:"block"});containerHeader=new Element("div",{id:"overlay_header_divOverlayConfirm","class":"headerOverlay headerOverlayBlue"});containerHeaderTitle=new Element("div",{id:"overlay_title_divOverlayConfirm","class":"titleOverlay"});containerHeader.appendChild(containerHeaderTitle.update(options.title));containerBlock.appendChild(containerHeader);containerContent=new Element("div",{id:"overlay_content_divOverlayConfirm","class":"contentOverlay",style:"text-align:center;"});containerContent.update("<h4>"+c+"</h4>");containerBlock.appendChild(containerContent);containerFooter=new Element("div",{id:"overlay_bottom_divOverlayConfirm","class":"footerOverlay"});containerFooterBlock=new Element("div",{id:"overlay_bottom_content_divOverlayAlert","class":"footerOverlay_content"});btnValid=new Element("button",{id:"BtnOverlayConfirmValid",type:"button","class":"shortValidButton",onstartselect:"return false",onmousedown:"return false"});btnValid.observe("click",function(){$("divOverlayConfirm").object.hide();this.onValid()}.bind(btnValid));btnValid.onValid=options.onValid;btnValid.appendChild(new Element("img",{src:"/shared/images/superadmin/icons/16x16/ico-apply.png",style:"vertical-align: middle;"}));btnValid.appendChild(new Element("span").update(Overlay_translation.valider));containerFooterBlock.appendChild(btnValid);btnCancel=new Element("button",{id:"BtnOverlayConfirmCancel",type:"button","class":"shortValidButton",onstartselect:"return false",onmousedown:"return false"});btnCancel.observe("click",function(){$("divOverlayConfirm").object.hide();this.onCancel()}.bind(btnCancel));btnCancel.onCancel=options.onCancel;btnCancel.appendChild(new Element("img",{src:"/shared/images/superadmin/icons/16x16/ico-cancel.png",style:"vertical-align: middle;"}));btnCancel.appendChild(new Element("span").update(Overlay_translation.annuler));containerFooterBlock.appendChild(btnCancel);containerFooter.appendChild(containerFooterBlock);containerBlock.appendChild(containerFooter);containerShadow.appendChild(containerBlock);container.appendChild(containerShadow);$$("BODY")[0].appendChild(container);$("divOverlayConfirm").object=new Popup("divOverlayConfirm",{fadeBackground:true,shadow:true,showEffect:{method:"appear",options:{duration:0.3}},hideEffect:{method:"fade",options:{duration:0.3}},onHide:function(){$("divOverlayConfirm").remove()},zIndex:options.zIndex});$("divOverlayConfirm").object.show()}catch(a){Prototype.alertError(a)}};Date.prototype.getTradDays=function(b){Prototype.require("langs/superadmin."+(typeof sJavascriptLang!="undefined"?sJavascriptLang:"fr")+".js");var a=[Date_translation.lundi,Date_translation.mardi,Date_translation.mercredi,Date_translation.jeudi,Date_translation.vendredi,Date_translation.samedi,Date_translation.dimanche];return a[(b+6)%7].ucfirst().substr(0,3)};Date.prototype.getTradMonth=function(b){Prototype.require("langs/superadmin."+(typeof sJavascriptLang!="undefined"?sJavascriptLang:"fr")+".js");var a=[Date_translation.janvier,Date_translation.fevrier,Date_translation.mars,Date_translation.avril,Date_translation.mai,Date_translation.juin,Date_translation.juillet,Date_translation.aout,Date_translation.septembre,Date_translation.octobre,Date_translation.novembre,Date_translation.decembre];return a[b%12].ucfirst()};Date.prototype.clone=function(){return new Date(this.getTime())};Date.prototype.WeekNbr=function(a){var b=new Date(this.getFullYear(),0,1);firstDay=b.clone();if(firstDay.getDay()<=4){firstDay=firstDay.add(firstDay.getDay()*(-1))}else{firstDay=firstDay.add(firstDay.getDay()*(-1));firstDay=firstDay.add(7)}if(a==1){firstDay=firstDay.add(1)}var c=0;c=firstDay.dateDiffWeek(this)+1;if((c==53)&&b.getDay()<4){c=1}return c};Date.prototype.DayFromWeek=function(c,a){var b=new Date(this.getFullYear(),0,1);firstDay=b.clone();if(firstDay.getDay()<=4){firstDay=firstDay.add(firstDay.getDay()*(-1))}else{firstDay=firstDay.add(firstDay.getDay()*(-1));firstDay=firstDay.add(7)}firstDay=firstDay.add(a);firstDay=firstDay.add((c-1)*7);return firstDay};Date.prototype.daysInMonth=function(){var a=new Date(this.getFullYear(),this.getMonth(),28);var b=28;for(b=28;b<=32;b++){a.setDate(b);if(a.getMonth()!=this.getMonth()){return(b-1)}}};Date.prototype.getFirstDateMonth=function(){var a;if(this instanceof Date){a=new Date(this)}else{a=new Date()}a.setDate(1);return a};Date.prototype.getLastDateMonth=function(){var a=this.addMonth(1);a.setDate(1);return a.add(-1)};Date.prototype.dateDiff=function(a){return Math.round((a.valueOf()-this.valueOf())/86400000)};Date.prototype.dateDiffWeek=function(a){return parseInt((parseInt(this.dateDiff(a)-1)+1)/7)};Date.prototype.timeDifference=function(a){return this.getTime()-a.getTime()};Date.prototype.add=function(b){var a=new Date(this);a.setDate(a.getDate()+b);return a};Date.prototype.addHours=function(b){var a=new Date(this);a.setHours(this.getHours()+b);return a};Date.prototype.addMonth=function(b){var a=new Date(this);a.setMonth(a.getMonth()+b);return a};Date.prototype.addYear=function(b){var a=new Date(this);a.setFullYear(a.getFullYear()+b);return a};Date.prototype.isLeapYear=function(){var a=new Date(this.getFullYear(),1,29);return(a.getMonth()==1)};Date.prototype.getDayInYear=function(){return Math.floor(this.getHourInYear()/24)};Date.prototype.getHourInYear=function(){return Math.floor(this.getMinuteInYear()/60)};Date.prototype.getMinuteInYear=function(){return Math.floor(this.getSecondInYear()/60)};Date.prototype.getSecondInYear=function(){return Math.floor(this.getMillisecondInYear()/1000)};Date.prototype.getMillisecondInYear=function(){return this.timeDifference(new Date(this.getFullYear(),0,1))};Date.prototype.convertToDateOnly=function(){var a=new Date(this);a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0);return a};String.prototype.ucfirst=function(){var a=this.charAt(0).toUpperCase();return a+this.substr(1)};Ajax.Base.addMethods({abort:function(){if(!this._complete){var a=new Ajax.Response(this);this.transport.aborted=true;this.transport.abort();if(this.options.onAbort){this.options.onAbort(a)}else{if(this.options.onFailure){this.options.onFailure(a)}}}}});function simulateEvent(d,c,b,a){if(c.indexOf(":")>=0){Event.fire(d,c,b,a)}else{aMouseEvents=["click","mouseup","mousedown","mouseover","mouseout","mousemouve","mouseenter","mouseleave"];d=$(d);if(Object.isUndefined(a)){a=true}if(d==document&&document.createEvent&&!d.dispatchEvent){d=document.documentElement}var f;if(document.createEvent){if(aMouseEvents.include(c.toLowerCase())){parameters=Object.extend({detail:0,screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false,button:0,relatedTarget:null},arguments[4]||{});f=document.createEvent("MouseEvents");f.initMouseEvent(c,a,true,window,parameters.detail,parameters.screenX,parameters.screenY,parameters.clientX,parameters.clientY,parameters.ctrlKey,parameters.altKey,parameters.shiftKey,parameters.metaKey,parameters.button,parameters.relatedTarget)}else{f=document.createEvent("UIEvents");f.initUIEvent(c,a,true,window,0);parameters=arguments[4]||{};Object.extend(f,parameters)}}else{f=document.createEventObject();parameters=arguments[4]||{};Object.extend(f,parameters);f.eventType="on"+c}f.eventName=c;f.memo=b||{};if(document.createEvent){d.dispatchEvent(f)}else{d.fireEvent(f.eventType,f)}return Event.extend(f)}}Object.extend(Event,{simulateEvent:simulateEvent});Object.extend(document,{simulateEvent:simulateEvent.methodize()});Element.addMethods({simulateEvent:simulateEvent,updateEx:function(element,content){Element.update(element,content.stripScripts());var regexp=null;regexp=new RegExp("<script[^>]+src=\\s*(\"[^\"]+\"|'[^']+')[^>]*>([\\S\\s]*?)<\/script>","img");content=content.replace(regexp,"<SCRIPT>Prototype.loadScript($1);$2</SCRIPT>");content.extractScripts().each(function(script){try{eval(script.replace("<!--","").replace("-->",""))}catch(e){Prototype.alertError("Error : script eval error : "+e.message);Prototype.Browser.log(script)}})},cumulativeZIndex:function(b){var a=$(b);var c="";do{c=a.getStyle("z-index");if(c){return c}a=$(a.parentNode)}while(a&&a.tagName.toLowerCase()!="body"&&typeof(a.cumulativeZIndex)!="undefined");return 0},lastDescendant:function(a){a=$(a).lastChild;while(a&&a.nodeType!=1){a=a.previousSibling}return $(a)},hasChild:function(a,b){b=$(b);return b&&b.descendantOf(a)},isEqualOrChild:function(a,b){return b&&(b==a||b.descendantOf(a))}});if(Prototype.Browser.IE&&Prototype.Browser.version<8){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(c,a){a=$(a);if(a.nodeType===Node.DOCUMENT_NODE||(a!==document.body&&!Element.descendantOf(a,document.body))||a.nodeName.toUpperCase()==="BODY"||a.nodeName.toUpperCase()==="HTML"){return $(document.body)}var b=(Element.getStyle(a,"display")==="inline");if(!b&&a.offsetParent){return a.offsetParent.nodeName.toUpperCase()==="HTML"?$(document.body):$(a.offsetParent)}while((a=a.parentNode)&&a!==document.body){if(Element.getStyle(a,"position")!=="static"){return a.nodeName.toUpperCase()==="HTML"?$(document.body):$(a)}}return $(document.body)})}CallbackHandler=Class.create({aCallbacks:null,initialize:function(){this.aCallbacks=[]},register:function(a,b){this.unregister(a,b);this.aCallbacks.push({oObject:a,fnFunction:b})},unregister:function(d,f){var a=false;var c=[];for(var b=0;b<this.aCallbacks.length;b++){if(this.aCallbacks[b].oObject==d&&this.aCallbacks[b].fnFunction==f){a=true}else{c.push(this.aCallbacks[b])}}if(a){this.aCallbacks=c}},empty:function(){return this.aCallbacks.length==0},dispatch:function(){this.trigger.apply(this,arguments)},trigger:function(){for(var a=0;a<this.aCallbacks.length;a++){try{this.aCallbacks[a].fnFunction.apply(this.aCallbacks[a].oObject,arguments)}catch(b){Prototype.Browser.log("Callback failed: "+b)}}}});Prototype.defaultStopEventHandler=function(a){Event.stop(a)};window.tinyMCEPreInit={base:"/shared/scripts/tiny_mce",suffix:"",query:""};Ajax.getTransport=Ajax.getTransport.wrap(function(a){var b=a();if(b){b._realSetRequestHeader=b.setRequestHeader;b.setRequestHeader=function(c,d){if(d!==null){this._realSetRequestHeader(c,d)}}}return b});
