
function Clic(Support){
	document.form1.EmballageTab.value=Support
	document.form1.submit()
}

function SelectA(Pic,Cell) {
	if (document.ScA != null) document.getElementById(document.ScA).className='SelectDivLeft1';
	document.getElementById(Cell).className='SelectDivLeft3';
	document.form1.ValA.value = Cell;
	document.ScA = Cell;
	if (Pic==1) SwapVisuel('A',Cell);
}

function SelectB(Pic,Cell) {
	if (document.ScB != null) document.getElementById(document.ScB).className='SelectDivLeft1';
	document.getElementById(Cell).className='SelectDivLeft3';
	document.form1.ValB.value = Cell;
	document.ScB = Cell;
	if (Pic==1) SwapVisuel('B',Cell);
}

function Survol(Pic,Cell) {
	KillSurvol();
	document.getElementById(Cell).className='SelectDivLeft2';
	document.Sv = Cell;
	if (Pic!=''){
		if (Pic=='A' && document.ScA==null) SwapVisuel('A',Cell)
		if (Pic=='B' && document.ScB==null) SwapVisuel('B',Cell)
		} 
}

function ColorCell(Cell) {
	if (document.Cell != null) document.getElementById(document.Cell).className='SelectDivLeft1'; 
	document.getElementById(Cell).className='SelectDivLeft2';; 
	document.Cell = Cell;
}

function SwapCello(Cello) {
	document.getElementById(document.ScP).className='SelectDivLeft1';
	document.ScP=null
	KillSurvol();
	document.form1.Cello.value=Cello;
	Cell='Cello'+Cello
	document.ScP = Cell;
	document.getElementById(Cell).className='SelectDivLeft3';
}

function SwapVisuel(Img,Src) {	
	document.images['Visuel'+Img].src='/images/pic/mini'+Src+'.jpg';
}

function SwapCouleurs(Couleur) {
	document.getElementById(document.ScB).className='SelectDivLeft1';
	document.ScB=null
	KillSurvol();
	Aplat = document.form1.Aplat.value;
	document.form1.Couleurs.value = Couleur;
	document.images['VisuelB'].src='/images/pic/miniColors'+Couleur+Aplat+'.jpg';
	Cell='Couleurs'+Couleur;
	document.ScB = Cell;
	document.getElementById(Cell).className='SelectDivLeft3';
}

function SwapAplat(Aplat) {
	document.getElementById(document.ScP).className='SelectDivLeft1';
	document.ScP=null
	KillSurvol();
	Couleur = document.form1.Couleurs.value;
	document.form1.Aplat.value = Aplat;
	document.images['VisuelB'].src='/images/pic/miniColors'+Couleur+Aplat+'.jpg';
	Cell='Aplat'+Aplat;
	document.ScP = Cell;
	document.getElementById(Cell).className='SelectDivLeft3';
}

function KillSurvol(){
	if (document.Sv != null) document.getElementById(document.Sv).className='SelectDivLeft1';
	if (document.ScA != null) document.getElementById(document.ScA).className='SelectDivLeft3';
	if (document.ScB != null) document.getElementById(document.ScB).className='SelectDivLeft3';
	if (document.ScP != null) document.getElementById(document.ScP).className='SelectDivLeft3';
}


var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
offsetX = 0;
offsetY = 20;
var toolTipSTYLE="";
function initToolTips()
{
  if(ns4||ns6||ie4)
  {
    if(ns4) toolTipSTYLE = document.toolTipLayer;
    else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
    else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
    if(ns4) document.captureEvents(Event.MOUSEMOVE);
    else
    {
      toolTipSTYLE.visibility = "visible";
      toolTipSTYLE.display = "none";
    }
    document.onmousemove = moveToMouseLoc;
  }
}
function toolTip(msg, fg, bg)
{
  if(toolTip.arguments.length < 1) // hide
  {
    if(ns4) toolTipSTYLE.visibility = "hidden";
    else toolTipSTYLE.display = "none";
  }
  else // show
  {
    if(!fg) fg = "#777777";
    if(!bg) bg = "#FFFFFF";
    var content =
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><td>' +
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + 
    '"><td align="center"><font face="sans-serif" color="' + fg +
    '" size="-2">&nbsp\;' + msg +
    '&nbsp\;</font></td></table></td></table>';
    if(ns4)
    {
      toolTipSTYLE.document.write(content);
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipLayer").innerHTML = content;
      toolTipSTYLE.display='block'
    }
    if(ie4)
    {
      document.all("toolTipLayer").innerHTML=content;
      toolTipSTYLE.display='block'
    }
  }
}
function moveToMouseLoc(e)
{
  if(ns4||ns6)
  {
    x = e.pageX;
    y = e.pageY;
  }
  else
  {
    x = event.x + document.body.scrollLeft;
    y = event.y + document.body.scrollTop;
  }
  toolTipSTYLE.left = x + offsetX;
  toolTipSTYLE.top = y + offsetY;
  return true;
}