if(YAHOO){YAHOO.util.Event.onMouseEnter=function(b,a,c,d){YAHOO.util.Event._mouseEnterLeave(b,a,c,d,"mouseover")};YAHOO.util.Event.onMouseLeave=function(b,a,c,d){YAHOO.util.Event._mouseEnterLeave(b,a,c,d,"mouseout")};YAHOO.util.Event._mouseEnterLeave=function(b,a,d,e,c){YAHOO.util.Event.on(b,c,function(g,f){if(g.relatedTarget!=this&&!YAHOO.util.Dom.isAncestor(this,g.relatedTarget)){if(!f.overrideContext){f.overrideContext=this}if(!f.obj){f.obj={}}if(f.overrideContext===true){f.fn.apply(f.obj,[g])}else{f.fn.apply(f.overrideContext,[g,f.obj])}}},{fn:a,obj:d,overrideContext:e})}};
var JSUrl;var CSSUrl;var IMGUrl;var DEBUG=false;var yahooIsHere=false;try{var _YUD=YAHOO.util.Dom;yahooIsHere=true}catch(e){_YUD=false}try{var _YUDD=YAHOO.util.DD;yahooIsHere=true}catch(e){_YUDD=false}try{var _YUDDP=YAHOO.util.DDProxy;yahooIsHere=true}catch(e){_YUDDP=false}try{var _YUA=YAHOO.util.Anim;yahooIsHere=true}catch(e){_YUA=false}try{var _YUE=YAHOO.util.Event;yahooIsHere=true}catch(e){_YUE=false}try{var _YUC=YAHOO.util.Connect;yahooIsHere=true}catch(e){_YUC=false}if(!yahooIsHere){var YAHOO=false}function OB_Log(a){if(window.console){window.console.log(a)}else{alert(a)}}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.strip=function(){return this.replace(/(<([^>]+)>)/ig,"").replace(">","").replace("<","")};String.prototype.space=function(){return this.replace(/_/g," ")};var truncate=function(a,c,b,d){if(!a){return""}if(!c){c=80}if(!b){b="…"}if(!d){d=false}if(a.length==0){return""}if(a.length>c){c=c-b.length;if(d){a.substring(0,c+1);a.replace("/s+?(S+)?$/","")}return a.substring(0,c)+b}else{return a}};var showEl=function(b,a){b=getElmt(b);if(b){if(!a){b.style.display="block"}else{switch(a){case"height":b.style.height="auto";b.style.overflow="visible";break}}}};var hideEl=function(b,a){b=getElmt(b);if(b){if(!a){b.style.display="none"}else{switch(a){case"height":b.style.height=0;b.style.overflow="hidden";break}}}};var destroyEl=function(a){var c=getElmt(a);if(c.parentNode){c.parentNode.removeChild(c)}else{if(a[0]){for(var b=0;a[b];b++){destroyEl(a[b])}}}};function createLink(a,c,g,f){var b=document.createElement("a");if(typeof("href")!="undefined"){b.setAttribute("href",a)}if(typeof("class")!="undefined"){b.setAttribute("class",c)}if(typeof("id")!="undefined"){b.setAttribute("id",g)}if(typeof("innerText")!="undefined"){var d=document.createTextNode(f);b.appendChild(d)}return b}function getElmt(a){if(typeof a=="string"){return document.getElementById(a)}else{return a}}function getBrowser(){if(navigator.appName.indexOf("Internet Explorer")!=-1){if(navigator.appVersion.indexOf("MSIE 7")!=-1){return"ie7"}return"ie"}if(navigator.appName.indexOf("Opera")!=-1){return"op"}if(navigator.appVersion.indexOf("Safari")!=-1){return"sf"}if(navigator.appName.indexOf("Konqueror")!=-1){return"kq"}if(navigator.appCodeName.indexOf("Mozilla")!=-1){return"mz"}}var language;var localizedFile;function getLocalizedString(b){try{if(localizedString&&localizedString[b]){return localizedString[b]}}catch(a){return b}return b}function numericKeysOnly(b){var a=_YUE.getEvent(b).keyCode;if((a>47&&a<58)||(a>95&&a<106)||(a==8)||(a==13)||(a==27)||(a==46)||(a==188)||(a==190)){return a}return false}var toggle=function(a,b){a=getElmt(a);if(!b){b="block"}if(a.style.display==b||a.style.display==""){a.style.display="none"}else{a.style.display=b}return true};function trim(a){return a.trim()}var confirmOnQuit=function(a){if(a){window.onbeforeunload=function(){return a};document.body.onbeforeunload=function(){return a};return true}else{window.onbeforeunload=new Function();document.body.onbeforeunload=new Function();return true}};var setAltLines=function(c){c=getElmt(c);if(!c){return false}var b=c.getElementsByTagName("li");if(b.length==0){b=c.getElementsByTagName("tr")}var d=false;for(var a=1;b[a];a++){if(d){_YUD.addClass(b[a],"alt");d=false}else{_YUD.removeClass(b[a],"alt");d=true}b[a].onmouseover=function(){_YUD.addClass(this,"over")};b[a].onmouseout=function(){_YUD.removeClass(this,"over")}}};var OB_AutoInputs=new Array();var OB_AutoInput=function(a,c,b){this.element=getElmt(a);this.newElement=null;this.items=new Array();this.withPlus=c;this.focusEvent=null;if(b&&b.focusEvent){this.focusEvent=b.focusEvent}this.blurEvent=null;if(b&&b.blurEvent){this.blurEvent=b.blurEvent}this.id=null;OB_AutoInputs.push(this);this.id=OB_AutoInputs.length;if(getBrowser()!="sf"){this.init()}};OB_AutoInput.prototype={init:function(){this.newElement=document.createElement("ul");this.element.parentNode.insertBefore(this.newElement,this.element);this.element.style.display="none";if(this.element.value!=""){var a=this.element.value.split(",");for(var b=0;a[b];b++){this.addItem(a[b])}}else{this.addItem(getLocalizedString("nouveau tag"))}},addItem:function(b){var a=new OB_AutoInputItem(b);this.items.push(a);this.redraw()},deleteItem:function(a){if(this.items.length>1){this.items.splice(this.getInputPosition(a),1);this.redraw()}else{this.items[0].value=getLocalizedString("nouveau tag");this.redraw()}this.serialize()},redraw:function(){this.newElement.innerHTML="";for(var a=0;this.items[a];a++){this.items[a].init();this.newElement.appendChild(this.items[a].element)}if(this.withPlus){newLi=document.createElement("li");newLi.style.display="inline";newLi.style.position="relative";newLi.parent=this;newLi.onclick=function(){this.parent.addItem(getLocalizedString("nouveau tag"))};newDiv=document.createElement("div");newDiv.style.background='url("'+IMGUrl+'tiplus.gif") center no-repeat';newLi.style.position="absolute";newDiv.style.width="12px";newDiv.style.height="1em";newLi.appendChild(newDiv);this.newElement.appendChild(newLi)}},serialize:function(){var b="";for(var a=0;this.items[a];a++){if(this.items[a].value!=getLocalizedString("nouveau tag")){b+=this.items[a].value;if(this.items[a+1]&&this.items[a+1].value!=getLocalizedString("nouveau tag")){b+=","}}else{b=""}}this.element.value=b},getInputPosition:function(a){for(var b=0;this.items[b];b++){if(this.items[b]==a){return b}}return false},addFocusEvent:function(a){this.focusEvent=a},destroy:function(){this.serialize();this.newElement.parentNode.removeChild(this.newElement);this.element.style.display="inline"},toString:function(){return"OB_AutoInput_"+this.id}};OB_AutoInput.getAutoInputByItem=function(c){for(var b=0;OB_AutoInputs[b];b++){for(var a=0;OB_AutoInputs[b].items[a];a++){if(OB_AutoInputs[b].items[a]==c){return OB_AutoInputs[b]}}}return false};var OB_AutoInputItems=new Array();var OB_AutoInputItem=function(a){this.value=a;this.element=null;this.id=null;OB_AutoInputItems.push(this);this.id=OB_AutoInputItems.length;this.init()};OB_AutoInputItem.prototype={init:function(){this.element=document.createElement("li");this.element.style.display="inline";this.element.style.marginRight="0.2em";this.element.style.position="relative";var b=document.createElement("span");b.innerHTML=this.value+",";this.element.appendChild(b);this.element.newSpan=b;var a=document.createElement("input");a.value=this.value;a.style.display="none";a.style.border="1px solid #ccc";a.style.width=(this.value.length+1)*0.7+"em";a.style.fontFamily="monospace";a.parent=this;a.onblur=function(){if(this.value==""){OB_AutoInput.getAutoInputByItem(this.parent).deleteItem(this.parent)}else{this.value=this.value.replace(new RegExp("<.*?>","gi"),"");this.parent.value=this.value;b.innerHTML=this.parent.value+",";if(OB_AutoInput.getAutoInputByItem(this.parent)){OB_AutoInput.getAutoInputByItem(this.parent).serialize()}a.style.display="none";b.style.display="inline"}if(OB_AutoInput.getAutoInputByItem(this.parent).blurEvent){OB_AutoInput.getAutoInputByItem(this.parent).blurEvent()}};a.onkeydown=function(d){var f=_YUE.getEvent(d);if(f.keyCode==13){return false}};a.onkeypress=function(d){if(parseInt(this.value.length)<3){this.style.width="2em"}else{this.style.width=(this.value.length+1)*0.6+"em"}};a.onfocus=function(){setTimeout(function(){a.select()},1);if(OB_AutoInput.getAutoInputByItem(this.parent).focusEvent){OB_AutoInput.getAutoInputByItem(this.parent).focusEvent()}};this.element.appendChild(a);var c=document.createElement("div");c.style.background='url("'+IMGUrl+'ticlose.gif") center no-repeat';c.style.width="12px";c.style.height="1em";c.style.position="absolute";c.style.top=0;c.style.left=0;c.style.visibility="hidden";c.onclick=function(){var d=OB_AutoInputItem.getAutoInputItemByElmt(this.parentNode);OB_AutoInput.getAutoInputByItem(d).deleteItem(d)};this.element.appendChild(c);this.element.style.paddingLeft="12px";this.element.onmouseover=function(){c.style.visibility="visible"};this.element.onmouseout=function(){c.style.visibility="hidden"};this.element.onclick=function(){b.style.display="none";a.style.display="inline";a.focus()}},toString:function(){return"OB_AutoInputItem_"+this.id}};OB_AutoInputItem.getAutoInputItemByElmt=function(b){for(var a=0;OB_AutoInputItems[a];a++){if(OB_AutoInputItems[a].element==getElmt(b)){return OB_AutoInputItems[a]}}return false};var OB_Editors=new Array();var OB_Editor=function(a,b){this.element=getElmt(a);this.id=null;this.params=b?b:{};this.onEditorInit=new Function();if(this.element){OB_Editors.push(this);if(this.element.id){this.id=this.element.id}else{this.id="OB_Editor_"+OB_Editors.length;this.element.id=this.id}this.init()}else{throw"No element specified. Can't initialize OB_Editor."}};OB_Editor.prototype={init:function(){this.tmceParams=null;this.tmceParams={mode:"exact",elements:this.id};if(!this.params.lang|this.params.lang!="fr"&&this.params.lang!="en"&&this.params.lang!="de"&&this.params.lang!="it"&&this.params.lang!="es"){this.params.lang="fr"}this._getToolbar(this.params.toolbar?this.params.toolbar:null);this.tmceParams.theme="advanced";this.tmceParams.skin="OB";this.tmceParams.paste_auto_cleanup_on_paste=false;this.tmceParams.inlinepopups_skin="OBinlineDialog";this.tmceParams.theme_advanced_toolbar_location="top";this.tmceParams.theme_advanced_toolbar_align="left";this.tmceParams.theme_advanced_resizing=false;this.tmceParams.theme_advanced_styles=getLocalizedString("style.Citation")+" = hitcitation; "+getLocalizedString("style.Encart")+" = hitencart; "+getLocalizedString("style.Important")+" = hitimportant; "+getLocalizedString("style.perso1")+" = hitperso1; "+getLocalizedString("style.perso2")+" = hitperso2";this.tmceParams.extended_valid_elements="*[*],img[*],object[*|type|id],em[*|class],b[*|class]";this.tmceParams.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt";if(this.params.normalNewLines){this.tmceParams.force_br_newlines=false;this.tmceParams.forced_root_block="p"}else{this.tmceParams.force_br_newlines=true;this.tmceParams.forced_root_block=""}if(this.params.cssUrl){this.tmceParams.content_css=this.params.cssUrl}this.tmceParams.convert_urls=false;if(this.params.width){this.tmceParams.width=this.params.width}if(this.params.height){this.tmceParams.height=this.params.height}this.tmceParams.language=this.params.lang?this.params.lang:"fr";if(this.params.urls){this.tmceParams.urls=this.params.urls}if(this.params.onInit){this.onEditorInit=this.params.onInit}if(this.params.onKeyPress){this.tmceParams.onKeyPress=this.params.onKeyPress;this.tmceParams.setup=function(a){a.onKeyPress.add(a.settings.onKeyPress)}}this.tmceParams.init_instance_callback=function(b){var a=OB_Editor.getById(this.editorId);a.editor=this;if(a.params&&a.params.bodyClass){this.getBody().className=a.params.bodyClass}if(a.onEditorInit){a.onEditorInit()}};tinymce.EditorManager.init(this.tmceParams);tinymce.editor=true},_getToolbar:function(c){switch(c){case OB_Editor.TOOLBAR_ADVANCED:this.tmceParams.plugins="safari,style,table,advimage,advlink,iespell,inlinepopups,media,searchreplace,OB_ContextMenu,paste,fullscreen,visualchars,spellchecker,OB_Align,OB_Smileys";var a=1;if(this.params.urls){var b="";this.tmceParams["theme_advanced_buttons"+a]="";if(this.params.urls.OB_Pictures){this.tmceParams.theme_advanced_buttons1+=b+"OB_Pictures,|";this.tmceParams.plugins+=",OB_Pictures";b=","}if(this.params.urls.OB_Videos){this.tmceParams.theme_advanced_buttons1+=b+"OB_Videos,|";this.tmceParams.plugins+=",OB_Videos";b=","}if(this.params.urls.OB_Music){this.tmceParams.theme_advanced_buttons1+=b+"OB_Music,|";this.tmceParams.plugins+=",OB_Music";b=","}if(this.params.urls.OB_Links_add){this.tmceParams.theme_advanced_buttons1+=b+"OB_Links_Add,|,OB_Links_Rm";this.tmceParams.plugins+=",OB_Links";b=","}a++}this.tmceParams["theme_advanced_buttons"+a]="bold,italic,underline,strikethrough,|,sub,sup,|,forecolor,backcolor,|,OB_Align_Left,OB_Align_Center,OB_Align_Right,OB_Align_Justify,|,bullist,numlist,|,outdent,indent,|,link,unlink,|,removeformat,fullscreen,OB_Smileys";a++;this.tmceParams["theme_advanced_buttons"+a]="fontselect,fontsizeselect"+(this.params.cssUrl?",styleselect":"")+",formatselect";a++;this.tmceParams["theme_advanced_buttons"+a]="code,|,undo,redo,|,hr,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,charmap,spellchecker,|,tablecontrols";this.tmceParams.theme_advanced_statusbar_location="bottom";this._setSpellchecker();break;case OB_Editor.TOOLBAR_TEXTELIBRE:this.tmceParams.plugins="safari,style,table,advimage,advlink,iespell,inlinepopups,media,searchreplace,OB_ContextMenu,paste,fullscreen,visualchars,spellchecker,OB_Align,OB_Smileys";var a=1;if(this.params.urls){var b="";this.tmceParams["theme_advanced_buttons"+a]="";if(this.params.urls.OB_Pictures){this.tmceParams.theme_advanced_buttons1+=b+"OB_Pictures,|";this.tmceParams.plugins+=",OB_Pictures";b=","}if(this.params.urls.OB_Videos){this.tmceParams.theme_advanced_buttons1+=b+"OB_Videos,|";this.tmceParams.plugins+=",OB_Videos";b=","}if(this.params.urls.OB_Music){this.tmceParams.theme_advanced_buttons1+=b+"OB_Music,|";this.tmceParams.plugins+=",OB_Music";b=","}if(this.params.urls.OB_Links_add){this.tmceParams.theme_advanced_buttons1+=b+"OB_Links_Add,|,OB_Links_Rm";this.tmceParams.plugins+=",OB_Links";b=","}a++}this.tmceParams["theme_advanced_buttons"+a]="bold,italic,underline,|,forecolor,backcolor,|,OB_Align_Justify,OB_Align_Left,OB_Align_Center,OB_Align_Right,|,bullist,numlist,|,cut,copy,paste,pasteword,|,search,replace,|,link,unlink,|,undo,redo,|,removeformat,OB_Smileys";a++;this.tmceParams["theme_advanced_buttons"+a]="code,|,fontselect,fontsizeselect"+(this.params.cssUrl?",styleselect":"")+",|,tablecontrols";a++;this.tmceParams["theme_advanced_buttons"+a]="";break;case OB_Editor.TOOLBAR_COMMENTS:this.tmceParams.plugins="safari,inlinepopups,paste,OB_Align,OB_Smileys,OB_lightlink,OB_lightimg";this.tmceParams.theme_advanced_buttons1="bold,italic,underline,|,forecolor,backcolor,|,OB_Align_Left,OB_Align_Center,OB_Align_Right,bullist,|,OB_Smileys,OB_lightlink,OB_lightimg,undo,redo";this.tmceParams.theme_advanced_buttons2="";this.tmceParams.theme_advanced_buttons3="";this.tmceParams.theme_advanced_buttons4="";break;case OB_Editor.TOOLBAR_RESPONSE:this.tmceParams.plugins="safari,inlinepopups,paste,OB_Align,OB_Smileys,OB_lightlink,OB_lightimg";this.tmceParams.theme_advanced_buttons1="bold,italic,underline,|,forecolor,backcolor,|,OB_Align_Left,OB_Align_Center,OB_Align_Right,OB_Align_Justify,|,bullist,numlist,|,OB_lightimg,OB_Smileys,OB_lightlink,unlink,|,undo,redo,|,code";this.tmceParams.theme_advanced_buttons2="";this.tmceParams.theme_advanced_buttons3="";this.tmceParams.theme_advanced_buttons4="";break;case OB_Editor.TOOLBAR_FORUM:this.tmceParams.plugins="safari,style,OB_lightlink,inlinepopups,paste,visualchars,emotions";this.tmceParams.theme_advanced_buttons1="bold,italic,underline,|,bullist,numlist,|,OB_lightlink,unlink,|,undo,redo,|,emotions";this.tmceParams.theme_advanced_buttons2="";this.tmceParams.theme_advanced_buttons3="";this.tmceParams.theme_advanced_buttons4="";break;case OB_Editor.TOOLBAR_SA:this.tmceParams.plugins="safari,inlinepopups,paste,OB_Align,OB_lightlink";var a=1;if(this.params.urls){this.tmceParams["theme_advanced_buttons"+a]="";if(this.params.urls.OB_Pictures){this.tmceParams.theme_advanced_buttons1="OB_Pictures";this.tmceParams.plugins+=",OB_Pictures"}a++}this.tmceParams["theme_advanced_buttons"+a]="bold,italic,underline,|,forecolor,backcolor,|,OB_Align_Left,OB_Align_Center,OB_Align_Right,OB_Align_Justify,|,bullist,numlist,|,OB_Smileys,OB_lightlink,unlink,|,undo,redo,|,code";a++;this.tmceParams["theme_advanced_buttons"+a]="";a++;this.tmceParams["theme_advanced_buttons"+a]="";break;case OB_Editor.TOOLBAR_BLOGPOOL:this.tmceParams.plugins="safari,inlinepopups,OB_Smileys,OB_lightlink,OB_lightimg";this.tmceParams.theme_advanced_buttons1="bold,italic,underline,|,forecolor,backcolor,|,OB_lightlink,OB_lightimg,|,undo,redo,|,code";this.tmceParams.theme_advanced_buttons2="";this.tmceParams.theme_advanced_buttons3="";this.tmceParams.theme_advanced_buttons4="";break;case OB_Editor.TOOLBAR_SIMPLE:default:this.tmceParams.plugins="safari,style,table,advimage,advlink,iespell,inlinepopups,media,searchreplace,OB_ContextMenu,paste,fullscreen,visualchars,spellchecker,OB_Align,OB_Smileys";var a=1;if(this.params.urls){var b="";this.tmceParams["theme_advanced_buttons"+a]="";if(this.params.urls.OB_Pictures){this.tmceParams.theme_advanced_buttons1+=b+"OB_Pictures,|";this.tmceParams.plugins+=",OB_Pictures";b=","}if(this.params.urls.OB_Videos){this.tmceParams.theme_advanced_buttons1+=b+"OB_Videos,|";this.tmceParams.plugins+=",OB_Videos";b=","}if(this.params.urls.OB_Music){this.tmceParams.theme_advanced_buttons1+=b+"OB_Music,|";this.tmceParams.plugins+=",OB_Music";b=","}if(this.params.urls.OB_Links_add){this.tmceParams.theme_advanced_buttons1+=b+"OB_Links_Add,|,OB_Links_Rm";this.tmceParams.plugins+=",OB_Links";b=","}a++}this.tmceParams["theme_advanced_buttons"+a]="bold,italic,underline,|,forecolor,backcolor,|,OB_Align_Justify,OB_Align_Left,OB_Align_Center,OB_Align_Right,|,bullist,|,outdent,indent,|,undo,redo,|,hr,|,cut,copy,paste,pastetext,pasteword,|,spellchecker,|,search,OB_Smileys";a++;this.tmceParams["theme_advanced_buttons"+a]=",fontselect,fontsizeselect,styleselect";a++;this.tmceParams["theme_advanced_buttons"+a]="";this._setSpellchecker();break}},_setSpellchecker:function(){this.tmceParams.spellchecker_rpc_url="/_tiny_mce/plugins/spellchecker/rpc.php";this.tmceParams.spellchecker_languages=(this.params.lang=="fr"?"+":"")+"French=fr,"+(this.params.lang=="en"?"+":"")+"English=en,"+(this.params.lang=="de"?"+":"")+"German=de,"+(this.params.lang=="it"?"+":"")+"Italian=it,"+(this.params.lang=="es"?"+":"")+"Spanish=es"},putValueInElmt:function(){this.editor.save();return true},_get:function(){this.editor=tinymce.EditorManager.get(this.id)},switchToolbar:function(a){this.params.toolbar=a;this.editor.remove();this.init()},destroy:function(){try{tinyMCE.execCommand("mceRemoveControl",true,this.id)}catch(b){}var c=[];for(var a in OB_Editors){if(OB_Editors[a]!=this){c.push(OB_Editors[a])}}OB_Editors=c},setError:function(a){YAHOO.util.Dom.setStyle([YAHOO.util.Dom.getElementsByClassName("mceLayout","table",this.editor.getContainer())[0],YAHOO.util.Dom.getElementsByClassName("mceToolbar","td",this.editor.getContainer())[0],YAHOO.util.Dom.getElementsByClassName("mceIframeContainer","td",this.editor.getContainer())[0]],"border-color",a)}};OB_Editor.getById=function(b){for(var a=0;OB_Editors[a];a++){if(OB_Editors[a].id==b){return OB_Editors[a]}}return false};OB_Editor.TOOLBAR_SIMPLE=0;OB_Editor.TOOLBAR_ADVANCED=1;OB_Editor.TOOLBAR_TEXTELIBRE=2;OB_Editor.TOOLBAR_COMMENTS=3;OB_Editor.TOOLBAR_RESPONSE=5;OB_Editor.TOOLBAR_FORUM=4;OB_Editor.TOOLBAR_SA=6;OB_Editor.TOOLBAR_BLOGPOOL=7;var OB_CheckForms=new Array();var OB_CheckForm=function(a){this.element=getElmt(a);this.inputs=new Array();this.isOk=true;this.init()};OB_CheckForm.prototype={init:function(){var c=this.element.getElementsByTagName("*");for(var b=0;c[b];b++){if(c[b].nodeName=="INPUT"||c[b].nodeName=="TEXTAREA"){var a=new OB_CheckInput(c[b]);this.inputs.push(a)}}},checkForm:function(){if(getBrowser()=="kq"){return true}this.isOk=true;for(var a=0;this.inputs[a];a++){if(this.isOk){this.isOk=this.inputs[a].isOk()}else{this.inputs[a].isOk()}}return this.isOk},getInputByElmt:function(b){for(var a=0;this.inputs[a];a++){if(this.inputs[a].element==getElmt(b)){return this.inputs[a]}}return false},reset:function(){for(var a=0;this.inputs[a];a++){this.inputs[a].setOk()}}};var OB_CheckInputs=new Array();var OB_CheckInput=function(a){this.element=getElmt(a);this.value=null;this.notNull=true;this.passOk=true;this.mailOk=true;this.isValidURL=true;this.blogNameOk=true;this.dateOk=true;this.isNumeric=true;this.isEqualTo=true;this.isMoreThan=true;this.isLessThan=true;this.isChecked=true;this.minChars=true;OB_CheckInputs.push(this);this.init()};OB_CheckInput.prototype={init:function(){this.value=this.element.value;this.notNull=true;this.passOk=true;this.mailOk=true;this.isValidURL=true;this.blogNameOk=true;this.dateOk=true;this.isNumeric=true;this.isEqualTo=true;this.isMoreThan=true;this.isLessThan=true;this.isChecked=true;this.minChars=true},testNotNull:function(){if(this.value.length==0){this.notNull=false;return false}},testPass:function(){if(this.value.length<32&&this.value.length>3){var a=/[\\\^\$%_\* ]/;if(this.value.search(a)!=-1&&this.value.length>0){this.passOk=false}}else{this.passOk=false}},testMail:function(){var a=/^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/;if(this.value.search(a)==-1&&this.value.length>0){this.mailOk=false}},testURL:function(){var a=/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/;if(this.value.search(a)==-1&&this.value.length>0){this.isValidURL=false}},testBlogName:function(){if(this.value.length==0||(this.value.length>3&&this.value.length<64)){var a=/^[0-9a-z]+((\.|\-)[a-z0-9]+)*[a-z0-9]*$/;if(this.value.search(a)==-1&&this.value.length>0){this.blogNameOk=false}}else{this.blogNameOk=false}},testDate:function(c){var a=0;var b=null;switch(c){case 1:a=10;b=/^\d{2}\/\d{2}\/\d{4}$/;break}if(this.value.length==0||this.value.length==a){if(this.value.search(b)==-1&&this.value.length==a){this.dateOk=false}}else{this.dateOk=false}},testNumeric:function(){var a=/^(\+|\d)([ \-\.\,]?\d)+$/;if(this.value.search(a)==-1&&this.value.length>0){this.isNumeric=false}},testIsEqualTo:function(a){if(this.value!=getElmt(a).value&&this.value!=a){this.isEqualTo=false}},testIsMoreThan:function(a){if(this.value<parseInt(a)){this.isMoreThan=false}},testIsLessThan:function(a){if(this.value>parseInt(a)){this.isLessThan=false}},testIfIsChecked:function(){this.isChecked=this.element.checked},testNbrOfChars:function(a){if(this.value.length>0&&this.value.length<a){this.minChars=false}},isOk:function(){this.init();var c=this.element.getAttribute("class")?this.element.getAttribute("class"):this.element.getAttribute("className");if(c){var b=c.split(" ");for(var a=0;b[a];a++){switch(b[a]){case"notNull":this.testNotNull();break;case"checkPass":this.testPass();break;case"checkMail":this.testMail();break;case"checkURL":this.testURL();break;case"checkBlogName":this.testBlogName();break;case"checkDateDDMMYYYY":this.testDate(1);break;case"checkNumeric":this.testNumeric();break;case"checkIsChecked":this.testIfIsChecked();break}if(b[a].indexOf("isEqualTo_")!=-1){this.testIsEqualTo(b[a].substr("isEqualTo_".length))}if(b[a].indexOf("isMoreThan_")!=-1){this.testIsMoreThan(b[a].substr("isMoreThan_".length))}if(b[a].indexOf("isLessThan_")!=-1){this.testIsLessThan(b[a].substr("isLessThan_".length))}if(b[a].indexOf("minChars_")!=-1){this.testNbrOfChars(b[a].substr("minChars_".length))}}if(this.notNull&&this.passOk&&this.mailOk&&this.isValidURL&&this.blogNameOk&&this.dateOk&&this.isNumeric&&this.isEqualTo&&this.isMoreThan&&this.isLessThan&&this.isChecked&&this.minChars){this.setOk();return true}else{this.setNotOk();return false}}else{this.setOk();return true}},setNotOk:function(){},setOk:function(){}};OB_CheckInput.getObjectByElmt=function(b){for(var a=0;OB_CheckInputs[a];a++){if(OB_CheckInputs[a].element==getElmt(b)){return OB_CheckInputs[a]}}return false};function del_stat_tag(){var a=getElmt("stat_script");a.parentNode.removeChild(a)}function add_stat_tag(){var a=document.createElement("script");a.setAttribute("src","http://js.cybermonitor.com/overblog.js");a.setAttribute("type","text/javascript");a.setAttribute("id","stat_script");document.body.appendChild(a)}function nl2br(a){a=escape(a);re_nlchar="";if(a.indexOf("%0D%0A")>-1){re_nlchar=/%0D%0A/g}else{if(a.indexOf("%0A")>-1){re_nlchar=/%0A/g}else{if(a.indexOf("%0D")>-1){re_nlchar=/%0D/g}}}return unescape(a.replace(re_nlchar,"<br />"))}function br2nl(d){var b="<br />";var c="\n";var a=""+d;while(a.indexOf(b)>-1){var f=a.indexOf(b);a=""+(a.substring(0,f)+c+a.substring((f+b.length),a.length))}return a}function y2k(a){return(a<1000)?a+1900:a}function isDate(b,d,c){var a=new Date();c=((!c)?y2k(a.getYear()):c);d=((!d)?a.getMonth():d-1);if(!b){return false}var f=new Date(c,d,b);if((y2k(f.getYear())==c)&&(d==f.getMonth())&&(b==f.getDate())){return true}else{return false}}var globDials=new Array();var OB_Dialog=function(){if(!YAHOO){return false}this.width=400;this.height=400;this.button1={};this.button2={};this.title=null;this.content=null;this.onSuccess=null;this.onFailure=null;this.modal=true;this.closeB=true;this.keys=new Array();this.keys.esc=true;this.keys.enter=true;this.move=true;this.yuiDialog=null};OB_Dialog.prototype={getInstance:function(){globDials.push(this);this.createYuiDialog();return this.yuiDialog},createYuiDialog:function(){this.yuiDialog=new YAHOO.widget.Dialog("OB_Dialog"+globDials.length,{width:this.width,height:this.height,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},fixedcenter:false,modal:this.modal,draggable:this.move,constraintoviewport:true,close:this.closeB,underlay:this.underlay?this.underlay:"shadow"});this.yuiDialog.setHeader(this.title);this.yuiDialog.setBody(this.content);if(this.footer){this.yuiDialog.setFooter(this.footer)}if(this.button1.text){if(this.button2.text){var j=[this.button2,this.button1]}else{j=[this.button1]}this.yuiDialog.cfg.queueProperty("buttons",j)}var d=new Array();if(this.keys.esc){var g=new YAHOO.util.KeyListener(document,{keys:27},{fn:this.yuiDialog.destroy,scope:this.yuiDialog,correctScope:true});d.push(g)}if(this.keys.enter){var c=new YAHOO.util.KeyListener(document,{keys:13},{fn:function(){if(this.dial.yuiDialog._aButtons[1]){this.dial.yuiDialog._aButtons[1].fireEvent("click")}},scope:this,correctScope:true});d.push(c)}if(d.length>0){this.yuiDialog.cfg.queueProperty("keylisteners",d)}this.yuiDialog.formSubmitEvent=null;this.yuiDialog.callback.success=this.onSuccess;this.yuiDialog.callback.failure=this.onFailure;this.yuiDialog.callback.scope=this;this.yuiDialog.render(document.body);if(this.newclass){_YUD.addClass(getElmt(this.yuiDialog.id),this.newclass)}_YUD.setStyle(getElmt(this.yuiDialog.id).parentNode,"z-index",999999);if(this.modal){_YUD.setStyle(getElmt(this.yuiDialog.id+"_mask"),"z-index",999998)}this.yuiDialog.show();var h=_YUD.getRegion(this.yuiDialog.element);var f=new Array((h.bottom-h.top),(h.right-h.left));if(f[0]>_YUD.getViewportHeight()){this.yuiDialog.configHeight(null,[_YUD.getViewportHeight()+"px"],null)}window.scrollTo(0,window.scrollY);this.yuiDialog.center();var a=this.yuiDialog.element.getElementsByTagName("form");for(var b=0;a[b];b++){a[b].dial=this;a[b].onsubmit=function(){if(this.dial.yuiDialog._aButtons[1]){this.dial.yuiDialog._aButtons[1].fireEvent("click")}return false}}},setDims:function(b,a){this.width=b;this.height=a},setButton1:function(b,c,a){this.button1={text:b,handler:c,isDefault:true}},setButton2:function(b,c,a){this.button2={text:b,handler:c,isDefault:false}},setTitle:function(a){this.title=a},setFooter:function(a){this.footer=a},setContent:function(a){this.content=a}};OB_Dialog.getDialogByElmt=function(b){for(var a=0;globDials[a];a++){if(globDials[a].yuiDialog.element==getElmt(b)){return globDials[a]}}return false};OB_Confirm.prototype=new OB_Dialog();OB_Confirm.prototype.constructor=OB_Dialog;function OB_Confirm(c,b,a){this.dialog=new OB_Dialog();this.init(c,b,a?a:{})}OB_Confirm.prototype.init=function(c,b,a){content=document.createElement("div");content.innerHTML=b;document.body.appendChild(content);this.setDims(a.width?a.width:"600px",a.height?a.height:"auto");this.setButton1(a.label1?a.label1:getLocalizedString("Oui"),function(){if(a.handleYes){a.handleYes(this)}this.hide();setTimeout(function(d){if(d){d.destroy()}},500,this)},false);this.setButton2(a.label2?a.label2:getLocalizedString("Non"),function(){if(a.handleNo){a.handleNo(this)}this.cancel();setTimeout(function(d){if(d){d.destroy()}},500,this)},true);if(a.close==false){this.closeB=false}if(a.modal==false){this.modal=false}if(a.enterKey==false){this.keys.enter=false}if(a.escKey==false){this.keys.esc=false}if(a.move==false){this.move=false}this.setTitle(c);this.setContent(content);instance=this.getInstance();if(a.handleNo){this.yuiDialog.cancelEvent.subscribe(a.handleNo)}return instance};OB_FormDialog.prototype=new OB_Dialog();OB_FormDialog.prototype.constructor=OB_Dialog;function OB_FormDialog(c,a,b){this.dialog=new OB_Dialog();this.init(c,a,b?b:{})}OB_FormDialog.prototype.init=function(c,a,b){this.setDims(b.width?b.width:"600px",b.height?b.height:"auto");this.setButton1(b.label1?b.label1:getLocalizedString("Oui"),function(){if(b.handleYes){b.handleYes(this)}if(!this.clicked){this.submit();this.clicked=true}setTimeout(function(d){if(d){d.destroy()}},500,this)},b.def_button==1?true:false);if(!b.oneButton){this.setButton2(b.label2?b.label2:getLocalizedString("Non"),function(){if(b.handleNo){b.handleNo(this)}this.cancel();setTimeout(function(d){if(d){d.destroy()}},500,this)},b.def_button!=1?true:false)}if(b.close==false){this.closeB=false}if(b.modal==false){this.modal=false}if(b.enterKey==false){this.keys.enter=false}if(b.escKey==false){this.keys.esc=false}if(b.move==false){this.move=false}this.setTitle(c);this.setContent(a);this.onSuccess=b.onSuccess?b.onSuccess:null;this.onFailure=b.onFailure?b.onFailure:null;instance=this.getInstance();if(b.handleNo){this.yuiDialog.cancelEvent.subscribe(b.handleNo)}return instance};OB_Alert.prototype=new OB_Dialog();OB_Alert.prototype.constructor=OB_Dialog;function OB_Alert(c,b,a){this.dialog=new OB_Dialog();this.init(c,b,a?a:{})}OB_Alert.prototype.init=function(c,b,a){content=document.createElement("div");content.innerHTML=b;document.body.appendChild(content);this.setDims(a.width?a.width:"600px",a.height?(parseInt(a.height)+80)+"px":"auto");this.setButton1(a.label?a.label:getLocalizedString("Fermer"),function(){if(a.handleYes&&a.handleYes!="destroy"){a.handleYes(this)}this.cancel();setTimeout(function(d){if(d){d.destroy()}},500,this)},true);this.closeB=false;if(a.modal==false){this.modal=false}this.escKey=true;if(a.escKey==false){this.keys.esc=false}this.setTitle(c);this.setContent(content);instance=this.getInstance();if(a.handleYes&&a.handleYes=="destroy"){this.yuiDialog.cancelEvent.subscribe(instance.destroy)}else{if(a.handleYes){this.yuiDialog.cancelEvent.subscribe(a.handleYes)}}if(a.height){instance.body.style.height=a.height;instance.footer.style.paddingTop="10px"}return instance};OB_PostItDialog=function(c,b,a){this.superclass=OB_Dialog;this.init(c,b,a?a:{})};OB_PostItDialog.prototype=new OB_Dialog();OB_PostItDialog.prototype.init=function(c,b,a){content=document.createElement("div");content.innerHTML=b;document.body.appendChild(content);this.setDims("161px",a.height?a.height:"auto");this.modal=a.modal;this.underlay="none";this.newclass="OB_PostItDialog";this.setTitle(c);this.setContent(content);this.setFooter("&nbsp;");instance=this.getInstance();this.yuiDialog.configXY(null,[["10px","10px"]],null);if(a.handleNo){this.yuiDialog.cancelEvent.subscribe(a.handleNo)}_YUD.setStyle(getElmt(this.yuiDialog.id).parentNode,"z-index",1000000);return instance};OB_PostItDialog.prototype.toString=function(){return"OB_PostItDialog object"};var OB_TooltipDialog=OB_PostItDialog;var OB_PulseAlerts=new Array();var OB_PulseAlert=function(c,b,a){this.element=null;this.title=c?c:"";this.content=b?b:"";this.params=a?a:{};this.anim=null;this.id=this.params.id?this.params.id:"OB_PulseAlert";this.effect=null;OB_PulseAlerts.push(this);this.init()};OB_PulseAlert.EFFECT_FADEOUT=1;OB_PulseAlert.EFFECT_SLIDE=2;OB_PulseAlert.STYLE_ERROR=1;OB_PulseAlert.STYLE_INFO=2;OB_PulseAlert.STYLE_OK=3;OB_PulseAlert.prototype={init:function(){if(!getElmt(this.id)){this.element=document.createElement("p")}else{this.element=getElmt(this.id)}this.element.innerHTML="<strong>"+this.title+"</strong><br />"+this.content;this.element.id=this.id;document.body.appendChild(this.element);this.element.setAttribute("class","");this.element.setAttribute("className","");YAHOO.util.Dom.addClass(this.element,this.id);if(this.params.className){YAHOO.util.Dom.addClass(this.element,this.params.className)}if(this.params.style){var a="";switch(this.params.style){case OB_PulseAlert.STYLE_ERROR:a+=" ctn_z_errorbox borderSolid";break;case OB_PulseAlert.STYLE_OK:a+=" ctn_z_okbox borderSolid";break;case OB_PulseAlert.STYLE_INFO:default:a+=" ctn_z_infobox borderSolid";break}YAHOO.util.Dom.addClass(this.element,a)}this.element.style.position="absolute";this.element.style.overflow="hidden";this.element.style.opacity=100;this.element.style.MozOpacity=100;this.element.style.filters="alpha(opacity=100)";switch(this.params.effect){case OB_PulseAlert.EFFECT_SLIDE:this.effect={height:{to:0}};break;case OB_PulseAlert.EFFECT_FADEOUT:default:this.effect={opacity:{from:1,to:0}}}this.pulse()},pulse:function(){if(this.element){this.stopAll();this.element.style.top=(_YUD.getViewportHeight()+_YUD.getDocumentScrollTop()-142)+"px";this.element.style.right=0;this.anim=new YAHOO.util.ColorAnim(this.element.id,this.effect,this.params.delay?parseFloat(this.params.delay):3,YAHOO.util.Easing.easeInStrong);this.anim.onComplete.subscribe(function(){this.getEl().style.display="none"});this.anim.onStart.subscribe(function(){this.getEl().style.display="block"});this.anim.getEl().anim=this.anim;this.anim.getEl().onclick=function(){this.anim.stop(true)};this.anim.animate()}else{return false}},stopAll:function(){for(var a=0;OB_PulseAlerts[a];a++){if(OB_PulseAlerts[a].anim){OB_PulseAlerts[a].anim.stop()}}}};var OB_Sortables=new Array();var OB_Sortable=function(a){this.element=getElmt(a);this.items=new Array();this.cloneContainer=document.createElement("div");this.lastMovedItem=null;this.id=null;OB_Sortables.push(this);if(this.element){this.init()}};OB_Sortable.prototype={init:function(){YAHOO.util.Dom.addClass(this.element,"OB_Sortable_List");if(getBrowser()!="ie"){YAHOO.util.Dom.addClass(this.cloneContainer,"OB_Sortable_List")}this.cloneContainer.style.position="absolute";this.cloneContainer.style.top=0;this.cloneContainer.style.height="1px";this.element.parentNode.appendChild(this.cloneContainer);this.id=this.element.getAttribute("id")?this.element.getAttribute("id"):this+OB_Sortables.length;var a=this.element.getElementsByTagName("li");if(a.length>0){for(var c=0;a[c];c++){var b=new OB_SortableItem(a[c],this);this.items.push(b)}}},destroy:function(){if(configDial&&configDial.yuiDialog.element){configDial.yuiDialog.cancel()}setTimeout(function(){configDial=null},300)},serialize:function(){var b="";var f="";var a=this.element.getElementsByTagName("li");for(var c=0;a[c];c++){var d=OB_SortableItem.getObjectByElmt(a[c]);b+=f+d.id;f=","}return b},move:function(d,c,a){switch(a){case"up":this.element.insertBefore(d.element,c.element);break;case"down":var b=this.getNextLi(c.element);if(!b){this.element.appendChild(d.element)}else{this.element.insertBefore(d.element,b)}break}},getNextLi:function(c){var a=this.element.getElementsByTagName("li");for(var b=0;a[b];b++){if(a[b]==c){if(!a[b+1]){return false}else{return a[b+1]}}}return false},onChange:function(b){if(b){this.customOnChange=b}for(var a=0;this.items[a];a++){this.items[a].onChange(this.customOnChange)}},customOnChange:function(a){}};var configDial=null;var OB_SortableItems=new Array();var OB_SortableItem=function(b,a){this.element=getElmt(b);this.parent=a;this.YUIDrag=null;this.dragEl=this.element.cloneNode(true);this.id=null;OB_SortableItems.push(this);this.init()};OB_SortableItem.prototype={init:function(){this.dragEl.style.visibility="hidden";this.element.setAttribute("id",this.element.getAttribute("id")?this.element.getAttribute("id"):this+"["+this.parent.id+"]"+OB_SortableItems.length);this.id=this.element.getAttribute("id");var a=document.createElement("div");if(this.element.firstChild.nodeName=="A"){this.element.linkNode=this.element.firstChild;this.element.removeChild(this.element.linkNode);a.innerHTML=this.element.linkNode.innerHTML}else{a.appendChild(this.element.firstChild)}a.setAttribute("id","child"+this.id);this.element.label=a;YAHOO.util.Dom.addClass(a,"OB_SortableItem_Content");this.element.appendChild(a);this.dragEl.setAttribute("id","dragEl"+this.element.getAttribute("id"));this.parent.cloneContainer.appendChild(this.dragEl);this.YUIDrag=new YAHOO.util.DDProxy("child"+this.id,this.parent.id,{dragElId:this.dragEl.getAttribute("id")});this.YUIDrag.setXConstraint(0,0);this.YUIDrag.startDrag=this.startDrag;this.YUIDrag.onDragOver=this.onDragOver;this.YUIDrag.endDrag=this.endDrag;this.YUIDrag.parent=this;new YAHOO.util.DDTarget(this.id,this.parent.id)},startDrag:function(a,b){this.parent.element.style.visibility="hidden"},getDBId:function(){return this.id.substr(5)},onDragOver:function(f,g){var d=OB_SortableItem.getObjectByElmt(g);var a=YAHOO.util.Event.getXY(f);var c=YAHOO.util.Dom.getRegion(d.element);var b=parseInt(c.top+((c.bottom-c.top)/2));if(a[1]<b){this.parent.parent.move(this.parent,d,"up")}else{this.parent.parent.move(this.parent,d,"down")}},endDrag:function(a,b){this.parent.element.style.visibility="visible"},onChange:function(a){this.YUIDrag.endDrag=function(){this.parent.parent.lastMovedItem=this.parent;this.parent.element.style.visibility="visible";a()}},createLinkFieldset:function(){if(configDial&&configDial.yuiDialog.element){configDial.yuiDialog.cancel()}if(getElmt("libelleLink")){getElmt("libelleLink").parentNode.removeChild(getElmt("libelleLink"))}if(getElmt("urlLink")){getElmt("urlLink").parentNode.removeChild(getElmt("urlLink"))}var b=getLocalizedString("Editer un lien");var a='<form class="ob_form">								   <fieldset>								   <label for="libelleLink" style="width:150px; display: block; float: left;">Libellé : </label>								   <input type="text" id="libelleLink" value="'+this.parentNode.linkNode.innerHTML+'" style="width: 300px; border: 1px solid black;" />								   <br />								   <div style="clear:both;height: 5px;"></div>								   <label for="urlLink" style="width:150px; display: block; float: left;"><accronym title="Uniformed Resources Locator">URL</accronym> : </label>								   <input type="text" id="urlLink" value="'+this.parentNode.linkNode.getAttribute("href")+'" style="width: 300px; border: 1px solid black;" />								   </fieldset>								   </form>';configDial=new OB_Confirm(b,a,{label1:getLocalizedString("Valider"),label2:getLocalizedString("Annuler"),handleYes:function(){var c=OB_SortableItem.getObjectByElmt(configDial.link.parentNode);c.element.label.innerHTML=getElmt("libelleLink").value!=""?getElmt("libelleLink").value:getLocalizedString("Nouveau Lien");c.element.linkNode.innerHTML=getElmt("libelleLink").value!=""?getElmt("libelleLink").value:getLocalizedString("Nouveau Lien");c.element.linkNode.setAttribute("href",getElmt("urlLink").value);c.dragEl.innerHTML='<a href="'+getElmt("urlLink").value+'">'+getElmt("libelleLink").value!=""?getElmt("libelleLink").value:getLocalizedString("Nouveau Lien")+"</a>";c.updateLink(getElmt("libelleLink").value,getElmt("urlLink").value)},modal:true,close:false});_YUD.setStyle(configDial.yuiDialog.element,"z-index",99999999);configDial.link=this},updateLink:function(b,a){},removeLinkFieldset:function(c){c.parentNode.parentNode.removeChild(this.linkField);this.linkField=null;var a=true;for(var b=0;this.parent.items[b];b++){if(this.parent.items[b].linkField){a=false}}if(a){YAHOO.util.DragDropMgr.unlock()}},onSupprClick:function(a){if(a){this.customSupprFunction=a}if(this.element.supprButton){this.element.supprButton.onclick=function(){this.parent.customSupprFunction();this.parent.parent.element.removeChild(this.parent.element)}}},customSupprFunction:function(){},onConfClick:function(a){if(this.element.confButton){this.element.confButton.onclick=a}},toString:function(){return"OB_SortableItem"}};OB_SortableItem.getObjectByElmt=function(b){for(var a=0;OB_SortableItems[a];a++){if(OB_SortableItems[a].element==getElmt(b)){return OB_SortableItems[a]}}return false};OB_SortableLinks=function(a){this.superclass=OB_Sortable;this.superclass(a)};OB_SortableLinks.prototype=new OB_Sortable();OB_SortableLinks.prototype.init=function(){this.superclass.prototype.init.call(this);for(var b=0;this.items[b];b++){var c=this.items[b].element;c.supprButton=document.createElement("input");c.supprButton.setAttribute("type","button");YAHOO.util.Dom.addClass(c.supprButton,"OB_SortableLinks_SupprButton");if(c.linkNode){c.confButton=document.createElement("input");c.confButton.setAttribute("type","button");YAHOO.util.Dom.addClass(c.confButton,"OB_SortableLinks_ConfButton");c.confButton.value="O";c.insertBefore(c.confButton,c.firstChild)}c.supprButton.value="X";c.insertBefore(c.supprButton,c.firstChild);c.supprButton.parent=this.items[b];this.items[b].onConfClick(this.items[b].createLinkFieldset)}var a=document.createElement("div");_YUD.setStyle(a,"text-align","center");_YUD.setStyle(a,"padding","5px");var d=document.createElement("input");d.setAttribute("type","button");d.value=localizedString["Ajouter un lien"];YAHOO.util.Dom.addClass(d,"buttonAction");a.appendChild(d);this.element.parentNode.insertBefore(a,this.element);this.element.addLink=new YAHOO.widget.ActionButton(d);this.element.addLink.parent=this;this.element.addLink.on("click",function(){if(configDial&&configDial.yuiDialog.element){configDial.yuiDialog.cancel()}if(getElmt("libelleLink")){getElmt("libelleLink").parentNode.removeChild(getElmt("libelleLink"))}if(getElmt("urlLink")){getElmt("urlLink").parentNode.removeChild(getElmt("urlLink"))}var g=getLocalizedString("Ajouter un lien");var f='<form class="ob_form">			<fieldset>			<label for="libelleLink" style="width:150px; display: block; float: left;">'+getLocalizedString("libelle")+'</label>			<input type="text" id="libelleLink" value="'+getLocalizedString("Nouveau Lien")+'" style="width: 300px; border: 1px solid black;" />			<br />			<div style="clear:both;height: 5px;"></div>			<label for="urlLink" style="width:150px; display: block; float: left;"><accronym title="Uniformed Resources Locator">URL</accronym> : </label>			<input type="text" id="urlLink" value="http://" style="width: 300px; border: 1px solid black;" />			</fieldset>			</form>';configDial=new OB_Confirm(g,f,{label1:getLocalizedString("Valider"),label2:getLocalizedString("Annuler"),handleYes:function(){var h=configDial.link.parent;h.addNewLink(getElmt("libelleLink").value,getElmt("urlLink").value)},modal:true,close:false});_YUD.setStyle(configDial.yuiDialog.element,"z-index",99999999);configDial.link=this})};OB_SortableLinks.prototype.addNewLink=function(b,a){this.customAddNewLink(b,a);var d=document.createElement("li");d.linkNode=document.createElement("a");d.linkNode.setAttribute("href",a?a:"http://");d.linkNode.innerHTML=b?b:getLocalizedString("Nouveau Lien");d.appendChild(d.linkNode);this.element.appendChild(d);var c=new OB_SortableItem(d,this);this.items.push(c);if(c.element.linkNode){c.element.confButton=document.createElement("input");c.element.confButton.setAttribute("type","button");YAHOO.util.Dom.addClass(c.element.confButton,"OB_SortableLinks_ConfButton");c.element.confButton.value="O";c.element.insertBefore(c.element.confButton,c.element.firstChild)}c.element.supprButton=document.createElement("input");c.element.supprButton.setAttribute("type","button");YAHOO.util.Dom.addClass(c.element.supprButton,"OB_SortableLinks_SupprButton");c.element.supprButton.value="X";c.element.insertBefore(c.element.supprButton,c.element.firstChild);d.supprButton.parent=c;c.onConfClick(c.createLinkFieldset);this.onSupprClick();this.setUpdateLink();this.onChange()};OB_SortableLinks.prototype.setAddNewLink=function(a){this.customAddNewLink=a};OB_SortableLinks.prototype.customAddNewLink=function(){};OB_SortableLinks.prototype.onSupprClick=function(b){if(b){this.customSupprClick=b}for(var a=0;this.items[a];a++){this.items[a].onSupprClick(this.customSupprClick)}};OB_SortableLinks.prototype.customSupprClick=function(){};OB_SortableLinks.prototype.onConfClick=function(b){for(var a=0;this.items[a];a++){this.items[a].onConfClick(b)}};OB_SortableLinks.prototype.setUpdateLink=function(b){if(b){this.customUpdateLinkFunction=b}for(var a=0;this.items[a];a++){this.items[a].updateLink=this.customUpdateLinkFunction}};OB_SortableLinks.prototype.customUpdateLinkFunction=function(){};OB_SortableLinks.prototype.toString=function(){return"OB_SortableLinks object"};var OB_Tooltips=new Array();var OB_Tooltip=function(a,b){this.element=getElmt(a);this.panel=null;this.params=b?b:{};OB_Tooltips.push(this);this.init()};OB_Tooltip.prototype={init:function(){this.panel=this._insertInDOM();this.panel.bd.innerHTML=this.params.text?this.params.text:this.element.title?this.element.title:this.element.alt?this.element.alt:"";this.element.setAttribute("alt","");this.element.setAttribute("title","");this.hide();this.element.tooltip=this;this.element.onmousemove=function(a){this.tooltip.show(a)};this.element.onmouseout=function(){this.tooltip.hide()}},_insertInDOM:function(){var a=document.createElement("div");a.hd=document.createElement("div");a.hd.appendChild(document.createTextNode(""));a.bd=document.createElement("div");a.bd.appendChild(document.createTextNode(""));a.ft=document.createElement("div");a.ft.appendChild(document.createTextNode(""));a.appendChild(a.hd);a.appendChild(a.bd);a.appendChild(a.ft);a.hd.className="hd";a.bd.className="bd";a.ft.className="ft";a.className="yui-tt"+(this.params.className?" "+this.params.className:"");a.style.position="absolute";a.style.display="none";YAHOO.util.Event.onDOMReady(function(c){try{var b=YAHOO.util.Dom.getAncestorByTagName(this.element,"body")}catch(c){b=document.body}b.appendChild(a)},this,true);return a},hide:function(a){this.panel.style.display="none"},show:function(d){try{var a=_YUE.getEvent(d);this.panel.style.display="block";var f=_YUE.getXY(a);var c=_YUD.getRegion(this.panel);this.panel.style.top=(f[1]+20)+"px";this.panel.style.left=this.params.marginLeft?(f[0]-parseInt(this.params.marginLeft))+"px":(f[0]-(c.right-c.left)/2+2)+"px"}catch(b){}},destroy:function(){this.panel.parentNode.removeChild(this.panel);this.element=null}};OB_Tooltip.getByEl=function(b){for(var a=0;OB_Tooltips[a];a++){if(OB_Tooltips[a].element==getElmt(b)){return OB_Tooltips[a]}}return false};var OB_TagLists=new Array();var OB_TagList=function(a,c,b){this.element=getElmt(a);this.tags=null;this.liste=document.createElement("ul");this.params=b?b:{};this.dataSource=c?c:new Array();this.queryLength=0;OB_TagLists.push(this);this.id=OB_TagLists.length;if(this.element){this.init()}};OB_TagList.prototype={init:function(){if(!this.params.maxInputs){this.params.maxInputs=10}if(!this.params.width){this.params.width="auto"}else{this.params.width=parseInt(this.params.width)+"px"}if(this.params.queryLength){this.queryLength=this.params.queryLength}if(this.element.parentNode){this.element.parentNode.insertBefore(this.liste,this.element)}this.element.style.display="none";this.tags=this.element.value.split(",");for(var a=0;a<this.tags.length;a++){if(this.tags[a]!=""){this.addInput(this.tags[a])}}this.tryAddInput();_YUD.addClass(this.liste,"OB_TagList")},serialize:function(){var a=this.liste.getElementsByTagName("input");var d="";var c="";for(var b=0;a[b];b++){if(a[b].value!=""){c+=d+a[b].value;d=","}}this.element.value=c},addInput:function(c){var b=this.liste.getElementsByTagName("input");if(b.length+1>this.params.maxInputs){return false}if(!c){c=" "}var f=document.createElement("li");var a=document.createElement("div");a.style.position="absolute";a.setAttribute("id","OB_TagList"+this.id+"AutoCompletePanel"+b.length);_YUD.addClass(a,"OB_TagListAutoCompletePanel");var d=document.createElement("input");d.setAttribute("type","text");d.setAttribute("id","OB_TagList"+this.id+"Item"+b.length);d.setAttribute("value",trim(c));d.style.width=this.params.width;d.parent=this;_YUE.addListener(d,"keyup",function(){this.parent.serialize();this.parent.tryAddInput()},this);_YUE.addListener(d,"focus",function(){_YUD.addClass(this,"focus")},this);_YUE.addListener(d,"blur",function(){_YUD.removeClass(this,"focus")},this);f.appendChild(d);f.appendChild(a);this.liste.appendChild(f);setTimeout(function(){var g=_YUD.getRegion(d.getAttribute("id"));_YUD.setXY(a,[g.left,g.bottom])},1000);d.autoComplete=new YAHOO.widget.AutoComplete(d.getAttribute("id"),a.getAttribute("id"),new YAHOO.widget.DS_JSArray(this.dataSource));d.autoComplete.delimChar="";d.autoComplete.animHoriz=true;d.autoComplete.autoHighlight=false;d.autoComplete.highlightClassName="hightlight";d.autoComplete.queryDelay=0;d.autoComplete.typeAhead=true;d.autoComplete.minQueryLength=this.queryLength;if(b.length>1){b[b.length-2].parentNode.appendChild(document.createTextNode(", "))}},hasVoidInput:function(){var a=this.liste.getElementsByTagName("input");for(var b=0;a[b];b++){if(a[b].value==""){return true}}return false},tryAddInput:function(){if(!this.hasVoidInput()){this.addInput("")}}};var OB_SortLists=new Array();var OB_SortList=function(a,b){this.element=getElmt(a);this.yuiDDTarget=null;this.params=b?b:{};this.outInput=document.createElement("input");this.independant=false;OB_SortLists.push(this);this.id=OB_SortLists.length;if(this.element){this.init()}};OB_SortList.prototype={init:function(){if(!this.element.getAttribute("id")){this.element.setAttribute("id","OB_SortList"+this.id)}this.yuiDDTarget=new YAHOO.util.DDTarget(this.element);this.tempLi=document.createElement("li");this.tempLi.innerHTML="&nbsp;";_YUD.addClass(this.tempLi,"tempLi");this.outInput.setAttribute("type","hidden");this.outInput.setAttribute("name",this.params.name?this.params.name:"OB_SortList"+this.id);this.element.parentNode.insertBefore(this.outInput,this.element)},addTempItem:function(c,f){if(this.params.no_sort){return false}if(!f){return false}var d=null;if(f.after){var a=this.element.getElementsByTagName("li");for(var b=0;a[b];b++){if(a[b]==f.after.element&&b<a.length-1){d=a[b+1]}}}if(f.before){d=f.before.element}if(d){this.element.insertBefore(this.tempLi,d)}else{this.element.appendChild(this.tempLi)}},addItem:function(a){if(this.tempLi.parentNode==this.element){this.element.insertBefore(a.element,this.tempLi)}else{this.element.appendChild(a.element)}a.element.style.top="auto";a.element.style.left="auto"},removeTempLi:function(){if(this.tempLi.parentNode&&this.tempLi.parentNode==this.element){this.element.removeChild(this.tempLi)}},getEl:function(){return this.element},serialize:function(){var a=this.element.getElementsByTagName("li");var c="";var d="";for(var b=0;a[b];b++){if(OB_SortListItem.getObjByEl(a[b])){c+=d+a[b].id;d=","}}this.outInput.value=c;return this.outInput.value},destroy:function(){if(this.element&&this.element.parentNode){this.element.parentNode.removeChild(this.element)}if(this.tempLi&&this.tempLi.parentNode){this.tempLi.parentNode.removeChild(this.tempLi)}if(this.outInput&&this.outInput.parentNode){this.outInput.parentNode.removeChild(this.outInput)}}};OB_SortList.getObjById=function(b){for(var a=0;OB_SortLists[a];a++){if(OB_SortLists[a].getEl()&&OB_SortLists[a].getEl().getAttribute("id")==b){return OB_SortLists[a]}}return false};OB_SortList.getObjByEl=function(b){for(var a=0;OB_SortLists[a];a++){if(OB_SortLists[a].getEl()==b){return OB_SortLists[a]}}return false};OB_SortList.destroyAll=function(){for(var a=OB_SortLists.length-1;OB_SortLists[a];a--){OB_SortLists[a].destroy()}OB_SortLists=new Array()};OB_SortList.moveFromTo=function(d,c){d=OB_SortList.getObjByEl(d);c=OB_SortList.getObjByEl(c);if(!d||!c){return false}var a=d.getEl().getElementsByTagName("li");if(a.length==0){return false}while(a.length>0){var b=OB_SortListItem.getObjByEl(a[0]);if(b){c.addItem(b)}}d.serialize();c.serialize()};var OB_SortListItems=new Array();var OB_SortListItem=function(a,b){this.element=getElmt(a);this.YUIDD=null;OB_SortListItems.push(this);this.id=OB_SortListItems.length;if(this.element){this.init(b)}};OB_SortListItem.prototype={init:function(a){if(!this.element.getAttribute("id")){this.element.setAttribute("id","OB_SortListItem"+this.id)}this.YUIDD=new YAHOO.util.DD(this.element);this.YUIDD.parent=this;this.YUIDD.b4StartDrag=function(){_YUD.setStyle(this.getEl(),"z-index",999999);_YUD.setStyle(this.getEl(),"opacity",0.8);if(getBrowser()=="ie"){_YUD.setStyle(_YUD.getElementsByClassName("handle","div",this.getEl()),"margin-left","20px")}};this.YUIDD.b4EndDrag=function(){_YUD.setStyle(this.getEl(),"z-index",9999);_YUD.setStyle(this.getEl(),"opacity",1)};this.YUIDD.onDragOver=function(g,h){if(OB_SortList.getObjById(h)&&OB_SortList.getObjById(h)!=OB_SortList.getObjByEl(this.parent.element.parentNode)){_YUD.addClass(OB_SortList.getObjById(h).getEl().parentNode,"OB_SortList_hover")}if(OB_SortListItem.getObjById(h)){var d=OB_SortListItem.getObjById(h);var f=_YUD.getRegion(d.element);var c=_YUE.getXY(g)[1];var b=parseInt(f.top+(f.bottom-f.top)/2);if(c<b){d.getParentTarget().addTempItem(this,{before:d})}else{d.getParentTarget().addTempItem(this.parent,{after:d})}}};this.YUIDD.onDragOut=function(b,c){_YUD.removeClass(getElmt(c).parentNode,"OB_SortList_hover");if(OB_SortList.getObjById(c)){OB_SortList.getObjById(c).removeTempLi()}};this.YUIDD.onDragDrop=function(c,f){_YUD.removeClass(getElmt(f).parentNode,"OB_SortList_hover");var b=OB_SortList.getObjById(f);if(b){if(b.tempLi.parentNode==b.element||!b.independant){var d=this.parent.getParentTarget();b.addItem(this.parent);b.removeTempLi();d.serialize();b.serialize();this.parent.onDragDrop()}else{this.onInvalidDrop()}}};this.YUIDD.onInvalidDrop=function(){attributes={points:{to:[this.startPageX,this.startPageY]},opacity:{to:1}};var b=new YAHOO.util.Motion(this.dragElId,attributes,0.2,YAHOO.util.Easing.easeOut);b.animate()};if(a){this.handle=document.createElement("div");this.handle.className=a;this.element.appendChild(this.handle);this.YUIDD.setHandleElId(this.handle)}},getEl:function(){return this.element},getParentTarget:function(){return OB_SortList.getObjByEl(this.element.parentNode)},onDragDrop:function(){},destroy:function(){if(this.element&&this.element.parentNode){this.element.parentNode.removeChild(this.element)}}};OB_SortListItem.getObjById=function(b){for(var a=0;OB_SortListItems[a];a++){if(OB_SortListItems[a].getEl().getAttribute("id")==b){return OB_SortListItems[a]}}return false};OB_SortListItem.getObjByEl=function(b){for(var a=0;OB_SortListItems[a];a++){if(OB_SortListItems[a].getEl()==b){return OB_SortListItems[a]}}return false};OB_SortListItem.destroyAll=function(){for(var a=0;OB_SortListItems[a];a++){OB_SortListItems[a].destroy()}OB_SortListItems=new Array()};OB_NavTabs=new Array();OB_NavTab=function(a){this.id=a;this.element=getElmt(a);if(this.element){OB_NavTabs.push(this);this.init()}else{return null}};OB_NavTab.prototype={init:function(){this.value=this.element.innerHTML.substr(1,this.element.innerHTML.length-2)},setValue:function(a){this.value=a;this.element.innerHTML="("+a+")"},increment:function(a){if(!a){a=1}this.setValue(parseInt(this.value)+1);this.toggle()},decrement:function(a){if(!a){a=1}this.setValue(parseInt(this.value)-1);this.toggle()},toggle:function(){if(this.value>0){this.element.parentNode.style.display="block"}else{this.element.parentNode.style.display="none"}}};OB_NavTab.toggle=function(){for(var a=0;OB_NavTabs[a];a++){OB_NavTabs[a].toggle()}};var OB_LinkInputFor=function(a,d){var f=new Array();f.push(document.getElementsByTagName("input"));f.push(document.getElementsByTagName("select"));f.push(document.getElementsByTagName("textarea"));var g=new Array();for(var c=0;f[c];c++){for(var b=0;f[c][b];b++){g.push(f[c][b])}}for(c=0;g[c];c++){g[c].fors=_YUD.getElementsBy(function(h){return(h.getAttribute("for")==g[c].id)});g[c].onfocus=function(){for(b=0;this.fors[b];b++){a(this.fors[b])}};g[c].onblur=function(){for(b=0;this.fors[b];b++){d(this.fors[b])}}}};if(YAHOO&&YAHOO.widget&&YAHOO.widget.Button){YAHOO.widget.Button.prototype.deactivate=function(a){if(this.__yui_events.click.subscribers[1]){this._oldOnClick=this.__yui_events.click.subscribers[1].fn}this.unsubscribe("click");this.on("click",function(){return false});if(a){this.oldLabel=this.get("label");this.setAttributes({label:a})}this._deactivated=true};YAHOO.widget.Button.prototype.reactivate=function(a){if(!this._deactivated){return false}this.unsubscribe("click");if(this._oldOnClick){this.on("click",this._oldOnClick,this,this)}if(a){this.setAttributes({label:a})}else{if(this.oldLabel){this.setAttributes({label:this.oldLabel})}}this._deactivated=false};YAHOO.widget.ActionButton=function(b,a){YAHOO.widget.ActionButton.superclass.constructor.call(this,b,a);this.addClass("default")};YAHOO.lang.extend(YAHOO.widget.ActionButton,YAHOO.widget.Button);YAHOO.widget.SearchButton=function(b,a){YAHOO.widget.ActionButton.superclass.constructor.call(this,b,a);this.addClass("search")};YAHOO.lang.extend(YAHOO.widget.SearchButton,YAHOO.widget.Button);YAHOO.widget.Buttons={};YAHOO.widget._buttons=new Array();YAHOO.widget.Buttons.ACTION=1;YAHOO.widget.Buttons.SEARCH=2;YAHOO.widget.Buttons.createButtons=function(d,f){if(getBrowser()=="ie"){return false}try{buttons=_YUD.getElementsByClassName(d);for(var b=0;buttons[b];b++){if(!_YUD.hasClass(buttons[b],"noYui")){if(f&&f==YAHOO.widget.Buttons.ACTION){buttons[b].newButton=new YAHOO.widget.ActionButton(buttons[b])}else{if(f&&f==YAHOO.widget.Buttons.SEARCH){buttons[b].newButton=new YAHOO.widget.SearchButton(buttons[b])}else{buttons[b].newButton=new YAHOO.widget.Button(buttons[b])}}if(buttons[b].onclick){buttons[b].newButton.on("click",buttons[b].onclick,buttons[b],buttons[b])}if(buttons[b].style){for(var a=0;buttons[b].style[a];a++){if(buttons[b].style[a]){var c=buttons[b].style[a];if(c=="font-size"){c="fontSize"}buttons[b].newButton._button.style[c]=buttons[b].style[c]}}}buttons[b].newButton._button.style.width=buttons[b].style.width;YAHOO.widget._buttons.push(buttons[b].newButton)}}}catch(g){}};YAHOO.widget.Buttons.getById=function(b){for(var a=0;YAHOO.widget._buttons[a];a++){if(YAHOO.widget._buttons[a]._button.parentNode.parentNode.id==b){return YAHOO.widget._buttons[a]}}return false}}var OB_Checks=new Array();var OB_Check=function(a,b){this.element=getElmt(a);this.params=b?b:{};this.inputs=this.params.inputs?this.params.inputs:{};this.valid=false;this.init()};OB_Check.prototype={init:function(){for(name in this.inputs){var a=this.element[name];a.ob_check=this;a.params=this.inputs[name];a.onblur=function(){if(this.ob_check.params.events&&this.ob_check.params.events.onBlur){this.ob_check.params.events.onBlur(this)}if(this.params.fn){this.params.fn(this)}var c=false;for(test in this.params.tests){var b=this.ob_check.check(this,test,this.params.tests[test].arg);if(b===1){return}if(!b){c=this.params.tests[test].error}}if(!c){this.parentNode.parentNode.className="ok";this.parentNode.parentNode.getElementsByTagName("td")[2].getElementsByTagName("p")[0].innerHTML=this.params.ok}else{this.parentNode.parentNode.className="error";this.parentNode.parentNode.getElementsByTagName("td")[2].getElementsByTagName("p")[0].innerHTML=c}};a.onfocus=function(){if(this.ob_check.params.events&&this.ob_check.params.events.onFocus){this.ob_check.params.events.onFocus(this)}}}this.element.ob_check=this;this.element.onsubmit=function(){return this.ob_check.checkAll()}},check:function(b,d,a){var c=b.value;switch(d){case"email":return c.match(/^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/i);case"url":return c.match(/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/);case"password":return c.match(/^[a-zA-Z0-9]{4,}$/);case"sameas":return c==getElmt(a).value;case"notNull":return c!="";case"checked":return b.checked;case"custom":return a(b);case"maxLength":return c.length<a}return true},checkAll:function(){var b=true;for(name in this.inputs){var a=false;for(test in this.inputs[name].tests){if(!this.check(this.element[name],test,this.inputs[name].tests[test].arg)){a=this.inputs[name].tests[test].error}}if(a===null){return}if(!a){this.element[name].parentNode.parentNode.className="ok";this.element[name].parentNode.parentNode.getElementsByTagName("td")[2].getElementsByTagName("p")[0].innerHTML=this.inputs[name].ok}else{this.element[name].parentNode.parentNode.className="error";this.element[name].parentNode.parentNode.getElementsByTagName("td")[2].getElementsByTagName("p")[0].innerHTML=a;b=false}}return b}};var OB_Calendar=new Array();var OB_Calendar=function(b,a,c){this.element=getElmt(b);this.container=getElmt(a);this.renderer=c;this.cal=null;this.init()};OB_Calendar.prototype={init:function(){var a=document.createElement("span");a.style.position="absolute";a.setAttribute("href","#");a.setAttribute("id","trigger");a.setAttribute("style","cursor: pointer;");var b=document.createElement("img");b.setAttribute("src",IMGUrl+"p_calendrier.gif");b.setAttribute("alt","calendar");a.appendChild(this.container);a.appendChild(b);a.parent=this;this.element.parentNode.appendChild(a);this.cal=new YAHOO.widget.Calendar("yui_calendar"+this.element.id,this.container.id,{selected:this.element?this.element.value:0,SHOW_WEEKDAYS:true,close:true});this.cal.selectEvent.subscribe(function(d,c,f){date=f.getSelectedDates()[0];oldDate=new Date(getElmt("publicationDate").value);getElmt("publicationDate").value=((date.getDate()<10)?("0"+date.getDate()):date.getDate())+"/"+((date.getMonth()+1<10)?("0"+(date.getMonth()+1)):(date.getMonth()+1))+"/"+date.getFullYear()+" "+((oldDate.getHours()<10)?("0"+oldDate.getHours()):(oldDate.getHours()))+":"+((oldDate.getMinutes()<10)?("0"+oldDate.getMinutes()):(oldDate.getMinutes()));this.cal.hide()},this.cal);this.cal.cfg.setProperty("MONTHS_LONG",[getLocalizedString("Janvier"),getLocalizedString("Fevrier"),getLocalizedString("Mars"),getLocalizedString("Avril"),getLocalizedString("Mai"),getLocalizedString("Juin"),getLocalizedString("Juillet"),getLocalizedString("Aout"),getLocalizedString("Septembre"),getLocalizedString("Octobre"),getLocalizedString("Novembre"),getLocalizedString("Decembre")]);this.cal.cfg.setProperty("WEEKDAYS_SHORT",[getLocalizedString("Dim"),getLocalizedString("Lun"),getLocalizedString("Mar"),getLocalizedString("Mer"),getLocalizedString("Jeu"),getLocalizedString("Ven"),getLocalizedString("Sam")]);this.cal.cfg.setProperty("START_WEEKDAY",1);this.cal.render();this.cal.hide();a.onclick=function(){var c=this.parent.container;if(c.style.display=="none"){this.parent.cal.show()}else{this.parent.cal.hide()}return false}}};
if(!OB){var OB={}}(function(){OB.Cache={};OB.Diablogs=new Array();OB.Diablog=function(params){this.dialog;this.init(params);this.noEnter=false;this.onAjaxLoaded=new YAHOO.util.CustomEvent("onAjaxLoaded",this);OB.Diablogs.push(this)};OB.Diablog.LABEL_CLOSE="close";OB.Diablog.TYPE_OK="diablog_ok";OB.Diablog.TYPE_ERROR="diablog_error";OB.Diablog.prototype={init:function(params){if(!params){params={}}this.modal=document.createElement("div");YAHOO.util.Dom.setStyle(this.modal,"background","black");YAHOO.util.Dom.setStyle(this.modal,"opacity",0);YAHOO.util.Dom.setStyle(this.modal,"top",0);YAHOO.util.Dom.setStyle(this.modal,"left",0);YAHOO.util.Dom.setStyle(this.modal,"height",YAHOO.util.Dom.getDocumentHeight()+"px");YAHOO.util.Dom.setStyle(this.modal,"width",YAHOO.util.Dom.getDocumentWidth()+"px");YAHOO.util.Dom.setStyle(this.modal,"position","absolute");var zindex=0;YAHOO.util.Dom.batch(document.getElementsByTagName("*"),function(el){var zi=parseInt(YAHOO.util.Dom.getStyle(el,"z-index"));if(zi>zindex){zindex=zi}});YAHOO.util.Dom.setStyle(this.modal,"z-index",zindex);this.modal.dialog=this;document.body.appendChild(this.modal);this.dialog=document.createElement("div");this.dialog.dialog=this;if(params.width){YAHOO.util.Dom.setStyle(this.dialog,"width",typeof params.width=="string"?params.width:parseInt(params.width)+"px")}YAHOO.util.Dom.setStyle(this.dialog,"z-index",zindex+1);this.dialog.className="diablog";if(params.className){this.dialog.className+=" "+params.className}this.dialog.titleCtn=document.createElement("div");this.dialog.titleCtn.className="title";this.dialog.appendChild(this.dialog.titleCtn);this.dialog.contentCtn=document.createElement("div");this.dialog.contentCtn.className="content";this.dialog.appendChild(this.dialog.contentCtn);this.dialog.buttonsCtn=document.createElement("div");this.dialog.buttonsCtn.className="buttons";this.dialog.appendChild(this.dialog.buttonsCtn);this.dialog.buttons=new Array();if(!params.noButton){this.addButton(OB.Diablog.LABEL_CLOSE,{click:function(){this.close()},className:"",scope:this})}document.body.appendChild(this.dialog);YAHOO.util.Dom.setStyle(this.dialog,"opacity",0);this.center();(new YAHOO.util.Anim(this.modal,{opacity:{to:0.5}},0.25)).animate();(new YAHOO.util.Anim(this.dialog,{opacity:{to:1}},0.25)).animate();if(!params.noEsc){YAHOO.util.Event.addListener(window,"keydown",function(e,dialog){if(e.keyCode==e.DOM_VK_ESCAPE||e.keyCode==27){dialog.close()}},this)}YAHOO.util.Event.purgeElement(this.dialog,null,"keydown");if(!params.noEnter){YAHOO.util.Event.addListener(this.dialog,"keydown",function(e,dialog){if(e.keyCode==13&&(!e.target||e.target.nodeName.toLowerCase()!="textarea")&&!this.dialog.noEnter){YAHOO.util.Event.preventDefault(e);dialog.getDefaultButton().click()}},this)}YAHOO.util.Dom.batch(YAHOO.util.Dom.getElementsBy(function(el){return el.nodeName.toLowerCase()=="embed"||el.nodeName.toLowerCase()=="object"||el.nodeName.toLowerCase()=="select"}),function(el){YAHOO.util.Dom.setStyle(el,"visibility","hidden")});this.nocache=params.nocache},getDefaultButton:function(){var dftBtn=false;for(var i=0;this.dialog.buttons[i];i++){if(this.dialog.buttons[i].isDefault){dftBtn=this.dialog.buttons[i]}}if(!dftBtn){dftBtn=this.dialog.buttons[i-1]}return dftBtn},center:function(){YAHOO.util.Dom.setStyle(this.dialog,"position","absolute");YAHOO.util.Dom.setStyle(this.getCtnEl(),"height","auto");var reg=YAHOO.util.Dom.getRegion(this.getCtnEl());if((reg.bottom-reg.top)>YAHOO.util.Dom.getViewportHeight()){var outerHeight=this.getOuterHeight();YAHOO.util.Dom.setStyle(this.getCtnEl(),"height",(YAHOO.util.Dom.getViewportHeight()-outerHeight-80)+"px");YAHOO.util.Dom.setStyle(this.getCtnEl(),"overflow","auto")}else{YAHOO.util.Dom.setStyle(this.dialog,"height","auto")}r=YAHOO.util.Dom.getRegion(this.dialog);YAHOO.util.Dom.setStyle(this.dialog,"left",parseInt((YAHOO.util.Dom.getViewportWidth()/2)-((r.right-r.left)/2)+YAHOO.util.Dom.getDocumentScrollLeft())+"px");YAHOO.util.Dom.setStyle(this.dialog,"top",parseInt((YAHOO.util.Dom.getViewportHeight()/2)-((r.bottom-r.top)/2)+YAHOO.util.Dom.getDocumentScrollTop())+"px")},setTitle:function(title){if(typeof title=="string"){this.dialog.titleCtn.innerHTML=title}else{this.dialog.titleCtn.appendChild(title)}this.center()},setContent:function(content){if(typeof content=="string"){this.dialog.contentCtn.innerHTML+=content}else{this.dialog.contentCtn.appendChild(content)}YAHOO.util.Dom.batch(YAHOO.util.Dom.getElementsBy(function(el){return el.nodeName.toLowerCase()=="embed"||el.nodeName.toLowerCase()=="object"||el.nodeName.toLowerCase()=="select"},null,this.dialog.contentCtn),function(el){YAHOO.util.Dom.setStyle(el,"visibility","visible")});this.center()},flushContent:function(){while(this.dialog.contentCtn.firstChild){this.dialog.contentCtn.removeChild(this.dialog.contentCtn.firstChild)}},setContentFromAjax:function(uri,success,successParams){this._uri=uri;this._success=success;this._successParams=successParams;this.flushContent();if(!this.nocache&&OB.Cache[this._uri]){this.setContent(OB.Cache[this._uri]);if(typeof this._success=="function"){this._success.apply(this,[this._successParams])}this._evalJSFromAjax(this.getEl().contentCtn);this.onAjaxLoaded.fire(this)}else{var wait=document.createElement("div");wait.className="wait";this.setContent(wait);if(this._ajax){this._ajax.cancel()}this._ajax=YAHOO.util.Connect.asyncRequest("get",this._uri,{success:function(o){this.flushContent();var body=o.responseText.replace(/\s+/gm," ").match(/<body[^>]*>(.*)<\/body>/gi);if(body){body=body[0].replace(/<body[^>]*>/gi,"");body=body.replace(/<\/body>/gi,"")}else{body=o.responseText}this.setContent(body);if(typeof this._success=="function"){this._success.apply(this,[this._successParams])}this._evalJSFromAjax(this.getEl().contentCtn);this.onAjaxLoaded.fire(this);OB.Cache[this._uri]=body;this._ajax=null},scope:this})}},_evalJSFromAjax:function(ctn){var scripts=ctn.getElementsByTagName("script");for(var i=0;scripts[i];i++){eval(scripts[i].text)}},addButton:function(label,params){var button=new OB.Blutton(label,params);button.dialog=this;this.dialog.buttonsCtn.appendChild(button.getEl());this.dialog.buttons.push(button);if(params.isDefault){for(var i=0;this.dialog.buttons[i];i++){if(this.dialog.buttons[i].isDefault){this.dialog.buttons[i].isDefault=false}}button.isDefault=true}},close:function(msg,params){if(!params){params={}}if(msg){params.closeicon=false;params.dontreopen=true;this.displayMessage(msg,params)}if(this.ajax){this.ajax.cancel()}var anim=new YAHOO.util.Anim(this.dialog,{opacity:{to:0}},msg?2:0.25,msg?YAHOO.util.Easing.easeInStrong:YAHOO.util.Easing.easeOut);if(params.fn){anim.afterComplete=params.fn}else{anim.afterComplete=new Function()}if(params.scope){anim.afterCompleteScope=params.scope}else{anim.afterCompleteScope=this}anim.onComplete.subscribe(function(){this.getEl().parentNode.removeChild(this.getEl());this.afterComplete.apply(this.afterCompleteScope)});anim.animate();var anim2=new YAHOO.util.Anim(this.modal,{opacity:{to:0}},msg?2:0.25,msg?YAHOO.util.Easing.easeInStrong:YAHOO.util.Easing.easeOut);anim2.onComplete.subscribe(function(){if(this.getEl()){this.getEl().parentNode.removeChild(this.getEl())}YAHOO.util.Dom.batch(YAHOO.util.Dom.getElementsBy(function(el){return el.nodeName.toLowerCase()=="embed"||el.nodeName.toLowerCase()=="object"||el.nodeName.toLowerCase()=="select"}),function(el){YAHOO.util.Dom.setStyle(el,"visibility","visible")})});anim2.animate()},displayMessage:function(msg,params){if(!params){params={}}var reg=YAHOO.util.Dom.getRegion(this.getEl());var panel=document.createElement("div");if(!params.type){params.type=OB.Diablog.TYPE_OK}YAHOO.util.Dom.addClass(panel,"fullmessage");YAHOO.util.Dom.addClass(panel,params.type);if(typeof msg=="string"){panel.appendChild(document.createTextNode(msg))}else{panel.appendChild(msg)}if(params.closeicon){panel.appendChild(document.createElement("br"));panel.appendChild(document.createElement("br"));panel.appendChild(new OB.Blutton("Ok",{className:"orange"}).getEl())}panel.dialog=this;this.noEnter=true;if(!params.close){params.close=panel}if(!params.dontreopen){YAHOO.util.Event.addListener(params.close,"click",function(e,dialog){var a=new YAHOO.util.Anim(this,{opacity:{to:0}},0.25,YAHOO.util.Easing.easeOut);a.onComplete.subscribe(function(a,b,dialog){this.parentNode.removeChild(this)},this,true);a.animate();(new YAHOO.util.Anim(this.dialog.getEl(),{height:{to:this.dialog.getEl().originalHeight},top:{to:this.dialog.getEl().originalTop}},0.25,YAHOO.util.Easing.easeOut)).animate();if(params.onClose){params.onClose.apply(this.dialog)}this.noEnter=false},this,panel)}YAHOO.util.Dom.setStyle(panel,"opacity",0);YAHOO.util.Dom.setStyle(panel,"cursor","pointer");(new YAHOO.util.Anim(panel,{opacity:{to:1}},0.25,YAHOO.util.Easing.easeOut)).animate();this.getEl().contentCtn.appendChild(panel);this.getEl().originalHeight=reg.bottom-reg.top;this.getEl().originalTop=parseInt(YAHOO.util.Dom.getStyle(this.getEl(),"top"));reg=YAHOO.util.Dom.getRegion(panel);var panelHeight=reg.bottom-reg.top-10;YAHOO.util.Dom.setStyle(this.getEl(),"overflow","hidden");(new YAHOO.util.Anim(this.getEl(),{height:{to:panelHeight},top:{to:this.getEl().originalTop+(this.getEl().originalHeight-panelHeight)/2}},0.25,YAHOO.util.Easing.easeOut)).animate()},getEl:function(){return this.dialog},getCtnEl:function(){return this.dialog.contentCtn},getOuterHeight:function(){var reg1=YAHOO.util.Dom.getRegion(this.getEl().titleCtn);var reg2=YAHOO.util.Dom.getRegion(this.getEl().buttonsCtn);return(reg1.bottom-reg1.top)+(reg1.bottom-reg1.top)}};OB.Bluttons=new Array();OB.Blutton=function(label,params){this.label=label;this.el;this.active=true;if(!params){params={}}this.init(params)};OB.Blutton.LABEL_DEACTIVATED="…";OB.Blutton.prototype={init:function(params){if(typeof this.label=="string"){this.el=document.createElement("span");this.el.className="ob-button";if(params.className){this.el.className+=" "+params.className}this.el.firstchild=document.createElement("span");this.el.firstchild.className="first-child";this.el.firstchild.b=document.createElement("button");this.el.firstchild.b.appendChild(document.createTextNode(this.label));this.el.firstchild.appendChild(this.el.firstchild.b);this.el.appendChild(this.el.firstchild)}else{if(this.label.nodeName.toLowerCase()==="button"||this.label.nodeName.toLowerCase()==="input"||this.label.nodeName.toLowerCase()==="a"){this.el=this.label.parentNode.parentNode;this.el.firstchild=this.label.parentNode;this.el.firstchild.b=this.label;if(this.label.nodeName.toLowerCase()==="input"){this.label=this.label.value}else{this.label=this.label.innerHTML}}else{throw"label must be a string or an encapsuled input/button/a"}}if(params.click){this.fn=params.click;if(params.scope){scope=params.scope}else{scope=this}YAHOO.util.Event.addListener(this.el,"click",function(e,obj,params){this.fn.apply(obj.scope,[e,obj.params])},{scope:scope,button:this,params:params.params},this)}},getEl:function(){return this.el},deactivate:function(){this._clickEvents=YAHOO.util.Event.getListeners(this.el,"click");YAHOO.util.Event.purgeElement(this.el,false,"click");YAHOO.util.Dom.addClass(this.el,"active");var reg=YAHOO.util.Dom.getRegion(this.el.firstchild.b);YAHOO.util.Dom.setStyle(this.el.firstchild.b,"width",(reg.right-reg.left)+"px");YAHOO.util.Dom.setStyle(this.el.firstchild.b,"padding","0");if(this.el.firstchild.b.nodeName.toLowerCase()==="input"){this.el.firstchild.b.value=OB.Blutton.LABEL_DEACTIVATED}else{this.el.firstchild.b.removeChild(this.el.firstchild.b.firstChild);this.el.firstchild.b.appendChild(document.createTextNode(OB.Blutton.LABEL_DEACTIVATED))}this.el.firstchild.b.blur();this.active=false},reactivate:function(){YAHOO.util.Dom.removeClass(this.el,"active");if(this.el.firstchild.b.nodeName.toLowerCase()==="input"){this.el.firstchild.b.value=this.label}else{this.el.firstchild.b.removeChild(this.el.firstchild.b.firstChild);this.el.firstchild.b.appendChild(document.createTextNode(this.label))}if(this._clickEvents){for(var i=0;this._clickEvents[i];i++){YAHOO.util.Event.addListener(this.el,this._clickEvents[i].type,this._clickEvents[i].fn,this._clickEvents[i].obj,this._clickEvents[i].scope)}}this.active=true},click:function(){var evts=YAHOO.util.Event.getListeners(this.el,"click");for(var i=0;evts[i];i++){evts[i].fn.apply(evts[i].scope,[evts[i],evts[i].obj])}}}})();
