function confirmDelete( message, callPage )
{
  if( confirm( message ) )
  {
    location.href = callPage;
  }  
}


function update_qte( form, valeur )
{
  qte = form.quantite.value;
  qte = parseInt( qte ) + parseInt( valeur );
  if (qte < 1) { qte = 1; }
  if (qte > 99) { qte = 99; }
  form.quantite.value = qte;
}


function verifyForbiddenChar( p_string )
{
  var _counter = 0;
  var _length  = 0;
  var _isFound = 0;
  var _forbiddenChar = '\<>=()/:.,+-"?&';
  
  _length = _forbiddenChar.length;
  while( ( _counter < _length )
      && ( _isFound == 0 ) )
  {
    if( p_string.indexOf( _forbiddenChar[_counter] ) != -1 )
    {
      _isFound = 1;
    }
    
    _counter += 1;
  }

  // Test last char
  if( p_string.indexOf( "'" ) != -1 )
  {
    _isFound = 1;
  }

  if( _isFound == 1 ) return false;
  
  return true;
}


function verifyForbiddenCharForEmail( p_string )
{
  var _counter = 0;
  var _length  = 0;
  var _isFound = 0;
  var _forbiddenChar = '< > = ( ) / : , + - \ " ? &';
  
  _length = _forbiddenChar.length;
  while( ( _counter < _length )
      && ( _isFound == 0 ) )
  {
    if( p_string.indexOf( _forbiddenChar[_counter] ) != -1 )
    {
      _isFound = 1;
    }
    
    _counter += 2;
  }

  // Test last char
  if( p_string.indexOf( "'" ) != -1 )
  {
    _isFound = 1;
  }
  
  if( _isFound == 1 ) return false;
  
  return true;
}

function verification( p_form )
{
  var password = "";
  var email = "";
  
  // ---------------- IDENTIFICATION
  // Mail Control
  if( p_form.email.value == '' )
  {
    alert( 'Veuillez entrer un e-mail!' );
    p_form.email.focus( );
    return false;
  }
  else
  {
    email = p_form.email.value;
    // Validity of the mail
    if( email.indexOf( "." ) == -1 )
    {
      alert( 'Votre e-mail doit comporter un point' );
      p_form.email.focus( );
      return false;
    }
    if( email.indexOf( "@" ) == -1 )
    {
      alert( 'Votre e-mail doit comporter un @' );
      p_form.email.focus( );
      return false;
    }
    if( verifyForbiddenCharForEmail( p_form.email.value ) == false )
    {
      alert( 'Vous avez utilisé un caractère interdit!' );
      p_form.email.focus( );
      return false;
    }
  }

  // Password control
  if( p_form.passwd1.value == '' )
  {
    alert( 'Veuillez entrer un mot de passe!' );
    p_form.passwd1.focus( );
    return false;
  }
  else
  {
    password = p_form.passwd1.value;
    if( password.length < 8 )
    {
      alert( 'Votre mot de passe doit comporter au moins 8 charactères!' );
      p_form.passwd1.focus( );
      return false;
    }
    if( verifyForbiddenChar( p_form.passwd1.value ) == false )
    {
      alert( 'Vous avez utilisé un caractère interdit!' );
      p_form.passwd1.focus( );
      return false;
    }
  }
  if( p_form.passwd2.value == '' )
  {
    alert( 'Veuillez entrer de nouveau votre mot de passe!' );
    p_form.passwd2.focus( );
    return false;
  }
  if( verifyForbiddenChar( p_form.passwd2.value ) == false )
  {
    alert( 'Vous avez utilisé un caractère interdit!' );
    p_form.passwd2.focus( );
    return false;
  }
  if( p_form.passwd1.value != p_form.passwd2.value )
  {
    alert( 'Vos mots de passe sont différents!' );
    p_form.passwd2.focus( );
    return false;
  }

  // Question / Answer control
  if( p_form.question.value == '' )
  {
    alert( 'Veuillez entrer une question!' );
    p_form.question.focus( );
    return false;
  }
  if( verifyForbiddenChar( p_form.question.value ) == false )
  {
    alert( 'Vous avez utilisé un caractère interdit!' );
    p_form.question.focus( );
    return false;
  }

  if( p_form.answer.value == '' )
  {
    alert( 'Veuillez entrer une réponse!' );
    p_form.question.focus( );
    return false;
  }
  if( verifyForbiddenChar( p_form.answer.value ) == false )
  {
    alert( 'Vous avez utilisé un caractère interdit!' );
    p_form.answer.focus( );
    return false;
  }
  
  // Sponsor Control
  if( p_form.emails.value != '' )
  {
    email = p_form.emailparrain.value;
    // Validity of the mail
    if( email.indexOf( "." ) == -1 )
    {
      alert( 'L\'e-mail de votre parrain doit comporter un point' );
      p_form.emailparrain.focus( );
      return false;
    }
    if( email.indexOf( "@" ) == -1 )
    {
      alert( 'L\'e-mail de votre parrain doit comporter un @' );
      p_form.emailparrain.focus( );
      return false;
    }
    if( verifyForbiddenCharForEmail( p_form.emailparrain.value ) == false )
    {
      alert( 'Vous avez utilisé un caractère interdit!' );
      p_form.emailparrain.focus( );
      return false;
    }
  }

  // ---------------- COORDONNEES
  // Civility
  if( p_form.titre.value == 'Faîtes votre choix' )
  {
    alert( 'Veuillez entrer un titre!' );
    p_form.titre.focus( );
    return false;
  }
  
  // Firstname control
  if( p_form.prenom.value == '' )
  {
    alert( 'Veuillez entrer un prénom!' );
    p_form.prenom.focus( );
    return false;
  }
  if( verifyForbiddenChar( p_form.prenom.value ) == false )
  {
    alert( 'Vous avez utilisé un caractère interdit!' );
    p_form.prenom.focus( );
    return false;
  }

  // Name control
  if( p_form.nom.value == '' )
  {
    alert( 'Veuillez entrer un nom!' );
    p_form.nom.focus( );
    return false;
  }
  if( verifyForbiddenChar( p_form.nom.value ) == false )
  {
    alert( 'Vous avez utilisé un caractère interdit!' );
    p_form.nom.focus( );
    return false;
  }
  
  // Birthday control
  if( ( p_form.j_date_naiss.value == 'jours' )
   || ( p_form.m_date_naiss.value == 'mois' )
   || ( p_form.a_date_naiss.value == 'année' ) )
  {
    alert( 'Veuillez entrer votre date de naissance!' );
    return false;
  }
  
  // Address control
  if( p_form.adresse.value == '' )
  {
    alert( 'Veuillez entrer une adresse!' );
    p_form.adresse.focus( );
    return false;
  }
  
  // Postal Code control
  if( p_form.cp.value == '' )
  {
    alert( 'Veuillez entrer un code postal!' );
    p_form.cp.focus( );
    return false;
  }
  if( verifyForbiddenChar( p_form.cp.value ) == false )
  {
    alert( 'Vous avez utilisé un caractère interdit!' );
    p_form.cp.focus( );
    return false;
  }
  
  
  // City control
  if( p_form.ville.value == '' )
  {
    alert( 'Veuillez entrer une ville!' );
    p_form.ville.focus( );
    return false;
  }
  if( verifyForbiddenChar( p_form.ville.value ) == false )
  {
    alert( 'Vous avez utilisé un caractère interdit!' );
    p_form.ville.focus( );
    return false;
  }
  
  
  // Country control
  if( p_form.pays.value == 'Votre Pays' )
  {
    alert( 'Veuillez entrer un pays!' );
    p_form.pays.focus( );
    return false;
  }
  
  // General conditions control
  if( !p_form.reglement.checked )
  {
    alert( 'Veuillez accepter les Conditions Générales de Vente!' );
    p_form.reglement.focus( );
    return false;
  }
  
  // No error detected, MD5 password
  p_form.passwd1.value = calcMD5( p_form.passwd1.value );
  p_form.passwd2.value = calcMD5( p_form.passwd2.value );

  return true;  
}

function my_alert( p_msg )
{
  if( 0 ) alert( p_msg );
}

function openPicture( picturePath, pictureWidth, pictureHeight, nbPictures )
{
  _pageToCall = '../galeria.php5?name=' + picturePath + '&qty=' + nbPictures;
  myWindow = open( _pageToCall,
                   'Article',
                   'weigth=toolbar=no,scrollbars=yes,resizable=yes,width=' + pictureWidth + ',height=' + pictureHeight );
}


function openOrder( clientMail, orderReference, width, nbElem )
{
  _height = nbElem * 75 + 330;
  if( _height > 768 ) _height = 768;
  window.open( 'orderDetails.php5?mail=' + clientMail + '&orderRef=' + orderReference + '&size=' + width, 'Commande', 'width='+width+', height='+_height+', toolbar=0, scrollbars=yes');
}
  

/*
 * Convert a 32-bit number to a hex string
 * with ls-byte first
 */
var hex_chr = "0123456789abcdef";
function rhex(num)
{
  str = "";
  for(j = 0; j <= 3; j++)
    str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F) +
           hex_chr.charAt((num >> (j * 8)) & 0x0F);
  return str;
}

/*
 * Convert a string to a sequence of 16-word blocks,
 * stored as an array.
 * Append padding bits and the length, as described
 * in the MD5 standard.
 */
function str2blks_MD5(str)
{
  nblk = ((str.length + 8) >> 6) + 1;
  blks = new Array(nblk * 16);
  for(i = 0; i < nblk * 16; i++) blks[i] = 0;
  for(i = 0; i < str.length; i++)
    blks[i >> 2] |= str.charCodeAt(i) << ((i % 4) * 8);
  blks[i >> 2] |= 0x80 << ((i % 4) * 8);
  blks[nblk * 16 - 2] = str.length * 8;
  return blks;
}

/*
 * Add integers, wrapping at 2^32. This uses 16-bit
 * operations internally to work around bugs in some
 * JS interpreters.
 */
function add(x, y)
{
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  return (msw << 16) | (lsw & 0xFFFF);
}

/*
 * Bitwise rotate a 32-bit number to the left
 */
function rol(num, cnt)
{
  return (num << cnt) | (num >>> (32 - cnt));
}

/*
 * These functions implement the basic operation
 * for each round of the algorithm.
 */
function cmn(q, a, b, x, s, t)
{
  return add(rol(add(add(a, q), add(x, t)), s), b);
}
function ff(a, b, c, d, x, s, t)
{
  return cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function gg(a, b, c, d, x, s, t)
{
  return cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function hh(a, b, c, d, x, s, t)
{
  return cmn(b ^ c ^ d, a, b, x, s, t);
}
function ii(a, b, c, d, x, s, t)
{
  return cmn(c ^ (b | (~d)), a, b, x, s, t);
}

/*
 * Take a string and return the hex
 * representation of its MD5.
 */
function calcMD5(str)
{
  x = str2blks_MD5(str);
  a =  1732584193;
  b = -271733879;
  c = -1732584194;
  d =  271733878;

  for(i = 0; i < x.length; i += 16)
  {
    olda = a;
    oldb = b;
    oldc = c;
    oldd = d;

    a = ff(a, b, c, d, x[i+ 0], 7 , -680876936);
    d = ff(d, a, b, c, x[i+ 1], 12, -389564586);
    c = ff(c, d, a, b, x[i+ 2], 17,  606105819);
    b = ff(b, c, d, a, x[i+ 3], 22, -1044525330);
    a = ff(a, b, c, d, x[i+ 4], 7 , -176418897);
    d = ff(d, a, b, c, x[i+ 5], 12,  1200080426);
    c = ff(c, d, a, b, x[i+ 6], 17, -1473231341);
    b = ff(b, c, d, a, x[i+ 7], 22, -45705983);
    a = ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
    d = ff(d, a, b, c, x[i+ 9], 12, -1958414417);
    c = ff(c, d, a, b, x[i+10], 17, -42063);
    b = ff(b, c, d, a, x[i+11], 22, -1990404162);
    a = ff(a, b, c, d, x[i+12], 7 ,  1804603682);
    d = ff(d, a, b, c, x[i+13], 12, -40341101);
    c = ff(c, d, a, b, x[i+14], 17, -1502002290);
    b = ff(b, c, d, a, x[i+15], 22,  1236535329);    

    a = gg(a, b, c, d, x[i+ 1], 5 , -165796510);
    d = gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
    c = gg(c, d, a, b, x[i+11], 14,  643717713);
    b = gg(b, c, d, a, x[i+ 0], 20, -373897302);
    a = gg(a, b, c, d, x[i+ 5], 5 , -701558691);
    d = gg(d, a, b, c, x[i+10], 9 ,  38016083);
    c = gg(c, d, a, b, x[i+15], 14, -660478335);
    b = gg(b, c, d, a, x[i+ 4], 20, -405537848);
    a = gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
    d = gg(d, a, b, c, x[i+14], 9 , -1019803690);
    c = gg(c, d, a, b, x[i+ 3], 14, -187363961);
    b = gg(b, c, d, a, x[i+ 8], 20,  1163531501);
    a = gg(a, b, c, d, x[i+13], 5 , -1444681467);
    d = gg(d, a, b, c, x[i+ 2], 9 , -51403784);
    c = gg(c, d, a, b, x[i+ 7], 14,  1735328473);
    b = gg(b, c, d, a, x[i+12], 20, -1926607734);
    
    a = hh(a, b, c, d, x[i+ 5], 4 , -378558);
    d = hh(d, a, b, c, x[i+ 8], 11, -2022574463);
    c = hh(c, d, a, b, x[i+11], 16,  1839030562);
    b = hh(b, c, d, a, x[i+14], 23, -35309556);
    a = hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
    d = hh(d, a, b, c, x[i+ 4], 11,  1272893353);
    c = hh(c, d, a, b, x[i+ 7], 16, -155497632);
    b = hh(b, c, d, a, x[i+10], 23, -1094730640);
    a = hh(a, b, c, d, x[i+13], 4 ,  681279174);
    d = hh(d, a, b, c, x[i+ 0], 11, -358537222);
    c = hh(c, d, a, b, x[i+ 3], 16, -722521979);
    b = hh(b, c, d, a, x[i+ 6], 23,  76029189);
    a = hh(a, b, c, d, x[i+ 9], 4 , -640364487);
    d = hh(d, a, b, c, x[i+12], 11, -421815835);
    c = hh(c, d, a, b, x[i+15], 16,  530742520);
    b = hh(b, c, d, a, x[i+ 2], 23, -995338651);

    a = ii(a, b, c, d, x[i+ 0], 6 , -198630844);
    d = ii(d, a, b, c, x[i+ 7], 10,  1126891415);
    c = ii(c, d, a, b, x[i+14], 15, -1416354905);
    b = ii(b, c, d, a, x[i+ 5], 21, -57434055);
    a = ii(a, b, c, d, x[i+12], 6 ,  1700485571);
    d = ii(d, a, b, c, x[i+ 3], 10, -1894986606);
    c = ii(c, d, a, b, x[i+10], 15, -1051523);
    b = ii(b, c, d, a, x[i+ 1], 21, -2054922799);
    a = ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
    d = ii(d, a, b, c, x[i+15], 10, -30611744);
    c = ii(c, d, a, b, x[i+ 6], 15, -1560198380);
    b = ii(b, c, d, a, x[i+13], 21,  1309151649);
    a = ii(a, b, c, d, x[i+ 4], 6 , -145523070);
    d = ii(d, a, b, c, x[i+11], 10, -1120210379);
    c = ii(c, d, a, b, x[i+ 2], 15,  718787259);
    b = ii(b, c, d, a, x[i+ 9], 21, -343485551);

    a = add(a, olda);
    b = add(b, oldb);
    c = add(c, oldc);
    d = add(d, oldd);
  }
  return rhex(a) + rhex(b) + rhex(c) + rhex(d);
}

/*
  Display popup with image for the menu "Last View ..."
  */

//-------------------------------------------------------------
//  Nom Document : GFBULLE.JS
//  Auteur       : G.Ferraz
//  Objet        : Info Bulle...
//  Création     : 01.12.2003
//-------------------------------------------------------------
//  Mise à Jour  : 29.05.2006
//  Objet        : Compatibilité IE6 et DOCTYPE
//  -----------------------------------------------------------
//  Mise à Jour  : 21.06.2006
//  Objet        : Prise en compte des <SELECT>
//  2.1 -------------------------------------------------------
//  Mise à Jour  : 15.09.2006
//  Objet        : Amélioration et modif suite à commentaires
//  2.2 -------------------------------------------------------
//  Mise à Jour  : 10.11.2006
//  Objet        : Correction Bug sous FF si document <DIV style="float...">
//  2.3 -------------------------------------------------------
//  Mise à Jour  : 15.08.2007
//  Objet        : Ajout fonction Init_Bulle plus esprit DOM plus quelques ...
//  -----------------------------------------------------------
var OPERA    = ( window.opera ? true : false);
var Mouse_X;          // Position X en Cours de la Mouse
var Mouse_Y;          // Position Y en Cours de la Mouse
var Decal_X  = -10;   // Décalage X entre Pointeur Mouse et Bulle
var Decal_Y  = -10;   // Décalage Y entre Pointeur Mouse et Bulle
var bBULLE   = false; // Flag Affichage de la Bulle
// Flag pour présence Select sous IE
var bSELECT  = ( navigator.appName =='Microsoft Internet Explorer') && !OPERA;
//-- Pour Test mode Cadre
var ZObjet = new RECT();   // Zone pour MouseMove
var ZBulle = new RECT();
var bCADRE = false;        // Flag Affichage du Cadre
var Fenetre = new RECT();
//=========================
// Définition pour le Cadre
//=========================
function RECT(){
  this.Left   =0;
  this.Top    =0;
  this.Right  =0;
  this.Bottom =0;
  this.InitRECT = RECT_Set; 
  this.PtInRECT = RECT_PtIn; 
}
//-------------------------------------------
function RECT_Set( left_, top_, larg_, haut_){
  with( this){
    Left   = ( left_ ? left_ : -1);
    Top    = ( top_  ? top_  : -1);
    Right  = Left + ( larg_ ? (larg_ -1): 0);
    Bottom = Top  + ( haut_ ? (haut_ -1): 0);
  }
}
//-------------------------
function RECT_PtIn( x_, y_){
  with( this){
    return(( x_ > Left) && ( x_ < Right) && ( y_ > Top ) && ( y_ < Bottom));
  }
}
//---------------------
function GetObjet(div_){
  return document.getElementById(div_);
}
//-- 10.11.2006 ----------------------------
// correction bug sur <DIV style="float...">
// PROBLEME BARRE DE SCROLL sous FireFOX
//------------------------------------------
function Win_GetDimension(){
  var Left;
  var Top;
  var Width;
  var Height;
  var DocRef;
  if( window.innerWidth){
    with( window){
      //-- position scrolling
      Left   = pageXOffset;
      Top    = pageYOffset;
      //-- dimension scroll compris
      Width  = innerWidth;
      Height = innerHeight;
      //-- Recup Max et min Hauteur du document
      var H_Max = Math.max( document.documentElement.clientHeight, document.body.clientHeight);
      var H_Min = Math.min( document.documentElement.clientHeight, document.body.clientHeight);
      //-- si hauteur document plus grand que fenetre
      if( H_Max > Height)
        Height = H_Min;
      //-- si hauteur document plus petit que fenetre
      else
        Height = H_Max;
      //-- Recup Max et min Largeur du document
      var L_Max = Math.max( document.documentElement.clientWidth, document.body.clientWidth);
      var L_Min = Math.min( document.documentElement.clientWidth, document.body.clientWidth);
      //-- si largeur document plus grand que fenetre
      if( L_Max > Width)
        Width = L_Min;
      //-- si largeur document plus petit que fenetre
      else
        Width = L_Max;
    }
  }
  else{ // Cas Explorer a part le plus simple
    if( document.documentElement && document.documentElement.clientWidth)
      DocRef = document.documentElement;
    else
      DocRef = document.body;
    with( DocRef){
      Left   = scrollLeft;
      Top    = scrollTop;
      Width  = clientWidth;
      Height = clientHeight;
    }
  }
  return({ width : Width, height : Height, top: Top, right: Left +Width, bottom: Top + Height, left: Left });
}
//------------------------------------
function ObjShowAll( div_, x_, y_, z_){
  var B_Obj = GetObjet( div_);
  var F_Obj = GetObjet( div_ +'_F');
  var MaxX, MaxY;
  var Haut, Larg;
  var SavY = y_;

  if( B_Obj){
    //-- Recup. dimension du DIV
    Larg = B_Obj.offsetWidth;
    Haut = B_Obj.offsetHeight;
    with( Fenetre){
      //-- Reajuste dimension fenetre
      MaxX = Fenetre.right  - Larg;
      MaxY = Fenetre.bottom - Haut;
      //-- Application Bornage
      if( x_ > MaxX) x_ = MaxX;
      if( x_ < Fenetre.left) x_ = Fenetre.left;
      if( y_ > MaxY) y_ = MaxY;
      if( y_ < Fenetre.top)  y_ = Fenetre.top;
    }
    //-- si en bas On réajuste
    //-- pour que la bulle ne prenne pas le focus
    if( y_== MaxY){
      var DeltaY = MaxY -SavY;
      y_ = MaxY - DeltaY -Haut -2*Decal_Y;
    }
    //-- On place la Bulle
    if( F_Obj){//-- Ajout pour SELECT sous IE
      with( F_Obj.style){
        left       = x_ +"px";
        top        = y_ +"px";
        zIndex     = z_-1;
        visibility = "visible";
      }
    }
    with(B_Obj.style){
      left       = x_ +"px";
      top        = y_ +"px";
      zIndex     = z_;
      visibility = "visible";
    }
    //-- Affectation Zone du Rectangle
    ZBulle.InitRECT( x_, y_, Larg, Haut);
  }
}
//-- 15.09.2006 ------------------------
// Ajout Fonction Add_Event
//--------------------------------------
function Add_Event( obj_, event_, func_, mode_){
  if( obj_.addEventListener)
    obj_.addEventListener( event_, func_, mode_? mode_:false);
  else
    obj_.attachEvent( 'on'+event_, func_);
}
//-- 15.09.2006 ------------------------
// Utilisation de Add_Event
//--------------------------------------
function Init_Bulle(){
  //-- Pour les SELECT on supprime l'événement hérite
  var Obj = document.body.getElementsByTagName('SELECT');
  if( Obj && Obj.length){
    for(var i=0; i < Obj.length; i++){
      if( Obj[i].size == 1){
        for(var k=0; k < Obj[i].options.length; k++){
          Add_Event( Obj[i].options[k], 'mousemove', popupHide);
        }
      }
      Add_Event( Obj[i], 'mousedown', popupHide);
      Add_Event( Obj[i], 'scroll', popupHide);
    }
  }
  else 
    bSELECT = false; // Pas de SELECT dans le document
}
////////////////////////////
// mode Cadre Indépendant //
////////////////////////////
//------------------------
function CadreWrite( txt_){
  var Html;
  var B_Obj = GetObjet( 'GF_BULLE');
  var F_Obj = GetObjet( 'GF_BULLE_F');
  if( B_Obj){
    //-- Récup dimension d'affichage
    Fenetre = Win_GetDimension();
    Decal_X = -10;  // Decalage dans de la Bulle
    Decal_Y = -10;
    Html  = "<table border='1' bordercolor='#808080' cellspacing=0 cellpadding=2 bgcolor='#C0C0C0'>";
    Html += "<tr><td class='Bulle' nowrap>";
    Html += txt_;
    Html += "<\/td><\/tr><\/table>";
    B_Obj.innerHTML = Html;

    if( F_Obj){ //-- Ajout pour SELECT sous IE
      with( F_Obj.style){
        height = B_Obj.offsetHeight;
        width  = B_Obj.offsetWidth;
        left   = B_Obj.offsetLeft;
        top    = B_Obj.offsetTop;
      }
    }
    //-- On affiche le résultat
    ObjShowAll('GF_BULLE', Mouse_X +Decal_X, Mouse_Y +Decal_Y, 1000);
    bCADRE= true;
    return( true);
  }
  return(false);
}
////////////////////////////
// mode Bulle Indépendant //
////////////////////////////
//-- 15.09.2006 ------------------------
// Ajout paramètre x_ et y_
//--------------------------------------
function popupShowPicture( txt_, x_, y_){
  var B_Obj = GetObjet( 'GF_BULLE');
  var F_Obj = GetObjet( 'GF_BULLE_F');
  var Html;
  if( B_Obj){
    //-- Récup dimension d'affichage
    Fenetre = Win_GetDimension();
    // Decalage hors de la Bulle
    Decal_X =( x_ ? x_: 5);//    Decal_X = 5 par défaut
    Decal_Y =( y_ ? y_: 5);//    Decal_Y = 5 par défaut
    //-- Ecriture de la Bulle
    Html  = "<table border=0 cellspacing=0><tr><td bgcolor='#c0c0c0'>";
    Html += "<table border=0 cellspacing=0 cellpadding=4 width='100%' bgcolor='#FFFFE8'>";
    Html += "<tr><td class='Bulle' nowrap>";
    //Html += txt_;
    Html += "<img src='"+txt_+"' alt='' border='0'>";
    Html += "<\/td><\/tr><\/table><\/td><\/tr><\/table>";
    B_Obj.innerHTML = Html;
    //-- Ajout pour SELECT sous IE
    if( F_Obj){
      with( F_Obj.style){
        height = B_Obj.offsetHeight;
        width  = B_Obj.offsetWidth;
        left   = B_Obj.offsetLeft;
        top    = B_Obj.offsetTop;
      }
    }
    //-----------------------------------------//
    // IMPORTANT on n'affiche pas la Bulle     //
    // l'événement MouseOver va avec MouseMove //
    //-----------------------------------------//
    // ObjShowAll('GF_BULLE', Mouse_X +Decal_X, Mouse_Y +Decal_Y, 1000);
    bBULLE= true;
    return( true);
  }
 return(false);
}


function popupShowCart( p_headerPict, p_productStr, p_x, p_y )
{
  var B_Obj = GetObjet( 'GF_BULLE');
  var F_Obj = GetObjet( 'GF_BULLE_F');
  var Html;
  if( B_Obj){
    //-- Récup dimension d'affichage
    Fenetre = Win_GetDimension();
    // Decalage hors de la Bulle
    Decal_X = ( p_x ? p_x : 5);//    Decal_X = 5 par défaut
    Decal_Y = ( p_y ? p_y : 5);//    Decal_Y = 5 par défaut
    //-- Ecriture de la Bulle
    Html  = "<table border=1 cellspacing=0><tr><td bgcolor='#c0c0c0'>";
    Html += "<table border=1 cellspacing=0 cellpadding=4 width='100%' bgcolor='#FFFFE8'>";
    Html += "<tr><td class='Bulle' colspan='5'nowrap><img src='" + p_headerPict + "' alt='' border='0'><\/td><\/tr>";
    Html += "<tr><td align='center'>Photo<\/td><td align='center'>Référence<\/td>";
    Html += "<td align='center'>Quantité<\/td><td align='center'>Prix<\/td>";
    Html += "<td align='center'>En Stock ?<\/td><\/tr>";
    
    // Getting all products
    var _array = p_productStr.split('-');
    var _counter = 0;
    var _nbElem = _array.length;
    
    for( _counter = 0; _counter < _nbElem; _counter++ )
    {
      var _product = _array[_counter].split( ';' );
      Html += "<tr><td align='center'><img src='" + _product[0] + "' alt='' border='0' height=64 width=32\/><\/td>";
      Html += "    <td align='center'>" + _product[1] + "<\/td>";
      Html += "    <td align='center'>" + _product[2] + "<\/td>";
      Html += "    <td align='center'>" + _product[3] + "<\/td>";
      Html += "    <td align='center'><img src='" + _product[4] + "' alt='' border='0' height=20 width=20\/><\/td><\/tr>";
    }
    
    Html += "<\/table><\/td><\/tr><\/table>";
   
    B_Obj.innerHTML = Html;
    //-- Ajout pour SELECT sous IE
    if( F_Obj){
      with( F_Obj.style){
        height = B_Obj.offsetHeight;
        width  = B_Obj.offsetWidth;
        left   = B_Obj.offsetLeft;
        top    = B_Obj.offsetTop;
      }
    }
    //-----------------------------------------//
    // IMPORTANT on n'affiche pas la Bulle     //
    // l'événement MouseOver va avec MouseMove //
    //-----------------------------------------//
    // ObjShowAll('GF_BULLE', Mouse_X +Decal_X, Mouse_Y +Decal_Y, 1000);
    bBULLE= true;
    return( true);
  }
 return(false);
}

//------------------
function popupHide(){
  var B_Obj = GetObjet( 'GF_BULLE');
  var F_Obj = GetObjet( 'GF_BULLE_F');

  if( F_Obj){ //-- Ajout pour SELECT sous IE
    F_Obj.style.height = 0 +"px";
  }
  with(B_Obj){
    innerHTML        = "&nbsp;"
    style.left       = -1000 +"px";
    style.top        = -1000 +"px";
    style.zIndex     = 0;
    style.visibility = "hidden";
  }
  //-- Pose les Flags
  bCADRE = false;
  bBULLE = false;
  return(true);
}
//--------------------
function WhereMouse(e){
  var DocRef;
  var Obj  = null;
  var bRECT= true;
  //-- On traque les hybrides
  if( e && e.target){
    Mouse_X = e.pageX;
    Mouse_Y = e.pageY;
    Obj     = e.target;
    //-- Spécifique FireFox
    if( Obj.boxObject){
      with( Obj){
        //-- La Zone de prise en compte
        ZObjet.InitRECT( boxObject.x, boxObject.y, boxObject.width, boxObject.height);
      }
      //-- Barre de défilement et autre sous FireFox
      Obj = e.originalTarget;
      if( Obj)
        if( Obj.prefix =="xul"){
          BulleHide();
          return( true);
        }
      //-- Test pour SELECT sous FireFox
      bRECT = ZObjet.PtInRECT( Mouse_X, Mouse_Y);
    }
  }//-- Endif
  else{
    if( document.documentElement && document.documentElement.clientWidth)
      DocRef = document.documentElement;
    else
      DocRef = document.body;

    Mouse_X = event.clientX +DocRef.scrollLeft;
    Mouse_Y = event.clientY +DocRef.scrollTop;
  }

  if( bBULLE)
    if( bRECT)
      ObjShowAll('GF_BULLE', Mouse_X +Decal_X, Mouse_Y +Decal_Y, 1000);

  if( bCADRE)// on ne move pas on test juste si dans Rect
    if( !ZBulle.PtInRECT( Mouse_X, Mouse_Y))
      BulleHide();

  return( true);
}

//-- 15.08.2007 ---------------------------
// Fonction plus DOM que les document.write
//-----------------------------------------
function Init_Page(){
  var O_New;

  Init_Bulle();

  if( document.createElement){
    //-- Creation IFRAME
    O_New = document.createElement('iframe');
    //-- Definition du style
    with( O_New){
      id               = "GF_BULLE_F";
      frameBorder      = "no";
      scrolling        = "no"
      style.position   = "absolute";
      style.left       = "0px";
      style.top        = "0px";
      style.border     = "0px";
      style.width      = "auto";
      style.height     = "auto";
      style.zIndex     = 0;
      style.visibility = "hidden";
    }
    //-- Ajout de l'element IFRAME
    document.body.appendChild( O_New);
    //-- Creation du DIV Bulle
    O_New = document.createElement('div');
    //-- Definition du style
    with( O_New){
      id               = "GF_BULLE";
      style.position   = "absolute";
      style.left       = "0px";
      style.top        = "0px";
      style.width      = "auto";
      style.height     = "auto";
      style.zIndex     = 0;
      style.visibility = "hidden";
    }
    //-- Ajout de l'element DIV
    document.body.appendChild( O_New);
    //-- Creation balise style
    var O_Style = document.createElement('style');
    //-- Le style de la bulle
    var szStyle = '.Bulle{cursor:default;color:#000000;font-size:13px;font-family:Verdana;white-space:nowrap}';    
    //-- Obligatoire pour IE
    O_Style.setAttribute("type", "text/css");
    //-- pour IE
    if( O_Style.styleSheet){
      O_Style.styleSheet.cssText = szStyle;
    }
    //-- Pour les autres
    else{
      var O_Text = document.createTextNode( szStyle);
      O_Style.appendChild( O_Text);
    }
    //-- Ajout de l'element STYLE
    document.getElementsByTagName('head')[0].appendChild( O_Style);
    //-- Ajout evenement position
    Add_Event( document, 'mousemove', WhereMouse);
  }
}

//== INITIALISATION ==================================
Add_Event( window, 'load', Init_Page);
//-- EOF ------------------------------------------------------
