// 1] Détection du navigateur
	var ns4=(document.layers)? true:false;
	var ns6=(document.getElementById)? true:false;
	var ie4=(document.all)? true:false;
	var ie5=false;
	if(ie4){
		if((navigator.userAgent.indexOf('MSIE 5')> 0)||(navigator.userAgent.indexOf('MSIE 6')> 0)){
			ie5=true;
		}
		if(ns6){
			ns6=false;
		}
	}

  var posX=0;
  var posY=0;


// 2] Déclaration des infos bulles standards 
  var app1TitleTxt='<img src="../images/minizoom.gif"><B>&nbsp;Colchique</B>';
  var app1TitleTxtTarif='<B>&nbsp;Colchique</B>';
  var app1InfoTxt='<LI><B>3</B> Pi&egrave;ces</LI><LI>Jusqu\'&agrave; <B>6</B> Personnes</LI><LI><B>SdB ind&eacute;pendante</B></LI>';
  var app2TitleTxt='<img src="../images/minizoom.gif"><B>&nbsp;Belle de Nuit</B>';
  var app2TitleTxtTarif='<B>&nbsp;Belle de Nuit</B>';
  var app2InfoTxt='<LI><B>1</B> Chambre</LI><LI>Jusqu\'&agrave; <B>2</B> Personnes</LI><LI>1 Lavabo, SdB sur le pallier</LI>';
  var app3TitleTxt='<img src="../images/minizoom.gif"><B>&nbsp;Sous la Lune</B>';
  var app3TitleTxtTarif='<B>&nbsp;Sous la Lune</B>';
  var app3InfoTxt='<LI><B>1</B> Chambre</LI><LI>Jusqu\'&agrave; <B>3</B> Personnes</LI><LI>1 Lavabo, SdB sur le pallier</LI>';
  var app4TitleTxt='<img src="../images/minizoom.gif"><B>&nbsp;Gentiane</B>';
  var app4TitleTxtTarif='<B>&nbsp;Gentiane</B>';
  var app4InfoTxt='<LI><B>3</B> Pi&egrave;ces</LI><LI>Jusqu\'&agrave; <B>5</B> Personnes</LI><LI><B>SdB ind&eacute;pendante</B></LI>';
  var app5TitleTxt='<img src="../images/minizoom.gif"><B>Bonjour ch&eacute;ri</B>';
  var app5TitleTxtTarif='<B>Bonjour ch&eacute;ri</B>';
  var app5InfoTxt='<LI><B>2</B> Pi&egrave;ces</LI><LI>Jusqu\'&agrave; <B>3</B> Personnes</LI><LI>1 Lavabo, SdB sur le pallier</LI>';
  var app6TitleTxt='<img src="../images/minizoom.gif"><B>Pervenche</B>';
  var app6TitleTxtTarif='<B>Pervenche</B>';
  var app6InfoTxt='<LI><B>3</B> Pi&egrave;ces</LI><LI>Jusqu\'&agrave; <B>4</B> Personnes</LI><LI><B>SdB ind&eacute;pendante</B></LI>';
// 2_1] Gestion des liens
/*  
  function Load_Url(url,dest){
    if(window.top.frames[dest]){
      window.top.frames[dest].location=url;
    }
    else{
      alert('la frame ' + dest + ' n\'existe pas');
    }  
  */
// 3] Fonction de gestion des infos bulles
 
  if (ns4) { document.captureEvents(Event.MOUSEMOVE); }
  document.onmousemove = getMousePos;

  function getMousePos(e){
  	if (document.all) {
      posX=event.x+document.body.scrollLeft;
      posY=event.y+document.body.scrollTop;
    }
    else
    {
      posX=e.clientX+document.body.scrollLeft;
      posY=e.clientY+document.body.scrollTop;
    }
  }
  
  function formatInfo(titleTxt,infoTxt){
    formatTxt=          '<table border="0"  cellspacing="0"><tr><td class="APP_TOOLTIP_TITLE">' + titleTxt + '</td></tr>';
    formatTxt=formatTxt + '<tr><td class="APP_TOOLTIP_INFO">' + infoTxt + '</td></tr></table>';
    return formatTxt;
  }
  
  function dispInfo(txt,freeTxt,tarif){
  	  document.getElementById("infoBulle").style.left=posX+10;
  	  document.getElementById("infoBulle").style.top=posY+10;
  	  if (freeTxt)
  	  {
        document.getElementById("infoBulle").innerHTML=txt;
      }
      else
      {
        if (tarif=='1')
        {
          if (txt=='app1Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app1TitleTxtTarif,app1InfoTxt);
          if (txt=='app2Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app2TitleTxtTarif,app2InfoTxt);
          if (txt=='app3Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app3TitleTxtTarif,app3InfoTxt);
          if (txt=='app4Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app4TitleTxtTarif,app4InfoTxt);
          if (txt=='app5Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app5TitleTxtTarif,app5InfoTxt);
          if (txt=='app6Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app6TitleTxtTarif,app6InfoTxt);          
        }
        else
        {
          if (txt=='app1Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app1TitleTxt,app1InfoTxt);
          if (txt=='app2Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app2TitleTxt,app2InfoTxt);
          if (txt=='app3Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app3TitleTxt,app3InfoTxt);
          if (txt=='app4Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app4TitleTxt,app4InfoTxt);
          if (txt=='app5Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app5TitleTxt,app5InfoTxt);
          if (txt=='app6Info')
            document.getElementById("infoBulle").innerHTML=formatInfo(app6TitleTxt,app6InfoTxt);
        }   
      }
      document.getElementById("infoBulle").style.visibility='visible';
  }  
  
  function moveInfo(){
  	  document.getElementById("infoBulle").style.left=posX+10;
  	  document.getElementById("infoBulle").style.top=posY+10;
  	  document.getElementById("infoBulle").style.visibility='visible';
  }
  function hideInfo(){
  	  document.getElementById("infoBulle").style.visibility='hidden';
      document.getElementById("infoBulle").style.left=0;
  	  document.getElementById("infoBulle").style.top=0;
      //document.getElementById("infoBulle").innerHTML="";
  }  
  
// 4] Fonctions de gestion des appartements
  
  function dispApp(idApp){
    document.getElementById(idApp).style.visibility='visible';
  }
  
  function hideApp(idApp){
    document.getElementById(idApp).style.visibility='hidden';
  }
  
  function dispPicture(imgSrc){
    content=        '<TABLE border="0"  cellspacing="0" cellpadding="0">';//' width="400" height="300">';
    content=content+'<TR valign="center">';
    content=content+'<TD  height="24" background="">';//../images/Barre_De_Titre.gif" >';
    content=content+'<B>&nbsp;Detail</B>';
    content=content+'</TD>';
    content=content+'<TD background="">';//../images/Barre_De_Titre.gif" >';
    content=content+'<IMG src="../images/fermer_icon.gif" onclick="javascript:hidePicture()" align="right" border="0" width="20" height="20">';
    content=content+'</TD>';
    content=content+'</TR>';
    content=content+'<TR valign="center">';
    content=content+'<TD align="center" colspan="2">';
    content=content+'<IMG id=App1_DetPtvImg_Img src="'+ imgSrc +'">';
    content=content+'</TR>';
    content=content+'</TABLE>';
    document.getElementById("affichagePhoto").innerHTML=content;
    document.getElementById('affichagePhoto').style.visibility='visible';
    }
  
  function hidePicture(){
    document.getElementById("affichagePhoto").style.visibility='hidden';
    document.getElementById("affichagePhoto").innerHTML="";
  }
