// JavaScript Document

//D'autres scripts sur http://www.toutjavascript.com
//Si vous utilisez ce script, merci de m'avertir !  < webmaster@toutjavascript.com >

var menu=new CreerMenu("Destination...","new","+ ");
// CreerMenu(Titre de la liste déroulante,target,carac)
//   target=nom de la frame ou "self" si c'est la fenetre elle meme, "new" pour une nouvelle fenêtre
//   carac=caracteres à afficher devant les lignes ayant un lien
// Pour ajouter les liens dans les listes, utiliser menu.Add
// Menu.Add(profondeur d'arborescence, texte, page à charger)

menu.Add(1,"Poteries utilitaires","");
   menu.Add(2,"Aliments","");
        menu.Add(3,"Coupes","poterie-decorative-entretien.html","self");
        menu.Add(3,"Plateaux à fromages","poterie-decorative-rongeurs.html","self");
	    menu.Add(3,"Plats carrés","poterie-alimentaire-aliments.html","self");
	    menu.Add(3,"Plats tuiles","poterie-alimentaire-aliments.html","self");
		menu.Add(3,"Saladiers","poterie-alimentaire-aliments.html","self");
		menu.Add(3,"Soupières","poterie-alimentaire-aliments.html","self");
  menu.Add(2,"Condiments","");
        menu.Add(3,"Coupelles-sauce","poterie-alimentaire-aperitif.html","self");
	    menu.Add(3,"Piques-olives","poterie-alimentaire-aperitif.html","self");
	    menu.Add(3,"Mains à sel","poterie-alimentaire-condiments.html","self");
		menu.Add(3,"Trio sel-poivre-moutarde","poterie-alimentaire-condiments.html","self");
  menu.Add(2,"Liquides","");
		menu.Add(3,"Bols","poterie-alimentaire-aliments.html","self");
		menu.Add(3,"Bouteilles","poterie-alimentaire-eau.html#bouteilles","self");
		menu.Add(3,"Chopes","poterie-alimentaire-eau.html","self");
		menu.Add(3,"Cruches","poterie-alimentaire-eau.html","self");
		menu.Add(3,"Gobelets","poterie-alimentaire-eau.html","self");
		menu.Add(3,"Pichets","poterie-alimentaire-eau.html","self");
	    menu.Add(3,"Théières","poterie-alimentaire-eau.html#théières","self");
menu.Add(1,"Poteries décoratives","");
	menu.Add(2,"Céramiques d'Art","");
		menu.Add(3,"Bouteilles","poterie-alimentaire-eau.html#bouteilles","self");
		menu.Add(3,"Cloches","poterie-decorative-creatures.html","self");
		menu.Add(3,"Plaques murales","poterie-galerie.html","self");
		menu.Add(3,"Plaques murales-lutins","poterie-decorative-creatures.html","self");
		menu.Add(3,"Plateaux","poterie-alimentaire-aliments.html","self");
		menu.Add(3,"Plats-tuiles","poterie-etapes-de-fabrication2.html","self");
		menu.Add(3,"Soliflores","poterie-decorative-entretien.html","self");
		menu.Add(3,"Théières","poterie-alimentaire-eau.html#théières","self");
        menu.Add(3,"Vases","poterie-galerie.html","self");
		
function CreerMenu(titre,target,carac) {
	this.nb=0;this.titre=titre;this.target=target;this.carac=carac;
	this.Add=AddObjet;
	this.Aff=AffMenu;
}
function AddObjet(deep,txt,page) {
	var rub = new Object;
	rub.deep=deep;
	rub.txt=txt;
	rub.page=page;
	this[this.nb]=rub;
	this.nb++;
}
function space(i) {var Z="";for (var j=1;j<i;j++){Z+="&nbsp;&nbsp;&nbsp;";}return Z}

function AffMenu() {
	var Z="<FORM name='mf'>";var z="";
	Z+="<SELECT size=1 name='tjs' onChange='Clic(this.form);'><OPTION>"+this.titre+"</OPTION>";
	for (var i=0;i<this.nb;i++) {
		z=""; if ((this[i].page!="")&&(this[i].page!=null)) {z=this.carac}
		Z+="<OPTION value='"+this[i].page+"'>"+space(this[i].deep)+z+this[i].txt+"</OPTION>"
	}
	Z+="</SELECT>";
	Z+="</FORM>";
	document.write(Z);
}
function Clic(f){
	var i=f.elements["tjs"].selectedIndex-1;
	if (i>=0) {
		var page=menu[i].page;
		if ((page!="")&&(page!=null)) {
			if (menu.target=="self") {window.location=page}
			else if (menu.target=="new") {window.open(page,'newf','scrollbars=yes')}
			else {parent.frames[menu.target].window.location=page}
		}
	}
}


