
function Display (id)
{
  document.getElementById(id).style.display = 'block';
}
function Hide (id)
{
  document.getElementById(id).style.display = 'none';
}


bdp_2_on = new Image;
bdp_2_on.src = "http://ftp.mascotteo.com/img/bdp_2_on.gif";
bdp_2_off = new Image;
bdp_2_off.src = "http://ftp.mascotteo.com/img/bdp_2.gif";

bdp_3_on = new Image;
bdp_3_on.src = "http://ftp.mascotteo.com/img/bdp_3_on.gif";
bdp_3_off = new Image;
bdp_3_off.src = "http://ftp.mascotteo.com/img/bdp_3.gif";

bdp_4_on = new Image;
bdp_4_on.src = "http://ftp.mascotteo.com/img/bdp_4_on.gif";
bdp_4_off = new Image;
bdp_4_off.src = "http://ftp.mascotteo.com/img/bdp_4.gif";

bdp_5_on = new Image;
bdp_5_on.src = "http://ftp.mascotteo.com/img/bdp_5_on.gif";
bdp_5_off = new Image;
bdp_5_off.src = "http://ftp.mascotteo.com/img/bdp_5.gif";

bdp_6_on = new Image;
bdp_6_on.src = "http://ftp.mascotteo.com/img/bdp_6_on.gif";
bdp_6_off = new Image;
bdp_6_off.src = "http://ftp.mascotteo.com/img/bdp_6.gif";



var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])


function changeColors(name, img, color1)
{
  if (version < 7)
  {
    document.getElementById('caps_data_'+name+'').style.backgroundImage = "url(http://ftp.mascotteo.com/img/bg_caps_on.gif)";
  }
  else
  {
    document.getElementById('caps_data_'+name+'').style.backgroundImage = "url(http://ftp.mascotteo.com/img/bg_caps_on.png)";
  }
  
  document.getElementById('caps_data_'+name+'').style.color='#043d1d';
  document.getElementById('caps_'+name+'').style.borderColor='#'+color1+'';
}
function resetColors(name, img, color1, color3)
{
  if (version < 7)
  {
    document.getElementById('caps_data_'+name+'').style.backgroundImage = "url(http://ftp.mascotteo.com/img/bg_caps.gif)";
  }
  else
  {
    document.getElementById('caps_data_'+name+'').style.backgroundImage = "url(http://ftp.mascotteo.com/img/bg_caps.png)";
  }
  
  document.getElementById('caps_data_'+name+'').style.color='#'+color1+'';
  document.getElementById('caps_'+name+'').style.borderColor='#ffffff';
}

function changeColorsLight(name, img, color1)
{
  if (version < 7)
  {
    document.getElementById('light_caps_data_'+name+'').style.backgroundImage = "url(http://ftp.mascotteo.com/img/bg_caps_on.gif)";
  }
  else
  {
    document.getElementById('light_caps_data_'+name+'').style.backgroundImage = "url(http://ftp.mascotteo.com/img/bg_caps_on.png)";
  }
  
  document.getElementById('light_caps_data_'+name+'').style.color='#ffffff';
  document.getElementById('light_caps_'+name+'').style.borderColor='#'+color1+'';
}
function resetColorsLight(name, img, color1, color3)
{
  if (version < 7)
  {
    document.getElementById('light_caps_data_'+name+'').style.backgroundImage = "url(http://ftp.mascotteo.com/img/bg_caps.gif)";
  }
  else
  {
    document.getElementById('light_caps_data_'+name+'').style.backgroundImage = "url(http://ftp.mascotteo.com/img/bg_caps.png)";
  }
  
  document.getElementById('light_caps_data_'+name+'').style.color='#'+color1+'';
  document.getElementById('light_caps_'+name+'').style.borderColor='#ffffff';
}

function Hide_DS (id)
{
  Hide('DS_CONTENT_'+id+'');
  Hide('DS_TOP_'+id+'');
  Display('DS_TOP_OFF_'+id+'');
}
function Show_DS (id)
{
  Hide('DS_TOP_OFF_'+id+'');
  Display('DS_TOP_'+id+'');
  Display('DS_CONTENT_'+id+'');
}

function Show_DS_FETES ()
{
  Hide('DS_TOP_THEMES');
  Hide('DS_CONTENT_THEMES');
  Display('DS_TOP_OFF_THEMES');
  
  Hide('DS_TOP_LICENCES');
  Hide('DS_CONTENT_LICENCES');
  Display('DS_TOP_OFF_LICENCES');
  
  Hide('DS_TOP_OFF_FETES');
  Display('DS_TOP_FETES');
  Display('DS_CONTENT_FETES');
}

function Show_DS_THEMES ()
{
  Hide('DS_TOP_FETES');
  Hide('DS_CONTENT_FETES');
  Display('DS_TOP_OFF_FETES');
  
  Hide('DS_TOP_LICENCES');
  Hide('DS_CONTENT_LICENCES');
  Display('DS_TOP_OFF_LICENCES');
  
  Hide('DS_TOP_OFF_THEMES');
  Display('DS_TOP_THEMES');
  Display('DS_CONTENT_THEMES');
}

function Show_DS_LICENCES ()
{
  Hide('DS_TOP_FETES');
  Hide('DS_CONTENT_FETES');
  Display('DS_TOP_OFF_FETES');
  
  Hide('DS_TOP_THEMES');
  Hide('DS_CONTENT_THEMES');
  Display('DS_TOP_OFF_THEMES');
  
  Hide('DS_TOP_OFF_LICENCES');
  Display('DS_TOP_LICENCES');
  Display('DS_CONTENT_LICENCES');
}




function Hide_TS ()
{
  Hide('DS_TOP');
  Hide('DS_CONTENT');
  Hide('DS_BOTTOM');
  
  Display('DS_TOP_OFF');
  Display('DS_CONTENT_OFF');
}
function Show_TS ()
{
  Hide('DS_TOP_OFF');
  Hide('DS_BOTTOM_OFF');
  
  Display('DS_TOP');
  Display('DS_CONTENT');
  Display('DS_BOTTOM');
}



function Hide_BDC_0 ()
{
  Hide('bdc_idcat_active_0');
  Display('bdc_idcat_0');
}
function Show_BDC_0 ()
{
  Hide('bdc_idcat_0');
  Hide('bdc_idcat_active_1');
  Hide('bdc_idcat_active_2');

  Display('bdc_idcat_active_0');
  Display('bdc_idcat_1');
  Display('bdc_idcat_2');
}

function Hide_BDC_1 ()
{
  Hide('bdc_idcat_active_1');
  Display('bdc_idcat_1');
}
function Show_BDC_1 ()
{
  Hide('bdc_idcat_1');
  Hide('bdc_idcat_active_0');
  Hide('bdc_idcat_active_2');

  Display('bdc_idcat_active_1');
  Display('bdc_idcat_0');
  Display('bdc_idcat_2');
}

function Hide_BDC_2 ()
{
  Hide('bdc_idcat_active_2');
  Display('bdc_idcat_2');
}
function Show_BDC_2 ()
{
  Hide('bdc_idcat_2');
  Hide('bdc_idcat_active_0');
  Hide('bdc_idcat_active_1');

  Display('bdc_idcat_active_2');
  Display('bdc_idcat_0');
  Display('bdc_idcat_1');
}





function hover(obj){
  if(document.all){
    UL = obj.getElementsByTagName('ul');
  
    
  
    if(UL.length > 0){
      sousMenu = UL[0].style;
      if(sousMenu.display == 'none' || sousMenu.display == ''){
        sousMenu.display = 'block';

    if(obj.className=="level1")
    {
    obj.style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/repeat_li_on.gif)';
    obj.getElementsByTagName('a')[0].style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/round.gif)';
    obj.getElementsByTagName('a')[0].style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/round.gif)';
    
    }
      }else{
        sousMenu.display = 'none';

    if(obj.className=="level1")
    {
    obj.style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/repeat_li.gif)';
    obj.getElementsByTagName('a')[0].style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/round.gif)';    
    }
      }
    }
  else
  {
  
    if(obj.className=="acc" && (obj.style.backgroundImage == '' || obj.style.backgroundImage=="url(http://ftp.mascotteo.com/img/menu/acceuil.gif)"))
    {
      
      obj.style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/acceuil_on.gif)';
      
    }
    else if(obj.className=="acc" && obj.style.backgroundImage=='url(http://ftp.mascotteo.com/img/menu/acceuil_on.gif)')
    {
      obj.style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/acceuil.gif)';
      
    
    }
    
    if(obj.className=="contact" && (obj.style.backgroundImage == '' || obj.style.backgroundImage=="url(http://ftp.mascotteo.com/img/menu/contact.gif)"))
    {
      
      obj.style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/contact_on.gif)';
      
    }
    else if(obj.className=="contact" && obj.style.backgroundImage=='url(http://ftp.mascotteo.com/img/menu/contact_on.gif)')
    {
      obj.style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/contact.gif)';
      
    
    }
    
    if(obj.className=="level1" && (obj.style.backgroundImage == '' || obj.style.backgroundImage=="url(http://ftp.mascotteo.com/img/menu/repeat_li.gif)"))
    {
      
      obj.style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/repeat_li_on.gif)';
      
    }
    else if(obj.className=="level1" && obj.style.backgroundImage=='url(http://ftp.mascotteo.com/img/menu/repeat_li_on.gif)')
    {
      obj.style.backgroundImage='url(http://ftp.mascotteo.com/img/menu/repeat_li.gif)';
      
    
    }
  
  
  }
  }
}

function setHover(){
  LI = document.getElementById('menu').getElementsByTagName('li');
  nLI = LI.length;

  for(i=0; i < nLI; i++){
    LI[i].onmouseover = function()
    {    
      //if (document.getElementById && document.getElementById('visite')) 
      //{       
         //document.getElementById('visite').style.display='none';
      //}
      hover(this);
    }
    LI[i].onmouseout = function()
    {
      hover(this);
      //if (document.getElementById && document.getElementById('visite'))
      //{
        //document.getElementById('visite').style.display='block';
      //}
    }
  }
}

var newWin = null;
function closeWin(){
if (newWin != null){
if(!newWin.closed)
newWin.close();
}
}

function popUp(strURL,strType,strHeight,strWidth) {
closeWin();
var strOptions="";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
newWin = window.open(strURL, 'newWin', strOptions);
newWin.focus();
}

function PrintDeclinaisonChoice()
{
  var choice = document.getElementById('CHOICE').options[document.getElementById('CHOICE').options.selectedIndex].value ;
  
  if (tabArticles[choice].reference != "")
  {
    document.getElementById('reference').innerHTML = tabArticles[choice].reference;
  }
  
  if (tabArticles[choice].price2 != "")
  {
    document.getElementById('prix').innerHTML = "<span class=\"price\">"+tabArticles[choice].price2+"&nbsp;&euro;</span><br /><del>"+tabArticles[choice].price+"&nbsp;&euro;</del>";
  }
  else if (tabArticles[choice].price != "")
  {
    document.getElementById('prix').innerHTML = "<span class=\"price\">"+tabArticles[choice].price+"&nbsp;&euro;</span>";
  }
  else
  {
    document.getElementById('prix').innerHTML = "--";
  }
  
  if (tabArticles[choice].taille != "")
  {
    document.getElementById('LISTE1').value = tabArticles[choice].taille;
  }
  
  if (tabArticles[choice].couleur != "")
  {
    document.getElementById('LISTE2').value = tabArticles[choice].couleur;
  }
  
}

function PrintChoiceList()
{
  var choice = document.getElementById('CHOICE').options[document.getElementById('CHOICE').options.selectedIndex].value ;
  
  if (tabArticles[choice].price2 != "")
  {
    document.getElementById('prix').innerHTML = "<span class=\"price\">"+tabArticles[choice].price2+"&nbsp;&euro;</span><br /><del>"+tabArticles[choice].price+"&nbsp;&euro;</del>";
  }
  else if (tabArticles[choice].price != "")
  {
    document.getElementById('prix').innerHTML = "<span class=\"price\">"+tabArticles[choice].price+"&nbsp;&euro;</span>";
  }
  else
  {
    document.getElementById('prix').innerHTML = "--";
  }
 
}




