<!-- debut du script

var test="deb";
var cli=0;
var doc;
var icone=" ";
var n=0,n0=0,n1="*",n2,n3=true,n4=true;
var nx,ny=0,nz=0;
var cc=1,ic=0;
var tl,ta,tc,td,te,tv,tp;
var k1,k2;
var t=0,dt,delai;
var qp=0;
var nav,ver,vu=0;
var ur,url;

function VN(Ne, Ex) {
nav="";
ver=navigator.appVersion.substring(0,3)
if (ver >= Ne && navigator.appName == 'Netscape') nav="na"
if (ver >= Ex && navigator.appName.substring(0,9) == 'Microsoft') nav="ex"
if (ver<4) alert("\rDésolé, mais vous avez la version "+ver+"\rSorry, but you are using version "+ver+"\r\rChargez la version 4 pour la carte interactive.\rLoad version 4 for the interactive map.");
vu=1;
if (nav!="") return true;
else return false;
}

function clique(c) {
cl=false;bis="0";k1=1;i=1;
while (i<c) {k1=k1*2;i++}
k2=cli&k1;
if (k2==0) {cli=cli+k1;cl=true} else {cli=cli-k1};
if (cl) ig="j"+c+".jpg"; else ig="b"+c+".jpg";
return cl;
}

function ICO (fr,an,al,po) {
this.q=new Array(4);
this.q[0]=fr;this.q[1]=an;this.q[2]=al;this.q[3]=po;
}

function init() {
kp=document.location+"/";
ur=kp.indexOf("www");
test="init";
 if (VN(3,3)==false) return;
 img=new Array(32);
 tl= new Array(32);
 ta= new Array(168);
 tc= new Array(168);
 td= new Array(168);
 te= new Array(168);
 tp= new Array(168);
 tn= new Array(168);
 tv= new Array(80);
window.name="main";

qs=" "+document.location;
qs=qs.toUpperCase();
qp=0;
if (qs.indexOf("CHOIHOT1")>0) qp=1;
if (qs.indexOf("CHOIHOT2")>0) qp=2;
if (qs.indexOf("CHOIHOT3")>0) qp=3;
if (qs.indexOf("CARTHOT1")>0) qp=1;
if (qs.indexOf("CARTHOT2")>0) qp=2;
if (qs.indexOf("CARTHOT3")>0) qp=3;


tl[1]=new ICO("Ascenseur","Lift","Fahrstuhl","Elevador");
tl[2]=new ICO("Mini golf","Mini golf","Minigolf","Mini golf");
tl[3]=new ICO("Sauna","Sauna","Sauna","Sauna");
tl[4]=new ICO("Logis de France","Logis de France","Logis de France","Cadeia Logis de France");
tl[5]=new ICO("Chiens acceptés au restaurant","Dogs admitted to the restaurant","Hunde im Restaurant erlaubt","Cães são aceitos no restaurante");

tl[6]=new ICO("Golf","Golf","Golfplatz","Golf");
tl[7]=new ICO("Terrasse panoramique","Terrace with view","Terrasse mit Panoramablick","Terraço Panorâmico");
tl[8]=new ICO("Chambres pour handicapés","Room for disabled persons","Zimmer für Behinderte","Quarto para deficientes fis&iacute;cos");
tl[9]=new ICO("Gymnastique","Gymnasium","Gymnastik","Ginástica");
tl[10]=new ICO("Téléphone direct extérieur","Direct dial telephone","Telefon mit Direktwahl nach ausserhalb","Telefone direto");
tl[11]=new ICO("Relais et Châteaux","Relais et Châteaux","Relais et Châteaux","Cadeia Relais et Châteaux");
tl[12]=new ICO("Equitation","Horse riding","Reiten","Equitaç&atilde;o");
tl[13]=new ICO("Piscine","Swiming pool","Swimingpool","Picina");
tl[14]=new ICO("Télévision chambre","Television in room","Fernseher im Zimmer","Televisão no quarto");
tl[15]=new ICO("Chiens acceptés à l'hôtel","Dogs admitted to the hotel","Hunde im Hotel willkommen","Cães são aceitos no hotel");
tl[16]=new ICO("Jardin","Garden","Garten","Jardim");
tl[17]=new ICO("Tennis","Tennis","Tennisplatz","Tenis");
tl[18]=new ICO("Châteaux et Hôtels de France","Châteaux et Hôtels de France","Châteaux et Hôtels Indépendants","Cadeia Châteaux et Hôtels de France");
tl[19]=new ICO("Garage privé","Private garage","Eigene Hotelgarage","Garagem privativa");
tl[20]=new ICO("Parking privé","Private parking","Privater Hotelparkplatz","Estacionamento privativo");
tl[21]=new ICO("Télévision au salon","Television in lounge","Fernseher im Salon","Televisão na sala");
tl[22]=new ICO("Salle de réunion","Conference room","Versammlungsraum","Sala de reuni&otilde;es");
tl[23]=new ICO("Veilleur de nuit","Night porter","Nachtwächter","Porteiro à noite");
tl[24]=new ICO("Chèque vacances","Chèque vacances","Chèque vacances","Chèque vacances");
tl[25]=new ICO("Relais Silence","Relais Silence","Relais Silence","Cadeia Relais Silence");
tl[26]=new ICO("Climat de France","Climat de France","Climat de France","Cadeia Climat de France");
tl[27]=new ICO("Inter Hotel","Inter Hotel","Inter Hotel","Cadeia Inter Hotel");
tl[28]=new ICO("Best Western","Best Western","Best Western","Cadeia Best Western");
tl[29]=new ICO("Restaurants Toques du Périgord","Restaurantes Toques du Périgord","Restaurants Toques du Périgord","Restaurantes Toques du Périgord");
tl[30]=new ICO("Restaurateurs de métier","Restaurateurs de métier","Restaurateurs de métier","Cadeia Restaurateurs de métier");


tv[0]="*";
tv[1]="";

ta[0]="noms";
ta[1]="";


tc[0]="ville";
tc[1]=1;




td[00]="etoiles";
td[1]=0;



te[00]="icones";
te[1]=32768;

for (i=1;i<168;i++) tp[i]="";

// liste des renvois sur pages hôtels :
tp[1]="";

tn[121]=0;

t=ta.length;
test="fin"; 
}

function fermerNote() {
}

//977 ****
function afficheNote() {
ny=document.choix0.noms.selectedIndex;
if (nz==0) nx=document.choix2.ville.selectedIndex; else nx=nz;
  n1=tv[nx];
  if (ny>0) n0=document.choix0.noms[ny].value;
  if ((n0>0)&&(tp[n0]!="")) 
    {
	kp=tp[n0];kk=kp.indexOf("0");
	if (qp>0) kp=kp.substring(0,kk)+qp+kp.substring(kk+1,kp.length) 
	document.links[0].href=kp;
	}
 else
  {
 var tex="";
var col=true;
 vil(0);
nk=n0;
hot(0);
n2=0;
if(document.choix1.etoile1.checked) n2+=Math.abs(document.choix1.etoile1.value);
if(document.choix1.etoile2.checked) n2+=Math.abs(document.choix1.etoile2.value);
if(document.choix1.etoile3.checked) n2+=Math.abs(document.choix1.etoile3.value);
if(document.choix1.etoile4.checked) n2+=Math.abs(document.choix1.etoile4.value);

 texte = '<HTML><HEAD><TITLE>Votre choix</TITLE></HEAD><BODY BGCOLOR="#FFFFCC" BACKGROUND="fond.jpg"><A NAME="bid"></A>';
//1003****
 texte += '<CENTER><FONT SIZE=2 COLOR="#222222"><B>';
 texte += '<TABLE border=1 align=center>'
 	 n=0;
	 if (cli!=0||n2!=0) {n0=0;document.choix0.noms.selectedIndex=0;}
	 for (i=1;i<t;i++) 
	{
	if (nk>0) (i=nk)
   	n3=false;if ((cli&te[i])==cli) n3=true;
   	n4=true;
  	if (n2>0) n4=((n2&td[i])==td[i])&&(td[i]>0);
//tex+="<BR>"+td[i]+"/"+n2+"/"+n4 
  	if (((n3) &&(n1==tv[tc[i]]||n1=="*") && (n4))||(nk>0)) 
	   {
		if (col) {tex+='<TR>';col=false} else col=true;
		tex+='<TD>';
// link vers 
		if(tp[i]!="") 
			{
			kp=tp[i];
			if (qp>0) {
// selon qu'on travaille en ligne ou hors ligne
if (ur==-1) url='file://C|/B-hotels-restau-dordogne/';else url='http://www.hotels-restau-dordogne.org/';
// selon le cas on change le mode d'appel:
//ci dessous hôtels avec un seul fichier
if (tn[i]==0) kp=url+kp+'#'+qp;  
//ci dessous hôtels avec 4 fichiers sous nom de domaine Fédération
 kk=kp.indexOf("/index.htm");
if (tn[i]==1) kp=url+tp[i].substring(0,kk)+'/index'+qp+'.htm'; 

// pour les hotels avec nom de domaine, pas moyen de travailler hors ligne
//ci dessous hôtels avec 4 fichiers sous leur nom de domaine  (anciens hôtels)
if (tn[i]==2) kp=tp[i].substring(0,kk)+'/index'+qp+'.htm';
//ci dessous hôtels avec 4 fichiers sous leur nom de domaine  (nouveaux hôtels)
if (tn[i]==3) kp=tp[i].substring(0,kk)+'/index'+qp+'.htm';
 						}
			tex+='<A HREF="'+kp+'">';
			}
 		tex+=ta[i];
 		pl=tex.indexOf("R5");
		if (pl>-1)
			{tex=tex.substring(0,pl)+"Restaurant "+tex.substring(pl+2,tex.length);}
		for (g=1;g<3;g++) 
		    {
			pl=tex.indexOf("H1");
			if (pl>-1)
				{tex=tex.substring(0,pl)+"Hôtel "+tex.substring(pl+2,tex.length);}
			}
		pl=tex.indexOf("T5");
		if (pl>-1)
			{tex=tex.substring(0,pl)+"Tél: 05 53 "+tex.substring(pl+2,tex.length);}
		pl=tex.indexOf("T6");
		if (pl>-1)
			{tex=tex.substring(0,pl)+"Télécopie: 05 53 "+tex.substring(pl+2,tex.length);}
//1053****
// fin de link
		if(tp[i]!="") {tex +="</A>";}

 		tex+='</TD>';
		if (col) tex+='</TR>';
		texte +=tex;

		tex="";
	 	n=n+1; 				
	    }
	    if (nk>0) break;	
 	}
 if (n==0) 
    {
if (qp==0) texte+="Il n\'y a pas d\'h&ocirc;tel correspondant &agrave; vos crit&egrave;res, faites un autre choix";
if (qp==1) texte+="There is no hotel that matches your requirements. <BR>Please modify your request.";
if (qp==2) texte+="Leider f&uuml;hren wir kein Hotel, das den von Ihnen gew&uuml;nschten Kriterien entspricht.<BR>Bitte treffen Sie eine andere Wahl."
if (qp==3) texte+="N&atilde;o h&aacute; hotel correspondendo aos seus crit&eacute;rios.<BR>Fa&ccedil;a outra escolha."
     }
 texte +='</B>';
texte+="<BR><BR><B>"+tv[nx]+"</B><BR>"
if (!col) texte+='<TD>&nbsp;</TD></TR>';
 texte += '</TABLE>';
 texte +='</CENTER></FONT></BODY></HTML>';

if (nav=="na") document.links[0].href="vide.htm";
if (nav=="ex") document.links[0].href="vide1.htm"
   document.write(texte);
   document.close( );
  }
}
//1085****
function hot(nb){
  document.choix0.noms.selectedIndex=nb;
}

function tempo(delai1) {
delai=delai1;
if (test!="fin") {clearTimeout(dt);return};
dt = setTimeout("tempo(delai)",delai1);
}

function vil(nb){
 if (test!="fin") tempo(1000);
 if (nb==0) nz=document.choix2.ville.selectedIndex; else nz=0;
 document.choix2.ville.selectedIndex=nb;
//1100***
 if (tv!=null)document.choix3.vil.value=tv[nb];
//window.status=nb+"/"+tv[nb]
 hot(0);
}

function pied(ic){
if (vu!=1) return;
if (ic>0) document.ico.ico1.value=tl[ic].q[qp]; else document.ico.ico1.value=" ";
}
function piedf(ic){
if (vu!=1) return;
if (ic>0) document.icof.ico1f.value=tl[ic].q[0]; else document.icof.ico1f.value=" ";
}function pieda(ic){
if (vu!=1) return;
if (ic>0) document.icoa.ico1a.value=tl[ic].q[1]; else document.icoa.ico1a.value=" ";
}function piedg(ic){
if (vu!=1) return;
if (ic>0) document.icog.ico1g.value=tl[ic].q[2]; else document.icog.ico1g.value=" ";
}function piedp(ic){
if (vu!=1) return;
if (ic>0) document.icop.ico1p.value=tl[ic].q[3]; else document.icop.ico1p.value=" ";
}
// Fin du script -->                      
