<!--
self.window.name = 'mainwindow';

function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr;
    for(i=0; a && i<a.length && (x=a[i]) && x.oSrc; i++) x.src=x.oSrc
}
function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function hideItNoSpace(divId)
{
 if (document.getElementById){ 
         currDiv=document.getElementById(divId).style.display="none";
 }else if (document.all){ 
         document.all[divId].style.display="none"; 
 } else if (document.layers){ 
         document.layers[divId].display="none"; 
 }
}

function showItNoSpace(divId)
{
 if (document.getElementById)
 { 
         currDiv=document.getElementById(divId);
         currDiv.style.display="block"; 
}
 else if (document.all)
 { document.all[divId].style.display="block"; }
 else if (document.layers)
 { document.layers[divId].display="block"; }
}

/**
Fonctions permettant le défilment des promos pour les Box Top ventes, Nouveautés, Vente Flash, Promotion Online
D.Vassard
23/11/2005
*/
var chronometreTopVente;

function deplaceADroite(sGroupe)
{    
    var iMaxArticle = eval('maxArticle'+sGroupe);
    //alert(iMaxArticle);
    for(i=1;i<=iMaxArticle;i++){
        tvDiv=document.getElementById(sGroupe+i);
        //alert(tvDiv);
        if(tvDiv){  
            if(tvDiv.style.display=="block")
            {
                
                oldid=sGroupe+i;
                indice=i;
            }
        }
    }
    
    document.getElementById(oldid).style.display="none";
    if(indice<iMaxArticle)
    {    
        indice++;
        newid=sGroupe+indice;
    }else{
        newid=sGroupe+1;
    }
    
    document.getElementById(newid).style.display="block";
    if(deplaceADroite.arguments[1] != "click" && sGroupe == "topvente"){
        chronometreTopVente = setTimeout("deplaceADroite('"+sGroupe+"')",5000);
    }   
    else if (deplaceADroite.arguments[1] == "click" && sGroupe == "topvente"){
    	clearTimeout(chronometreTopVente);
    	chronometreTopVente = setTimeout("deplaceADroite('topvente')",5000);
    }
}

function deplaceAGauche(sGroupe)
{
	
    var iMaxArticle = eval('maxArticle'+sGroupe);
    for(i=1;i<=iMaxArticle;i++){
        tvDiv=document.getElementById(sGroupe+i);
        if(tvDiv.style.display=="block")
        {
            oldid=sGroupe+i;
            indice=i;    
        }
    }
    document.getElementById(oldid).style.display="none";
    if(indice>1)
    {
        indice--;
        newid=sGroupe+indice;
    }else{
        newid=sGroupe+iMaxArticle;
    }
    document.getElementById(newid).style.display="block"; 
    if(deplaceAGauche.arguments[1] != "click" && sGroupe == "topvente"){
        chronometreTopVente = setTimeout("deplaceADroite('"+sGroupe+"')",5000);
    }   
    else if (deplaceAGauche.arguments[1] == "click" && sGroupe == "topvente"){
    	clearTimeout(chronometreTopVente);
    	chronometreTopVente = setTimeout("deplaceADroite('topvente')",5000);
    }           
}

/**
Fonctions permettant l'affichage des infosbulles
S.Muller
25/11/2005
*/

var bulle=false; // La variable bulle nous dit si la bulle est visible ou non
var timer;
var isBulle=false;
var isBulle2=false;
var iframeExist = false;

function GetId(id)
{
return document.getElementById(id);
}

var positionX = 0;
var positionY = 0;
var bInfoBulleVisible = false;
function move(e) {         
 if (bulle==true || isBulle==true)
 {
    if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
	    if (iframeExist){
	    	GetId("iframeCurseur").style.left=e.pageX + 5+'px';
	    	GetId("iframeCurseur").style.top=e.pageY + 10+'px';    	
	    }
	    GetId("curseur").style.left=e.pageX + 5+'px';
	    GetId("curseur").style.top=e.pageY + 10+'px';
	}else{
	    if (iframeExist){
	   		GetId("iframeCurseur").style.left=window.event.x + 5;
	    	GetId("iframeCurseur").style.top=window.event.y + 10 + document.documentElement.scrollTop; // Sous IE, voici un petit hack pour que lors du scroll la position reste bonne !    
		}    	
	    GetId("curseur").style.left=window.event.x + 5;
	    GetId("curseur").style.top=window.event.y + 10 + document.documentElement.scrollTop; // Sous IE, voici un petit hack pour que lors du scroll la position reste bonne !
    }
 }else{
    if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
      positionX = e.pageX;
      positionY = e.pageY;
    }else{
      positionX = window.event.clientX;
      positionY = window.event.clientY;       
    }
 }

	if(bInfoBulleVisible == true){
		hideInfoBulle(false, bLinkOnly);
	}
}
function montre(text) {
      if(bulle==false) {
         if (isBulle2==false){
   		 bulle=true;
         }

  		oDiv3           = document.createElement("iframe");
		oAtt3           = document.createAttribute("id");
		oAtt3.nodeValue = "iframeCurseur";			
		oDiv3.setAttributeNode(oAtt3);	

        // AJOUT POUR LE HTTPS
		oAtt3           = document.createAttribute("src");
		oAtt3.nodeValue = "/commande/pagevide.html";	
		oDiv3.setAttributeNode(oAtt3);			
      
		if (isBulle2){
		   GetId("curseur").innerHTML     = '<span style="cursor:pointer;" onclick="cache();return false;"><img src="/grafx/' + sGrafx + '/boutons/fermer_mini.png" /></span><br>';
		}else{
		   GetId("curseur").innerHTML     = '';
		}
		GetId("curseur").innerHTML     += text; 
		GetId("curseur").style.display = "block"; // Si il est cacher (la verif n'est qu'une securité) on le rend visible.
		
  	   if (isBulle2){
          if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
             if (iframeExist){
             	GetId("iframeCurseur").style.left=positionX + 5+'px';
             	GetId("iframeCurseur").style.top=positionY + 10+'px';    	
             }
             GetId("curseur").style.left=positionX + 5+'px';
             GetId("curseur").style.top=positionY + 10+'px';
          }else{
             if (iframeExist){
                GetId("iframeCurseur").style.left=positionX + 5;
                GetId("iframeCurseur").style.top=positionY + 10 + document.documentElement.scrollTop; // Sous IE, voici un petit hack pour que lors du scroll la position reste bonne !    
         	 }    	
             GetId("curseur").style.left=positionX + 5;
             GetId("curseur").style.top=positionY + 10 + document.documentElement.scrollTop; // Sous IE, voici un petit hack pour que lors du scroll la position reste bonne !  	        	       
  	       }
  	   } 
  	   
   	largeurBulle                   = GetId("curseur").offsetWidth;
   	hauteurBulle                   = GetId("curseur").offsetHeight;
   	topBulle                       = GetId("curseur").style.top;
   	topBulle                       = topBulle.substring(0, topBulle.length - 2);      	
   	leftBulle                      = GetId("curseur").style.left;      
   	leftBulle                      = leftBulle.substring(0, leftBulle.length - 2);
      	
	   document.getElementsByTagName('body')[0].appendChild(oDiv3);
	   iframeExist = true;
	    
   	GetId("iframeCurseur").style.width    = largeurBulle + "px";
   	GetId("iframeCurseur").style.height   = hauteurBulle + "px";
   	GetId("iframeCurseur").style.top      = topBulle  + "px";
   	GetId("iframeCurseur").style.left     = leftBulle + "px";
   	GetId("iframeCurseur").style.position = 'absolute';
   	GetId("iframeCurseur").style.filter   = "Alpha(opacity=0)";
  	   GetId("iframeCurseur").style.opacity  = 0;  	   
  	   GetId("iframeCurseur").style.zIndex  = "-1";
  	
	  	//alert(largeurBulle +";"+hauteurBulle+";"+topBulle+";"+leftBulle);
	  	//alert(document.documentElement.scrollTop);
      //GetId("iframeCurseur").style.zIndex = GetId("curseur").style.zIndex - 1;        	
      //alert('b');
      /*
      // GetId("curseur").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securité) on le rend visible.
      GetId("curseur").style.display="block"; // Si il est cacher (la verif n'est qu'une securité) on le rend visible.
      GetId("curseur").innerHTML = text; // Cette fonction est a améliorer, il parait qu'elle n'est pas valide (mais elle marche)
      */
      }  
}
function cache() {
    isBulle=false;    
    clearTimeout(timer);
    if(bulle==true || isBulle2) {
    //GetId("curseur").style.visibility="hidden"; // Si la bulle etais visible on la cache
    isBulle2=false;
    document.getElementsByTagName('body')[0].removeChild(GetId("iframeCurseur"));
    iframeExist = false;
    
    GetId("curseur").style.display="none"; // Si la bulle etais visible on la cache
    bulle=false;
    GetId("curseur").style.left=200;
    GetId("curseur").style.top=200;
    }    
    
}
function time(text) {
    if(isBulle || bulle || isBulle2){
       cache();       
    }   
    isBulle=true;
    isBulle2=false;
    text1=text;
    timer=setTimeout("montre(text1)",600);
}
function time2(text) {
    if(isBulle || bulle || isBulle2){
       cache();       
    }
    isBulle=false;
    isBulle2=true;
    text1=text;
    timer=setTimeout("montre(text1)",100);
}

/* Maskas 
Nouvelle Gestion des infobulle
*/
function getLeft(item){
	if (item.offsetParent){
		return (item.offsetLeft + getLeft(item.offsetParent)); 
	}else{ 
		return (item.offsetLeft);
	} 
}

function getTop(item){
	if (item.offsetParent){
		return (item.offsetTop + getTop(item.offsetParent)); 
	}else{ 
		return (item.offsetTop); 
	} 
}

var bLinkOnly = false;
function hideInfoBulle(bForce, bLinkOnly){
	if(bInfoBulleVisible == false){
		return;
	}
	var oInfoBulleGlobal	= GetId('infoBulleGlobal');
	var oInfoBulleLink		= GetId('infoBulleLink');
	if(!bForce){
		bForce = false;
	}
	if(!bLinkOnly){
		bLinkOnly = false;
	}
	var iCood_X		= getLeft(oInfoBulleGlobal);
	var iCood_Y		= getTop(oInfoBulleGlobal);
	var iWidth		= oInfoBulleGlobal.offsetWidth;
	var iHeight		= oInfoBulleGlobal.offsetHeight;
	if (navigator.appName=="Microsoft Internet Explorer"){
		positionY = positionY + document.documentElement.scrollTop;
	}
	if(!bForce && (positionX >= iCood_X && positionX <= (iCood_X + iWidth))
		&&
		(positionY >= iCood_Y && positionY <= (iCood_Y+iHeight))
		){
		
		// est-on au dessus du lien ?
		var iCood_X		= getLeft(oInfoBulleLink);
		var iCood_Y		= getTop(oInfoBulleLink);
		var iWidth		= oInfoBulleLink.offsetWidth;
		var iHeight		= oInfoBulleLink.offsetHeight;

		if(bLinkOnly && !((positionX >= iCood_X && positionX <= (iCood_X + iWidth))
		&&
		(positionY >= iCood_Y && positionY <= (iCood_Y+iHeight))
		)){
			// On doit etre au dessus du lien pour l'infobulle, c'est une demande forcée hor ce n'est pas le cas
			// on cache l'infobulle
			bInfoBulleVisible = false;
			GetId('infoBulleGlobal').style.display='none';
		}else{
			// on garde la DIV infobulle
		if((positionX >= iCood_X && positionX <= (iCood_X + iWidth))
		&&
		(positionY >= iCood_Y && positionY <= (iCood_Y+iHeight))
		){
			changeColorLinkParent("colorLinkHover");
		}else{
			changeColorLinkParent("colorLink");
		}
		}
	}else{
		bInfoBulleVisible = false;
		GetId('infoBulleGlobal').style.display='none';
	}
}
var objParentInfobulle;
var aColorLinkParent = {};
function changeColorLinkParent(sKey){
	if(objParentInfobulle.nodeName =="A"){
		objParentInfobulle.style.color = "#" + aColorLinkParent[sKey];
	}
}
	
function showInfoBulle(oLink, sInnerTxt, oParam){
	var oInfoBulleGlobal	= GetId('infoBulleGlobal');
	var oInfoBulle 			= GetId('infoBulle');
	var oInfoBulleT 		= GetId('infoBulleTransparent');
	var oInfoBulleContainer	= GetId('infoBulleContainer');
	var oInfoBulleLink		= GetId('infoBulleLink');
	var oInfoBulleFleche	= GetId('infoBulleFleche');
	var iLargFenetre 		= document.documentElement.clientWidth;
	
	
	// Initialisation des parametres
	if(!oParam){
		oParam = {};
	}
	oParamDefault = {	"width"			: "500",
						"align"			: "right",
						"marginFleche"	: 20,
						"marginDiv"		: 5,
						"colorLink"		: "007a97",
						"colorLinkHover": "00b1c1",
						"bLinkOnly" 	: false
					};
 
	
	// Insertion du contenu de l'infobulle et affichage
	oInfoBulleContainer.innerHTML=sInnerTxt;
	oInfoBulleGlobal.style.display='block';
	bInfoBulleVisible = true;
	
	// Paramètres - Position de l'infobulle
	if(oParam["align"]){
		oParamDefault["align"] = oParam["align"];
	}
	if(oParam["bLinkOnly"]){
		oParamDefault["bLinkOnly"] = oParam["bLinkOnly"];
	}
	bLinkOnly = oParamDefault["bLinkOnly"];
	
	// Paramètres - Largeur de l'infobulle
	if(oParam["width"]){
		oParamDefault["width"] = oParam["width"];
	}
	
	// Reinitialisation des position et definition de la largeur du contenu
	oInfoBulleT.style.margin		= "0 0 0 0";
	oInfoBulleFleche.style.margin	= "0 0 0 0";
	oInfoBulle.style.width = oParamDefault["width"] +'px'; 
 
	// Margin pour positionner de la fleche
	if(oParam["marginFleche"] || oParam["marginFleche"]==0){
		if(oParam["marginFleche"] == "cursor"){
			//positionX-getLeft(this)
			oParamDefault["marginFleche"] = positionX-getLeft(oLink)- (oInfoBulleFleche.offsetWidth/2);
		}else{
			oParamDefault["marginFleche"] = oParam["marginFleche"];
		}
	}
	
	// Couleur du lien
	if(oParam["colorLink"]){
		oParamDefault["colorLink"] = oParam["colorLink"];
	}
	if(oParam["colorLinkHover"]){
		oParamDefault["colorLinkHover"] = oParam["colorLinkHover"];
	}
	objParentInfobulle	= oLink;
	aColorLinkParent["colorLink"]		= oParamDefault["colorLink"];
	aColorLinkParent["colorLinkHover"]	= oParamDefault["colorLinkHover"];
	
	// Détermination des différentes tailles
	var sExtention = "";
	if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
		var sExtention = "px";
	}
	oInfoBulleGlobal.style.top		= (getTop(oLink)-10) +sExtention;
	
	
	oInfoBulleT.style.width				= oLink.offsetWidth +sExtention;
	oInfoBulleT.style.height			= oLink.offsetHeight +sExtention;
	if(oLink.nodeName =="A" && oLink.href){
		oInfoBulleLink.href 			= oLink.href;
	}else{
		oInfoBulleLink.href = "#nogo";
	}
	if(oLink.nodeName =="A" && oLink.onclick){
		oInfoBulleLink.onclick	=oLink.onclick;
	}else if(oInfoBulleLink.getAttribute('onclick')){
		oInfoBulleLink.removeAttribute('onclick');
	}
	
	if(oParamDefault["align"]=="right"){
		// Div à Droite
		oInfoBulleGlobal.style.left		= (getLeft(oLink)-10) +sExtention;
		
	}else{
		// Div à gauche
		oInfoBulleT.style.margin		= "0 0 0 "+ (oLink.offsetWidth-oLink.offsetHeight) +"px";
		if(oInfoBulleGlobal.offsetWidth > (getLeft(oLink) + 10 + oLink.offsetWidth)){
			var iNewLargeurInfoBulle = (getLeft(oLink) + 10 + oLink.offsetWidth) -30;
			oInfoBulle.style.width = iNewLargeurInfoBulle +'px'; 
		}
		oInfoBulleGlobal.style.left		= getLeft(oLink) + 10 + oLink.offsetWidth - oInfoBulleGlobal.offsetWidth +sExtention;
	}

	// Controle de la sortie de l'ecran de la DIV
	// Positionnement de la DIV et de ses élements
	if(oParamDefault["align"]=="right"){
		// Div à droite
		if(oInfoBulleGlobal.offsetWidth + getLeft(oInfoBulleGlobal) > iLargFenetre){
			var iNewLargeurInfoBulle = iLargFenetre - getLeft(oInfoBulleGlobal) - 30;
			oInfoBulle.style.width = iNewLargeurInfoBulle +'px'; 
		}
		if((oParamDefault["marginFleche"]+oInfoBulleFleche.offsetWidth) > oInfoBulle.offsetWidth){
			oParamDefault["marginFleche"] = oInfoBulle.offsetWidth - oInfoBulleFleche.offsetWidth;
		}else if(oParamDefault["marginFleche"]<0){
			oParamDefault["marginFleche"] = 0;
		}
		oInfoBulleFleche.style.margin='0 0 0 '+oParamDefault["marginFleche"]+'px';
	}else{
		// Div à gauche
		var iTempValue = (oInfoBulle.offsetWidth - oParamDefault["marginFleche"] - oInfoBulleFleche.offsetWidth);
		oInfoBulleFleche.style.margin	='0 0 0 '+iTempValue+'px';

		var iTempValueLink = iTempValue + (oInfoBulleFleche.offsetWidth/2) - (oLink.offsetWidth/2);
		oInfoBulleT.style.margin		= "0 0 0 "+ (iTempValueLink) +"px";
	}
}

function showDivOptionPayante(id, text){
   GetId(id).innerHTML=text;
   GetId(id).style.display='block';
    if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
       GetId(id).style.left=positionX - 15+'px';
       GetId(id).style.top=positionY - 15+'px';
    }else{
       GetId(id).style.left=positionX - 15;
       GetId(id).style.top=positionY - 15 + document.documentElement.scrollTop; // Sous IE, voici un petit hack pour que lors du scroll la position reste bonne !  	        	       
    }
}
function cacheDivOptionPayante(id){
   GetId(id).style.display='none';
}
document.onmousemove=move;


/**
 *    Sylvain Gourvil
 *    Fonction pour le rollover du mur de telephone
 */
var divBefore       = null;
var divBloque       = false;
var timerRoll       = null;
var typeDiv         = "";
function chargeDiv(id, type) {	
	 typeDiv = type; 
     if (divBefore != null && divBefore != id)
        {
            fermerRollOver();
        }
    div         = id;
    //timerRoll   = setTimeout('ouvreRollOver(div)', 500);
    timerRoll   = setTimeout('openRollOver(div)', 500);
}

/**
*    groupe de fonction pour gérer la place d'un calque sur le mur de téléphone
*    Eric Vincent
*/
var _ie_ = false;
var _ff_ = false;
function setNav(){
	switch (navigator.appName){
		case 'Microsoft Internet Explorer':
		         _ie_ =  true;
		         break;
		case 'Netscape':
		         _ff_ = true;
		         break;
		default:
		         _ff_ = true;
	}
}

function getDivTopRecursif(div){
  if (div.offsetParent) return (div.offsetTop + getDivTopRecursif(div.offsetParent));
  else return (div.offsetTop);
}

function getDivLeftRecursif(div){
  if (div.offsetParent) return (div.offsetLeft + getDivLeftRecursif(div.offsetParent));
  else return (div.offsetLeft);	
}

function getDivLeft(div){
	if (_ff_){
		return div.offsetLeft;
	}
	else if (_ie_){
		return getDivLeftRecursif(div, 0);
	}	
}

function getDivTop(div){	
	if (_ff_){
		return div.offsetTop;
	}
	else if (_ie_){
		return getDivTopRecursif(div, 0);
	}	
}

function getDivWidth(div){
	return div.offsetWidth;
}

function getDivHeight(div){
	return div.offsetHeight;	
}

function getDocTopDefil(){
	if (_ff_){
		return window.pageYOffset;
	}
	else if (_ie_){  //fonctionne pas!!
		return window.document.documentElement.scrollTop;
	}	
}

function openRollOver(div){
	divEnfant                = GetId(div);           
	divParent                = GetId('in_' + div.substr(8, div.length));
	divContenu               = GetId('contenu');  
	
	contenuWidth          = divContenu.offsetWidth;	
	
	parentLeft   = getDivLeft(divParent);
	parentTop    = getDivTop(divParent);
	parentWidth  = getDivWidth(divParent);
	parentHeight = getDivHeight(divParent);	
	
	divEnfant.style.top         = "3000px"; 
    divEnfant.style.left        = "0px";
	
	divEnfant.style.visibility  = "visible"; 
    divEnfant.style.display     = "block";
	
	enfantWidth  = divEnfant.offsetWidth;
	enfantHeight = divEnfant.offsetHeight;
	
	positionTopEcran = getDocTopDefil();

	if ( (parentLeft + parentWidth + enfantWidth) > (window.screen.availWidth - 100) ){
		enfantLeft = parentLeft - enfantWidth + 20;
	}
	else{
		enfantLeft = parentLeft + parentWidth - 20;
	}	

	if ( (parentTop + (parentHeight / 2) + enfantHeight) > (positionTopEcran + document.documentElement.clientHeight) ){
		enfantTop = parentTop - enfantHeight + (parentHeight / 2);		
	}
	else{
		enfantTop = parentTop + (parentHeight / 2);
	}
	
    divEnfant.style.left        = enfantLeft+'px';
    divEnfant.style.top         = enfantTop+'px';
    divEnfant.style.visibility  = "visible"; 
    divEnfant.style.display     = "block"; 
    divBefore                   = div;
    divBloque                   = true;	
}

function fermerRollOver()
{
    killTimeOutRollOver();
    GetId(divBefore).style.visibility  = "hidden"; 
    GetId(divBefore).style.display     = "none";
    divBloque                          = false;
    divBefore                          = null;
}

function killTimeOutRollOver()
{
    clearTimeout(timerRoll);
}

setNav();
/**
* fin fonction pour le mur de téléphone
*/

//Function interface pour Xajax
//Construit l'appel à la fonction xajax_goTreat quelquesoit le nombre de paramètres passés à doAction
    <!--
    function doAction(Action){
        var args    = "";
        for ( i=1; i<doAction.arguments.length; i++ ) 
        {
            args += doAction.arguments[i]+",";
        }
        Param = Action+','+args;
        switch(Action){
            case "seeGamme":
                Param+=",Hello";
            break;
            case 'Keep':
                Param += document.getElementById('check'+doAction.arguments[1]).value;
                if ( document.getElementById('check'+doAction.arguments[1]).value == "Add" )
                {
                    document.getElementById('check'+doAction.arguments[1]).value="Supp";
                }else{
                    document.getElementById('check'+doAction.arguments[1]).value = "Add";
                }
                break;
            case 'Select':
            case 'Redirection':
                Param += document.getElementById(arguments[1]).value;
                break;
            //case 'PriceList':
                //Slider Double de prix
                //Param += Math.round(tamponDoubleSlide)+",";
                //Param += sTamponDoubleSlide;
            case 'Prix' :
                Param += Math.round(sliderPrix.getValue('value'));
                //alert(Math.round(sliderPrix.getValue('value')));
                break;
            case 'Poids' :
                Param += Math.round(sliderPoids.getValue('value'));
                //alert(Math.round(sliderPrix.getValue('value')));
                break;
            case 'Autonomie' :
                Param += Math.round(sliderAutonomie.getValue('value'));
                //alert(Math.round(sliderPrix.getValue('value')));
                break;
            case "seeGamme" :
                break;
            case "Special" :            
                Param += document.getElementById('check'+doAction.arguments[1]).value;
                if ( document.getElementById('check'+doAction.arguments[1]).value == "Add" )
                {
                    document.getElementById('check'+doAction.arguments[1]).value="Supp";
                }else{
                    document.getElementById('check'+doAction.arguments[1]).value = "Add";
                }
                break;
            case "AddComparateur":
                Param+=",Hello";
//alert("-"+Param+"-");
                break;
        }
        xajax_goTreat(Param);
    }

/* teste la réponse answer, et détruit les node créer par la fonctions 
   displayDivConfirmChoice*/

function hideDivConfirmChoice( ){
	document.getElementsByTagName('body')[0].removeChild(document.getElementById('iframe'));
	document.getElementsByTagName('body')[0].removeChild(document.getElementById('borderConfirmBox'));
	document.getElementsByTagName('body')[0].removeChild(document.getElementById('confirmBox'));
}		


function getWindowHeight() {
		    var windowHeight=0;
		    if (typeof(window.innerHeight)=='number') {
		        windowHeight=window.innerHeight;
		    }
		    else {
		     if (document.documentElement&&
		       document.documentElement.clientHeight) {
		         windowHeight = document.documentElement.clientHeight;
		    }
		    else {
		     if (document.body&&document.body.clientHeight) {
		         windowHeight=document.body.clientHeight;
		      }
		     }
		    }
		    return windowHeight;
		}
		

/* Désactive la page en affichant une DIV grisée sur tout l'écran
   et affiche une confirm box avec 2 boutons oui et non */
function displayDivConfirmChoice( question ){
	//on crée la DIV pour demander le choix de l'utilisateur s'il n'existe pas
	if ( ! document.getElementById("borderConfirmBox") ) {
  		oDiv           = document.createElement("div");
		oAtt           = document.createAttribute("id");
		oAtt.nodeValue = "borderConfirmBox";	
		oDiv.setAttributeNode(oAtt);	
		oAtt           = document.createAttribute("class");
		oAtt.nodeValue = "opacity";	
		oDiv.setAttributeNode(oAtt);		
		
  		oDiv2           = document.createElement("div");
		oAtt2           = document.createAttribute("id");
		oAtt2.nodeValue = "confirmBox";	
		oDiv2.setAttributeNode(oAtt2);	
		oAtt2           = document.createAttribute("class");
		oAtt2.nodeValue = "confirmBox";	
		oDiv2.setAttributeNode(oAtt2);

  		oDiv3           = document.createElement("iframe");
		oAtt3           = document.createAttribute("id");
		oAtt3.nodeValue = "iframe";	
		oDiv3.setAttributeNode(oAtt3);	
        // AJOUT POUR LE HTTPS
		oAtt3           = document.createAttribute("src");
		oAtt3.nodeValue = "/commande/pagevide.html";	
		oDiv3.setAttributeNode(oAtt3);			
			
		oAtt3           = document.createAttribute("class");
		oAtt3.nodeValue = "opacity";	
		oDiv3.setAttributeNode(oAtt3);		

		document.getElementsByTagName('body')[0].appendChild(oDiv3);				
		document.getElementsByTagName('body')[0].appendChild(oDiv);	
		document.getElementsByTagName('body')[0].appendChild(oDiv2);						
	}
	//alert(document.getElementById('page'));
	//on place la DIV à l'écran
	document.getElementById('iframe').style.zIndex = 2999;
	document.getElementById('iframe').style.height = document.getElementById('globalcontainer').offsetHeight + "px";	
	
	document.getElementById('iframe').style.opacity = 0.5 ;
	document.getElementById('borderConfirmBox').style.opacity = 0.5 ;
	
	document.getElementById('iframe').style.filter           = "Alpha(opacity=50)";
	document.getElementById('borderConfirmBox').style.filter = "Alpha(opacity=50)";
	
	document.getElementById('borderConfirmBox').style.zIndex = 3000;
	document.getElementById('borderConfirmBox').style.height = document.getElementById('globalcontainer').offsetHeight + "px";

	document.getElementById('confirmBox').style.zIndex = 3001;
	//document.getElementById('confirmBox').style.top    = (window.screen.availHeight / 2 - 100) + "px";		
	//document.getElementById('confirmBox').style.top    = (window.screen.height / 2 - 100) + "px";		
	document.getElementById('confirmBox').style.top    = (getWindowHeight() / 2 )+ document.documentElement.scrollTop + "px";	
	
	
	//on rempli la DIV avec les paramètres
	// Mais d'abord on vérifie la provenance de l'appel de la fonction

	var call_funt="";
	if(document.getElementById('Caller_Funct')){
		var call_funct=document.getElementById('Caller_Funct').value;
	}
	if(call_funct == "confirmCG"){
		var funct_arguments = "";
		for (i = 1, max = displayDivConfirmChoice.arguments.length ; i < max; i++){
			funct_arguments += '\"' + displayDivConfirmChoice.arguments[i] + '\", ';
		}
		var text = "<p>"+question+"</p>";
		//text    += "<br />";
		text    += "<form onsubmit='return false'>";
		text    += "<input type='button' name='Oui' class='boutonconfirm'  value='Oui' onclick='"+ call_funct +"(" + funct_arguments +  "true,\"oui\");' />";
		text    += "<input type='button' name='Non' class='boutonconfirm'  value='Non' onclick='"+ call_funct +"(" + funct_arguments +  "true,\"non\");' />";
		text    += "</form>";
	}else if ( call_funct == 'validerFormulaire' ) { 
		var funct_arguments = "";
		for (i = 1, max = displayDivConfirmChoice.arguments.length ; i < max; i++){
			funct_arguments += '\"' + displayDivConfirmChoice.arguments[i] + '\"';
		}
		var text = "<p>"+question+"</p>";
		//text    += "<br />";
		text    += "<form onSubmit='return false'>";
		text    += "<input type='button' name='Oui' class='boutonconfirm'  value='Oui' onClick='document.getElementById("+funct_arguments+").submit();' />";
		text    += "<input type='button' name='Non' class='boutonconfirm'  value='Non' onClick='hideDivConfirmChoice();' />";
		text    += "</form>";         
	}else if(call_funct == "redirectionMurTel" ){
		//pour permettre la redirection depuis le mur de tel vers la page N2 correspondante
		var idFamFormRedirection = ($('idFamFormRedirection')) ? '\"\", "'+document.getElementById('idFamFormRedirection').value : '\"';
		var argumentsDoBuy = "";
		for (i = 1, max = displayDivConfirmChoice.arguments.length ; i < max; i++){
			argumentsDoBuy += '\"' + displayDivConfirmChoice.arguments[i] + '\", ';
		}
		var text = "<p>"+question+"</p>";
//    	text    += "<br /><br /><br /><br /><br />";
    	text    += "<form class='formconfirm' onSubmit='return false'>";
    	text    += "<input type='image' src='" + UrlBouton + "boutons/oui_off.gif' name='Oui' class='boutonconfirm'  value='Oui' onClick='doBuy(" + argumentsDoBuy +  "true,\"oui\","+idFamFormRedirection+"\");' onMouseOver='this.src=\"" + UrlBouton + "boutons/oui_on.gif\"' onMouseOut='this.src=\"" + UrlBouton + "boutons/oui_off.gif\"' />";
    	text    += "<input type='image' src='" + UrlBouton + "boutons/non_off.gif' name='Non' class='boutonconfirm'  value='Non' onClick='doBuy(" + argumentsDoBuy +  "true,\"non\");' onMouseOver='this.src=\"" + UrlBouton + "boutons/non_on.gif\"' onMouseOut='this.src=\"" + UrlBouton + "boutons/non_off.gif\"' />";
    	text    += "</form>";	
	}else{
		var argumentsDoBuy = "";
		for (i = 1, max = displayDivConfirmChoice.arguments.length ; i < max; i++){
			argumentsDoBuy += '\"' + displayDivConfirmChoice.arguments[i] + '\", ';
		}
		var text = "<p>"+question+"</p>";
//    	text    += "<br /><br /><br /><br /><br />";
    	text    += "<form onSubmit='return false'>";
    	text    += "<input type='image' src='" + UrlBouton + "boutons/oui_off.gif' name='Oui' class='boutonconfirm'  value='Oui' onClick='doBuy(" + argumentsDoBuy +  "true,\"oui\");' onMouseOver='this.src=\"" + UrlBouton + "boutons/oui_on.gif\"' onMouseOut='this.src=\"" + UrlBouton + "boutons/oui_off.gif\"' />";
    	text    += "<input type='image' src='" + UrlBouton + "boutons/non_off.gif' name='Non' class='boutonconfirm'  value='Non' onClick='doBuy(" + argumentsDoBuy +  "true,\"non\");' onMouseOver='this.src=\"" + UrlBouton + "boutons/non_on.gif\"' onMouseOut='this.src=\"" + UrlBouton + "boutons/non_off.gif\"' />";
    	text    += "</form>";
	}
		
	document.getElementById('confirmBox').innerHTML = text;	
}  

/**
* fonction qui détecte si le navigateur supporte les cookies
*/
function hasCookie(){
    
	if ((document.URL).indexOf('cookie.html') == -1) {
		if (document.cookie == ''){
			location.href="/cookie.html";
		} //sinon cookies supportés
	}
}

/**
* fonctions ajouter pour la V3 quigères la transparance des images sur la page offre ajout le : 28-03-06
* 
*/
function rendreopaque(div1,div2) {
   if (_ie_){
   	//alert(document.getElementById(div1).filters.alpha);
   	document.getElementById(div1).filters.alpha.opacity = 50; 
	if (div2){
		document.getElementById(div2).filters.alpha.opacity = 50; 
	}  	
   }else{
   	//alert(document.getElementById(div1).filters.alpha);
   	document.getElementById(div1).style.opacity = 0.5;
	if (div2){
		document.getElementById(div2).style.opacity = 0.5;
	}   	
   }
}
function rendrevisible(div1,div2) {
   if (_ie_){   
   	document.getElementById(div1).filters.alpha.opacity = 100;
	if (div2){
		document.getElementById(div2).filters.alpha.opacity = 100; 
	}     	
   }else{	
   	document.getElementById(div1).style.opacity = 1; 
	if (div2){
		document.getElementById(div2).style.opacity = 1;
	}  	
   }
}
// MASQUER / AFFICHER DES DIV

function afficher1(etat) 
{    
    document.getElementById("champ1").style.visibility=etat;    
    document.getElementById("champ1").style.display='block';    
} 
function afficher2(etat) 
{    
    document.getElementById("champ2").style.visibility=etat;    
    document.getElementById("champ2").style.display='block';    
}

// ouvre un pop up pour l'opération de noel 2006 désactivé au 18/12/2006
function openPopUpJeuNoel(){
	//var PopUp = 	window.open("http://www.animations2.bouyguestelecom.fr/jeunoeldexception","Un noel d'exception","location=no, resizable=no,status=no, height=500, width=600");
	
	if (this.closed){
		//alert ("on ferme !!! ");
		//window.open("http://www.animations2.bouyguestelecom.fr/jeunoeldexception","Un noel d'exception","location=no, resizable=no,status=no, height=500, width=600");
	}
	else{
		//alert ("c'est fermé ??");	
	}
	//setTimeout("openPopUpJeuNoel()",1000);
}

// ouvre un pop up sur les liens sortants du header
function openPopUpSortantBorne(){
	//var PopUp = 	window.open("http://www.animations2.bouyguestelecom.fr/jeunoeldexception","Un noel d'exception","location=no, resizable=no,status=no, height=500, width=600");
	var dDate_debut 	= new Date(2007,02,21,10,00);
	var dDate_fin	 	= new Date(2007,02,26,19,00);
	var dDate_courante	= new Date();
	if(dDate_courante>dDate_debut && dDate_courante<dDate_fin){
		if (this.closed){
			//window.open("http://www.animations2.bouyguestelecom.fr/jeunoeldexception","Unnoeldexception","directories=yes,location=yes,resizable=yes,status=yes,height=600,width=700");
			window.open("http://www.laboutique.bouyguestelecom.fr/op18-forfaits.html","Unnoeldexception","directories=yes,location=yes,resizable=yes,status=yes,height=600,width=700");
			self.focus();
		}
		else{
			//window.open("http://www.animations2.bouyguestelecom.fr/jeunoeldexception","Unnoeldexception","directories=yes,location=yes,resizable=yes,status=yes,height=600,width=700");
			window.open("http://www.laboutique.bouyguestelecom.fr/op18-forfaits.html","Unnoeldexception","directories=yes,location=yes,resizable=yes,status=yes,height=600,width=700");
			self.focus();
		}
	}
	else{
		alert('l\'opération est terminée');
	}
	return true;
}

// ouvre un site under sur les liens sortants du header
function openSiteUnder(sUrl, iHeight, iWidth){
	if (iHeight == undefined){
		iHeight = 600;
	}
	if (iWidth == undefined){
		iWidth = 700;
		}
			//window.open("http://www.animations2.bouyguestelecom.fr/jeunoeldexception","Unnoeldexception","directories=1,location=1,resizable=1,status=1,height=600,width=700");
			window.open(sUrl,"site_under","directories=1,location=1,resizable=1,status=1,height="+iHeight+",width="+iWidth+",scrollbars=1");
			self.focus();
	return false;
}

// ouvre un site under sur les liens sortants du header
function openPopUnder(sUrl, iHeight, iWidth){
	if (iHeight == undefined){
		iHeight = 360;
		}
	if (iWidth == undefined){
		iWidth = 420;
		}
	window.open(sUrl,'pop_under','directories=0,location=0,resizable=0,status=0,height='+iHeight+',width='+iWidth);
	self.focus();
	return false;
}

//dvp - fonctions pour l'opération cerise
// Ces fonctions permettent d'afficher ou de masquer le flash déroulant en masquant les éléments génants du header situé en dessous.

function cacher_flash(){
	document.getElementById('infostripe').style.visibility = 'visible';
	document.getElementById('searchstripe').style.visibility = 'visible';
	document.getElementById('menu7Container').style.visibility = 'hidden';
	document.getElementById('cerise_deroulant').style.display = 'none';	
}

function montrer_flash(){
	document.getElementById('cerise_deroulant').style.display = 'block';
	document.getElementById('infostripe').style.visibility = 'hidden';
	document.getElementById('searchstripe').style.visibility = 'hidden';
	document.getElementById('menu7Container').style.visibility = 'hidden';
}

/*flash expres pour la portabilite :) DJ 22-05-2007*/
function openExpandBanner(){	
	objetflash=document.getElementById('div_video_portabilite').innerHTML;
	document.getElementById('div_video_portabilite').innerHTML="";
	document.getElementById('div_video_portabilite').innerHTML=objetflash;
	document.getElementById('div_video_portabilite').style.display='block';
}
function closeExpandBanner(){
	document.getElementById('div_video_portabilite').style.display='none';
	
}

/*flash expres pour les covers :) DJ AT 06/07/2007*/
function openCoverVideo(){
	objetflash=document.getElementById('videoCover').innerHTML;
	document.getElementById('videoCover').innerHTML="";
	document.getElementById('videoCover').innerHTML=objetflash;
	document.getElementById('videoCover').style.display='block';
}
function closeCoverVideo(){
	document.getElementById('videoCover').style.display='none';
}



function isDate(d) {
// Cette fonction permet de vérifier la validité d'une date au format jj/mm/aa ou jj/mm/aaaa

 if (d == "") // si la variable est vide on retourne faux
 return false;

 e = new RegExp("^[0-9]{1,2}\/[0-9]{1,2}\/([0-9]{2}|[0-9]{4})$");

 if (!e.test(d)) // On teste l'expression régulière pour valider la forme de la date
 return false; // Si pas bon, retourne faux

 // On sépare la date en 3 variables pour vérification, parseInt() converti du texte en entier
 j = parseInt(d.split("/")[0], 10); // jour
 m = parseInt(d.split("/")[1], 10); // mois
 a = parseInt(d.split("/")[2], 10); // année

 // Si l'année n'est composée que de 2 chiffres on complète automatiquement
 if (a < 1000) {
 if (a < 89) a+=2000; // Si a < 89 alors on ajoute 2000 sinon on ajoute 1900
 else a+=1900;
 }

 // Définition du dernier jour de février
 // Année bissextile si annnée divisible par 4 et que ce n'est pas un siècle, ou bien si divisible par 400
 if (a%4 == 0 && a%100 !=0 || a%400 == 0) fev = 29;
 else fev = 28;

 // Nombre de jours pour chaque mois
 nbJours = new Array(31,fev,31,30,31,30,31,31,30,31,30,31);

 // Enfin, retourne vrai si le jour est bien entre 1 et le bon nombre de jours, idem pour les mois, sinon retourn faux
 return ( m >= 1 && m <=12 && j >= 1 && j <= nbJours[m-1] );
 } 

function isMajeur(d){
	// Verification de la majorité pour une date en comparaison a la date courante
	var dNow		= new Date();
	
	// On sépare la date en 3 variables pour vérification, parseInt() converti du texte en entier
	j = parseInt(d.split("/")[0], 10); // jour
	m = parseInt(d.split("/")[1], 10) - 1; // mois
	a = parseInt(d.split("/")[2], 10); // année	

	j_now = dNow.getDate();
	m_now = dNow.getMonth();
	a_now = dNow.getFullYear();

	if(a < (a_now-18)){
		return true;
	}else if(a == (a_now-18)){
		if((m < m_now) || (m == m_now && j <= j_now)){
			return true;
		}
	}
	return false;
}

function openPopUp(sUrl, iWidth, iHeight){
	window.open(sUrl, '','toolbar=0,location=0,directories=0,status=no,menubar=no,scrollbars=1,resizable=0,width='+iWidth+',height='+iHeight+',left=0,top=0','mainwindow');
	return false;
}

// Supprime les espaces inutiles en début et fin de la chaîne passée en paramètre.
function trimJs(aString) {
	var regExpBeginning = /^\s+/;
	var regExpEnd       = /\s+$/;
    return aString.replace(regExpBeginning, "").replace(regExpEnd, "");
}

function unserialize(inData)
{
    var outData = false;
    var stringMatches = inData.match(/s:[0-9]+:".*?";s:[0-9]+:".*?";/g);
    if(stringMatches != null)
    {
        outData = new Array()
        for(var i = 0; i < stringMatches.length; i++)
        {
            var match = stringMatches[i].match(/s:[0-9]+:"(.*?)";s:[0-9]+:"(.*?)";/);
            if(match != null)
            {
                outData[match[1]] = match[2];
            }
        }
    }
    return outData;
}

-->
