offenvoyer=new Image();   offenvoyer.src='bitmap/envoyer_off.gif';
onenvoyer= new Image();   onenvoyer.src='bitmap/envoyer_on.gif';
offrechercher=new Image(); offrechercher.src='bitmap/rechercher_off.gif';
onrechercher= new Image(); onrechercher.src='bitmap/rechercher_on.gif';

// Fonction pour les rollovers //////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////////////////////
function select_out(imgName,imgNameId)  { document[imgNameId].src = eval('off'+imgName+'.src') }
function select_over(imgName,imgNameId) { document[imgNameId].src = eval('on'+imgName+'.src') }

// Fonction pour constructeur des calques ///////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////////////////////	         
function verifyCompatibleBrowser(){
   this.ver=navigator.appVersion
   this.dom=document.getElementById?1:0
   this.ie5=(this.ver.indexOf("MSIE")>-1 && this.dom)?1:0;
   this.ie4=(document.all && !this.dom)?1:0;
   this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
   this.ns4=(document.layers && !this.dom)?1:0;
   this.mac= (navigator.appVersion.indexOf("Macintosh") != -1);
   this.win= (navigator.appVersion.indexOf("Windows") != -1);   
   this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5);
   return this
}	
bw=new verifyCompatibleBrowser();	

function InitCssCalque(obj) {
   this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
   return this
}

// Fonctions de la page carte.php ///////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////////////////////
var affiche=0;

function afficheinfo(id) {	 	
   eval(id+".css.visibility='visible';");
   affiche=1;    
}

function afficheprev(id) {
   if (affiche==0) {
      eval(id+".css.visibility='visible';");
   }
}

function efface(id) {
   affiche=0;
   window.setTimeout("efface_exe("+id+")",300);
}

function efface_exe(id) {
   if (affiche==0) {	
      eval("pre"+id+".css.visibility='hidden';");
      eval("inf"+id+".css.visibility='hidden';");		  
   }
}

// Fonction popup_photo() ///////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////////////////////
function popup_photo(id, rep_upload) {
   var w=(screen.availWidth-600)/2;
   var h=(screen.availHeight-400)/2;	
   PHOTOGRAPHIE=window.open("upload/"+rep_upload+"/image"+id+".jpg", "PHOTOGRAPHIE","width=600,height=400,toolbar=0,status=0,resizable=1,scrollbars=1");
   PHOTOGRAPHIE.moveTo(w,h);
}

// FonctionMenu dynamique //////////////////////////////////////////////////////////////
menu_elm=Array(254,254,254,254,254,254,254,254,254,254);
menu_init=Array(0,0,0,0,0,0,0,0,0,0);
menu_speed=5;

function menuOver(id)
{
  if(menu_init[id]==-1)	return;
  if(menu_elm[id]<=206) menu_init[id]=0;
  else menu_init[id]=1;
  
  menu_elm[id]-=6;

  if(document.getElementById) document.getElementById('colonne'+id).style.backgroundColor = "rgb("+menu_elm[id]+", "+menu_elm[id]+", "+menu_elm[id]+")";
  
  if(menu_init[id]==1) window.setTimeout("menuOver("+id+");", menu_speed);
}

function menuOut(id)
{ 
  //if(menu_init[id]==1)	return;
  if(menu_elm[id]>=253) menu_init[id]=0;
  else menu_init[id]=-1; 
  
  menu_elm[id]+=1;

  if(document.getElementById) document.getElementById('colonne'+id).style.backgroundColor = "rgb("+menu_elm[id]+", "+menu_elm[id]+", "+menu_elm[id]+")"; 
  
  if(menu_init[id]==-1) window.setTimeout("menuOut("+id+");", menu_speed);  
}



