
// Copyright @2008 NovaBoost 
// Any copy is strictly forbidden


        function displaycontent() {  
            $('rightcol').appear();    
        }
        
        function hidemaincontent() {  
            $('maincontent').style.visibility = 'hidden';  
        }
        function showmaincontent() {  
            $('maincontent').style.visibility = 'visible';  
        }


        function overcollection() {
            var main1=document.getElementById('main');
            main1.style.backgroundImage = 'url(images/Collection-Hover.jpg)';
            hidemaincontent();
        }  
         function out() {
            var main1=document.getElementById('main');
            main1.style.backgroundImage = 'url(images/BackGround.jpg)';
            showmaincontent()
        }     
        function overcommunication() {
            var main1=document.getElementById('main');
            main1.style.backgroundImage = 'url(images/Communication-Hover.jpg)';
            hidemaincontent();
        }  
         
        function overhistorique() {
            var main1=document.getElementById('main');
            main1.style.backgroundImage = 'url(images/Historique-Hover.jpg)';
            hidemaincontent();
        }  
        
        function overdistributeurs() {
            var main1=document.getElementById('main');
            main1.style.backgroundImage = 'url(images/Distributeurs-Hover.jpg)';
            hidemaincontent();
        }     
                        
        function nextphoto() {
            var i = $('counter').value; 
            var nextvalue = parseInt(i) + 1;  
            var nextnextvalue = parseInt(i) + 2;  
            var picactive = 'P'+ i;
            var picnext = 'P'+ nextvalue;
            var picnextnext = 'P'+ nextnextvalue;
            var btnprevious = document.getElementById('btnprevious');
            var btnnext = document.getElementById('btnnext');
                  
            $('counter').value = nextvalue;
         
            if (parseInt(i) >= 1) {
                btnprevious.style.display = "inline";
            }
            else
            {
                btnprevious.style.display = "none";
            }
         
            if ($(picnextnext)) { 
                   btnnext.style.display = "inline";
                   }
                   else {
                   btnnext.style.display = "none";
                   }   
          
                $(picactive).fade({ duration:0.2 });
               
                
            if ($(picnext)) {          
                setTimeout('shownext(' + nextvalue + ')', 400);  
                $('counter').value = nextvalue;                
            }                
                                   
        }   
             
        function previousphoto() {
            var i = $('counter').value; 
            var previousvalue = parseInt(i) - 1;              
            var picactive = 'P'+ i;
            var picprevious = 'P'+ previousvalue;
            var btnprevious = document.getElementById('btnprevious');
            var btnnext = document.getElementById('btnnext');
            
                 
            if (previousvalue <= 1) {
                btnnext.style.display = "inline";
                btnprevious.style.display = "none";
                $('counter').value = '1';
                }
                else
                {
                $('counter').value = previousvalue;
                btnprevious.style.display = "inline";
                btnnext.style.display = "inline";
                }      
            
                $(picactive).fade({ duration:0.2 });  
            
                    
            setTimeout('shownext(' + previousvalue + ')', 400);                        
        }        
        
        function shownext(itemnext) {            
            
                new Effect.Appear('P' + itemnext, { direction:'top-left' });
               
        }        
      
    var Index1 = 0;   
    var ImgToReveal = new Image;
    var ImgToHide = new Image;
    var MainImg = []; // preloading array
    var nbPhotos;
    
    function Slideshow(items) {
        nbPhotos = items.length;
        for (i=0; i < nbPhotos; i++) {       
            var Path = items[i];   
            MainImg[i] = new Image();
            
            MainImg[i].src = Path; 
                      
        }     
        Index1=0;       
        setTimeout("RevealImgV2()", 300);
              
    }      
    
    function RevealImgV2() {
    
        ImgToReveal = document.getElementById("ImgSlideshow");
        
        ImgToReveal.src = MainImg[Index1].src;
        
        if (ImgToReveal) {
        
            if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent))
                {
                
                ImgToReveal.style.display = 'block';
                }
            else {
                new Effect.Appear(ImgToReveal, { duration:1.0 });
                         
            }   
            setTimeout("HideImgV2()", 5000);
            setTimeout("RevealImgV2()", 5520);    
        
        
            
        }
    }
    
    function HideImgV2() {
    
        ImgToReveal = document.getElementById("ImgSlideshow");
        ImgToReveal.src = MainImg[Index1].src;
        if (ImgToReveal) {
        
        if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent))
                {
                ImgToReveal.style.display = 'none';
                }
            else {
                new Effect.Fade(ImgToReveal, { duration:0.5 });                         
            }      
            
            Index1+=1;
            if (Index1 >= nbPhotos) Index1=0;
        }
    }
    
    function displaycontenthistorique() {
            $('rightcolhistorique').appear();  
            
         }
    
    function selectonclick(item) {
        changephotout($('selectedcollection').value);
        $('selectedcollection').value = item;
        changeborder(item);  
        $('bottom').style.display = 'block';
        $('btnprevious').style.display = "none";
        $('btnnext').style.display = "block";
        changephotohover(item);
        
    }
    
    function changeborder(item) {
            var i;
            var divitem = 'DB' + item;
            var divselected = parseInt(item);
            var divi;
            for (i=1; i<=7; i++){
                var j = i+'' 
                divi =  'DB' + j;
                if (i != $('selectedcollection').value) {
                    if (i == divselected) { 
                        $(divi).style.border = 'solid 1px #ffffff';
                        }
                        else
                        {
                        $(divi).style.border = 'solid 1px #a9a9a9';
                        }
                    }
            }         
        
        }
        
    
    function changephotohover(item) {
    
        switch (item) {
                case '1':
                    if ($('pagelanguage').value == 'fr') {
                        $('ImgD1').src = 'Images/CollectionsButtons/Collect1hover.jpg';
                        }
                        else
                        {
                        $('ImgD1').src = 'Images/CollectionsButtons/Collect1hoverEN.jpg';
                        }
                    break;
                case '2':
                    if ($('pagelanguage').value == 'fr') {
                        $('ImgD2').src = 'Images/CollectionsButtons/Collect2hover.jpg';
                        }
                        else
                        {
                        $('ImgD2').src = 'Images/CollectionsButtons/Collect2hoverEN.jpg';
                        }
                    break;
                case '3':
                    $('ImgD3').src = 'Images/CollectionsButtons/Collect3hover.jpg';
                    break;
                case '4':
                    if ($('pagelanguage').value == 'fr') {
                        $('ImgD4').src = 'Images/CollectionsButtons/Collect4hover.jpg';
                        }
                        else
                        {
                        $('ImgD4').src = 'Images/CollectionsButtons/Collect4hoverEN.jpg';
                        }          
                    break;
                case '5':                    
                        $('ImgD5').src = 'Images/CollectionsButtons/Collect5hover.jpg';
                    break;
                case '6':
                    if ($('pagelanguage').value == 'fr') {
                        $('ImgD6').src = 'Images/CollectionsButtons/Collect6hover.jpg';
                        }
                        else
                        {
                        $('ImgD6').src = 'Images/CollectionsButtons/Collect6hoverEN.jpg';
                        }     
                    break;
                case '7':
                    $('ImgD7').src = 'Images/CollectionsButtons/Collect7hover.jpg';
                    break;
                }   
             
    }   
    
    function changephotout(item) {
    
        switch (item) {
                case '1':
                    if ($('pagelanguage').value == 'fr') {
                        $('ImgD1').src = 'Images/CollectionsButtons/Collect1out.jpg';
                        }
                        else
                        {
                        $('ImgD1').src = 'Images/CollectionsButtons/Collect1outEN.jpg';
                        }
                    break;
                case '2':
                    if ($('pagelanguage').value == 'fr') {
                        $('ImgD2').src = 'Images/CollectionsButtons/Collect2out.jpg';
                        }
                        else
                        {
                        $('ImgD2').src = 'Images/CollectionsButtons/Collect2outEN.jpg';
                        }
                    break;
                case '3':
                    $('ImgD3').src = 'Images/CollectionsButtons/Collect3out.jpg';
                    break;
                case '4':
                    if ($('pagelanguage').value == 'fr') {
                        $('ImgD4').src = 'Images/CollectionsButtons/Collect4out.jpg';
                        }
                        else
                        {
                        $('ImgD4').src = 'Images/CollectionsButtons/Collect4outEN.jpg';
                        }          
                    break;
                case '5':                    
                        $('ImgD5').src = 'Images/CollectionsButtons/Collect5out.jpg';
                    break;
                case '6':
                    if ($('pagelanguage').value == 'fr') {
                        $('ImgD6').src = 'Images/CollectionsButtons/Collect6out.jpg';
                        }
                        else
                        {
                        $('ImgD6').src = 'Images/CollectionsButtons/Collect6outEN.jpg';
                        }     
                    break;
                case '7':
                    $('ImgD7').src = 'Images/CollectionsButtons/Collect7out.jpg';
                    break;
                }   
             
    }   
    
    function showhover(item) {    
        
        var Dvalue = item.id;
        var smallpic = $('smallpic');
        var hoverdiv = $('hoverdiv');
        
        $('bottom').style.visibility = 'hidden';
        switch (Dvalue) { 
            case 'D1':                                        
                               
                $('hoverpic1').style.visibility = 'visible';                               
                $('hoverpic2').style.visibility = 'hidden';
                $('hoverpic3').style.visibility = 'hidden';
                $('hoverpic4').style.visibility = 'hidden';
                $('hoverpic5').style.visibility = 'hidden';
                $('hoverpic6').style.visibility = 'hidden';
                $('hoverpic7').style.visibility = 'hidden';
                
                $('ImgT1').style.visibility = 'visible';
                $('ImgT2').style.visibility = 'hidden';
                $('ImgT3').style.visibility = 'hidden';
                $('ImgT4').style.visibility = 'hidden';
                
                $('Txt1').style.visibility = 'visible';
                $('Txt2').style.visibility = 'hidden';
                $('Txt3').style.visibility = 'hidden';
                $('Txt4').style.visibility = 'hidden';
                
                changeborder('1');
                changephotohover('1');
                break;                 
            case 'D2': 
                $('hoverpic1').style.visibility = 'hidden';
                $('hoverpic2').style.visibility = 'visible';
                $('hoverpic3').style.visibility = 'hidden';
                $('hoverpic4').style.visibility = 'hidden';
                $('hoverpic5').style.visibility = 'hidden';
                $('hoverpic6').style.visibility = 'hidden';
                $('hoverpic7').style.visibility = 'hidden';
                
                $('ImgT1').style.visibility = 'visible';
                $('ImgT2').style.visibility = 'hidden';
                $('ImgT3').style.visibility = 'hidden';
                $('ImgT4').style.visibility = 'hidden';
                
                $('Txt1').style.visibility = 'visible';
                $('Txt2').style.visibility = 'hidden';
                $('Txt3').style.visibility = 'hidden';
                $('Txt4').style.visibility = 'hidden';
                
                changeborder('2');
                changephotohover('2');
                break;                
            case 'D3': 
                $('hoverpic1').style.visibility = 'hidden';
                $('hoverpic2').style.visibility = 'hidden';
                $('hoverpic3').style.visibility = 'visible';
                $('hoverpic4').style.visibility = 'hidden';
                $('hoverpic5').style.visibility = 'hidden';
                $('hoverpic6').style.visibility = 'hidden';
                $('hoverpic7').style.visibility = 'hidden';
                
                $('ImgT1').style.visibility = 'hidden';
                $('ImgT2').style.visibility = 'visible';
                $('ImgT3').style.visibility = 'hidden';
                $('ImgT4').style.visibility = 'hidden';
                
                $('Txt1').style.visibility = 'hidden';
                $('Txt2').style.visibility = 'visible';
                $('Txt3').style.visibility = 'hidden';
                $('Txt4').style.visibility = 'hidden';
                
                changeborder('3');
                changephotohover('3');
                break;
            case 'D4': 
                $('hoverpic1').style.visibility = 'hidden';
                $('hoverpic2').style.visibility = 'hidden';
                $('hoverpic3').style.visibility = 'hidden';
                $('hoverpic4').style.visibility = 'visible';
                $('hoverpic5').style.visibility = 'hidden';
                $('hoverpic6').style.visibility = 'hidden';
                $('hoverpic7').style.visibility = 'hidden';
                
                $('ImgT1').style.visibility = 'hidden';
                $('ImgT2').style.visibility = 'visible';
                $('ImgT3').style.visibility = 'hidden';
                $('ImgT4').style.visibility = 'hidden';
                
                $('Txt1').style.visibility = 'hidden';
                $('Txt2').style.visibility = 'visible';
                $('Txt3').style.visibility = 'hidden';
                $('Txt4').style.visibility = 'hidden';
                
                changeborder('4');
                changephotohover('4');
                break;
            case 'D5': 
                $('hoverpic1').style.visibility = 'hidden';
                $('hoverpic2').style.visibility = 'hidden';
                $('hoverpic3').style.visibility = 'hidden';
                $('hoverpic4').style.visibility = 'hidden';
                $('hoverpic5').style.visibility = 'visible';
                $('hoverpic6').style.visibility = 'hidden';
                $('hoverpic7').style.visibility = 'hidden';
                
                $('ImgT1').style.visibility = 'hidden';
                $('ImgT2').style.visibility = 'hidden';
                $('ImgT3').style.visibility = 'visible';
                $('ImgT4').style.visibility = 'hidden';
                
                $('Txt1').style.visibility = 'hidden';
                $('Txt2').style.visibility = 'hidden';
                $('Txt3').style.visibility = 'visible';
                $('Txt4').style.visibility = 'hidden';
                
                changeborder('5');
                changephotohover('5');
               
                break;
            case 'D6':
            $('hoverpic1').style.visibility = 'hidden';
                $('hoverpic2').style.visibility = 'hidden';
                $('hoverpic3').style.visibility = 'hidden';
                $('hoverpic4').style.visibility = 'hidden';
                $('hoverpic5').style.visibility = 'hidden';
                $('hoverpic6').style.visibility = 'visible';
                $('hoverpic7').style.visibility = 'hidden';
            
            
                $('ImgT1').style.visibility = 'hidden';
                $('ImgT2').style.visibility = 'hidden';
                $('ImgT3').style.visibility = 'visible';
                $('ImgT4').style.visibility = 'hidden';
                
                $('Txt1').style.visibility = 'hidden';
                $('Txt2').style.visibility = 'hidden';
                $('Txt3').style.visibility = 'visible';
                $('Txt4').style.visibility = 'hidden';
                
                changeborder('6');
                changephotohover('6');
                break;
            
            case 'D7':
            
                $('hoverpic1').style.visibility = 'hidden';
                $('hoverpic2').style.visibility = 'hidden';
                $('hoverpic3').style.visibility = 'hidden';
                $('hoverpic4').style.visibility = 'hidden';
                $('hoverpic5').style.visibility = 'hidden';
                $('hoverpic6').style.visibility = 'hidden';
                $('hoverpic7').style.visibility = 'visible';
                
                $('ImgT1').style.visibility = 'hidden';
                $('ImgT2').style.visibility = 'hidden';
                $('ImgT3').style.visibility = 'hidden';
                $('ImgT4').style.visibility = 'visible';
                
                $('Txt1').style.visibility = 'hidden';
                $('Txt2').style.visibility = 'hidden';
                $('Txt3').style.visibility = 'hidden';
                $('Txt4').style.visibility = 'visible';
                
                changeborder('7');
                changephotohover('7');
                break;
        }        
    
    }    
    
    function hidehover(item) {
        
        $('hoverpic1').style.visibility = 'hidden';
        $('hoverpic2').style.visibility = 'hidden';
        $('hoverpic3').style.visibility = 'hidden';
        $('hoverpic4').style.visibility = 'hidden';
        $('hoverpic5').style.visibility = 'hidden';
        $('hoverpic6').style.visibility = 'hidden';
        $('hoverpic7').style.visibility = 'hidden';
         
        $('ImgT1').style.visibility = 'hidden';
        $('ImgT2').style.visibility = 'hidden';
        $('ImgT3').style.visibility = 'hidden';
        $('ImgT4').style.visibility = 'hidden';
        
        $('Txt1').style.visibility = 'hidden';
        $('Txt2').style.visibility = 'hidden';
        $('Txt3').style.visibility = 'hidden';
        $('Txt4').style.visibility = 'hidden';
                
        $('bottom').style.visibility = 'hidden';
        
        if (item != $('selectedcollection').value ) {
            
            changephotout(item);
            
            
            
            }
         
        switch ($('selectedcollection').value ) { 
                    case '1':                                        
                        $('ImgT1').style.visibility = 'visible';
                        break;
                    case '2':                                        
                        $('ImgT1').style.visibility = 'visible';
                        break;
                     case '3':                                        
                        $('ImgT2').style.visibility = 'visible';
                        break;
                    case '4':                                        
                        $('ImgT2').style.visibility = 'visible';
                        break;
                    case '5':                                        
                        $('ImgT3').style.visibility = 'visible';
                        break;
                    case '6':                                        
                        $('ImgT3').style.visibility = 'visible';
                        break;
                    case '7':                                        
                        $('ImgT4').style.visibility = 'visible';
                        break;
            }
            
    }
    
    function showbottom() {
        $('bottom').style.visibility = 'visible';
    
    }
    
    function hideonclick() {
        
        $('hoverpic1').style.visibility = 'hidden';
        $('hoverpic2').style.visibility = 'hidden';
        $('hoverpic3').style.visibility = 'hidden';
        $('hoverpic4').style.visibility = 'hidden';
        $('hoverpic5').style.visibility = 'hidden';
        $('hoverpic6').style.visibility = 'hidden';
        $('hoverpic7').style.visibility = 'hidden';
        
              
        $('Txt1').style.visibility = 'hidden';
        $('Txt2').style.visibility = 'hidden';
        $('Txt3').style.visibility = 'hidden';
        $('Txt4').style.visibility = 'hidden';
         
        $('bottom').style.visibility = 'visible';
        
    }
    
  