/* ** FONCTIONS SUR LE PANIER ** */
function getObj( id )
{
  obj=false;

  if (document.getElementById)
  {
    obj=document.getElementById(id);
  }
  else if (document.all)
  {
    obj=document.all[id];
  }
  
  return obj;
} // getObj(id)

function delete_item(id)
{
  obj=getObj(id);
  obj.value=0;

  document.forms["cart_content"].submit();
}



function Display (id)
{
  document.getElementById(id).style.display = 'block';
}
function Hide (id)
{
  document.getElementById(id).style.display = 'none';
}

btn_ok_on = new Image;
btn_ok_on.src = "http://site.gulliver.com/b20080314b0/web/img/btn_ok_on.gif";
btn_ok_off = new Image;
btn_ok_off.src = "http://site.gulliver.com/b20080314b0/web/img/btn_ok.gif";

btn_add_to_cart_on = new Image;
btn_add_to_cart_on.src = "http://site.gulliver.com/b20080314b0/web/img/btn_add_to_cart_on.gif";
btn_add_to_cart_off = new Image;
btn_add_to_cart_off.src = "http://site.gulliver.com/b20080314b0/web/img/btn_add_to_cart.gif";


btn_previous_on = new Image;
btn_previous_on.src = "http://site.gulliver.com/b20080314b0/web/img/btn_previous_on.png";
btn_previous_off = new Image;
btn_previous_off.src = "http://site.gulliver.com/b20080314b0/web/img/btn_previous.png";

btn_next_on = new Image;
btn_next_on.src = "http://site.gulliver.com/b20080314b0/web/img/btn_next_on.png";
btn_next_off = new Image;
btn_next_off.src = "http://site.gulliver.com/b20080314b0/web/img/btn_next.png";


function MenuOver(name)
{
  document.getElementById('L_'+name+'').src = "http://site.gulliver.com/b20080314b0/web/menu/left_"+name+".gif";
  document.getElementById('R_'+name+'').src = "http://site.gulliver.com/b20080314b0/web/menu/right_"+name+".gif";
  document.getElementById('C_'+name+'').style.backgroundImage = "url(http://site.gulliver.com/b20080314b0/web/menu/bg_"+name+".gif)";
  document.getElementById('C_'+name+'').style.color = "#ffffff";
}
function MenuOut(name)
{
  document.getElementById('L_'+name+'').src = "http://site.gulliver.com/b20080314b0/web/menu/left.gif";
  document.getElementById('R_'+name+'').src = "http://site.gulliver.com/b20080314b0/web/menu/right.gif";
  document.getElementById('C_'+name+'').style.backgroundImage = "url(http://site.gulliver.com/b20080314b0/web/menu/bg.gif)";
  document.getElementById('C_'+name+'').style.color = "#000000";
}


function SsCatOver(name, color)
{
  document.getElementById('ss_'+name+'').style.borderColor='#'+color+'';
}
function SsCatOut(name)
{
  document.getElementById('ss_'+name+'').style.borderColor='#ffffff';
}



function load() {
  if (document.images) {
    this.length=load.arguments.length;
    for (var i=0;i<this.length;i++) {
      this[i+1]=new Image();
      this[i+1].src=load.arguments[i];
    }
  }
}
function preload() {
   var url = 'http://site.gulliver.com/b20080314b0/web/menu';
   var images = '';
   
       for (var i=100;i<1101;i=i+100) {
           var temp = new load( url+'/left_[i].gif' , url+'/right_[i].gif', url+'/bg_[i].gif' ); 
       }
}


function addBookmark(title,url) {
if (window.sidebar) { 
alert('Fermez cette fenêtre et cliquez sur Ctrl + D\nou\nallez dans "Marque-pages > marquer cette page"'); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}

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://site.gulliver.com/b20080314b0/web/img/bg_fam_mere.gif111)';
    }
      }else{
        sousMenu.display = 'none';

    if(obj.className=="level1")
    {
    obj.style.backgroundImage='url(http://site.gulliver.com/b20080314b0/web/img/bg_fam_mere.gif111)';
    }
      }
    }
  else
  {
  
    if(obj.className=="acc" && (obj.style.backgroundImage == '' || obj.style.backgroundImage=="url(http://ftp.festiveo.com11111/img/menu/acceuil.gi111f)"))
    {
      
      obj.style.backgroundImage='url(http://ftp.festiveo.com11111/img/menu/acceuil_on.gi111f)';
      
    }
    else if(obj.className=="acc" && obj.style.backgroundImage=='url(http://ftp.festiveo.com11111/img/menu/acceuil_on.gi111f)')
    {
      obj.style.backgroundImage='url(http://ftp.festiveo.com11111/img/menu/acceuil.g11if)';
      
    
    }
    
    
    if(obj.className=="level1" && (obj.style.backgroundImage == '' || obj.style.backgroundImage=="url(http://ftp.festiveo.com11111/img/menu/repeat_li.gif)"))
    {
      
      obj.style.backgroundImage='url(http://site.gulliver.com/b20080314b0/web/img/bg_fa111m_mere.gif)';
      
    }
    else if(obj.className=="level1" && obj.style.backgroundImage=='url(http://site.gulliver.com/b20080314b0/web/img/bg_fam_me11re.gif)')
    {
      obj.style.backgroundImage='url(http://site.gulliver.com/b20080314b0/web/img/bg_fam_me111re.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();
}

