function resizePopUp(monTitre, monImage) {
	w = window.open('','chargement','width=10,height=10');
	w.document.write( "<html><head><title>"+monTitre+"</title>\n" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false;\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true;\n");
	w.document.write( "else if(document.layers)NN4=true;\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31);\n");
	w.document.write( "else if(NN6) self.sizeToContent();\n");
	w.document.write( "else window.resizeTo(document.images[0].width,document.images[0].height+20);\n");
	w.document.write( "self.focus();\n");
	w.document.write( "}\n</scri");
	w.document.write( "pt>\n");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
	w.document.write( "<a href='javascript:window.close();'><img src='"+monImage+"' border=0 alt='Fermer'></a>" );
	w.document.write( "</body></html>" );
	w.document.close();
}

function resizeLPopUp(monTitre, monImage, monURL ) {
	w = window.open('','chargement','width=10,height=10');
	w.document.write( "<html><head><title>"+monTitre+"</title>\n" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false;\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true;\n");
	w.document.write( "else if(document.layers)NN4=true;\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31);\n");
	w.document.write( "else if(NN6) self.sizeToContent();\n");
	w.document.write( "else window.resizeTo(document.images[0].width,document.images[0].height+20);\n");
	w.document.write( "self.focus();\n");
	w.document.write( "}\n</scri");
	w.document.write( "pt>\n");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" );
	w.document.write( "<a href='javascript:opener.location.href=\""+monURL+"\";window.close();'><img src='"+monImage+"' border=0 alt='Fermer'></a>" );
	w.document.write( "</body></html>" );
	w.document.close();
}

function resizeSWFPopUp(monTitre, monImage) {
	w = open ("swfpop.php?myswf="+monImage, "media", "height=230, width=230, scrollbars=0, toolbar=0, status=0, resizable=1");
}

function open_pop(Ho, La, No){
	Fichier = "popup.php?page=Mois"+No;
	//alert(No+" "+Fichier);
	var La1=La+20;
	w = open (Fichier,"media","height="+Ho+", width="+La1+", scrollbars=yes");
}

function open_popreg(Ho, La, No){
	Fichier = "popup.php?page="+No;
	//alert(No+" "+Fichier);
	var La1=La+20;
	w = open (Fichier,"media","height="+Ho+", width="+La1+", scrollbars=yes");
}

function open_popact(Ho, La, No){
	Fichier = "activitePop.php?No="+No;
	//alert(No+" "+Fichier);
	var La1=La+20;
	w = open (Fichier,"media","height="+Ho+", width="+La1+", scrollbars=yes");
}

function openinfos(nom){
	Fichier = "popup.php?page="+nom;
	w = open (Fichier,"media","height=500, width=400, scrollbars=yes");
}

function open_firstpop(Ho, La, No){
	Fichier = "pophome.php";
	//alert(No+" "+Fichier);
	var La1=La+20;
	w = open (Fichier,"media","height="+Ho+", width="+La1+", scrollbars=no");
}

function open_carte(Ho, La, No){
	Fichier = "cartepop.php?Idcarte="+No;
	var La1=La+20;
	w = open (Fichier,"media","height="+Ho+", width="+La+", scrollbars=no");
}

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
     if (browserName == "Netscape" && browserVer >= 3) version = "n3";
     else { if (browserVer >= 4) version = "n3";
     else version = "n2"; }

function change(imgName, imgsource) {
	if (version == "n3") {
	dos = "images/";
	eval('document.' + imgName + '.src = "' + dos + imgsource + '"');
	}
}

var noLien;
	var tabLien = new Array("menu01.gif", "menu02.gif", "menu03.gif", "menu04.gif", "menu05.gif", "menu06.gif");
	var tabRoll = new Array("menu01_roll.gif", "menu02_roll.gif", "menu03_roll.gif", "menu04_roll.gif", "menu05_roll.gif", "menu06_roll.gif");
	var tabURL = new Array("tourisme.php", "atouts.php", "transports.php", "hebergement.php", "tos.php", "voyage.php");

function changemenu(no, ty) {
imgName = "img"+no;
	if (version == "n3" && noLien!=no) {
//alert(noLien+" / "+no);
		dos = "images/"+ tabLien[no-1];
		dosR = "images/"+ tabRoll[no-1];
		if (ty=="N") {
			eval('document.' + imgName + '.src = "' + dos  + '"');
		}else{
			eval('document.' + imgName + '.src = "' + dosR + '"');
		}
	}
}

function GoURL(no){
var URL="";
noLien = no;
if (no!=0){
	for (i=0; i<tabLien.length; i++){
		if ((no-1)==i) {
			dos = "images/"+tabRoll[i];
		}else{
			dos = "images/"+tabLien[i];
	}
//alert(dos);
	imgName = "img"+(i+1);
	eval('document.' + imgName + '.src = "' + dos + '"');
	}//alert(tabURL[no-1]);
parent.mainFrame.document.location.href = tabURL[no-1];
}else{
	for (i=0; i>tabLien.length; i++){
		dos = "images/"+tabLien[i];
		imgName = "img"+(i+1);
		eval('parent.topFrame.document.' + imgName + '.src = "' + dos + '"');
	}//alert(tabURL[tabURL.length-1]);
parent.mainFrame.document.location.href = "contenu.php";
}
}
