/*
Description : Definition des layersr ToolsTips
Date : Demiguel 10/01/2002
*/
// 0- Timers and default position
var toolTipWait = 750;    // Delay before showing tool tip par d&eacute;faut.
var toolTipShow = 5000;    // Time to keep tool tip active.
var totX =-30;    // Horizontal distance from mouse par d&eacute;faut.
var totY =10;    // Vertical distance from mouse par d&eacute;faut.
// 1- ToolTips Looks
/// ToolTip Look Windows Bg Yellow Light mais texte lisible facilement
Style01Debut="<table BORDER='0' CELLSPACING='1' CELLPADDING='0' bgcolor='#57527E'><tr><td>"+
"<table width='100%' BORDER='0' CELLSPACING='3' CELLPADDING='0' bgcolor='#ffffff'><tr><td>"+
"<SPAN STYLE='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; color: #FF7300'>";
Style01Fin="&nbsp;</SPAN></td></tr></table></td></tr></table>";
/*
Style01Debut="<table BORDER='0' CELLSPACING='1' CELLPADDING='1' bgcolor='#A50800'><tr><td>"+
"<table width='100%' BORDER='0' CELLSPACING='1' CELLPADDING='1' bgcolor='#000000'><tr><td>"+
"<font face='Arial, Helvetica, sans-serif' color='#ffffff' size='1'><B>";
Style01Fin="</B></font></td></tr></table></td></tr></table>"; rouge B31B34
*/
// Information style   eg. OutOfStock message  EA8809
StylePopUpInfoDebut="<TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR ALIGN='CENTER'><TD>"+
"<TABLE BORDER='0' CELLSPACING='3' CELLPADDING='0' BGCOLOR='#003399'><TR><TD>"+
"<TABLE BORDER='0' CELLSPACING='3' CELLPADDING='0' BGCOLOR='#FFFFFF'><TR><TD>"+
"<TABLE BORDER='0' CELLSPACING='5' CELLPADDING='0'><TR ALIGN='CENTER'><TD VALIGN='TOP'>"+
"<IMG src=/images/misc/info3.GIF width=20 height=20 border=0 alt=Info></TD><TD ALIGN='LEFT'>"+
"<SPAN STYLE='font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #003399'>";
StylePopUpInfoFin="&nbsp;</SPAN></TD></TR></TABLE></TD></TR></TABLE></TD></TR></TABLE></TD></TR></TABLE>";
// 2-Begin ToolTips Contents Local (Language Specific)
//   =>  Only this one will stay :
globalTipOutOfStockMessage = StylePopUpInfoDebut+
			"Ce produit est en rupture de stock.&nbsp;<BR>Veuillez nous excuser<BR>de ce d&eacute;sagr&eacute;ment temporaire."+
			     StylePopUpInfoFin;
// => All following tooltips will be useless.  And so, to be removed...

tipDemig = Style01Debut+"Envoyez un mail au WebMaster"+ Style01Fin;

tipMenu = Style01Debut+"Ecrivez-moi"+Style01Fin;
// 3- ToolTips Main Functions Setup
//-------------------------------------------------------------------------------
//  LayerWriter V4
function layerV4Write(name,nestref,contentToPut) {
	if (isMinNS4) {
		var lyr = (nestref)? eval('document.'+nestref+'.document.'+name+'.document') : document.layers[name].document;
		lyr.open();
		lyr.write(contentToPut);
		lyr.close();
		return true;
	}
	else if (isMinIE4) document.all[name].innerHTML = contentToPut;
  return true;
}
//-------------------------------------------------------------------------------
function getLayer(name) {
  if (isMinNS4)
    return findLayer(name, document);
  if (isMinIE4)
    return eval('document.all.' + name);
  return null;
}
function findLayer(name, doc) {
  var i, layer;
  for (i = 0; i < doc.layers.length; i++) {
    layer = doc.layers[i];
    if (layer.name == name)
      return layer;
    if (layer.document.layers.length > 0)
      if ((layer = findLayer(name, layer.document)) != null)
        return layer;
  }
  return null;
}
//-------------------------------------------------------------------------------
function moveLayerTo(layer, x, y) {
  if (isMinNS4)
    layer.moveTo(x, y);
  if (isMinIE4) {
    layer.style.left = x;
    layer.style.top  = y;
  }
}
//-------------------------------------------------------------------------------
// These variables will hold the current mouse pointer position.
var mouseX = 0;
var mouseY = 0;
// Set up event capturing.
if (isMinNS4) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMousePosition;

function getMousePosition(e) {
  // Save cursor position using browser-specific code.
  if (isMinNS4) {
    mouseX = e.pageX;
    mouseY = e.pageY;
  }
  if (isMinIE4) {
    mouseX = event.clientX + document.body.scrollLeft;
    mouseY = event.clientY + document.body.scrollTop;
  }
  return true;
}
//-------------------------------------------------------------------------------
function startToolTip(contentToPut,toolTipWait,toolTipShow,nestref,name) {
 // include Choosen content
	layerV4Write(name,nestref,contentToPut)
	 var tip = getLayer(name);
  // Set timer to show tool tip.
	tip.timerID = setTimeout('showToolTip("' + name + '","' + toolTipShow + '")', toolTipWait);
}
function showToolTip(name,toolTipShow,contentToPut) {
  var tip = getLayer(name);
  // Clear out any pending timer.
  if (tip.timerID)
    clearTimeout(tip.timerID);
  // Position and show the tool tip.
moveLayerTo(tip, mouseX + totX, mouseY + totY);
  showV4Layer(tip);
  // Set timer to hide the tool tip after a delay.
tip.timerID = setTimeout('hideToolTip("' + name + '")', toolTipShow);
}
function hideToolTip(name) {
  var tip = getLayer(name);
  // Clear out any pending timer.
  if (tip.timerID)
    clearTimeout(tip.timerID);
  hideV4Layer(tip);
}
//-------------------------------------------------

