new Event.observe(window,"load",onBodyLoad,false);var starempty="images/main/star2.jpg";var starfull="images/main/star1.jpg";var currentstar=0;function onBodyLoad(){if($("frmaddfiche")!=null){Event.observe($("rubrique"),"change",maj_sousrubrique,false);if($F("sousrubrique")==""){$("sousrubrique").options.length=1}Event.observe($("sousrubrique"),"change",maj_form_add_fiche,false);maj_sousrubrique($F("sousrubrique"));maj_form_add_fiche()}if($("starcreetic")!=null){if($F("notecreetic")!=""){currentstar=$F("notecreetic")}$$("#starcreetic a").each(function(b,a){b.observe("click",function(c){starclicked(c,b,a+1)});b.observe("mouseover",function(c){changeStar(a+1)});b.observe("mouseout",function(c){changeStar(currentstar)})})}if($$(".deletefriend").length>0){$$(".deletefriend").each(function(a){a.observe("click",function(b){deletefriend(b,a)})})}if($$(".demand").length>0){$$(".demand a").each(function(a){a.observe("click",function(b){execlink(b,a.href,a.up(".demand"))})})}if($$(".message").length>0&&$("thread")==null){$$("a [class^=link_]").each(function(a){a.observe("click",function(b){execlink(b,a.href,a.up(".message"))})})}if($("thread")!=null){max=$("thread").className.split("to_");max=max[1];new Effect.ScrollTo($("message_"+max),{duration:1})}if($("add_friend")!=null){$("add_friend").observe("click",function(a){add_friend(a)})}if($("remove_friend")!=null){$("remove_friend").observe("click",function(a){remove_friend(a)})}if($("acceptfriend")!=null){$("acceptfriend").observe("click",function(a){accept_friend(a)})}if($("refusfriend")!=null){$("refusfriend").observe("click",function(a){refus_friend(a)})}if($("blocked")!=null){$("blocked").observe("click",function(a){block_unblock_friend(a,"blocked")})}if($("unblock")!=null){$("unblock").observe("click",function(a){block_unblock_friend(a,"unblock")})}}function block_unblock_friend(a,c){Event.stop(a);if($(c).title!=""){var b=confirm($(c).title);if(b){new Ajax.Request($(c).href,{onSuccess:function(e,d){window.location.reload()}})}}}function refus_friend(a){Event.stop(a);if($("refusfriend").title!=""){var b=confirm($("refusfriend").title);if(b){new Ajax.Request($("refusfriend").href,{onSuccess:function(d,c){$("action_friend").innerHTML=replaceFirstWordToLink(c.text,c.link,c.title,"add_friend");$("add_friend").observe("click",function(e){add_friend(e)})}})}}}function createlink(c,a,b,d){c='<a href="'+a+'" title="'+b+'" id="'+d+'">'+c+"</a>";return c}function accept_friend(a){Event.stop(a);if($("acceptfriend").title!=""){var b=confirm($("acceptfriend").title);if(b){new Ajax.Request($("acceptfriend").href,{onSuccess:function(d,c){$("action_friend").innerHTML=replaceFirstWordToLink(c.text,c.link,c.title,"remove_friend");$("remove_friend").observe("click",function(e){remove_friend(e)})}})}}}function add_friend(b){try{Event.stop(b)}catch(a){}var c=confirm($("add_friend").title);if(c){new Ajax.Request($("add_friend").href,{onSuccess:function(e,d){$("action_friend").innerHTML="<strong>"+d.text+"</strong>";alert(d.message)}})}}function add_public_friend(a){var b=confirm(a.title);if(b){new Ajax.Request(a.href,{onSuccess:function(d,c){a.innerHTML="<strong>"+c.text+"</strong>"}})}return false}function email_public_send(a){new Ajax.Request("send-message-public.html",{method:"post",postBody:"id="+$(a+"_id").value+"&sub="+$(a+"_subject").value+"&cnt="+$(a+"_content").value,onComplete:function(c,b){alert(b.message);if(b.error==0){$(a+"_subject").value=$(a+"_content").value="";dspclass(a)}}});return false}function remove_friend(a){Event.stop(a);var b=confirm($("remove_friend").title);if(b){new Ajax.Request($("remove_friend").href,{onSuccess:function(d,c){alert(c.link);$("action_friend").innerHTML=replaceFirstWordToLink(c.text,c.link,c.title,"add_friend");$("add_friend").observe("click",function(e){add_friend(e)});alert(c.message)}})}}function replaceFirstWordToLink(c,a,b,d){space=c.split(" ");word=space[0];re=new RegExp(word);re.exec(c);c=c.replace(re,'<a href="'+a+'" title="'+b+'" id="'+d+'">'+word+"</a>");return c}function execlink(c,a,b){Event.stop(c);new Ajax.Request(a,{onComplete:function(d){b.hide()}})}function deletefriend(b,a){Event.stop(b);new Ajax.Request("./supprimer-"+a.identify()+"-de-ma-liste-amis.html",{onComplete:function(c){$("friend_"+a.identify()).hide();$$(".pagination-digrs p").each(function(d){content=d.innerHTML.split(" ");i=parseInt(content[0]);if(i>0){i--}d.innerHTML=i+" "+content[1]})}})}function starclicked(b,a,c){Event.stop(b);changeStar(c);currentstar=c;$("notecreetic").value=c;return false}function changeStar(a){$$("#starcreetic a").each(function(c,b){img=c.childElements();if((b+1)<=a){img[0].src=starfull}else{img[0].src=starempty}})}function maj_sousrubrique(a){new Ajax.Request("./display/sous-rubrique",{method:"post",postBody:"rubrique="+$F("rubrique"),onComplete:function(c,b){$("sousrubrique").options.length=0;b.each(function(e,d){if(a==e.id){$("sousrubrique")[d]=new Option(e.name,e.id,true,true)}else{$("sousrubrique")[d]=new Option(e.name,e.id)}})}})}function sendusefull(a){new Ajax.Request("useful-creetic-"+a+".html",{method:"post",onSuccess:function(b){re=/(\()([0-9]+)(\))/;str=$("ut_"+a).innerHTML;re.exec(str);nb=parseInt(RegExp.$2);nb++;$("ut_"+a).innerHTML=str.replace(re,"("+nb+")")}})}function sendwellwritten(a){new Ajax.Request("written-well-creetic-"+a+".html",{method:"post",onSuccess:function(b){re=/(\()([0-9]+)(\))/;str=$("be_"+a).innerHTML;re.exec(str);nb=parseInt(RegExp.$2);nb++;$("be_"+a).innerHTML=str.replace(re,"("+nb+")")}})}function maj_form_add_fiche(){$$(".temporaire").each(function(a){if($F("sousrubrique")==60||$F("sousrubrique")==61||$F("sousrubrique")==66){Element.hide(a)}else{Element.show(a)}})}function ajaxDecouvrir(a){new Ajax.Request("./display/decouvrir.html",{method:"post",postBody:"item="+a,onSuccess:function(b){$("boxAjaxDecouvrir"+a).innerHTML=b.responseText}})}function displayCarrousel(f,c,e){var a="";var d="link_menu_carrousel_"+e;if(navigator.appName!="Microsoft Internet Explorer"){a=" !important"}for(var b=0;b<=c;b++){if($("menu_carrousel_"+b)!=null){$("menu_carrousel_"+b).style.display="none"}}if($("menu_carrousel_"+f)!=null){$("menu_carrousel_"+f).style.display="block"}}function boxInitCarrousel(c,b,a){new Ajax.Request("./display/carrousel",{method:"post",postBody:"ajax=3&idRub="+c+"&idSousRub="+b+"&max="+a,onSuccess:function(d){$("car_but").innerHTML=d.responseText}})}function boxBookMark(){new Ajax.Request("./display/bookmark",{method:"post",onSuccess:function(a){$("bookmark").innerHTML=a.responseText}})}function initCarrousel(c,b,a){boxInitCarrousel(c,b,a);displayCarrousel(0,7,$("link_menu_carrousel_0"))}function boxCarrouselSimple(d,c,a,b,g,e,f){new Ajax.Request("./display/carrouselsimple",{method:"post",postBody:"ajax=2&idRub="+d+"&idSousRub="+c+"&idCritRub="+a+"&i="+b+"&id="+g+"&table="+e+"&z="+f,onSuccess:function(h){$("boxcar_0").innerHTML=h.responseText}});return false}function boxCarrousel(c,b,a,f,d,e){new Ajax.Request("./display/carrousel",{method:"post",postBody:"ajax=2&idRub="+c+"&idSousRub="+b+"&i="+a+"&id="+f+"&table="+d+"&z="+e,onSuccess:function(g){$("boxcar_"+a).innerHTML=g.responseText;closeRedact();setCurrentOngletCarrousel("link_menu_carrousel_"+a)}});return false}function boxGlobalCarrousel(b,a){new Ajax.Request("./display/bigcarrousel",{method:"post",postBody:"ajax=99&idRub="+b+"&idSousRub="+a,onSuccess:function(c){$("bcarrousel").innerHTML=c.responseText;displayCarrousel(0,20,"link_menu_carrousel_0")}});return false}function boxPub(c,b,a){new Ajax.Request("./display/publicite",{method:"post",postBody:"pub="+c+"&idRub="+b+"&idSousRub="+a,onSuccess:function(d){if($("boxAjaxPub"+c)!=null){$("boxAjaxPub"+c).innerHTML=d.responseText}}})}function boxSearch(b,a){new Ajax.Request("./display/filters-search",{method:"post",postBody:"ajax=1&idRub="+b+"&idSousRub="+a,onSuccess:function(c){$("boxAjaxSearch").innerHTML=c.responseText}})}function boxUsers(a){new Ajax.Request("./display/liste-users",{method:"post",postBody:"ajax=1&idRub="+a,onSuccess:function(b){$("boxAjaxUsers").innerHTML=b.responseText}})}function newVideo(a){new Ajax.Request("./display/video",{method:"post",postBody:"deb="+a,onSuccess:function(b){$("boxAjaxVideo").innerHTML=b.responseText;new Effect.Appear("boxAjaxVideo",{duration:0.3,fps:25,from:0,to:1})}})}function locktheweb(){alert("Copyright© 2008 http://www.creetic.com");return false}function toto(){alert("test")}function EnterKey(c){var b;if(window.event){b=window.event.keyCode}else{b=c.which}if(b==13){var a=document.getElementById("passwordForHidden").value;document.getElementById("password").value=a;connexion.submit();return false}}function submitformnewletter(){if(document.sub_form.email_addr.value==""){alert("Cette adresse électronique n'est pas valide")}else{if(((document.sub_form.email_addr.value.indexOf("@",1))==-1)||(document.sub_form.email_addr.value.indexOf(".",1))==-1){alert("Cette adresse électronique n'est pas valide")}else{window.open("","formPopup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,height=200,width=500,toolbar=no",true);document.sub_form.target="formPopup";document.sub_form.submit()}}}function ScaleEffect(a){new Effect.Scale(a,{duration:2,from:0,to:1})}function ShowEffect(a){new Effect.Appear(a,{duration:2,from:0,to:1})}function BlindDownEffect(a){new Effect.BlindDown(a,{duration:2,from:0,to:1})}function HideEffect(a){new Effect.Appear(a,{duration:2,from:1,to:0})}function thematiquechange(b){var a=getXMLHTTP();if(a==null){return}labelbox="themeC2";a.open("GET","././plugin/inc.details_creasondagesoustheme.php?idTheme="+b+"&rand="+Math.random(),true);a.onreadystatechange=function(){if(a.readyState==4){var c=document.getElementById("themeC2");Message=a.responseText;if(Message!=""){c.innerHTML=Message}}};a.send(null)}function getXMLHTTP(){var c=null;if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{if(window.ActiveXObject){try{c=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{c=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){c=null}}}else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...")}}if(c==null){alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...")}return c}function Show_content6(){document.resrvat.submit()}function Show_content5(){document.crervide.submit()}function showdetail(a){document.getElementById("affiche"+a).style.display=""}function afficher(a){document.getElementById("affiche"+a).style.display="none";document.updatetab.hiden_update.value=a;document.getElementById("hiden_id").value=document.getElementById("hidden_id"+a).value;document.getElementById("hiden_avis").value=document.getElementById("avis"+a).value;document.getElementById("idusers").value=document.getElementById("idusers"+a).value;document.getElementById("updatetab").submit()}function showform(a){switch(a){case 1:document.getElementById("etoile").innerHTML='<a onclick="showform(1);"><img src="images/main/star1.png"></a><a  onclick="showform(2);"><img src="images/main/star2.png"></a><a  onclick="showform(3);"><img src="images/main/star2.png"></a><a  onclick="showform(4);"><img src="images/main/star2.png"></a><a  onclick="showform(5);"><img src="images/main/star2.png"></a></b></span>';break;case 2:document.getElementById("etoile").innerHTML='<a  onclick="showform(1);"><img src="images/main/star1.png"></a><a  onclick="showform(2);"><img src="images/main/star1.png"></a><a  onclick="showform(3);"><img src="images/main/star2.png"></a><a  onclick="showform(4);"><img src="images/main/star2.png"></a><a  onclick="showform(5);"><img src="images/main/star2.png"></a>';break;case 3:document.getElementById("etoile").innerHTML='<a  onclick="showform(1);"><img src="images/main/star1.png"></a><a  onclick="showform(2);"><img src="images/main/star1.png"></a><a  onclick="showform(3);"><img src="images/main/star1.png"></a><a  onclick="showform(4);"><img src="images/main/star2.png"></a><a  onclick="showform(5);"><img src="images/main/star2.png"></a>';break;case 4:document.getElementById("etoile").innerHTML='<a  onclick="showform(1);"><img src="images/main/star1.png"></a><a  onclick="showform(2);"><img src="images/main/star1.png"></a><a  onclick="showform(3);"><img src="images/main/star1.png"></a><a  onclick="showform(4);"><img src="images/main/star1.png"></a><a  onclick="showform(5);"><img src="images/main/star2.png"></a>';break;case 5:document.getElementById("etoile").innerHTML='<a  onclick="showform(1);"><img src="images/main/star1.png"></a><a  onclick="showform(2);"><img src="images/main/star1.png"></a><a  onclick="showform(3);"><img src="images/main/star1.png"></a><a  onclick="showform(4);"><img src="images/main/star1.png"></a><a  onclick="showform(5);"><img src="images/main/star1.png"></a>';break}document.getElementById("note").value=a}function upStar(a){switch(a){case 1:document.getElementById("starId1").src="css/images/pictos/star.gif";document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="M&eacute;diocre";break;case 2:document.getElementById("starId1").src=document.getElementById("starId2").src="css/images/pictos/star.gif";document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Moyen";break;case 3:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src="css/images/pictos/star.gif";document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Bien";break;case 4:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src="css/images/pictos/star.gif";document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Tr&egrave;s bien";break;case 5:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star.gif";document.getElementById("textRating").innerHTML="Excellent";break}}function downStar(){var a=0;a=document.getElementById("note").value;switch(parseInt(a)){case 0:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="&nbsp;";break;case 1:document.getElementById("starId1").src="css/images/pictos/star.gif";document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="M&eacute;diocre";break;case 2:document.getElementById("starId1").src=document.getElementById("starId2").src="css/images/pictos/star.gif";document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Moyen";break;case 3:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src="css/images/pictos/star.gif";document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Bien";break;case 4:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src="css/images/pictos/star.gif";document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Tr&egrave;s bien";break;case 5:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star.gif";document.getElementById("textRating").innerHTML="Excellent";break;default:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="&nbsp;";break}}function validStar(a){switch(a){case 1:document.getElementById("starId1").src="css/images/pictos/star.gif";document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="M&eacute;diocre";document.getElementById("note").value=1;break;case 2:document.getElementById("starId1").src=document.getElementById("starId2").src="css/images/pictos/star.gif";document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Moyen";document.getElementById("note").value=2;break;case 3:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src="css/images/pictos/star.gif";document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Bien";document.getElementById("note").value=3;break;case 4:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src="css/images/pictos/star.gif";document.getElementById("starId5").src="css/images/pictos/star_empty.gif";document.getElementById("textRating").innerHTML="Tr&egrave;s bien";document.getElementById("note").value=4;break;case 5:document.getElementById("starId1").src=document.getElementById("starId2").src=document.getElementById("starId3").src=document.getElementById("starId4").src=document.getElementById("starId5").src="css/images/pictos/star.gif";document.getElementById("textRating").innerHTML="Excellent";document.getElementById("note").value=5;break}document.getElementById("but_crit").show()}function dspn(b){try{$(b).style.display="none"}catch(a){}}function dspclass(f){try{var b=$(f).className;found=false;if(b){var d=b.split(" ");for(var e=0;e<d.length;e++){var a=d[e];if(a=="displayN"){$(f).removeClassName("displayN");found=true;break}}}if(!found){$(f).addClassName("displayN")}}catch(c){}return false}function cdspn(b){try{Effect.Shrink(b)}catch(a){}}function cdspy(b){try{Effect.Grow(b)}catch(a){}}function PlugIn(b){for(i=1;i<100;i++){try{$("plug"+i).style.display="none"}catch(a){}}if(b!=0){if(b==25){displayresatickenet()}else{if(b==29){displayresabooking()}else{$("plug"+b).style.display="block"}}}return false}function initPlugin(){var a=location.href.lastIndexOf("#");num=1;if(a>0){num=location.href.substr(a+1,3);PlugIn(num)}else{PlugIn(num)}return num}hPresent=0;function presOffsetInt(a,d){try{var c=$("pres").offsetHeight;if(c>212&&hPresent==0){$("pres").style.height="212px";hPresent=c;$(a).setAttribute("src","css/images/bouton/suite_pres"+d+".png")}else{if(hPresent!=0){$("pres").style.height=hPresent+"px";hPresent=0;$(a).setAttribute("src","css/images/bouton/fermer_pres"+d+".png")}else{$(a).hide()}}}catch(b){}}function presOffset(a){presOffsetInt("presbut",a)}function presOffsetAvis(){presOffsetInt("presbutavis",thelangue)}function initPlugToogle(h){for(o=0;o<100;o++){try{var l=$("details_"+o).className;if(l){var b=l.split(" ");for(var g=0;g<b.length;g++){var k=b[g];if(k=="onglet_none"){dspn("details_"+o)}}}}catch(e){}}var c=location.href.lastIndexOf("#");ifirst=ilast=1;var f=$("onglets").getElementsByTagName("*");for(var a=0;a<f.length;a++){var l=f[a];if(l.className){var b=l.className.split(" ");for(var g=0;g<b.length;g++){var k=b[g];if(k=="first_tab"){ifirst=l.id.substring(3)}if(k=="noborder"){ilast=l.id.substring(3)}}}}num=(h==1)?4:ifirst;if(c>0){num=location.href.substr(c+2,3);if(num==5||num=="27b"){num=4}}PlugToggle(1,num,(num==ifirst)?1:0,(num==ilast)?1:0);return num}function disable_vins(d,c){d=Math.ceil(d);if(d==0){return false}for(var b=0;b<d;b++){$("vins_"+b).style.display="none"}if($("vins_"+c)!=null){$("vins_"+c).style.display="block"}var a="";if(c==0&&d>0){a='1 <a onclick="disable_vins('+d+', 1)"> &raquo;</a> '}else{if(c>0&&((d-1)==c)){a='<a onclick="disable_vins('+d+", "+(c-1)+')">&laquo; '+c+"</a> "+(c+1)+" "}else{if(c>0&&(c<(d-1))){a='<a onclick="disable_vins('+d+", "+(c-1)+')">&laquo; '+c+" </a> "+(c+1)+" ";a=a+'<a onclick="disable_vins('+d+", "+(c+1)+')"> '+(c+2)+" &raquo;</a> "}}}$("pagvins").innerHTML=a}timerPhoto=null;iPhoto=0;nPhotos=0;iCarCur=0;nFamille=0;iCurFamille=0;function ViewImgBig(b,a,e){nPhotos=e;iCarCur=b;for(var d=0;d<nPhotos;d++){if($("img_view_big_"+b+"_"+d)!=null){$("img_view_big_"+b+"_"+d).style.display="none"}}new Effect.Appear($("img_view_big_"+b+"_"+a),{duration:1,from:0,to:1});for(d=0;d<nPhotos;d++){try{$("img_small_"+b+"_"+d).removeClassName("current_photo")}catch(c){break}}try{$("img_small_"+b+"_"+a).addClassName("current_photo")}catch(c){}}function photoStartAuto(b,e,d,a){nPhotos=e;iCarCur=d;iPhoto=e;nFamille=a;iCurFamille=d;for(var c=0;c<a;c++){$("car_menu_"+c).removeClassName("current");if(c!=d){$("fCarousel_"+c).hide()}else{$("car_menu_"+c).addClassName("current");$("fCarousel_"+c).show()}}if(timerPhoto!=null){clearTimeout(timerPhoto)}timerPhoto=null;if(e>1){timerPhoto=setTimeout("PhotoChange()",5000)}PhotoChange()}function photoStopAuto(){if(timerPhoto!=null){clearTimeout(timerPhoto)}timerPhoto=null;iPhoto=0}function PhotoChange(){if(iPhoto+1<nPhotos){iPhoto++}else{iPhoto=0}ViewImgBig(iCarCur,iPhoto,nPhotos);switch(iCarCur){case 0:hCarousel0.scrollTo(iPhoto);break;case 1:hCarousel1.scrollTo(iPhoto);break;case 2:hCarousel2.scrollTo(iPhoto);break;case 3:hCarousel3.scrollTo(iPhoto);break;case 4:hCarousel4.scrollTo(iPhoto);break;case 5:hCarousel5.scrollTo(iPhoto);break;case 6:hCarousel6.scrollTo(iPhoto);break;case 7:hCarousel7.scrollTo(iPhoto);break;case 8:hCarousel8.scrollTo(iPhoto);break;case 9:hCarousel9.scrollTo(iPhoto);break}if(timerPhoto!=null){clearTimeout(timerPhoto)}timerPhoto=null;if(nPhotos>1){timerPhoto=setTimeout("PhotoChange()",5000)}}function selcatprox(b,a,c){searchProximite(b,a,c,$("catselprox").value)}function searchProximite(c,b,d,a){new Ajax.Request("./display/proximite",{method:"post",postBody:"permalink="+d+"&idRub="+c+"&idSousRub="+b+"&idSel="+a,onSuccess:function(f,e){$("proximitelink").innerHTML=f.responseText;loadMapProx(e.coordfiche[0],e.coordfiche[1],e.coordfiche[2],e.coordfiche[3],e.coordonnees)}})}function createMarker(b,d,g,f,e){var h=String.fromCharCode("A".charCodeAt(0)+d);var a=new GIcon(G_DEFAULT_ICON);a.image=e;markerOptions={icon:a};var c=new GMarker(b,markerOptions);GEvent.addListener(c,"click",function(){c.openInfoWindowHtml("<b>"+f+"</b> : "+g)});return c}var marker0;var marker1;var marker2;var marker3;var marker4;var map;var coordg;function loadMapProx(g,c,f,e,h){if(GBrowserIsCompatible()){coordg=new GLatLng(g,c);map=new GMap2(document.getElementById("map"));map.setCenter(coordg,16,G_NORMAL_MAP);map.addControl(new GSmallZoomControl());var b=new GIcon(G_DEFAULT_ICON);b.image=e;markerOptions={icon:b};var a=new GMarker(coordg,markerOptions);map.addOverlay(a);GEvent.addListener(a,"click",function(){a.openInfoWindowHtml(f)});for(var d=j=0;d<h.length;d+=5,j++){m=createMarker(new GLatLng(h[d],h[d+1]),j,h[d+3],h[d+2],h[d+4]);map.addOverlay(m);switch(j){case 0:marker0=m;break;case 1:marker1=m;break;case 2:marker2=m;break;case 3:marker3=m;break;case 4:marker4=m;break}}}}function changeMarker(b,a){switch(b){case 0:picto=marker0.getIcon();coord=marker0.getLatLng();break;case 1:picto=marker1.getIcon();coord=marker1.getLatLng();break;case 2:picto=marker2.getIcon();coord=marker2.getLatLng();break;case 3:picto=marker3.getIcon();coord=marker3.getLatLng();break;case 4:picto=marker4.getIcon();coord=marker4.getLatLng();break}if(a==1){var c=new RegExp("(.png)","g");image=picto.image.replace(c,"-orange.png")}else{image=picto.image}switch(b){case 0:marker0.setImage(image);marker0.show();break;case 1:marker1.setImage(image);marker1.show();break;case 2:marker2.setImage(image);marker2.show();break;case 3:marker3.setImage(image);marker3.show();break;case 4:marker4.setImage(image);marker4.show();break}}function loadMap(a){document.getElementById("adr").style.visibility="hidden";document.getElementById("adr").style.display="none";document.getElementById("adr").style.height=0;if(GBrowserIsCompatible()){geocoder.getLatLng(a,function(c){if(!c){alert(address+" - can not find")}else{map=new GMap2(document.getElementById("map"));map.setCenter(c,16,G_NORMAL_MAP);map.addControl(new GSmallZoomControl());var b=new GMarker(c);map.addOverlay(b);GEvent.addListener(b,"click",function(){b.openInfoWindowHtml(a)})}})}}function sondagereponse(a,d,c,b){new Ajax.Request("./display/sondage",{method:"post",postBody:"idRub="+a+"&idSRub="+d+"&id="+c+"&iCol="+b,onSuccess:function(e){$("sondages10").style.display="none";$("sondages11").style.display=""}})}function supFriend(a){if(!confirm(a.title)){return false}new Ajax.Request(a.href,{method:"post",postBody:"",onSuccess:function(b){window.location.reload()}});return false}function supDiscussion(a){if(!confirm(a.title)){return false}new Ajax.Request(a.href,{method:"post",postBody:"",onSuccess:function(b){window.location.reload()}});return false}function supDiscussionFromMsg(a){if(!confirm(a.title)){return false}new Ajax.Request(a.href,{method:"post",postBody:"",onSuccess:function(b){window.location="./mes-messages-recus.html"}});return false}var curRspMsg=0;function rspMessage(a){if(curRspMsg!=0){$("formrsp_"+curRspMsg).hide();$("formrsp_"+curRspMsg).innerHTML=""}if(curRspMsg!=a){$("formrsp_"+a).innerHTML=$("formrsp").innerHTML;$("formrsp_"+a).show();$("text_mail").focus();curRspMsg=a}else{curRspMsg=0}}function initCalendar(){$("cont").toggle();var b=Calendar.setup({cont:"cont",weekNumbers:true,selectionType:Calendar.SEL_MULTIPLE,onSelect:selDate,onTimeChange:selTime,titleFormat:"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%B %Y",showTime:true});b.setLanguage("fr");var a=document.getElementsByTagName("link");var d={};for(var c=0;c<a.length;c++){if(/^skin-(.*)/.test(a[c].id)){var e=RegExp.$1;d[e]=a[c]}}for(var c in d){if(d.hasOwnProperty(c)){d[c].disabled=true}}d.steel.disabled=false;b.setHours(20);b.setMinutes(0);b.showAt(0,155,false)}function showCalendar(){$("cont").style.display="block"}function noshowCalendar(){$("cont").style.display="none"}function selDate(){var a=this.selection.get()[0];a=Calendar.intToDate(a);a=Calendar.printDate(a,"%d/%m/%Y");$("date").value=a}function selTime(c){var b=c.getHours(),a=c.getMinutes();if(b<10){b="0"+b}if(a<10){a="0"+a}$("heure").value=Calendar.formatString("${hh}:${mm}",{hh:b,mm:a})}redact=false;function showRedact(){redact=!redact;if(redact){$("idRedac").removeClassName("displayN");new Effect.BlindDown("idRedac",{duration:1,from:0,to:1})}else{new Effect.BlindUp("idRedac",{duration:1,from:0,to:1})}}function closeRedact(){redact=false;try{if(redact){new Effect.BlindDown("idRedac",{duration:1,from:0,to:1})}else{new Effect.BlindUp("idRedac",{duration:1,from:0,to:1})}}catch(a){}}function loadSelectionFiche(b,a){if(a.id!=0){new Ajax.Request("./display/search-go-fiche",{method:"post",postBody:"idRub="+$("idRub1").value+"&idSRub="+$("idSRub1").value+"&id="+a.id,onSuccess:function(c){window.location.replace(c.responseText)}})}}function searchSetRubs(a,b){return b+"&rub="+$("idRub1").value+"&theme="+$("idSRub1").value}function selectcat(){$("idSRub1").value=$("idSRub2").value=$("catsel").value;boxSearch($("idRub").value,$("idSRub1").value)}function OpenFormules(a){if(cat_menu!=null){for(i=0;i<cat_menu.length;i++){if(cat_menu[i]==a){$("cat_menu_"+cat_menu[i]).style.display="block"}else{$("cat_menu_"+cat_menu[i]).style.display="none"}}}}function go(a){window.location=a}function ctrlaccess(a){Modalbox.show("./18ans/18ans.php?lang="+a,{title:"Paris Coquin",width:970,height:710,overlayClose:false,closeValue:""});return false}function valide_ctrlaccess(){new Ajax.Request("valid-access-adult.html",{method:"post",onSuccess:function(a){}})}function PlugToggle(e,a,f,d){if(a==25){displayresatickenet();return a}else{if(a==29){displayresabooking();return a}else{try{$("details_"+e).hide();$("ong"+e).removeClassName("current");$("details_"+a).show();if(a!="28"){Move.element($("details_"+a),$("tab_container"),"move")}$("ong"+a).addClassName("current")}catch(c){$("ong"+a).addClassName("current")}if(f==1){$("onglets").addClassName("menu_onglet_first_tab_current")}else{$("onglets").removeClassName("menu_onglet_first_tab_current");if($("ong"+a)&&$("details_"+a)){var b=$("ong"+a).offsetLeft+15;$("details_"+a).style.background="transparent url(/css/images/background/onglet_arrow.gif) no-repeat scroll "+b+"px top"}}if(d==1){$("onglets").addClassName("menu_onglet_last_tab_current")}else{$("onglets").removeClassName("menu_onglet_last_tab_current")}}}return a}var Move={copy:function(k,h){var c=$(k);var f=c.cloneNode(true);var g=f.childNodes.length-1;f.id=k+"-copy";for(var b=0;g>=b;b++){if(f.childNodes[b].id){var a=f.childNodes[b];var d=a.id;a.id=d+"-copy"}}$(h).appendChild(f)},element:function(d,c,b){var a=$(d);if(b=="move"){$(c).appendChild(a)}else{if(b=="copy"){this.copy(d,c)}}}};hPresentAvis=0;thelangue="_FR";function getfullpresent(d,c,a,b){thelangue=b;if(hPresentAvis==1){return}hPresentAvis=1;new Ajax.Request("get-full-present.html",{method:"post",postBody:"idRub="+c+"&idSousRub="+a+"&id="+d,onSuccess:function(e){$("pres").innerHTML=e.responseText;$("presbutavis").observe("click",presOffsetAvis);hPresent=0;$("presbutavis").setAttribute("src","css/images/bouton/fermer_pres"+thelangue+".png");presOffsetAvis()}})}function clickdec(a){new Ajax.Request("set-click-decouvrir.html",{method:"post",postBody:"permalink="+a,onSuccess:function(b){}});return true}function filtersResSearch(a){new Ajax.Request("filters-res-search.html",{method:"post",postBody:"params="+a,onSuccess:function(b){$("menudde"+a).innerHTML=b.responseText;displayletterfirst()}});return true}function showSubMenu(){var c=$("page").offsetLeft;var b=$("submenu_more").previous().offsetTop+$("submenu_more").previous().offsetHeight;var a=c+$("submenu_more_link").offsetLeft;$("submenu_more").style.top=b+"px";$("submenu_more").style.left=a+"px";$("submenu_more").style.width=$("submenu_more_link").offsetWidth-8+"px";$("submenu_more").show();posXB=a;posXE=a+$("submenu_more_link").offsetWidth-8;posYB=b-$("submenu_more").previous().offsetHeight;posYE=b+$("submenu_more").offsetHeight}function hideSubmenu(){if(x>=posXB&&x<=posXE){if(y>=posYB&&y<=posYE){return}}$("submenu_more").hide()}function position(a){if(!document.all){x=a.pageX;y=a.pageY}else{x=event.clientX+document.body.scrollLeft;y=event.clientY+document.body.scrollTop}hideSubmenu()}var x;var y;var posXB,postXE,posYB,posYE;Event.observe(window,"load",function(a){if($("submenu_more")){$("submenu_more").hide();if(!document.all){document.captureEvents(Event.MOUSEMOVE)}document.onmousemove=position}});var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";if(this.OS=="Mac"){document.write("<link rel='stylesheet' type='text/css' href='css/mac.css' title='mac_stylesheet'>")}},searchString:function(d){for(var a=0;a<d.length;a++){var b=d[a].string;var c=d[a].prop;this.versionSearchString=d[a].versionSearch||d[a].identity;if(b){if(b.indexOf(d[a].subString)!=-1){return d[a].identity}}else{if(c){return d[a].identity}}}},searchVersion:function(b){var a=b.indexOf(this.versionSearchString);if(a==-1){return}return parseFloat(b.substring(a+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};function displaymodal(a){Modalbox.show(a.href,{title:a.title,width:733,height:550,overlayClose:false});return false}function creetic_fb_init(){if(location.href.search("member.creetic.ie")>=0){FB.init("38ec8fe29d508cec3fb3da822f596e88","facebook/xd_receiver.htm")}else{FB.init("84bb7313dca29df4c1555c412cffc5d7","facebook/xd_receiver.htm")}}function write_fb_review(e,c,b,g,f,d,a){FB_RequireFeatures(["XFBML","Connect"],function(){var h="M2 not set";FB.ensureInit(function(){var k={name:"Creetic",href:b,description:g+c,caption:f+" "+d,media:[{type:"image",src:a,href:b}]};FB.Facebook.apiClient.users_hasAppPermission("publish_stream",function(n){if(n==0){FB.Connect.showPermissionDialog("publish_stream",function(q){var p=FB.Connect.streamPublish(e,k,null,null,f+" "+d,null,false)})}else{var l=FB.Connect.streamPublish(e,k,null,null,f+" "+d,null,false)}info("Stream publish returned: "+l)})})})}function checkFacebookConnectedStatus(){FB.Connect.ifUserConnected(fb_connected,fb_notconnected)}function fb_connected(){$("but_link_fb_allfriends").style.display="";dspn("but_fb_connect");myfb_session=FB.Facebook.apiClient.get_session();facebook_displayfriends()}function fb_notconnected(){}function facebook_onlogin(){fb_connected();write_fb_friends()}function facebook_displayfriends(){var a=document.getElementById("profile_pics");FB.ensureInit(function(){FB.Facebook.apiClient.friends_get(null,function(b){var c="";var e=b?Math.min(4,b.length):0;if(e>0){for(var d=0;d<e;d++){c+='<li><fb:profile-pic size="square" uid="'+b[d]+'" facebook-logo="true" linked="false" width="40"> </fb:profile-pic><p class="text"><a href="#" onclick="return false;"><b><fb:name uid="'+b[d]+'" linked="false" ></fb:name></b></a></p></li>'}}a.innerHTML=c;FB.XFBML.Host.parseDomElement(a)})})}function write_fb_friends(b,a,c){FB_RequireFeatures(["XFBML","Connect"],function(){var d="M2 not set";FB.ensureInit(function(){var e={name:"Creetic",href:a,description:c,media:[{type:"image",src:a+"css/images/background/logo_FR.gif",href:a}]};FB.Facebook.apiClient.users_hasAppPermission("publish_stream",function(g){if(g==0){FB.Connect.showPermissionDialog("publish_stream",function(k){var h=FB.Connect.streamPublish(b,e,null,null,c,null,false)})}else{var f=FB.Connect.streamPublish(b,e,null,null,c,null,false)}info("Stream publish returned: "+f)})})})}function initpubbillet(){$("pubbillet").innerHTML='<a href="http://www.usinedeco.com/" target="_blank" rel="nofollow">'+$("pubbillet").innerHTML+"</a>"}function changeNewDateResa(b){var a=$("jour_resa").value+"/"+$("mois_resa").value+"/"+$("annee_resa").value;$("allots").innerHTML='<span style="display:block;text-align:center;height:auto;"><img src="css/images/pictos/club-loader.gif"></span>';new Ajax.Request("change-new-date-resa.html",{method:"post",postBody:"couvert="+$("couvert").value+"&date="+a+"&permalink="+b,onSuccess:function(c){$("allots").innerHTML=c.responseText}})};
