$expandedObj=false;clickedOnMultiselect=0;function expandBlock(e){if(e!=$expandedObj){a($expandedObj)}else{$expandedObj=false}$titleBarObj=e.parentNode;for($i=0;$i<$titleBarObj.childNodes.length;$i++){var c=$titleBarObj.childNodes[$i];if(c.className=="blockExpandText"){if($.trim(c.innerHTML)=="+"){c.innerHTML=" - "}else{c.innerHTML=" + "}}if(c.className=="blockFermerText"){if(c.style.right=="9999em"){c.style.right=""}else{c.style.right="9999em"}}}var d=e.parentNode.parentNode;if(d){for(var b=0;b<d.childNodes.length;b++){if(d.childNodes[b].title&&d.childNodes[b].title=="expanded"){if($(d.childNodes[b]).is(":hidden")){$(d.childNodes[b]).slideDown();$expandedObj=e}else{$(d.childNodes[b]).slideUp("slow")}}}}function a(l){if(!l){return true}var f=l.parentNode;var j=l.parentNode.parentNode;if(j){for(var h=0;h<j.childNodes.length;h++){if(j.childNodes[h].title&&j.childNodes[h].title=="expanded"){$(j.childNodes[h]).slideUp("slow")}for(var k=0;k<f.childNodes.length;k++){var g=f.childNodes[k];if(g.className=="blockExpandText"){if($.trim(g.innerHTML)=="+"){g.innerHTML=" - "}else{g.innerHTML=" + "}}if(g.className=="blockFermerText"){g.style.right="9999em"}}}}}}function cityBonus(b){var a=410;var c=280;var e=(screen.height-c)/2;var d=(screen.width-a)/2;wcb=window.open(b,"","top="+e+",left="+d+",width="+a+",height="+c+", scrollbars=1")}(function(b){b.dimensions={version:"1.2"};b.each(["Height","Width"],function(d,c){b.fn["inner"+c]=function(){if(!this[0]){return}var f=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+c]:a(this,c.toLowerCase())+a(this,"padding"+f)+a(this,"padding"+e)};b.fn["outer"+c]=function(f){if(!this[0]){return}var h=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";f=b.extend({margin:false},f||{});var g=this.is(":visible")?this[0]["offset"+c]:a(this,c.toLowerCase())+a(this,"border"+h+"Width")+a(this,"border"+e+"Width")+a(this,"padding"+h)+a(this,"padding"+e);return g+(f.margin?(a(this,"margin"+h)+a(this,"margin"+e)):0)}});b.each(["Left","Top"],function(d,c){b.fn["scroll"+c]=function(e){if(!this[0]){return}return e!=undefined?this.each(function(){this==window||this==document?window.scrollTo(c=="Left"?e:b(window)["scrollLeft"](),c=="Top"?e:b(window)["scrollTop"]()):this["scroll"+c]=e}):this[0]==window||this[0]==document?self[(c=="Left"?"pageXOffset":"pageYOffset")]||b.boxModel&&document.documentElement["scroll"+c]||document.body["scroll"+c]:this[0]["scroll"+c]}});b.fn.extend({position:function(){var h=0,g=0,f=this[0],j,c,e,d;if(f){e=this.offsetParent();j=this.offset();c=e.offset();j.top-=a(f,"marginTop");j.left-=a(f,"marginLeft");c.top+=a(e,"borderTopWidth");c.left+=a(e,"borderLeftWidth");d={top:j.top-c.top,left:j.left-c.left}}return d},offsetParent:function(){var c=this[0].offsetParent;while(c&&(!/^body|html$/i.test(c.tagName)&&b.css(c,"position")=="static")){c=c.offsetParent}return b(c)}});function a(c,d){return parseInt(b.curCSS(c.jquery?c[0]:c,d,true))||0}})(jQuery);function showSousMenuPicto(a){$imgChild=$("#"+a+" > div");$width=$($imgChild).width();if($("#"+a)){$("#"+a).animate({width:$width},300)}}function hideSousMenuPicto(a){$tempObj=$("#"+a);$tempObj.timerOut=setTimeout("hideSousMenuPictoTimeout('"+a+"')",500)}function hideSousMenuPictoTimeout(a){$("#"+a).animate({width:"1px"},200)}function showSousMenuProfile(a){$tempObj=document.getElementById(a);if($tempObj.timerOut){clearTimeout($tempObj.timerOut);$tempObj.timerOut=false}showSousMenuPicto(a)}function hideSousMenuProfile(a){$tempObj=document.getElementById(a);if(!$tempObj.timerOut){$tempObj.timerOut=setTimeout("hideSousMenuProfile('"+a+"')",100);return true}hideSousMenuPictoTimeout(a)}function changeContentById(a,b){for(var c=0;;c++){if($("#"+a+c).length>0){$style="sousOnglets";$contentStyle="displayNone";if(c==b){$style="sousOngletsActive";$contentStyle="displayYes"}$("#"+a+c)[0].className=$style;$("#"+a+c+"Content")[0].className=$contentStyle}else{break}}return}function changeContent(a){$p=$(a).parent().get(0);$parentOfContent=$($($($p).parent().get(0)).next().get(0)).children().get(0);for(var b=0;b<$($p).children().length;b++){if($($p).children().get(b)==a){$($p).children().get(b).className="blockOngletsActive";$($parentOfContent).children().get(b).className="displayYes"}else{$($p).children().get(b).className="";$($parentOfContent).children().get(b).className="displayNone"}}}function valideRecherche(c,b,a){if(b==null){if($.trim($("#OUKEYWORDS").val())==c){$cityVal=""}else{$cityVal=$.trim($("#OUKEYWORDS").val())}}else{if($.trim($("#"+b).val())==c){$cityVal=""}else{$cityVal=$.trim($("#"+b).val())}}if(a!=null){$formName=a}else{$formName="searchByCity"}if($.trim($("#QUIQUOIKEYWORDS").val())==""&&$cityVal==""){alert("Veuillez remplir au moins un champ de recherche");return false}else{$("form[name='"+$formName+"']").submit()}}function insertRow(){var b=document.getElementById("countInput").value;var a=document.getElementById("myTable");a.innerHTML='<table><tr><td>Titre de l\'actualité</td><td><input type="text" id="titreAct2" name="titreAct[]" value="" class="inputGradGris"></td></tr><tr><td>Texte :</td><td><textarea id="textAct2" name="textAct[]" rows="4" class="inputGradGris" ></textarea></td></tr></table>';b++;document.getElementById("insertLink").style.display="none";document.getElementById("countInput").value=b;return false}function confirmFavori(b,a){$.post("/"+b+"/Ajax",{action:"ajoutefavoris",favidentifianturl:a},function(){removeBlackLayer()})}function supprimeFavori(c,b,a){$.post("/"+c+"/Ajax",{action:"supprimefavoris",favidentifianturl:b},function(){removeBlackLayer();if(a.indexOf("?")!=-1){document.location=a+"&enleveId="+b}else{document.location=a+"?enleveId="+b}})}function supprimeAlbum(c,b,a){$.post("/"+b+"/Ajax",{action:"supprimealbum",numalbum:c},function(){removeBlackLayer();if(a.indexOf("?")!=-1){document.location=a}else{document.location=a}})}function supprimePublication(b,c,a){$.post("/"+c+"/Ajax",{action:"suppPublication",numcarte:b},function(){removeBlackLayer();document.location=a})}function supprimeEnvoi(b,c,a){$.post("/"+c+"/Ajax",{action:"suppEnvoi",numcarte:b},function(){removeBlackLayer();document.location=a})}function supprimeFan(c,b,a){$.post("/"+c+"/Ajax",{action:"supprimefans",fanidentifianturl:b},function(){removeBlackLayer();if(a.indexOf("?")!=-1){document.location=a+"&enleveId="+b}else{document.location=a+"?enleveId="+b}})}function supprimeAmi(c,b,a){$.post("/"+c+"/Ajax",{action:"supprimeami",amidentifianturl:b},function(){removeBlackLayer();if(a.indexOf("?")!=-1){document.location=a+"&enleveId="+b}else{document.location=a+"?enleveId="+b}})}function ajouteBlocNote(b,c,a){$.post("/AjaxBlockNote",{idCont:b,idLEA:c,typeLEA:a},function(){removeBlackLayer()})}function envoieWG(b,a){$codewebgram=$("input[@type=radio][@name=webgramtype][@checked]").val();$messageWebgram=$("textarea[@name=message]").val();$.post("/"+b+"/Ajax",{action:"envoiewg",numcontdest:a,wgcode:$codewebgram,message:$messageWebgram},function(){removeBlackLayer();wer=location.href;urlic=wer.replace(/aj_wg\//,"");window.location=urlic})}function rejointGroupe(c,a,b){$.post("/"+c+"/Ajax",{action:"rejointgroupe",numgroupe:a},function(){removeBlackLayer();if(b!=""){window.location=b}})}function quitterGroupe(b,a){$.post("/"+b+"/Ajax",{action:"quitterGroupe",numgroupe:a},function(){removeBlackLayer()})}function confirmationAlerte(a,c,b){$addBlocNote="no";if(document.getElementById("ablocnote").checked){$addBlocNote="yes"}$.post("/AjaxConfirmationAlerte",{type:a,num:c,idcont:b,addBlocNote:$addBlocNote},function(){removeBlackLayer()})}function starVote(a,b){document.getElementById(a).value=b;for($i=5;$i<0;$i--){if(document.getElementById("star"+a+$i)&&parseInt(document.getElementById("star"+a+$i).value)>b){document.getElementById("star"+a+$i).className="etlInactive"}}}function starOver(b,a){for($i=1;$i<=parseInt(a);$i++){document.getElementById("star"+b+$i).className="etlActive"}}function starOut(a){var b=parseInt(document.getElementById(a).value);for($i=1;$i<=5;$i++){if(document.getElementById("star"+a+$i)){if($i<b||$i==b){document.getElementById("star"+a+$i).className="etlActive"}else{document.getElementById("star"+a+$i).className="etlInactive"}}}}function resetTextInput(a){$("#"+a).css({border:"1px solid #DCDCDC"});if($("#"+a+"_err")){$("#"+a+"_err").attr("class","errorMsgHide")}}function checkInput(a,b){if($.trim($("#"+a).val())==""){$("#"+a).css({border:"1px solid #FF0000"});if($("#"+a+"_err")){$("#"+a+"_err").attr("class","errorMsgShow");$("#"+a).focus()}return false}return true}$showBulleStat=0;function showStatistique(){if($showBulleStat==0){$docWidth=$(document).width();$elemWidth=$("#bulleStatistiqueBl").width();$left=parseInt($docWidth/2)-parseInt($elemWidth/2);$("#bulleStatistiqueBl").css({top:"250px",left:$left+"px",display:"block",zIndex:100});$showBulleStat=1}else{$("#bulleStatistiqueBl").css({display:"none"});$showBulleStat=0}}function supprimerPhoto(b,a){$.post("/"+b+"/Ajax",{action:"supprimephoto",numphoto:a},function(){$redirecturl=location.href;window.location.href=$redirecturl})}function getAvisVilles(b,a){var c=$("#rechercheQuoi option:selected").attr("elType");if(c!="l"){$("#showOu").css({display:"none"});return false}$type=$("#rechercheQuoi").val();$note=$("#rechercheNote").val();if(a){var d="/"+a}else{var d=""}$.getJSON("/"+b+d+"/AjaxAvisLieux",{note:$note,typelieu:$type},function(g){$ouSelect=document.getElementById("rechercheOu");while($ouSelect.length>1){$ouSelect.remove(1)}for($i=0;$i<g.length;$i++){$j=$i+1;var e=document.createElement("option");e.text=g[$i].libvil;e.value=g[$i].codevil;try{$ouSelect.add(e,null)}catch(f){$ouSelect.add(e)}}$("#showOu").css({display:"block"})})}function checkImageExtension(a){if($.trim(a)==""){return true}$imageAttrArray=a.split(".");$ext=$imageAttrArray[$imageAttrArray.length-1].toLowerCase();if($ext=="jpg"||$ext=="jpeg"){return true}return false}function nomAlbumCheck(){$nomAlbum=$("#nom_album").val();$val=50-$nomAlbum.length;$("#char_rest").val($val)}function deselectAll(a){v=document.getElementsByName(a+"[]");for(i=0;i<v.length;i++){v[i].checked=false}}function selectClicked(f,b,e,a,d){clickedOnMultiselect=1;if(f.charAt(0)!="#"){f="#"+f}var c=0;v=document.getElementsByName(b+"[]");for(i=0;i<v.length;i++){if(v[i].checked){c++}}if(c){if(c>1){$(f).html(c+" "+a)}else{$(f).html(c+" "+d)}}else{$(f).html(e)}}function multiSelect(e,d,c,a,b){$status=$("#"+d+"_div").css("display");$(".multis").hide();e="#"+e;if($status=="block"){$("#"+d+"_div").hide()}else{$("#"+d+"_div").show()}selectClicked(e,d,c,a,b)}checkVar=0;$(document).click(function(){if(clickedOnMultiselect){clickedOnMultiselect=0;checkVar=0;return}else{if(checkVar==0){checkVar=1;clickedOnMultiselect=0;return}checkVar=0;$(".multis").hide()}});