document.write('');
document.write('');
var urlbase = 'https://www.elexence.fr/ww2/';
var urlfiche = '/fiche-composant.asp'; //fiche personnalisée (paramétrable)
var urltmp = '';
var innerdetail=null; //zone liste composants de la préconisation
var innercomposant=null; //zone composant de la préconisation
var innerfamille=null; //zone choix composants par famille
var overlay=null; //voile sombre
var numfamille;
var emplacement = 1;
var innerdrop; //verif config
var retourfam; //repositionne la fenêtre sur cette famille après fermeture fiche
var retourref;
var iWidth = 200;
var iHeight = 200;
var idaffilie = '';
var colonnesx3 = 1;
var fa3 = 430;
var fa4 = 431;
var pressfa3 = 0; //second disque
var pressfa4 = 0; //second media
var imprimerfiche = 0;
var compatible = new Array();
var ordretri = 'prix'; // ordre de tri par défaut de la liste composants
var ordrep = false; // prix asc ou desc
var ordret = false; // type asc ou desc
var echellebench = 1;
var nbgen = 1; //combien de générations différentes
var voirgen = 2; //la dernière
var bTva = 1; //prix avec ou sans tva
var filtres = ''; //les filtres
var filtre = new Array(); //le choix de filtre
/**
* Permet de récupérer les composants d'une même famille
*/
function GetFamilleGo(param){
var obj=new JSONscriptRequest(urlbase + 'GetComponent.asp' + param);
obj.buildScriptTag();
obj.addScriptTag();
}
function GetFamille(fam, emp){
var id;
var ladate = new Date();
var nocache = ladate.getTime();
acpr = new Array(); //init liste à comparer
compatible = new Array(); //init liste composants
if (innerfamille) {
CloseFamille();
location.href='#'+fam;
}
if (emp == '' || isNaN(emp)) emp = 1;
id = fam + '.' + emp;
//(emp != '') ? id = fam + '.' + emp : id = fam;
//alert('famille'+id);
innerfamille = document.getElementById('famille'+id); //definition de l'endroit d'affichage
innerfamille.style.display = 'block';
innerfamille.innerHTML = '
';
//Comparer
txt += '
';
txt += ' '; if (itm.numfamille == fa3 && itm.emplacement > 1) txt += ' '+itm.emplacement+'ième disque'; else if (itm.numfamille == fa4 && itm.emplacement > 1) txt += ' '+itm.emplacement+'ième média'; else if (itm.nomfamille) txt += itm.nomfamille; if (itm.nomfamille && colonnesx3 == 2) txt += '
'; if ((itm.numfamille == fa3 || itm.numfamille == fa4) && itm.emplacement == 1 && itm.ajouter == 1) { //if (itm.numfamille==262) alert('Passe B'); if (colonnesx3 == 2) { txt += ''; txt += ''; txt += 'en ajouter un
'; } else { txt += ' '; txt += ''; txt += '+ en ajouter un'; } } if (colonnesx3 == 2) { if (itm.refcomposant != '') { if (itm.modifiable == '1') txt += ' '+bt_modifier(itm.numfamille, itm.emplacement)+' '; } else { if (itm.numfamille == fa3) pressfa3 = 0; // second disque ? if (itm.numfamille == fa4) pressfa4 = 0; // second média ? (numfamille == itm.numfamille && emplacement >= 2) ? emp = emplacement : emp = ''; txt += ' '+bt_ajouter(itm.numfamille, emp)+' '; } } else { } txt += '
') //write out pointer image
var ie=document.all;
var ns6=document.getElementById && !document.all;
var enabletip=false;
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : "";
var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : "";
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function ddrivetip(thetext, thewidth, thecolor){
tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : "";
pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : "";
if (ns6||ie) {
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px";
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor;
tipobj.innerHTML=thetext
enabletip=true
return false
}
}
function positiontip(e){
tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : "";
pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : "";
if (enabletip){
var nondefaultpos=false;
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20
var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY
var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -2000
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge