﻿function vIE(){return (navigator.appName=='Microsoft Internet Explorer')?parseFloat((new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})")).exec(navigator.userAgent)[1]):-1;}

function PositionnerQuisommesNous(){

                emplacementLeftmenuBasQuiSommesNous2=GetDomOffset(document.getElementById('menuBasQuiSommesNous2'), 'offsetLeft' );  
                    if (emplacementLeftmenuBasQuiSommesNous2<200){
            
                    document.getElementById("voletMenuBasQuiSommes").style.left=-(emplacementLeftmenuBasQuiSommesNous2-10)+'px';
                    }
     PositionnerEspacePress();          
     }
     
     function PositionnerEspacePress(){
       if (document.body.offsetWidth<1050){
        document.getElementById("voletMenuBasEspacePress").style.left='250px';
                    }
     //voletMenuBasEspacePress
     //
     }
     function changerEncartTelLang(quelLang){
       
         if (quelLang=='fr'){
           document.getElementById('encartTel').className = 'encartTel';
              document.getElementById('encartChatHoraires').style.top = '26px';
          }
          if (quelLang=='en'){
           document.getElementById('encartTel').className = 'encartTel_en';
           document.getElementById('encartChatHoraires').style.top = '46px';
         
          }
     }
     
     function changerPlusInfo(quelDiv, quelLang){
                    var IE6 = false;
                    var strChUserAgent = navigator.userAgent;
                    var intSplitStart = strChUserAgent.indexOf("(",0);
                    var intSplitEnd = strChUserAgent.indexOf(")",0);
                    var strChMid = strChUserAgent.substring(intSplitStart, intSplitEnd);

                    if(strChMid.indexOf("MSIE 6") != -1) IE6 = true;
    
        if (quelLang=="fr"){
              if (IE6 == true){

                                                  quelsrc1="/statique/fr/image/offre-vign-info-fr-on.png";
                                                  quelimg=document.getElementById(quelDiv);
                                                  quelimg.runtimeStyle.backgroundImage = "none",
                                                  quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc1 + "', sizingMethod='image')",
                                                  quelimg.src = "/image/transparent.gif"
	                             
              }
             else{
                  
                  document.getElementById(quelDiv).style.backgroundImage='url(/statique/fr/image/offre-vign-info-fr-on.png)'; 
	            
             }
        }     
        if (quelLang=="en"){
              if (IE6 == true){

                                                  quelsrc1="/statique/en/image/offre-vign-info-en-on.png";
                                                  quelimg=document.getElementById(quelDiv);
                                                  quelimg.runtimeStyle.backgroundImage = "none",
                                                  quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc1 + "', sizingMethod='image')",
                                                  quelimg.src = "/image/transparent.gif"
	                             
              }
             else{
                  
                  document.getElementById(quelDiv).style.backgroundImage='url(/statique/en/image/offre-vign-info-en-on.png)'; 
	            
             }
        }     
        /// document.getElementById('ctl00_cphAccueil_OffreStationLink1').onmouseover = function() { this.style.backgroundImage='url(/image/video-voir-offres-offIE6.jpg)'; }
	    // document.getElementById('ctl00_cphAccueil_OffreStationLink1').onmouseout = function() { this.style.backgroundImage='url(/image/video-voir-offres-offIE6.jpg)'; }
     }
     
     
     function changerPlusInfoRollOut(quelDiv, quelLang){
                    var IE6 = false;
                    var strChUserAgent = navigator.userAgent;
                    var intSplitStart = strChUserAgent.indexOf("(",0);
                    var intSplitEnd = strChUserAgent.indexOf(")",0);
                    var strChMid = strChUserAgent.substring(intSplitStart, intSplitEnd);

                    if(strChMid.indexOf("MSIE 6") != -1) IE6 = true;
     //offresInfosGeneStationInfosTelecommandeV2
     //offres2InfosGeneStationInfosTelecommandeV2
     //filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/statique/fr/image/offre-vign-info-fr-on.png')
        if (quelLang=="fr"){
        
                      
              if (IE6 == true){
             
                     
                         
                                                  quelsrc1="/statique/fr/image/offre-vign-info-fr-off.png";
                                                  quelimg=document.getElementById(quelDiv);
                                                  quelimg.runtimeStyle.backgroundImage = "none",
                                                  quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc1 + "', sizingMethod='image')",
                                                  quelimg.src = "/image/transparent.gif"
                                                  
                                                   
	                            
              }
             else{
                    

                  document.getElementById(quelDiv).style.backgroundImage='url(/statique/fr/image/offre-vign-info-fr-off.png)'; 

             }
        }     
        
         if (quelLang=="en"){
        
                      
              if (IE6 == true){
             
                     
                         
                                                  quelsrc1="/statique/en/image/offre-vign-info-en-off.png";
                                                  quelimg=document.getElementById(quelDiv);
                                                  quelimg.runtimeStyle.backgroundImage = "none",
                                                  quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc1 + "', sizingMethod='image')",
                                                  quelimg.src = "/image/transparent.gif"
                                                  
                                                   
	                            
              }
             else{
                    

                  document.getElementById(quelDiv).style.backgroundImage='url(/statique/en/image/offre-vign-info-en-off.png)'; 

             }
        }     
        /// document.getElementById('ctl00_cphAccueil_OffreStationLink1').onmouseover = function() { this.style.backgroundImage='url(/image/video-voir-offres-offIE6.jpg)'; }
	    // document.getElementById('ctl00_cphAccueil_OffreStationLink1').onmouseout = function() { this.style.backgroundImage='url(/image/video-voir-offres-offIE6.jpg)'; }
     }
    function fondAleatoire(){
			switch (Math.ceil(Math.random()*25)) {
				case 1:
					document.getElementById("animFlash").style.background='url(/image/fondsite/02.jpg)';
				break;
				case 2:
					document.getElementById("animFlash").style.background='url(/image/fondsite/02.jpg)';
				break;
				case 3:
					document.getElementById("animFlash").style.background='url(/image/fondsite/04.jpg)';
				break;
				case 4 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/05.jpg)';
				break;
				case 5 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/06.jpg)';
				break;
				case 6 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/07.jpg)';
				break;
				case 7 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/08.jpg)';
				break;
				case 8 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/09.jpg)';
				break;
				case 9 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/10.jpg)';
				break;
				case 10 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/11.jpg)';
				break;
				case 11 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/11.jpg)';
					//supprimer 12.jpg demande hakim
				break;
				case 12 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/13.jpg)';
				break;
				case 13 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/14.jpg)';
				break;
				case 14 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/15.jpg)';
				break;
				case 15 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/16.jpg)';
				break;
				case 16 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/17.jpg)';
				break;
				case 17 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/18.jpg)';
				break;
				case 18 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/19.jpg)';
				break;
				case 19 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/20.jpg)';
				break;
				case 20 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/21.jpg)';
				break;
				case 21 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/22.jpg)';
				break;
				case 22 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/23.jpg)';
				break;
				case 23 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/24.jpg)';
				break;
				default:
					document.getElementById("animFlash").style.background='url(/image/fondsite/25.jpg)';
			}
			document.getElementById("animFlash").style.backgroundRepeat ='no-repeat';
		
    }
    
     function fondAleatoireSum(){
			switch (Math.ceil(Math.random()*18)) {
				case 1:
					document.getElementById("animFlash").style.background='url(/image/fondsite/01.jpg)';
				break;
				case 2:
					document.getElementById("animFlash").style.background='url(/image/fondsite/02.jpg)';
				break;
				case 3:
					document.getElementById("animFlash").style.background='url(/image/fondsite/03.jpg)';
				break;
				case 4 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/04.jpg)';
				break;
				case 5 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/05.jpg)';
				break;
				case 6 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/06.jpg)';
				break;
				case 7 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/07.jpg)';
				break;
				case 8 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/08.jpg)';
				break;
				case 9 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/09.jpg)';
				break;
				case 10 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/10.jpg)';
				break;
				case 11 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/11.jpg)';
					//supprimer 12.jpg demande hakim
				break;
				case 12 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/12.jpg)';
				break;
				case 13 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/13.jpg)';
				break;
				case 14 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/14.jpg)';
				break;
				case 15 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/15.jpg)';
				break;
				case 16 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/16.jpg)';
				break;
				case 17 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/17.jpg)';
				break;
				case 18 :
					document.getElementById("animFlash").style.background='url(/image/fondsite/17.jpg)';
				break;
				default:
					document.getElementById("animFlash").style.background='url(/image/fondsite/05.jpg)';
			}
			document.getElementById("animFlash").style.backgroundRepeat ='no-repeat';
		
    }
    
    
    
    function affichePremOnglet()
    {
    document.getElementById('contenuPageStations').style.visibility="visible";

    }
       function affichePremOngletRes()
    {
    document.getElementById('contenuPageStations').style.visibility="visible";
//  alert('visible');
    }
    function cachePremOnglet()
    {
    document.getElementById('contenuPageStations').style.visibility="hidden";
   // alert(document.getElementById('ongletStationFicheStationV2').style.visibility);
  // setTimeout(affichePremOnglet(), 10000) 

    }
     function cachePremOngletRes()
    {
    document.getElementById('contenuPageStations').style.visibility="hidden";

    }
       function jsDivWait(quelLang){
        //Loader Flash
        if (quelLang=='fr'){
       var so4 = new SWFObject("/statique/fr/Flash/loaderFlocon.swf", "loaderFlocon", "326", "77", "8", "#FFFFFF");
       }
       if (quelLang=='en'){
       var so4 = new SWFObject("/statique/en/Flash/loaderFlocon.swf", "loaderFlocon", "326", "77", "8", "#FFFFFF");
       }
       so4.addParam("wmode", "transparent");
       so4.write("loaderFlocon");
    }
     // cetnrer les div d'attente
    function PositionnerDivWait(){
        var oDivWait = document.getElementById('DivWait');
        var oDivWaitAjax = document.getElementById('DivWaitAjax');
        if (oDivWait != null) {
         oDivWait.style.top = (document.documentElement.clientHeight / 2 - 100) + 'px';
         oDivWait.style.left = (document.documentElement.clientWidth / 2 - 100) + 'px';
        }
        if (oDivWaitAjax != null) {
         //oDivWaitAjax.style.top='250px';
         //oDivWaitAjax.style.left= (basDivMenuBas('tableauMenuBas')/2)+"px";
         oDivWaitAjax.style.top = (document.documentElement.clientHeight / 2 - 100) + 'px';
         oDivWaitAjax.style.left = (document.documentElement.clientWidth / 2 - 100) + 'px';
        }
    }
    
    function PatienceAjax() {
        var dwa = document.getElementById('DivWait');
	    dwa.style.visibility = 'visible';
    }

    function UndoPatienceAjax() {
        //alert('Appel UndoPatienceAjax');
	    document.getElementById('DivWait').style.visibility = 'visible';
    }
    

    function testPng(quelimg, quelsrc){
    
         (quelimg.runtimeStyle.behavior="none") && (quelimg.pngSet ? quelimg.pngSet = true : (
         quelimg.nodeName == "IMG" ? (
         quelimg.src.toLowerCase().indexOf('.') > -1 ? (
         quelimg.runtimeStyle.backgroundImage = "none",
         quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
         quelimg.src = "/image/transparent.gif"
         ) : 0
         ) : (
         quelimg.origBg = quelimg.origBg? quelimg.origBg :quelimg.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
         quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelimg.origBg + "', sizingMethod='crop')",
         (quelimg.currentStyle.backgroundRepeat != 'no-repeat') ? (
         quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelimg.origBg + "', sizingMethod='scale')"
         ) : 0,
         quelimg.runtimeStyle.backgroundImage = "none"
         ),quelimg.pngSet=true
         )
         )
         quelimg.pngSet=true;
       //alert(quelimg.nodeName + '\n' + quelimg.runtimeStyle.filter + '\n' + quelsrc + '\n' + quelimg.src + '\n' + quelimg.pngSet);
     }
     
      function GetDomOffset( Obj, Prop ) {
	        var iVal = 0;
	        while (Obj && Obj.tagName != 'BODY') {
		        eval('iVal += Obj.' + Prop + ';');
		        Obj = Obj.offsetParent;
	        }
	        return iVal;
        }
        
   


    function ouvertureOngletNewsletter(quelDiv){
        document.getElementById(quelDiv).style.visibility='visible';
    }
    function fermerNewsletter(quelDiv){
        document.getElementById(quelDiv).style.visibility='hidden';
    }
   

    <!-- Script de gestion des calendriers -->

    
        var CalendrierOuvert = false;
        var quelChoixZone = '';

        // Maintenir le calendrier ouvert après postback ajax pour changer le mos en cours
        function setCalendarStateToOpen(etat) {
            CalendrierOuvert = etat;
        }
                                    
        // fermeture du calendrier
        function fermerCalendrier(oId) {
	        //cacheDivMenuBas();
	        document.getElementById(oId).style.display='none';
        }
        
        // repositionnement de la carte des stations, du calendrier et du jeu-concours (si nécessaire)
      	function PositionnerCarte() {
      	 if  (document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierMoisDiv') != null)  {
                emplacementTopBtnCalendar=GetDomOffset(document.getElementById('telecommandeV2pictoCalendar'), 'offsetTop' );
                emplacementLeftBtnCalendar=GetDomOffset(document.getElementById('telecommandeV2pictoCalendar'), 'offsetLeft' );
                emplacementLeftAnimFlash=GetDomOffset(document.getElementById('animFlash'), 'offsetLeft' );
                
                /*telecommandeV2pictoCalendar*/
                /*ctl00_cphAccueil_ctl01_PanelCalendrierAjax*/
                /*ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierMoisDiv*/
                document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierMoisDiv').style.left=(emplacementLeftBtnCalendar-emplacementLeftAnimFlash)+6+"px";
                document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierMoisDiv').style.top=emplacementTopBtnCalendar-13+"px";

                document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierSaisonDiv').style.left=(emplacementLeftBtnCalendar-emplacementLeftAnimFlash)+4+"px";
                    if (SiteEnCours()=="Summerbed"){
                    //pour summerbed on remonte le calendrier saison
                      document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierSaisonDiv').style.top=emplacementTopBtnCalendar-110+"px";
                    }
                    else{
                     document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierSaisonDiv').style.top=emplacementTopBtnCalendar-16+"px";

                    }
                    if(document.getElementById('calendrierPromo') != null){
                     document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierMoisDiv').style.left=(emplacementLeftBtnCalendar-emplacementLeftAnimFlash)+4+"px";
                document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierMoisDiv').style.top=emplacementTopBtnCalendar-13+"px";

                document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierSaisonDiv').style.left=(emplacementLeftBtnCalendar-emplacementLeftAnimFlash)+2+"px";
                document.getElementById('ctl00_cphAccueil_ctl00_PanelCalendrierAjax_CalendrierSaisonDiv').style.top=emplacementTopBtnCalendar-16+"px";
                    }
           }
                
                /* DEBUT pour summerbed */
             if  (document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierMoisDiv') != null)  {
                emplacementTopBtnCalendar=GetDomOffset(document.getElementById('telecommandeV2pictoCalendar'), 'offsetTop' );
                emplacementLeftBtnCalendar=GetDomOffset(document.getElementById('telecommandeV2pictoCalendar'), 'offsetLeft' );
                emplacementLeftAnimFlash=GetDomOffset(document.getElementById('animFlash'), 'offsetLeft' );
                
                /*telecommandeV2pictoCalendar*/
                /*ctl00_cphAccueil_ctl01_PanelCalendrierAjax*/
                /*ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierMoisDiv*/
                document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierMoisDiv').style.left=(emplacementLeftBtnCalendar-emplacementLeftAnimFlash)+6+"px";
                document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierMoisDiv').style.top=emplacementTopBtnCalendar-13+"px";

                document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierSaisonDiv').style.left=(emplacementLeftBtnCalendar-emplacementLeftAnimFlash)+4+"px";
                    if (SiteEnCours()=="Summerbed"){
                    //pour summerbed on remonte le calendrier saison
                      document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierSaisonDiv').style.top=emplacementTopBtnCalendar-110+"px";
                    }
                    else{
                     document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierSaisonDiv').style.top=emplacementTopBtnCalendar-16+"px";

                    }
                    if(document.getElementById('calendrierPromo') != null){
                     document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierMoisDiv').style.left=(emplacementLeftBtnCalendar-emplacementLeftAnimFlash)+4+"px";
                document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierMoisDiv').style.top=emplacementTopBtnCalendar-13+"px";

                document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierSaisonDiv').style.left=(emplacementLeftBtnCalendar-emplacementLeftAnimFlash)+2+"px";
                document.getElementById('ctl00_cphAccueil_ctl01_PanelCalendrierAjax_CalendrierSaisonDiv').style.top=emplacementTopBtnCalendar-16+"px";
                    }
            }
             /* FIN pour summerbed */    
                
      	    if ( (document.getElementById('telecommandeV2pictoCarte') != null) && (document.getElementById('fondCarteFrance') != null)){
      	           emplacementTopBtnCarte=GetDomOffset(document.getElementById('telecommandeV2pictoCarte'), 'offsetTop' );
                emplacementLeftBtnCarte=GetDomOffset(document.getElementById('telecommandeV2pictoCarte'), 'offsetLeft' );
      	          //alert('picto Carte et FondCarte Pas null');
      	        //alert('PositionnerCarte');
               // document.getElementById('telecommandeV2pictoCarte').style.left=emplacementLeftBtnCarte-147+"px";
                 //document.getElementById('telecommandeV2pictoCarte').style.top=emplacementTopBtnCalendar-20+"px";

                document.getElementById('fondCarteFrance').style.left=emplacementLeftBtnCarte+"px";
                document.getElementById('fondCarteFrance').style.top=emplacementTopBtnCarte+"px";
            }
      	    if ((document.getElementById('JeuConcours') != null) || (document.getElementById('JeuConcoursFin') != null)){
							emplacementLeftBtnCarte=GetDomOffset(document.getElementById('telecommandeV2pictoCalendar'), 'offsetLeft' );
							document.getElementById('JeuConcours').style.left=335+emplacementLeftBtnCarte+"px";
							document.getElementById('JeuConcoursFin').style.left=335+emplacementLeftBtnCarte+"px";
            }
        }
    

    

    <!-- Script de gestion des avis -->

   
        var AvisOuvert = '';

        // Maintenir le calendrier ouvert après postback ajax pour changer le mos en cours
        function setAvisStateToOpen(avisId) {
            //alert('setAvisStateToOpen : ' + avisId);
            AvisOuvert = avisId;
        }

    
        function PromoRedirect(url) {
            window.location = url;
        }


    <!-- Gestion de la Telecommande -->

  

    //script pour connaitre la hauteur de la div pour le MenuBas

        function hauteurDivMenuBas(quelDiv){
            var divHeight = 0;

            if(document.getElementById(quelDiv).offsetHeight)
                {
                     divHeight=document.getElementById(quelDiv).offsetHeight;
                }
            else if(document.getElementById(quelDiv).style.pixelHeight)
                {
                    divHeight=document.getElementById(quelDiv).style.pixelHeight;
                }
            return divHeight;
        }
        
        function basDivMenuBas(quelDiv){
            var divWidth = 0;

            if(document.getElementById(quelDiv).offsetWidth)
                {
                     divWidth=document.getElementById(quelDiv).offsetWidth;
                }
            else if(document.getElementById(quelDiv).style.pixelWidth)
                {
                    divWidth=document.getElementById(quelDiv).style.pixelWidth;
                }
            return divWidth;
        }
        
        function rollOverVoletV2(){
            document.getElementById('telecommandeV2btnPlusCritereG').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-g-on.png)';
            document.getElementById('telecommandeV2btnPlusCritereD').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-d-on.png)';
           
              var node = document.getElementById("telecommandeV2btnPlusCritere");
                        var childList = node.childNodes
                       
                        var i=0;
                              while (i < childList.length){
                                  if ((childList[i].tagName=="A")){
                                      var chaine=childList[i].className;
                                      childList[i].style.color='#FFFFFF';
                                      childList[i].style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-mat-on.png)';
                                                                    
                                  }
                              i++;
                              } 
         
            
        }
       function rollOutVoletV2(){
            document.getElementById('telecommandeV2btnPlusCritereG').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-g-off.png)';
            document.getElementById('telecommandeV2btnPlusCritereD').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-d-off.png)';
            //#0D3D85
          
               var node = document.getElementById("telecommandeV2btnPlusCritere");
                        var childList = node.childNodes
                       
                        var i=0;
                              while (i < childList.length){
                                  if ((childList[i].tagName=="A")){
                                      var chaine=childList[i].className;
                                    childList[i].style.color='#0D3D85';
                                    childList[i].style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-mat-off.png)';
                                      
                                      var assertion = childList[i].className;
                                      var patt1=/telecommandeSelection/gi;
                                 var resultat =(assertion.match(patt1));
                                      
                        if (resultat!=null){
                          childList[i].style.color="#E45600";
                        }
                        else{
                        childList[i].style.color="#0D3D85";
                        }

                                  
                                  }
                              i++;
                              } 
                    
                    
            
        }
        
        
        
        function rollOverVoletV2Open(){
            document.getElementById('telecommandeV2btnMoinsCritereG').style.backgroundImage='url(/image/telecom-elements/telecom-bout-moins-g-on.png)';
            document.getElementById('telecommandeV2btnMoinsCritereM').style.backgroundImage='url(/image/telecom-elements/telecom-bout-moins-mat-on.png)';
            document.getElementById('telecommandeV2btnMoinsCritereD').style.backgroundImage='url(/image/telecom-elements/telecom-bout-moins-d-on.png)';
            document.getElementById('telecommandeV2btnMoinsCritereM').style.color='#FFFFFF';
                      
            
        }
        
        function rollOver2VoletV2(){
            document.getElementById('telecommandeV2btnPlusCritereG').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-g-on.png)';
            document.getElementById('telecommandeV2btnPlusCritereM').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-mat-on.png)';
            document.getElementById('telecommandeV2btnPlusCritereD').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-d-on.png)';
            document.getElementById('telecommandeV2btnPlusCritereM').style.color='#FFFFFF';
            
               var node = document.getElementById("telecommandeV2btnPlusCritere");
                        var childList = node.childNodes
                       
                        var i=0;
                              while (i < childList.length){
                                  if ((childList[i].tagName=="A")){
                                      var chaine=childList[i].className;
                                    
                                      
                                      var assertion = childList[i].className;
                                      var patt1=/telecommandeSelection/gi;
                                 var resultat =(assertion.match(patt1));
                                      
                        if (resultat!=null){
                         document.getElementById('telecommandeV2btnMoinsCritereM').style.color='#E45600';
                        }
                        else{
                        document.getElementById('telecommandeV2btnMoinsCritereM').style.color='#FFFFFF';
                        }

                                  
                                  }
                              i++;
                              } 
               
            
        }
        
       function rollOutVoletV2Open(){
            document.getElementById('telecommandeV2btnMoinsCritereG').style.backgroundImage='url(/image/telecom-elements/telecom-bout-moins-g-off.png)';
            document.getElementById('telecommandeV2btnMoinsCritereM').style.backgroundImage='url(/image/telecom-elements/telecom-bout-moins-mat-off.png)';
            document.getElementById('telecommandeV2btnMoinsCritereD').style.backgroundImage='url(/image/telecom-elements/telecom-bout-moins-d-off.png)';
          
            document.getElementById('telecommandeV2btnMoinsCritereM').style.color='#0D3D85';
            var node = document.getElementById("telecommandeV2btnPlusCritere");
            var childList = node.childNodes
            var i=0;
                              while (i < childList.length){
                                  if ((childList[i].tagName=="A")){
                                      var chaine=childList[i].className;
                                    
                                      
                                      var assertion = childList[i].className;
                                      var patt1=/telecommandeSelection/gi;
                                 var resultat =(assertion.match(patt1));
                                      
                        if (resultat!=null){
                         document.getElementById('telecommandeV2btnMoinsCritereM').style.color='#E45600';
                        }
                        else{
                        document.getElementById('telecommandeV2btnMoinsCritereM').style.color='#0D3D85';
                        }

                                  
                                  }
                              i++;
                              } 
               
                    
            
        }
        
        
       function rollOut2VoletV2(){
            document.getElementById('telecommandeV2btnPlusCritereG').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-g-off.png)';
            document.getElementById('telecommandeV2btnPlusCritereM').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-mat-off.png)';
            document.getElementById('telecommandeV2btnPlusCritereD').style.backgroundImage='url(/image/telecom-elements/telecom-bout-plus-d-off.png)';
        
            document.getElementById('telecommandeV2btnPlusCritereM').style.color='#0D3D85';

            
        }
       
        
        function PointeurSurLaTelecommande(event)
        {
					var volet1, volet2;
					volet1 = document.getElementById('telecommandeV2')

					var PanelStandardHaut = GetDomOffset(volet1, 'offsetTop');
					var PanelStandardBas = PanelStandardHaut + hauteurDivMenuBas('telecommandeV2');
					var PanelStandardGauche = GetDomOffset(volet1, 'offsetLeft');
					var PanelStandardDroite = PanelStandardGauche + basDivMenuBas('telecommandeV2');

					var e = event || window.event;
					var scroll = new Array((document.documentElement && document.documentElement.scrollLeft) || window.pageXOffset || self.pageXOffset || document.body.scrollLeft,(document.documentElement && document.documentElement.scrollTop) || window.pageYOffset || self.pageYOffset || document.body.scrollTop);;

					return((e.clientX + scroll[0] - document.body.clientLeft >= PanelStandardGauche && e.clientX + scroll[0] - document.body.clientLeft <= PanelStandardDroite && e.clientY + scroll[1] - document.body.clientTop >= PanelStandardHaut && e.clientY + scroll[1] - document.body.clientTop <= PanelStandardBas));
        }

        function PointeurSurLaTelecommandeEtendue(event)
        {
					var volet1, volet2;
					volet1 = document.getElementById('telecommandeV2')
					volet2 = document.getElementById('voletTelecommandeV2')

					var PanelStandardHaut = GetDomOffset(volet1, 'offsetTop');
					var PanelStandardBas = PanelStandardHaut + hauteurDivMenuBas('telecommandeV2');
					var PanelStandardGauche = GetDomOffset(volet1, 'offsetLeft');
					var PanelStandardDroite = PanelStandardGauche + basDivMenuBas('telecommandeV2');
					var PanelEtenduHaut = GetDomOffset(volet2, 'offsetTop');
					var PanelEtenduBas = PanelEtenduHaut + hauteurDivMenuBas('voletTelecommandeV2');
					var PanelEtenduGauche = GetDomOffset(volet2, 'offsetLeft');
					var PanelEtenduDroite = PanelEtenduGauche + basDivMenuBas('voletTelecommandeV2');
					var e = event || window.event;
					var scroll = new Array((document.documentElement && document.documentElement.scrollLeft) || window.pageXOffset || self.pageXOffset || document.body.scrollLeft,(document.documentElement && document.documentElement.scrollTop) || window.pageYOffset || self.pageYOffset || document.body.scrollTop);;

					return((e.clientX + scroll[0] - document.body.clientLeft >= PanelStandardGauche && e.clientX + scroll[0] - document.body.clientLeft <= PanelStandardDroite && e.clientY + scroll[1] - document.body.clientTop >= PanelStandardHaut && e.clientY + scroll[1] - document.body.clientTop <= PanelStandardBas) || (e.clientX + scroll[0] - document.body.clientLeft >= PanelEtenduGauche && e.clientX + scroll[0] - document.body.clientLeft <= PanelEtenduDroite && e.clientY + scroll[1] - document.body.clientTop >= PanelEtenduHaut && e.clientY + scroll[1] - document.body.clientTop <= PanelEtenduBas));
        }




   
        function EcrireCarteFlash3D(IdDiv, urlDomaineInterface, fichierXml, FichierFondCarte, urlMapStationSWF, fondFlashcorpsPageStationsPlanStation, residence) {
            // <![CDATA[
            var flashvars = {};
            var params = {};
            var attributes = {};

            // alert('Début carte flash');

            flashvars.domain_interface = urlDomaineInterface;
            flashvars.fichier_xml_carte = fichierXml;
            flashvars.fichier_image_carte = FichierFondCarte;
            
            if (residence > 0)
            {
                flashvars.residence = residence;
            }

            params.menu = "false";
            params.quality = "high";
            params.scale = "noscale";
            params.salign = "tl";
            params.wmode = "transparent";
            params.seamlesstabbing = "false";
            params.allowfullscreen = "false";
            
            attributes.name = "loader";
            attributes.align = "middle";

            // alert('Avant Embed carte flash');

            swfobject.embedSWF(urlMapStationSWF, IdDiv, "706", "415", "8.0.0", false, flashvars, params, attributes);

            // alert('Fin carte flash');

            CentrerDiv('DivGlobaleCarte3DOffres');
        }
    
    
function CentrerDiv(idDiv)
{
    var DivCarte = document.getElementById(idDiv);
    var sHeight, sWidth, x, y, carteHeight, carteWidth;
    
    sWidth=document.documentElement.clientWidth;
    sHeight=document.documentElement.clientHeight;
    
    carteHeight = 474;
    carteWidth = 764;
    
    if (carteWidth < sWidth)
        x = (sWidth - carteWidth) / 2;
    else
        x = 0;
    if (carteHeight < sHeight)
        y = (sHeight - carteHeight) / 2;
    else
        y = 0;
    
    if (DivCarte != null)
    {    
        DivCarte.style.top = y + 'px';
        DivCarte.style.left = x + 'px';
    }
}
           



        


        // Redimmensionner une div trop grande
        function resizeDiv(oId){
            if (document.getElementById(oId) != null)
            {
                var hMax = 260;
                var obj = document.getElementById(oId.replace(/dt/,"dd"));
                var tailleDiv=obj.offsetHeight;
                if ((tailleDiv) > hMax){
                    obj.style.overflow = 'scroll';
                    obj.style.overflowX = 'hidden';
                    obj.style.height = hMax + "px";
                }
            }
        }
        
function redimmenAnimFlash(){
     oDivAnimFlash = document.getElementById('animFlash');
        if (oDivAnimFlash != null){
            if (document.body.offsetWidth>1280){
           
            document.getElementById("animFlash").style.width="1280px";
            testLeft=(basDivMenuBas('tableauMenuBas')/2)+"px";
           document.getElementById("animFlash").style.left= ((document.body.offsetWidth/2)-640)+"px";

           
            }
            else{
             
            document.getElementById("animFlash").style.width=document.body.offsetWidth+"px";
            }
         }   
     
     /*
     if (document.body.offsetWidth<1200){
      document.getElementById("animFlash").style.width=1227+"px";
     }*/
    }
        

			
			
			function tailleFaussePopupMeteo(){
 	// tailletableauMenuBas=basDivMenuBas('tableauMenuBas');
           	 tailletableauMenuBas=document.body.offsetWidth;
    
             
                    // la taille du grisé Niveau 1
					document.getElementById('faussePopup').style.width=tailletableauMenuBas+"px";
					document.getElementById('faussePopup').style.height=tailletableauMenuBas+"px";
					document.getElementById('faussePopup').style.zIndex=12000;
				
 } 
            function PositionnerPopupMeteo(){
                document.getElementById('popupMeteoNeigeFicheV2').style.left=(tailletableauMenuBas/2)-(basDivMenuBas('popupMeteoNeigeFicheV2')/2)+"px";
                
                
                }
                
                var btnOuvert="";
                var btn2Ouvert="";
                
           function onBtnMeteoNeigeV2(quelDiv){
                    if (btn2Ouvert!=""){
                    
                      document.getElementById(btn2Ouvert).style.backgroundImage='none';
                    }
                     
                        document.getElementById(quelDiv).style.backgroundImage='url(/image/meteo-neige-select-on.png)'; 
                        btnOuvert=quelDiv;
                        btn2Ouvert=quelDiv;
                    //this.style.backgroundRepeat='no-repeat';
               //this.style.backgroundImage='url(/image/meteo-neige-select-roll.png)';this.style.backgroundRepeat='no-repeat';
               
                }
                function onmouseoverBtnMeteoNeigeV2(quelDiv){
               
               if (quelDiv!=btnOuvert){
              document.getElementById(quelDiv).style.backgroundImage='url(/image/meteo-neige-select-roll.png)';
               }
               
                }
                
                function onmouseoutBtnMeteoNeigeV2(quelDiv){
                 if (quelDiv!=btnOuvert){
              document.getElementById(quelDiv).style.backgroundImage='none';
               }
              
                }
                
                function tailleOngletIE6(){
                
                
                if(navigator.appVersion.substring(0,1) == "4")
                 
                   if  (document.getElementById('ongletPageStations') != null)  {
                  
                 document.getElementById('ongletPageStations').style.width="750px";
                  }


                }


// Gestion des mois du calendrier de la télécommande
function setMoisActif(idMois, idTitreMois, tabMois, tabTitreMois)
{
    var i;
    var oMois, oTitreMois;
    
    for (i = 0; i < tabMois.length; i++)
    {
        oMois = document.getElementById(tabMois[i]);
        oTitreMois = document.getElementById(tabTitreMois[i]);
        
        if (tabMois[i] == idMois) {
            oMois.style.display = 'block';
            oTitreMois.style.display = 'block';
            MoisActifCalendrier = i;
        }
        else {
            oMois.style.display = 'none';
            oTitreMois.style.display = 'none';
        }
    }
}

function setMoisActifNum(nb, tabMois, tabTitreMois)
{
    var i;
    var oMois, oTitreMois;
    
    if (nb >= 0 && nb < tabMois.length) {
        for (i = 0; i < tabMois.length; i++)
        {
            oMois = document.getElementById(tabMois[i]);
            oTitreMois = document.getElementById(tabTitreMois[i]);
            
            if (i == nb) {
                oMois.style.display = 'block';
                oTitreMois.style.display = 'block';
                MoisActifCalendrier = i;
            }
            else {
                oMois.style.display = 'none';
                oTitreMois.style.display = 'none';
            }
        }
    }
}


function hrefToClick(oId, url) {
    var oLink, sOnclick, sHref;
    oLink = document.getElementById(oId);
    sOnclick = oLink.attributes["onclick"].value;
    sHref = oLink.href;
    oLink.href = url;
}

var xmlhttp;
function LoadHTML(url, id)
{
	if (window.XMLHttpRequest)
		xmlhttp = new XMLHttpRequest();
	else if (window.ActiveXObject)
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return null;
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4){
			if (xmlhttp.status==200){
				document.getElementById(id).innerHTML=xmlhttp.responseText;
				positionnementVoletMenuBas();
			}
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	 
}


// chargement ajax de la fiche station
function LoadHTMLFicheStation(url, id, lang, IdDivCarte, urlDomaineInterface, fichierXML, FondCarte, urlMapStation, divPlanStation, residence)
{
	if (window.XMLHttpRequest)
		xmlhttp = new XMLHttpRequest();
	else if (window.ActiveXObject)
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return null;
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4){
			if (xmlhttp.status==200){
				document.getElementById(id).innerHTML=xmlhttp.responseText;
                //alert(document.getElementById(id).innerHTML);
                
                CacherFlocon();
                
				OuvrirModalPopup('ficheStation');
				
				cachePremOnglet();
				choixChangementOngletStationV2('ongletStationFicheStationV2', lang);
				CacherOngletFiche('btnOngletLiensFicheStation', 'spanOngletCache');
				//alert(document.getElementById(id).innerHTML);
				affichePremOnglet();
				if (residence > 0)
				    EcrireCarteFlash3D(IdDivCarte, urlDomaineInterface, fichierXML, FondCarte, urlMapStation, divPlanStation, residence);
				
				    
				//positionnementVoletMenuBas();
				redimAnimFlashFiche();
                resolution();
                tailleFaussePopupOffres();
				PositionnerPopup('ficheStation');
				scripletPhotosV2();
				
				// gestion popup garantie neige
				document.getElementById('popupGarantieNeigeAjax').innerHTML = document.getElementById('popupGarantieNeigeFicheStationV2').innerHTML;
				document.getElementById('popupGarantieNeigeFicheStationV2').innerHTML = '';
				document.getElementById('popupGarantieNeigeFicheStationV2').style.display = 'none';
				// gestion popup météo neige
				document.getElementById('popupMeteoNeigeAjax').innerHTML = document.getElementById('popupMeteoNeigeFicheV2').innerHTML;
				document.getElementById('popupMeteoNeigeFicheV2').innerHTML = '';
				document.getElementById('popupMeteoNeigeFicheV2').style.display = 'none';
				// gestion popup avis
				document.getElementById('popupAvisAjax').innerHTML = document.getElementById('popupAvisFicheV2Station').innerHTML;
				document.getElementById('popupAvisFicheV2Station').innerHTML = '';
				document.getElementById('popupAvisFicheV2Station').style.display = 'none';
				
				resizeDivGriseV2('ongletStationFicheStationV2');
			}
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	 
}



// chargement ajax de la fiche résidence
function LoadHTMLFicheResidence(url, id, lang, IdDivCarte, urlDomaineInterface, fichierXML, FondCarte, urlMapStation, divPlanStation, residence, IdVideo)
{
	if (window.XMLHttpRequest)
		xmlhttp = new XMLHttpRequest();
	else if (window.ActiveXObject)
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return null;
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4){
			if (xmlhttp.status==200){
				document.getElementById(id).innerHTML=xmlhttp.responseText;
                //alert(document.getElementById(id).innerHTML);
                
                CacherFlocon();
                
				OuvrirModalPopup('ficheResidence');
				
				cachePremOngletRes();choixChangementOngletFicheResidence('ongletStationFicheResidenceV2', lang);
				CacherOngletFiche('btnOngletLiensFicheResidence', 'spanOngletCache');
				affichePremOngletRes();
				
				if (residence > 0)
				    EcrireCarteFlash3D(IdDivCarte, urlDomaineInterface, fichierXML, FondCarte, urlMapStation, divPlanStation, residence);
				else {
				    CacherOngletFiche('btnOngletLocalisationFicheResidence', 'spanOngletLocalisationCache');
				}
				
				if (IdVideo != '')
				    EcrireFlashVideo('DivVideoResidence', IdVideo, '1');
				
				//positionnementVoletMenuBas();
				redimAnimFlashFiche();
                resolution();
                tailleFaussePopupOffres();
				PositionnerPopup('ficheResidence');
				scripletPhotosV2();
				
				// gestion popup garantie neige
				document.getElementById('popupGarantieNeigeAjax').innerHTML = document.getElementById('popupGarantieNeigeFicheResidence').innerHTML;
				document.getElementById('popupGarantieNeigeFicheResidence').innerHTML = '';
				document.getElementById('popupGarantieNeigeFicheResidence').style.display = 'none';
				// gestion popup météo neige
				document.getElementById('popupMeteoNeigeAjax').innerHTML = document.getElementById('popupMeteoNeigeFicheV2').innerHTML;
				document.getElementById('popupMeteoNeigeFicheV2').innerHTML = '';
				document.getElementById('popupMeteoNeigeFicheV2').style.display = 'none';
				// gestion popup avis
				document.getElementById('popupAvisAjax').innerHTML = document.getElementById('popupAvisFicheV2Residence').innerHTML;
				document.getElementById('popupAvisFicheV2Residence').innerHTML = '';
				document.getElementById('popupAvisFicheV2Residence').style.display = 'none';
				
				resizeDivGriseV2('ongletStationFicheResidenceV2');
			}
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}


// chargement ajax de la fiche résidence
function LoadHTMLFicheUnique(url, id, lang, residence, destination)
{
var dest='';
	if (window.XMLHttpRequest)
		xmlhttp = new XMLHttpRequest();
	else if (window.ActiveXObject)
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return null;
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4){
			if (xmlhttp.status==200){
				document.getElementById(id).innerHTML=xmlhttp.responseText;
                //alert(document.getElementById(id).innerHTML);
                
                CacherFlocon();
                
                //inclusion destination
                if (destination =='1'){
                    inclusion('/CSS/css_fiche_mer.css');
                  prechargeImagesFicheSumMer();
                }
                if (destination =='2'){
                    inclusion('/CSS/css_fiche_montagne.css');
                    prechargeImagesFicheSumMontagne();
                }
                if (destination =='3'){
                    inclusion('/CSS/css_fiche_campagne.css');
                    prechargeImagesFicheSumCampagne();
                }
				OuvrirModalPopup('ficheResidence');
				
				cachePremOngletRes();
				choixChangementOngletFicheMer('ongletMerResidenceV2', lang, destination);
				/*choixChangementOngletFicheResidence('ongletStationFicheResidenceV2', lang);*/
				CacherOngletFiche('btnOngletLiensFicheResidence', 'spanOngletCache');
				affichePremOngletRes();
				
				//positionnementVoletMenuBas();
				redimAnimFlashFiche();
                resolution();
                tailleFaussePopupOffres();
				
				scripletPhotosV2FicheUnique('Residence');
				scripletPhotosV2FicheUnique('Ville');
				
				// gestion popup avis
				document.getElementById('popupAvisAjax').innerHTML = document.getElementById('popupAvisFicheV2Residence').innerHTML;
				document.getElementById('popupAvisFicheV2Residence').innerHTML = '';
				document.getElementById('popupAvisFicheV2Residence').style.display = 'none';
				
				resizeDivGriseV2('ongletStationFicheResidenceV2');
				PositionnerPopup('ficheResidence');
			}
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}




function PositionnerPopup(quelDiv){

    document.getElementById(quelDiv).style.left=((document.body.offsetWidth)/2)-(basDivMenuBas(quelDiv)/2)+"px";
    tailleDiv=document.getElementById(quelDiv).style.width;
    
}

function PositionnerPopupN2(quelDiv){
    var tailleWidthpopupGarantieNeigeFicheV2=document.getElementById(quelDiv).offsetWidth;
    emplacementLeftFicheStation=GetDomOffset(document.getElementById('contenuPageStations'), 'offsetWidth' );
    document.getElementById(quelDiv).style.left=(emplacementLeftFicheStation/2)-(tailleWidthpopupGarantieNeigeFicheV2/2)+"px";
}


function EcrireFlashVideo(IdDiv, IdVideo, EtatVideo) {
    if (document.getElementById(IdDiv)) {
        document.getElementById(IdDiv).style.display = 'block';
        var so = new SWFObject("/Lecteur_skibed.swf", "Lecteur", "524", "350", "8", "#FFFFFF");
        so.addParam("wmode", "transparent");
        so.addVariable("idbien", IdVideo);
        so.addVariable("etatvideo", EtatVideo);
        so.write(IdDiv);
    }
}






function scripletPhotosV2(){
    document.getElementById('thumbs').style.width = '220px';
    document.getElementById('gallery').style.display = 'block';
    
  jQuery(document).ready(function($) {
				// We only want these styles applied when javascript is enabled
				$('div.navigation').css({'width' : '240px', 'float' : 'left'});
				$('div.content').css('display', 'block');

				// Initially set opacity on thumbs and add
				// additional styling for hover effect on thumbs
				var onMouseOutOpacity = 0.67;
				$('#thumbs ul.thumbs li').opacityrollover({
					mouseOutOpacity:   onMouseOutOpacity,
					mouseOverOpacity:  1.0,
					fadeSpeed:         'fast',
					exemptionSelector: '.selected'
				});
				
				// Initialize Advanced Galleriffic Gallery
				var gallery = $('#thumbs').galleriffic({
					delay:                     2500,
					numThumbs:                 15,
					preloadAhead:              10,
					enableTopPager:            true,
					enableBottomPager:         true,
					maxPagesToShow:            7,
					imageContainerSel:         '#slideshow',
					controlsContainerSel:      '#controls',
					captionContainerSel:       '#caption',
					loadingContainerSel:       '#loading',
					renderSSControls:          true,
					renderNavControls:         true,
					playLinkText:              'Play Slideshow',
					pauseLinkText:             'Pause Slideshow',
					prevLinkText:              '&lsaquo; Previous Photo',
					nextLinkText:              'Next Photo &rsaquo;',
					nextPageLinkText:          'Next &rsaquo;',
					prevPageLinkText:          '&lsaquo; Prev',
					enableHistory:             false,
					autoStart:                 false,
					syncTransitions:           true,
					defaultTransitionDuration: 900,
					onSlideChange:             function(prevIndex, nextIndex) {
						// 'this' refers to the gallery, which is an extension of $('#thumbs')
						this.find('ul.thumbs').children()
							.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('fast', 1.0);
					},
					onPageTransitionOut:       function(callback) {
						this.fadeTo('fast', 0.0, callback);
					},
					onPageTransitionIn:        function() {
						this.fadeTo('fast', 1.0);
					}
				});

				/**** Functions to support integration of galleriffic with the jquery.history plugin ****/

				// PageLoad function
				// This function is called when:
				// 1. after calling $.historyInit();
				// 2. after calling $.historyLoad();
				// 3. after pushing "Go Back" button of a browser
				function pageload(hash) {
					// alert("pageload: " + hash);
					// hash doesn't contain the first # character.
					if(hash) {
						$.galleriffic.gotoImage(hash);
					} else {
						gallery.gotoIndex(0);
					}
				}

				// Initialize history plugin.
				// The callback is called at once by present location.hash. 
				$.historyInit(pageload, "advanced.html");

				// set onlick event for buttons using the jQuery 1.3 live method
				$("a[rel='history']").live('click', function(e) {
					if (e.button != 0) return true;
					
					var hash = this.href;
					hash = hash.replace(/^.*#/, '');

					// moves to a new page. 
					// pageload is called at once. 
					// hash don't contain "#", "?"
					$.historyLoad(hash);

					return false;
				});

				/****************************************************************************************/
			});
}


function scripletPhotosV2FicheUnique(id){
    document.getElementById('thumbs' + id).style.width = '220px';
    document.getElementById('gallery' + id).style.display = 'block';
    
  jQuery(document).ready(function($) {
				// We only want these styles applied when javascript is enabled
				$('div.navigation').css({'width' : '240px', 'float' : 'left'});
				$('div.content').css('display', 'block');

				// Initially set opacity on thumbs and add
				// additional styling for hover effect on thumbs
				var onMouseOutOpacity = 0.67;
				$('#thumbs'  + id + ' ul.thumbs li').opacityrollover({
					mouseOutOpacity:   onMouseOutOpacity,
					mouseOverOpacity:  1.0,
					fadeSpeed:         'fast',
					exemptionSelector: '.selected'
				});
				
				// Initialize Advanced Galleriffic Gallery
				var gallery = $('#thumbs' + id).galleriffic({
					delay:                     2500,
					numThumbs:                 15,
					preloadAhead:              10,
					enableTopPager:            true,
					enableBottomPager:         true,
					maxPagesToShow:            7,
					imageContainerSel:         '#slideshow' + id,
					controlsContainerSel:      '#controls',
					captionContainerSel:       '#caption' + id,
					loadingContainerSel:       '#loading' + id,
					renderSSControls:          true,
					renderNavControls:         true,
					playLinkText:              'Play Slideshow',
					pauseLinkText:             'Pause Slideshow',
					prevLinkText:              '&lsaquo; Previous Photo',
					nextLinkText:              'Next Photo &rsaquo;',
					nextPageLinkText:          'Next &rsaquo;',
					prevPageLinkText:          '&lsaquo; Prev',
					enableHistory:             false,
					autoStart:                 false,
					syncTransitions:           true,
					defaultTransitionDuration: 900,
					onSlideChange:             function(prevIndex, nextIndex) {
						// 'this' refers to the gallery, which is an extension of $('#thumbs')
						this.find('ul.thumbs').children()
							.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('fast', 1.0);
					},
					onPageTransitionOut:       function(callback) {
						this.fadeTo('fast', 0.0, callback);
					},
					onPageTransitionIn:        function() {
						this.fadeTo('fast', 1.0);
					}
				});

				/**** Functions to support integration of galleriffic with the jquery.history plugin ****/

				// PageLoad function
				// This function is called when:
				// 1. after calling $.historyInit();
				// 2. after calling $.historyLoad();
				// 3. after pushing "Go Back" button of a browser
				function pageload(hash) {
					// alert("pageload: " + hash);
					// hash doesn't contain the first # character.
					if(hash) {
						$.galleriffic.gotoImage(hash);
					} else {
						gallery.gotoIndex(0);
					}
				}

				// Initialize history plugin.
				// The callback is called at once by present location.hash. 
				$.historyInit(pageload, "advanced.html");

				// set onlick event for buttons using the jQuery 1.3 live method
				$("a[rel='history']").live('click', function(e) {
					if (e.button != 0) return true;
					
					var hash = this.href;
					hash = hash.replace(/^.*#/, '');

					// moves to a new page. 
					// pageload is called at once. 
					// hash don't contain "#", "?"
					$.historyLoad(hash);

					return false;
				});

				/****************************************************************************************/
			});
}




function ViderContenuDiv(oId)
{
    var oDiv = document.getElementById(oId);
    if (oDiv != null)
        oDiv.innerHTML = '';
}


function AfficherFlocon(){
    var divWait, divGrise;
    divWait = document.getElementById('DivWait');
    divGrise = document.getElementById('faussePopupFlocon');
    if (divWait != null)
    {
        document.getElementById('DivWait').style.visibility = 'visible';
        if (divGrise != null)
            document.getElementById('faussePopupFlocon').style.display = 'block';
    }
}

function CacherFlocon(){
    var divWait, divGrise;
    divWait = document.getElementById('DivWait');
    divGrise = document.getElementById('faussePopupFlocon');
    if (divWait != null)
    {
        document.getElementById('DivWait').style.visibility = 'hidden';
        if (divGrise != null)
            document.getElementById('faussePopupFlocon').style.display = 'none';
    }
}


function LogoSkibedTransp(){
    quelsrc="/statique/fr/image/logo-skibed.png";
    quelimg=document.getElementById('logoSkibedV2');

    quelimg.runtimeStyle.backgroundImage = "none",
    quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
    quelimg.src = "/image/transparent.gif"

}
function LogoSkibedTranspSum(){
    quelsrc="/statique/fr/image/logo-summerbed.png";
    quelimg=document.getElementById('logoSkibedV2');

    quelimg.runtimeStyle.backgroundImage = "none",
    quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
    quelimg.src = "/image/transparent.gif"

}

function DrapeauxSkibedTransp(){
    quelsrc="/image/menuV2/menu-drap-fr-off.png";
    quelimg=document.getElementById('drapeauFrV2');

    quelimg.runtimeStyle.backgroundImage = "none",
    quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
    quelimg.src = "/image/transparent.gif"
}



function PictoGarantieNeigeHomeTransp(quelLang){

quelsrc="/statique/"+quelLang+"/image/colonne-droite-we-off.png";
 quelimg=document.getElementById('pictoGarantieNeigeHomeV2');
quelimg.runtimeStyle.backgroundImage = "none",
quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
quelimg.src = "/image/transparent.gif"

quelsrc2="/image/croix-h1n1-V2-off.png";
 quelimg2=document.getElementById('pictoGrippeH1N1');
quelimg2.runtimeStyle.backgroundImage = "none",
quelimg2.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc2 + "', sizingMethod='image')",
quelimg2.src = "/image/transparent.gif"
//logoSkibedV2


}

function RollOverPictoWeekend(quelLang){
    if (vIE()==6){
      
     
quelsrc="/statique/"+quelLang+"/image/colonne-droite-we-on.png";
 quelimg=document.getElementById('pictoGarantieNeigeHomeV2');
quelimg.runtimeStyle.backgroundImage = "none",
quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
quelimg.src = "/image/transparent.gif"

    }
    else{
     document.getElementById('pictoGarantieNeigeHomeV2').src='/statique/'+quelLang+'/image/colonne-droite-we-on.png'; 
    }
}
function RollOutPictoWeekend(quelLang){

if (vIE()==6){
      
     
quelsrc="/statique/"+quelLang+"/image/colonne-droite-we-off.png";
 quelimg=document.getElementById('pictoGarantieNeigeHomeV2');
quelimg.runtimeStyle.backgroundImage = "none",
quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
quelimg.src = "/image/transparent.gif"

    }
    else{
     document.getElementById('pictoGarantieNeigeHomeV2').src='/statique/'+quelLang+'/image/colonne-droite-we-off.png'; 
    }
}

/*Gestion roll over colonne droite Offre eurogroupe Ete Hiver*/
function PictoEteHiverHomeTransp(quelLang){

    quelsrc="/statique/"+quelLang+"/image/colonne-droite-hiver-ete-off.png";
    quelimg=document.getElementById('pictoEteHiverHomeV2');
    quelimg.runtimeStyle.backgroundImage = "none",
    quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
    quelimg.src = "/image/transparent.gif"


}

function RollOverPictoEteHiver(quelLang){
    if (vIE()==6){
      
             
        quelsrc="/statique/"+quelLang+"/image/colonne-droite-hiver-ete-on.png";
        quelimg=document.getElementById('pictoEteHiverHomeV2');
        quelimg.runtimeStyle.backgroundImage = "none",
        quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
        quelimg.src = "/image/transparent.gif"

    }
    else{
     document.getElementById('pictoEteHiverHomeV2').src='/statique/'+quelLang+'/image/colonne-droite-hiver-ete-on.png'; 
    }
}
function RollOutPictoEteHiver(quelLang){

if (vIE()==6){
      
     
quelsrc="/statique/"+quelLang+"/image/colonne-droite-hiver-ete-off.png";
 quelimg=document.getElementById('pictoEteHiverHomeV2');
quelimg.runtimeStyle.backgroundImage = "none",
quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
quelimg.src = "/image/transparent.gif"

    }
    else{
     document.getElementById('pictoEteHiverHomeV2').src='/statique/'+quelLang+'/image/colonne-droite-hiver-ete-off.png'; 
    }
}

/*Fin gestion roll over colonne droite Offre eurogroupe Ete Hiver*/
function rollOverCroixGrippeColonneDroite(){
    if (vIE()==6){
          
         
    quelsrc="/image/croix-h1n1-V2-on.png";
     quelimg=document.getElementById('pictoGrippeH1N1');
    quelimg.runtimeStyle.backgroundImage = "none",
    quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
    quelimg.src = "/image/transparent.gif"

    }
    else{
     document.getElementById('pictoGrippeH1N1').src='/image/croix-h1n1-V2-on.png'; 
    
    }
 //   document.getElementById('ctl00_cphAccueil_MLLabel11').style.color="#FF0000";
}

function rollOutCroixGrippeColonneDroite(){
 if (vIE()==6){
          
         
    quelsrc="/image/croix-h1n1-V2-off.png";
     quelimg=document.getElementById('pictoGrippeH1N1');
    quelimg.runtimeStyle.backgroundImage = "none",
    quelimg.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + quelsrc + "', sizingMethod='image')",
    quelimg.src = "/image/transparent.gif"

    }
    else{
   //  document.getElementById('pictoGrippeH1N1').src='/image/croix-h1n1-V2-off.png'; 
    
    }
   
   // document.getElementById('ctl00_cphAccueil_MLLabel11').style.color="#0D2F85";
}
function ouvrirPopupGrippeH1N1(){

    if ( document.getElementById('popupGrippeAH1N1')){
     document.getElementById('popupGrippeAH1N1').style.display="block";
    }
    PositionnerPopup('popupGrippeAH1N1');
}
function fermerPopupGrippeH1N1(){
    if ( document.getElementById('popupGrippeAH1N1')){
     document.getElementById('popupGrippeAH1N1').style.display="none";
    }
}

/*Gestion Popup Accueil Eurogroupe Ete Hiver*/
function ouvrirPopupEteHiver(){

    if ( document.getElementById('popupEteHiver')){
     document.getElementById('popupEteHiver').style.display="block";
     document.getElementById('faussePopupFlocon').style.display = 'block';
    }
    PositionnerPopup('popupEteHiver');
}
function fermerPopupEteHiver(){
    if ( document.getElementById('popupEteHiver')){
     document.getElementById('popupEteHiver').style.display="none";
     document.getElementById('faussePopupFlocon').style.display = 'none';
    }
}
/*FIN Gestion Popup Accueil Eurogroupe Ete Hiver*/

/*Gestion Popup Offre Eurogroupe Ete Hiver*/
function ouvrirPopupEteHiverOffre(){

    if ( document.getElementById('popupEteHiverOffre')){
     document.getElementById('popupEteHiverOffre').style.display="block";
     document.getElementById('faussePopupFlocon').style.display = 'block';
    }
    PositionnerPopup('popupEteHiverOffre');
}
function fermerPopupEteHiverOffre(){
    if ( document.getElementById('popupEteHiverOffre')){
     document.getElementById('popupEteHiverOffre').style.display="none";
     document.getElementById('faussePopupFlocon').style.display = 'none';
    }
}
/*FIN Gestion Popup Offre Eurogroupe Ete Hiver*/

function fermerPopupTelechargerFlash(){
    if ( document.getElementById('divtelechargerFlash')){
     document.getElementById('divtelechargerFlash').style.display="none";
    }
}
function ouvrirPopupControleAge(){

    if ( document.getElementById('popupControleAge')){
     document.getElementById('popupControleAge').style.display="block";
    }
    PositionnerPopupControleAge();
    //PositionnerPopup('popupControleAge');
}

function fermerPopupControleAge(){
    if ( document.getElementById('popupControleAge')){
     document.getElementById('popupControleAge').style.display="none";
    }
}

function telecommanderedirection(s) {
    location.href = s;
}


function PositionnerPopupControleAge(){
emplacementLeftFlecheControleAge=GetDomOffset(document.getElementById('flecheControleAge'), 'offsetLeft' );  
emplacementTopFlecheControleAge=GetDomOffset(document.getElementById('flecheControleAge'), 'offsetTop' );  

emplacementLeftMenuAge=GetDomOffset(document.getElementById('EmplmtPopupIndicationAgeHotel'), 'offsetLeft' );  
emplacementTopMenuAge=GetDomOffset(document.getElementById('EmplmtPopupIndicationAgeHotel'), 'offsetTop' );  

 document.getElementById('popupControleAge').style.left=emplacementLeftMenuAge+190+"px";
 document.getElementById('popupControleAge').style.top=emplacementTopMenuAge-10+"px";

}


function setCook(nom,valeur) {
    document.cookie = nom + "=" + valeur
}
function getCook(nom) {
    deb = document.cookie.indexOf(nom + "=")
    if (deb >= 0) {
        deb += nom.length + 1
        fin = document.cookie.indexOf(";",deb)
        if (fin < 0) fin = document.cookie.length
        return unescape(document.cookie.substring(deb,fin))
        }
    return ""
}

function AfficherPopupOffreEuroGroup() {
var href;

    if (navigator.appName=='Microsoft Internet Explorer') {
         href = document.URL.toString();
    }
    else{
         href = window.location.href;
    }

    if (href.indexOf(".co.uk") != -1){
     
       
    }
    else{

         var ck = getCook('offreEuroGroup');
        
        if (ck!='offreEuroGroup'){
            ouvrirPopupEteHiver();
        }
        setCook('offreEuroGroup','offreEuroGroup');
    }
    
       


    }
    
    
function PositionnerBtnVoirOffresCarte(){
taillemenu=basDivMenuBas('voirToutesOffresStationCarte3DV2');

document.getElementById('voirToutesOffresStationCarte3DV2').style.marginLeft=((724/2)-(taillemenu/2))+"px";

}
/*Gestion telecharger Flash*/

 function ouvertureTelechargerFlash(){
      divGrise = document.getElementById('faussePopupFlocon');
      if (divGrise){
           divGrise.style.display = 'block';
            tailleAnimFlashHauteur=document.getElementById('animFlash').offsetHeight;
            tailleAnimFlashWidth=document.body.offsetWidth;
            var largFenetre=document.body.offsetWidth;
              // alert(largFenetre);
             if (largFenetre<1260){
                  largFenetre='1260';
              }

					
					document.getElementById('faussePopupFlocon').style.width=tailleAnimFlashWidth+"px";
					document.getElementById('faussePopupFlocon').style.height=tailleAnimFlashHauteur+"px";
					document.getElementById('faussePopupFlocon').style.zIndex=200;

    }
    document.getElementById('divtelechargerFlash').style.display = 'block';
   // document.getElementById('divtelechargerFlash').style.left=(basDivMenuBas('tableauMenuBas')/2)-(basDivMenuBas('divtelechargerFlash')/2)+"px";
 }
 
 function fermertureTelechargerFlash(){
      divGrise = document.getElementById('faussePopupFlocon');
      if (divGrise){
           divGrise.style.display = 'none';
    }
    document.getElementById('divtelechargerFlash').style.display = 'none';
   // document.getElementById('divtelechargerFlash').style.left=(basDivMenuBas('tableauMenuBas')/2)-(basDivMenuBas('divtelechargerFlash')/2)+"px";
 }
/**/
//gestion retour jeu concours
 function ouvertureDivMercijeuConcours(){
 
      divGrise = document.getElementById('faussePopupFlocon');
      if (divGrise){
           divGrise.style.display = 'block';
    }
     
LoadHTML('/ucwrapper/cms.aspx?ressource=SkibedV2_popupMerciConcours', 'imgMerciConcours');  
      document.getElementById('MerciJeuConcours').style.display = 'block';
     document.getElementById('spanMerciConcours').style.display = 'block';
     document.getElementById('MerciJeuConcours').style.left=(basDivMenuBas('tableauMenuBas')/2)-(basDivMenuBas('MerciJeuConcours')/2)+"px";
   
    }
    
    
function fermeturePopupMerciConcours(){
document.getElementById('faussePopupFlocon').style.display = 'none';
document.getElementById('MerciJeuConcours').style.display="none";
document.getElementById('spanMerciConcours').style.display="none";
    

}    
//gestion popupFaceBook


 function ouvertureDivFanFaceBook(){
 
      divGrise = document.getElementById('faussePopupFlocon');
      if (divGrise){
           divGrise.style.display = 'block';
    }
    document.getElementById('FanFacebook').style.visibility="visible";
   LoadHTML('/ucwrapper/cms.aspx?ressource=SkibedV2_ContenuPopup_FanSkibedFaceBook', 'contenuDivPopupFanFaceBook');
    document.getElementById('titrePopupFaceBook').style.display="block";
   document.getElementById('FanFacebook').style.left=(basDivMenuBas('tableauMenuBas')/2)-(basDivMenuBas('FanFacebook')/2)+"px";
   
    
    }
function GetCookie(name) {
     var startIndex = document.cookie.indexOf(name);
     if (startIndex != -1) {
          var endIndex = document.cookie.indexOf(";", startIndex);
      
              if (endIndex == -1){ 
                endIndex = document.cookie.length;
              }
          
          return unescape(document.cookie.substring(startIndex+name.length+1, endIndex));
          
     }
     else {
          var expire = new Date ();
          expire.setTime (expire.getTime() + (24 * 60 * 60 * 1000) * 100);
          document.cookie = name + "=" + escape('ski-0910-fr-divers-Facebook') + "; expires="; 
          ouvertureDivFanFaceBook();
     }
}
function fermeturePopupFanSkibedFaceBook(){
document.getElementById('faussePopupFlocon').style.display = 'none';

    document.getElementById('FanFacebook').style.visibility="hidden";

}



function SiteEnCours(){
    var href;

    if (navigator.appName=='Microsoft Internet Explorer') {
         href = document.URL.toString();
    }
    else{
         href = window.location.href;
    }

    if ((href.indexOf(".summerbed.") != -1) ||( href.indexOf(":8088") != -1)){
     
        return "Summerbed"
    }
    else{

        return "Skibed";
    }




}

function montreEteHiver(quel) {
	if(i==false) {
		document.getElementById("curseurEteHiver").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securitÃ©) on le rend visible.
		
		if (quel=='1'){
		   document.getElementById("txtInfosBullesEteHiver").innerHTML = document.getElementById("txtEteHiver1Avant").innerHTML;  
		}
		if (quel=='2'){
		    document.getElementById("txtInfosBullesEteHiver").innerHTML = document.getElementById("txtEteHiver2Avant").innerHTML;
		}
		
		i=true;
	}
}
function cacheEteHiver() {
	if(i==true) {
		GetId("curseurEteHiver").style.visibility="hidden"; // Si la bulle etais visible on la cache
		i=false;
	}
}

function montreEteHiverPromo(quel) {
	if(i==false) {
	document.getElementById("curseurEteHiverPromo").style.display="block"; 
		document.getElementById("curseurEteHiverPromo").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securitÃ©) on le rend visible.
		i=true;
	}
}
function cacheEteHiverPromo() {
	if(i==true) {
	document.getElementById("curseurEteHiverPromo").style.display="none";
		GetId("curseurEteHiverPromo").style.visibility="hidden"; // Si la bulle etais visible on la cache
		i=false;
	}
}


// RAZ des cookies du fil d'Ariane
function ResetCookiesFilAriane(NomCookieCriteres, NomCookieDernierCritere, RappelOffresNomCookie)
{
    setCookie(NomCookieCriteres, '', '/');
    setCookie(NomCookieDernierCritere, '', '/');
    setCookie(RappelOffresNomCookie, '0', '/');
}


// gestion des cookies en JS
function setCookie(name, value, path) {
    var s;
    s = name + "=" + escape(value) + ((path) ? "; path=" + path : "");
    document.cookie = s;
}

function setCookieV2(name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) +
	    ((expires) ? "; expires=" + expires.toGMTString() : "") +
	    ((path) ? "; path=" + path : "") +
	    ((domain) ? "; domain=" + domain : "") +
	    ((secure) ? "; secure" : "");
    document.cookie = curCookie;
}


function inclusion(fichier) {
    if (fichier.search('\.js') >= 0) {
        var js_effets=document.createElement("script");
        js_effets.setAttribute("type", "text/javascript");
        js_effets.setAttribute("src", fichier);
        document.getElementsByTagName("head")[0].appendChild(js_effets);
    } else {
        var css_style=document.createElement("link");
        css_style.setAttribute("rel", "stylesheet");
        css_style.setAttribute("type", "text/css");
        css_style.setAttribute("href", fichier);
        css_style.setAttribute("media", "screen");
        document.getElementsByTagName("head")[0].appendChild(css_style);
    }
}

function quelPrechargImagesFichesSum(quelDestination){
    if(quelDestination=='1') {
      prechargeImagesFicheSumMer();
    }
    if(quelDestination=='2') {
     prechargeImagesFicheSumMontagne();
    }
    if(quelDestination=='3') {
      prechargeImagesFicheSumCampagne();
    }

}
function prechargeImagesFicheSumMer(){


btnOnglet1 = new Image();
btnOnglet1.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-01-roll.png";
btnOnglet2 = new Image();
btnOnglet2.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-02-roll.png";
btnOnglet3 = new Image();
btnOnglet3.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-03-roll.png";
btnOnglet4 = new Image();
btnOnglet4.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-04-roll.png";
btnOnglet5 = new Image();
btnOnglet5.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-05-roll.png";
btnOnglet6 = new Image();
btnOnglet6.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-01-on.png";
btnOnglet7 = new Image();
btnOnglet7.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-02-on.png";
btnOnglet8 = new Image();
btnOnglet8.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-03-on.png";
btnOnglet9 = new Image();
btnOnglet9.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-04-on.png";
btnOnglet10 = new Image();
btnOnglet10.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-05-on.png";
btnOnglet11 = new Image();
btnOnglet11.src = "/statique/fr/image/fiche-mer/fiche-summer-ongl-01-off.png";


}
function prechargeImagesFicheSumMontagne(){

btnOnglet1 = new Image();
btnOnglet1.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-01-roll.png";
btnOnglet2 = new Image();
btnOnglet2.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-02-roll.png";
btnOnglet3 = new Image();
btnOnglet3.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-03-roll.png";
btnOnglet4 = new Image();
btnOnglet4.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-04-roll.png";
btnOnglet5 = new Image();
btnOnglet5.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-05-roll.png";
btnOnglet6 = new Image();
btnOnglet6.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-01-on.png";
btnOnglet7 = new Image();
btnOnglet7.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-02-on.png";
btnOnglet8 = new Image();
btnOnglet8.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-03-on.png";
btnOnglet9 = new Image();
btnOnglet9.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-04-on.png";
btnOnglet10 = new Image();
btnOnglet10.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-05-on.png";
btnOnglet11 = new Image();
btnOnglet11.src = "/statique/fr/image/fiche-montagne/fiche-summer-ongl-01-off.png";


}
function prechargeImagesFicheSumCampagne(){

btnOnglet1 = new Image();
btnOnglet1.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-01-roll.png";
btnOnglet2 = new Image();
btnOnglet2.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-02-roll.png";
btnOnglet3 = new Image();
btnOnglet3.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-03-roll.png";
btnOnglet4 = new Image();
btnOnglet4.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-04-roll.png";
btnOnglet5 = new Image();
btnOnglet5.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-05-roll.png";
btnOnglet6 = new Image();
btnOnglet6.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-01-on.png";
btnOnglet7 = new Image();
btnOnglet7.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-02-on.png";
btnOnglet8 = new Image();
btnOnglet8.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-03-on.png";
btnOnglet9 = new Image();
btnOnglet9.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-04-on.png";
btnOnglet10 = new Image();
btnOnglet10.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-05-off.png";
btnOnglet11 = new Image();
btnOnglet11.src = "/statique/fr/image/fiche-campagne/fiche-summer-ongl-01-off.png";

}