// JavaScript Document
function open_window(votre_page){
var hauteur_popup=550;
var H = (screen.height - hauteur_popup) / 2;
var largeur_popup=550;
var L = (screen.width - largeur_popup) / 2;
pop_up = window.open(votre_page,"Popup","status=yes,scrollbars=yes,resizable=yes,height="+hauteur_popup+",width="+largeur_popup+",top="+H+",left="+L);
}

function open_zoom(votre_page){
var hauteur_popup=492;
var H = (screen.height - hauteur_popup) / 2;
var largeur_popup=520;
var L = (screen.width - largeur_popup) / 2;
pop_up = window.open(votre_page,"Popup","status=yes,scrollbars=no,resizable=no,height="+hauteur_popup+",width="+largeur_popup+",top="+H+",left="+L);
}

///////////////////////////
// MASQUE LES ERREURS JS //
///////////////////////////

function error () { return true; }
window.onerror
= error;

///////////// FIN MASQUE LES ERREURS JS ////////////////////////
/*code pour cases à cocher Cross Selling */
function changeBox(cbox) {
	box = eval(cbox);
	box.checked = !box.checked;
	}
function dontchangeBox(cbox) {
	box = eval(cbox);
	}

/*code pour les zoomettes sur liste produits*/
function afficherzoom(nomdiv,nomimg,srcimg) {
	// Vérifie si le div est masqué
	if (document.getElementById(nomdiv).style.display=='none') 
	{	// Si oui on affiche le div
		document.getElementById(nomdiv).style.display='block'; 
		// Et on change la source de l'image
		document.getElementById(nomimg).src=srcimg; }
}
function masquerzoom(nomdiv) {
	// Vérifie si le div est affiché
	if (document.getElementById(nomdiv).style.display=='block') 
	{	// Si oui on masque le div
		document.getElementById(nomdiv).style.display='none'; }
}

/*code pour img zoom*/
function kw_switch(i,c) {
	d=document;if (d.getElementById){ d.getElementById('kwMain').src=i;
	d.getElementById('kw_caption').innerHTML=unescape(c);}
}
//////////////////////////
/////// MENUS HAUTS //////
//////////////////////////

var timer;

// temps d'affichage maximum des menus
var hideTimeout = 3500;

function masq(sauf) {
	for(var i = 1; i <= 3; i++)
	{
		if (i == 1) { var nomdiv = 'ss-menu1'; }
		if (i == 2) { var nomdiv = 'ss-menu2'; }
		if (i == 3) { var nomdiv = 'ss-menu3'; }
		if (sauf != i) 
		{
			if (document.getElementById(nomdiv).style.display=='block') 
			{ document.getElementById(nomdiv).style.display='none'; }
		}
	}
}

function aff(nomdiv) {
	if (document.getElementById(nomdiv).style.display=='none') 
	{ document.getElementById(nomdiv).style.display='block'; }		

	// arrête le timer en cours s'il est lancé
	clearTimeout(timer);

	// masque les menus au bout de tant de temps (var hideTimeout)
	timer = setTimeout("masq(0)",hideTimeout);
}
///////////// FIN MENU HAUTS ////////////////////////


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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_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 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_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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// apparition Div NAV GAUCHE Balance - Tensiometre - Powerball - Plaque vibrantes
function changeMenu(id)
{   var _x = document.getElementById('menu' + id);
	if (_x.style.position == 'absolute')
	   {_x.style.display = 'block';
	   _x.style.position = 'relative';}
	else{_x.style.display = 'none';
	_x.style.position = 'absolute';}
}

// apparition Div FAQ et autres
function onOverIn(id)
{
	var _x = document.getElementById('answer' + id);
	_x.style.background = '#DDEEFE';	
	_x = document.getElementById('question' + id);
	_x.style.background = '#DDEEFE';	
}
function onOutIn(id,col)
{
	var _x = document.getElementById('answer' + id);
	_x.style.background = col;
	_x = document.getElementById('question' + id);
	_x.style.background = col;
}
function changeVisIn(id)
{
	var _x = document.getElementById('answer' + id);
	if (_x.style.position == 'absolute'){
		_x.style.visibility = 'visible';
		_x.style.position = 'relative';
	}else{
		_x.style.visibility = 'hidden';
		_x.style.position = 'absolute';
	}
}
// gestion des ID sur page accessoires
   var sousmenu=new Array()

/* fonctions pour retirer ou montrer un bloc */
	 function retire() { 
   var id=null;
   var element_style=null
   for(i=0;i<arguments.length;i++) {
      element_style=null;
      id=arguments[i];
		  if (document.getElementById) {
		    element_style=document.getElementById(id).style;
			element_img=document.getElementById('plus_'+id);
		  } else if (document.all) {
		    element_style=document.all[id].style;
			element_img=document.all['plus_'+id];
		  } 

	    if(element_style){
		element_style.display="none";
		element_img.src="img_structure/bt-plusdinfos.gif";
		}
      }
    }

	 function montre(id) {
		var element_style=null
		if (document.getElementById) {
		  element_style=document.getElementById(id).style;
		  element_img=document.getElementById('plus_'+id);
		} else if (document.all) {
		  element_style=document.all[id].style;
		  element_img=document.all['plus_'+id];
		} 

		if(element_style){
		element_style.display="block";
		element_img.src="img_structure/bt-plusdinfos.gif";
		}
    }

/* Affichage du sous-menu 'id' acessoires*/
	 function affiche(id) {

/* Si on a reclique la derniere entree, on replie le sous-menu correspondant*/ 
   if (id == sousmenu[sousmenu.length-1]) { 
     retire(id); sousmenu.length --; element_img.src="img_structure/bt-plusdinfos.gif";
		 return;
		 }

   /* On ouvre le bloc demande, sauf si id est vide */
   if (id) { montre(id); sousmenu[sousmenu.length]=id; element_img.src="img_structure/bt-plusdinfos.gif"; }  
    }
	

/* Affichage du sous-menu 'id' wellbox*/
	 function affichewellbox(id) {

/* Si on a reclique la derniere entree, on replie le sous-menu correspondant*/ 
   if (id == sousmenu[sousmenu.length-1]) { 
     retire(id); sousmenu.length --; element_img.src="img/bt-plus-dinfos.gif";
		 return;
		 }

   /* On ouvre le bloc demande, sauf si id est vide */
   if (id) { montre(id); sousmenu[sousmenu.length]=id; element_img.src="img/bt-plus-dinfos.gif"; }  
    }
	
/////////////////////////////////////
//   EVEREF code version 3.5.      //
/////////////////////////////////////
function evfdisplayscript()
{
	var evfVersion = '3.5';
	var evfSiteID = 6892;
	var evfURL = escape(document.URL.substring(0,511));
	var evfReferrer = escape(document.referrer.substring(0,511));
	var evfIDPlus = escape(Math.random());
	var evfImage = new Image();
	evfImage.src = "http://go.atraxio.com/everef3/tr.asp?evfVersion=" + evfVersion + "&evfSiteID=" + evfSiteID + "&evfURL=" + evfURL + "&evfReferrer=" + evfReferrer + "&idplus=" + evfIDPlus;
}
void evfdisplayscript();
<!-- Fin EVEREF code -->
/* 
activateActiveX 
--------------- 
License: 
activateActiveX is Copyright (C) 2006 Jason Baker (therippa AT
 gmail.com). It is available as open source code from: 
http://therippa.blogspot.com 

This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
 Free Software Foundation; either version 2 of the License, or (at your
 option) any later version. 

This program is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
 License for more details http://www.gnu.org/licenses/gpl.html */ 
if (navigator.appName == "Microsoft Internet Explorer") { 
var arrElements = new Array(3); 
arrElements[0] = "object"; 
arrElements[1] = "embed"; 
arrElements[2] = "applet"; 
for (n = 0; n < arrElements.length; n++) { 
replaceObj = document.getElementsByTagName(arrElements[n]); 
for (i = 0; i < replaceObj.length; i++ ) { 
parentObj = replaceObj[i].parentNode; 
newHTML = parentObj.innerHTML; 
parentObj.removeChild(replaceObj[i]); 
parentObj.innerHTML = newHTML; 
} 
} 
}
