<!--
function Display (id)
{ document.getElementById(id).style.display = 'block'; }

function Hide (id)
{ document.getElementById(id).style.display = 'none'; }


function hover(obj){
  if(document.all){
    UL = obj.getElementsByTagName('ul');
    if(UL.length > 0){
      sousMenu = UL[0].style;
      if(sousMenu.display == 'none' || sousMenu.display == ''){
        sousMenu.display = 'block';
      }else{
        sousMenu.display = 'none';
      }
    }
  }
}

function setHover(){
  LI = document.getElementById('menu').getElementsByTagName('li');
  nLI = LI.length;

  for(i=0; i < nLI; i++){
    LI[i].onmouseover = function()
    {    
      //if (document.getElementById && document.getElementById('visite')) 
      //{       
         //document.getElementById('visite').style.display='none';
      //}
      hover(this);
    }
    LI[i].onmouseout = function()
    {
      hover(this);
      //if (document.getElementById && document.getElementById('visite'))
      //{
        //document.getElementById('visite').style.display='block';
      //}
    }
  }
}




function popup_edit( uri )
{
  var a=window.open('/php/main_new_api.php?' + uri, 'target_boutique', 'width=600,height=400' );
}
function popup_edit_ex( uri )
{
  var a=window.open('/php/product_form/php/product_form.php?' + uri, 'target_boutique', 'width=600,height=400' );
}
function popup_boutique( id_boutique )
{
  var a=window.open('<?=$url_boutique?>&BOUTIQUE=' + id_boutique, 'target_boutique', 'width=500,height=200' );
}
function popup_prod( id_boutique, id_famille, id_produit )
{
  var a=window.open('<?=$url_produit?>&BOUTIQUE=' + id_boutique + '&FAM='+id_famille +'&PROD='+id_produit, 'target_boutique', 'width=500,height=200' );
}
function popup_prod_ex( uri )
{
  var a=window.open('/php/main_new_api.php?' + uri, 'target_produit', 'width=700,height=400,menubar=no,status=no,scrollbars=auto,resizable=yes' );
  a.focus();
}
function popup_verif( uri )
{
  var a=window.open('/php/verif.php?' + uri, 'target_produit', 'width=700,height=400,menubar=no,status=no,scrollbars=auto,resizable=yes' );
  a.focus();
}



function miseajour (code,ville,lat,lon)
{
//  document.getElementById('livesearch').value=code;
//  document.getElementById('ville').value=ville;
  document.getElementById('geo_lat').value=lat;
  document.getElementById('geo_lon').value=lon;
  document.getElementById("LSResult").style.display = "none";
}
function Verif_number( event )
{
  if(event.keyCode>0 && event.keyCode < 32) return event;
  if(event.which>0 && event.which < 32) return event;

  if(event.keyCode>0 && (event.keyCode < 48 || event.keyCode > 57)) { event.returnValue = false; return event; }

  if(event.which < 48 || event.which > 57) return null;

  return event;
}
function Verif_alpha( event )
{
  if(event.keyCode>0 && event.keyCode < 33) return event;
  if(event.which>0 && event.which < 33) return event;

  if(event.keyCode>0 && (event.keyCode < 97 || event.keyCode > 122) && (event.keyCode < 65 || event.keyCode > 90) 
	&& event.keyCode != 39 && event.keyCode != 45) 
	{ event.returnValue = false; return event; }

  if((event.which < 97 || event.which > 122) && (event.which < 65 || event.which > 90) 
	&& event.which != 39 && event.which != 45) return null;

  return event;
}


function recup_data_geo()
{
//  cp   =document.getElementById('livesearch').value;
//  ville=document.getElementById('ville').value;
  lat  =document.getElementById('geo_lat').value;
  lon  =document.getElementById('geo_lon').value;

//  document.getElementById('i_bak_cp').value=cp; 
//  document.getElementById('i_bak_city').value=ville; 
  document.getElementById('i_bak_lat').value=lat; 
  document.getElementById('i_bak_lon').value=lon; 

  // alert( ":" + cp + ville + lat + lon );

  return true;
}






stopachat_on = new Image;
stopachat_on.src = "http://www.r7g.com/20045/m/img/btn_stopachat_on.gif";
stopachat_off = new Image;
stopachat_off.src = "http://www.r7g.com/20045/m/img/btn_stopachat.gif";

stopannonce_on = new Image;
stopannonce_on.src = "http://www.r7g.com/20045/m/img/btn_stopannonce_on.gif";
stopannonce_off = new Image;
stopannonce_off.src = "http://www.r7g.com/20045/m/img/btn_stopannonce.gif";

encherir_on = new Image;
encherir_on.src = "http://www.r7g.com/20045/m/img/btn_encherir_on.gif";
encherir_off = new Image;
encherir_off.src = "http://www.r7g.com/20045/m/img/btn_encherir.gif";

cancel_on = new Image;
cancel_on.src = "http://www.r7g.com/20045/m/img/btn_cancel_on.gif";
cancel_off = new Image;
cancel_off.src = "http://www.r7g.com/20045/m/img/btn_cancel.gif";


// 1. Les Bulles
var IB=new Object;
var posX=0;posY=0;
var xOffset=-4;yOffset=-20;
function AffBulle(texte) {
  // IE
  if (document.all) {
    var theLeft=0;
    var theTop=0;
    if (document.documentElement && document.documentElement.scrollTop)
    {
            theTop = document.documentElement.scrollTop;
            theLeft = document.documentElement.scrollLeft;
    }
    else if (document.body)
    {
            theTop = document.body.scrollTop
            theLeft = document.body.scrollLeft
    }
    posX=event.x+theLeft; //modifs CL 09/2001 - IE : regrouper l'évènement
    posY=event.y+theTop;
  }
  var contenu="<TABLE border=0 cellspacing=0 cellpadding="+IB.NbPixel+"><TR bgcolor='"+IB.ColContour+"'><TD><TABLE border=0 cellpadding=5 cellspacing=0 bgcolor='"+IB.ColFond+"'><TR><TD><FONT size='1' face='arial' color='"+IB.ColTexte+"'><span style='font-size: 11px'>"+texte+"</span><\/FONT><\/TD><\/TR><\/TABLE><\/TD><\/TR><\/TABLE>&nbsp;";
  var finalPosX=posX-xOffset;
  if (finalPosX<0) finalPosX=0;
  if (document.all) // IE et Opera
  {
    //var f=window.event;
    //doc=document.body.scrollTop;
    bulle.innerHTML=contenu;
    document.all["bulle"].style.top=posY+yOffset;
    document.all["bulle"].style.left=finalPosX;//f.x-xOffset;
    document.all["bulle"].style.visibility="visible";
  }
  else if (document.layers) 
  {
    document.layers["bulle"].document.write(contenu);
    document.layers["bulle"].document.close();
    document.layers["bulle"].top=posY+yOffset;
    document.layers["bulle"].left=finalPosX;
    document.layers["bulle"].visibility="show";
  }
  else if (document.getElementById) // FireFox
  {
    // alert( document.getElementById("bulle_firefox").style );
    document.getElementById("bulle_firefox").innerHTML       =contenu;
    document.getElementById("bulle_firefox").style.top       =(posY+yOffset) + "px";
    document.getElementById("bulle_firefox").style.left      =finalPosX + "px";
    document.getElementById("bulle_firefox").style.visibility="visible";
  }
}
function getMousePos(e) {
  if (document.all) {
    posX=event.x+document.body.scrollLeft; //modifs CL 09/2001 - IE : regrouper l'évènement
    posY=event.y+document.body.scrollTop;
  }
  else {
    posX=e.pageX; //modifs CL 09/2001 - NS6 : celui-ci ne supporte pas e.x et e.y
    posY=e.pageY; 
  }
}
function HideBulle() {
	if (document.layers) {document.layers["bulle"].visibility="hide";}
	if (document.all) {document.all["bulle"].style.visibility="hidden";}
	else if (document.getElementById){document.getElementById("bulle_firefox").style.visibility="hidden";}
}

function InitBulle(ColTexte,ColFond,ColContour,NbPixel) {
	IB.ColTexte=ColTexte;
        IB.ColFond=ColFond;
        IB.ColContour=ColContour;
        IB.NbPixel=NbPixel;

	if (document.layers) {
		window.captureEvents(Event.MOUSEMOVE);
                window.onMouseMove=getMousePos;
		document.write("<LAYER name='bulle' top=0 left=0 visibility='hide'><\/LAYER>");
	}
	if (document.all) {
		document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'><\/DIV>");
                // Pose problème avec IE => inutile, se trouve dans getMousePos
                //		document.onmousemove=getMousePos;
	}
	//modif CL 09/2001 - NS6 : celui-ci ne supporte plus document.layers mais document.getElementById
	else if (document.getElementById) {
	        document.onmousemove=getMousePos;
	        document.write("<DIV id='bulle_firefox' style='position:absolute;top:0;left:0;visibility:hidden'><\/DIV>");
	        //document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'><\/DIV>");
	}
}

// -->
