//Creating the menu object -- You can call it whatever you want - just remember to
//have the same name as the argument.
slideMenu = new createSlideMenu("slideMenu");

//Langues pour pages php
var chemin = window.location.pathname;
var lg="?lg=fr";
dossier = chemin.split("/");
page = dossier[dossier.length - 1];
extension = page.substr(page.lastIndexOf(".")+1,page.length-page.lastIndexOf(".")+1);
if (extension=="php"){
	if(!ArgumentURL("lg")){
		lg="fr"; }
	else{
		var reg=new RegExp("lg="+ArgumentURL("lg"),"g");
		if(ArgumentURL("lg")=="fr"){	
			lg="fr"; }
		else{
			lg="en"; }
	}
}
else { lg="fr"; }

//Variables to set:
adr=""; // "" hors connexion web sinon http://gmpca.u-bordeaux3.fr/
slideMenu.menuy=100; //The top placement of the menu.
slideMenu.menux=0; //The left placement of the menu
slideMenu.useImages = 1; //Are you using images or not?
slideMenu.pxspeed=20; //The pixel speed of the animation
slideMenu.timspeed=25; //The timer speed of the animation
slideMenu.inset = 10; //Déplacement latéral en sélection
slideMenu.arrow = 0; //Set to className "clArrow" to use the arrow feature. Note: This ONLY works on DOM capable browsers, and with useImages= 0

//Needed dummy classes - leave in the stylesheet!
slideMenu.bgClass =	"slideMenuBG";
slideMenu.txtClass = "slideMenuText";

/*******************************************************************************
Level properties - ALL properties have to be specified in level 0
The level[0] values will be the default value. Any value not specified in higher levels will be inherited from level[0].
If anything is spesified in level[1], but not in level[2], level[2] (sub2 menus) will get the property value from level[1] and so on.
The availble values to control the menu by level are:
left               - The left placement of all items in the current level ( px value )
width            - The width of all items in the current level  ( px value )
height           - The height of all items in the current level  ( px value )
between       - The number of pixels between each item in  the current level ( px value)
className   - Class specified in the stylesheet to control the look of items in this level. The class MUST be in a stylesheet, and it most have position:absolute.
classNameA - A name of a class specified in the stylesheet that will control the look of the TEXT for all items in this level. (Also specify a hover class for this className to get a mouseover effect on the text.
regImage      - If you use image feature of the script, spesify the default image here.
roundImg      - This is the image that will used when a item is selected.
roundImg2    - This is the image used for sub-levels on the last item in a list. (that's how the last items in this example are rounded on the sub-levels)
subImg         - The image used when the item has sub-items. Only in use for sub-levels
subRound     - Same as roundImg2 - only for items that have sub-items.
To understand the image setup see the images supplied with this script.
NOTE: Always specify the full (relative) path to the images!

The slideMenu_makeLevel function provides a shortcut to making levels. If you are more comfortable with setting the properties by name you can also set them like this:
slideMenu.level[0] = new Array()
slideMenu.level[0].left = 0
slideMenu.level[0].width = 138
..... and so on.
In level 0 below I have included the names of the variables just for readability - feel free to remove left = , width = , height = et cetera...
********************************************************************************/
slideMenu.level[0] = new slideMenu_makeLevel(
	left = 0,
	width = 130,
	height = 20,
	between = 5,
	className = "clSlideMenu",
	classNameA = "clA0",
	regImage = adr+"img_menu/level0_regular.gif",
	roundImg = adr+"img_menu/level0_round.gif",
	roundImg2 = "",
	subImg = "",
	subRound= "");
	
slideMenu.level[1] = new slideMenu_makeLevel(10,130,20,2,"clSlideMenu","clA1",adr+"img_menu/level1_regular.gif",adr+"img_menu/level1_round2.gif",adr+"img_menu/level1_round.gif",adr+"img_menu/level1_sub.gif", adr+"img_menu/level1_sub_round.gif");
slideMenu.level[2] = new slideMenu_makeLevel(20,120,20,2,"clSlideMenu","clA2",adr+"img_menu/level2_regular.gif",adr+"img_menu/level2_round2.gif",adr+"img_menu/level2_round.gif", adr+"img_menu/level2_sub.gif", adr+"img_menu/level2_sub_round.gif");
slideMenu.level[3] = new slideMenu_makeLevel(30,110,20,2,"clSlideMenu","clA3",adr+"img_menu/level3_regular.gif",adr+"img_menu/level3_round2.gif",adr+"img_menu/level3_round.gif",adr+"img_menu/level3_sub.gif",adr+"img_menu/level3_sub_round.gif");
slideMenu.level[4] = new slideMenu_makeLevel(40,100,20,2,"clSlideMenu","clA4",adr+"img_menu/level4_regular.gif", adr+"img_menu/level4_round2.gif",adr+"img_menu/level4_round.gif",adr+"img_menu/level4_sub.gif",adr+"img_menu/level4_sub_round.gif");

//Image preload --- leave this
for(var i=0;i<slideMenu.level;i++){
	var l = slideMenu.level[i];
	new preLoadBackgrounds(l.regImage,l.roundImg,l.roundImg2,l.subImg,l.subRound);
}

/**********************************************************************
Making the menus is the same as in SlideMenu 1 only that now you can make as many levels as you want.
NOTE: If you are converting from SlideMenu1 remember to add: theNameOfYourMenu. in front of all menu creation calls.
The arguments to the makeMenu function are:
TYPE - top for top item, sub for sub item, sub2 for sub2 item, sub3 for sub3 item and so on (I've done it like that to keep it the same way as version 1)
TEXT - The link text for the item
TARGET - The target frame to open the links in. You do not have to spesify this if you are not in a frame enviroment. (see below for more info)
------------------------------------------------------------
If you where to make a regular link that would open a link in another frame you would probably do like this: <a href="mylink.html" target="myOtherFrameName">Link</a>
To do the same for a slideMenu link you do like this: slideMenu.makeMenu('top',(lg=='fr'?:)'My link','mylink.html','myOtherFrameName')
------------------------------------------------------------
mySlideMenu.makeMenu('TYPE','TEXT','LINK','TARGET')
Mod(5) 280604 (type,text,lnk,target,end) ,mainimg,jswindow non nécessaires
************************************************************************/
//Menu Accueil -----------------------
slideMenu.makeMenu('top',(lg=='fr'?'Accueil':'Home'),'index.php?lg='+lg,(lg=='fr'?'Accueil':'Home'));

//Menu Groupe -----------------------
slideMenu.makeMenu('top',(lg=='fr'?'Le Groupe':'The Group'),'',(lg=='fr'?'Présentation du G.M.P.C.A.':'Presentation of G.M.P.C.A.'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Présentation':'Presentation'),'present.php?lg='+lg,(lg=='fr'?'Présentation des objectifs de l´association':'Presentation of the aims of the association'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Historique':'History'),'historic.php?lg='+lg,(lg=='fr'?'Un historique de l´association (par Alain Tabbagh)':'A short history of the association (by Alain Tabbagh)'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Statuts':'Statuts'),'statuts.php?lg='+lg,(lg=='fr'?'Statuts de l´association':'Association statuts'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Bureau':'Board'),'bureau.php?lg='+lg,(lg=='fr'?'Constitution du bureau depuis la création de l´association':'Composition of the board since the beginning of the association'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Adhérer':'Subscribe'),'doc/gmpca_appel_2010.pdf',(lg=='fr'?'Formulaire de pré-inscription au G.M.P.C.A.':'G.M.P.C.A. subscription formular'),'_blank');
	slideMenu.makeMenu('sub',(lg=='fr'?'Contacter':'Contact'),'adresse.php?lg='+lg,(lg=='fr'?'Coordonnées de l´association':'Postal and electronic addresses'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Annoncer':'Announce'),'annonce.php?lg='+lg,(lg=='fr'?'Transmission d´informations (Formation, Bourse, Emploi, Colloque ...)':'Informations transmission (Formations, Employments, Meetings...'));
	/*slideMenu.makeMenu('sub',(lg=='fr'?'Niveau 1':'Level 1'));
	slideMenu.makeMenu('sub2',(lg=='fr'?'Niveau 2':'Level 2'));
	slideMenu.makeMenu('sub3',(lg=='fr'?'Niveau 3':'Level 3'));
	slideMenu.makeMenu('sub4','Niveau 4');
	slideMenu.makeMenu('sub5','Niveau 5');*/

//Menu Membres -----------------------
slideMenu.makeMenu('top',(lg=='fr'?'Espace Membres':'Members area'),'',(lg=='fr'?'Espace réservé aux membres':'Area reserved to the members'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Connect./Deconnect.':'Connect./Deconnect.'),'connect.php?lg='+lg,(lg=='fr'?'Identification des membres':'Members identification'));
	slideMenu.makeMenu('sub',(lg=='fr'?'La lettre':'The lettre'),'lettre.php?lg='+lg,(lg=='fr'?'La lettre du G.M.P.C.A.':'The board letter'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Information':'Information'),'',(lg=='fr'?'Informations relatives à la communauté scientifique (Evênements, Manifestations, Colloques ...)':'Informations in the scientific community (Events, Meetings, Symposiums...)'));
	  slideMenu.makeMenu('sub2',(lg=='fr'?'Evènements':'Events'),'planning.php?lg='+lg,(lg=='fr'?'Evènements ':'Events in the community'));
	  slideMenu.makeMenu('sub2',(lg=='fr'?'Envoi [Generic]':'Mailing Generic'),'generic.php?lg='+lg,(lg=='fr'?'Souscription à la lettre d´information GMPCA-Generic':'Subscription to the GMPCA-Generic information letter'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Annonces':'Announcements'),'annonce.php?lg='+lg,(lg=='fr'?'Annonces temporaires (Formations, Bourses ...)':'Temporary announcements (Formations, prices ...)'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Contacts':'Contacts'));
	  slideMenu.makeMenu('sub2',(lg=='fr'?'Personnes':'People'),'users.php?lg='+lg,(lg=='fr'?'Rechercher quelqu´un':'Search somebody'));
	  slideMenu.makeMenu('sub2',(lg=='fr'?'Institutions':'Institutions'),'insts.php?lg='+lg,(lg=='fr'?'Rechercher une institutions':'Search a institut'));

//Menu Revue -----------------------
slideMenu.makeMenu('top','ArcheoSciences','',(lg=='fr'?'Espace consacré à la revue ArcheoSciences':'Area dedicated to the ArcheoSciences revue'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Présentation':'Presentation'),'ra_gen.php?lg='+lg,(lg=='fr'?'La revue ArcheoSciences: Vecteur essentiel de la communauté scientifique':'ArcheoSciences revue presentation'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Soumission':'Submission'),'',(lg=='fr'?'Informations pour la soumission d´article':'Informations about manuscript submission'));
	slideMenu.makeMenu('sub2',(lg=='fr'?'Généralité':'Generality'),'ra_sub.php?lg='+lg,(lg=='fr'?'Finalité de la Revue':'Aims of the revue'));
	slideMenu.makeMenu('sub2',(lg=='fr'?'Préparation':'Preparation'),'ra_sub.php?lg='+lg+'#n2',(lg=='fr'?'Normes de présentation (Résumé ,Texte ,Illustration ...)Informations pour soumettre un article':'Normes for presentation (Abstract ,Texte ,Illustration ...)'));
	slideMenu.makeMenu('sub2',(lg=='fr'?'Evaluation':'Evaluation'),'ra_sub.php?lg='+lg+'#n16',(lg=='fr'?'Evaluation du manuscript':'Evaluation of a manuscript'));
	slideMenu.makeMenu('sub2',(lg=='fr'?'Contact':'Contact'),'ra_sub.php?lg='+lg+'#n21',(lg=='fr'?'Informations complémentaires':'Complementary informations'));
	slideMenu.makeMenu('sub',(lg=='fr'?'... par numéros':'... by number'),'ra.php?lg='+lg,(lg=='fr'?'Les numéros de la revue ArcheoSciences':'Publication series of the revue'));
	slideMenu.makeMenu('sub',(lg=='fr'?'... par sommaires':'... by summaries'),'',(lg=='fr'?'Les sommaires des parutions de la revue ArcheoSciences':'ArcheoSciences revue summaries'));
		slideMenu.makeMenu('sub2','01-05','',(lg=='fr'?'Sommaire des parutions 1 à 5':'Summaries from n°1 to 5'));
			slideMenu.makeMenu('sub3','N°01','ra_publ.php?lg='+lg+'&n=1');
			slideMenu.makeMenu('sub3','N°02','ra_publ.php?lg='+lg+'&n=2');
			slideMenu.makeMenu('sub3','N°03','ra_publ.php?lg='+lg+'&n=3');
			slideMenu.makeMenu('sub3','N°04','ra_publ.php?lg='+lg+'&n=4');
			slideMenu.makeMenu('sub3','N°05','ra_publ.php?lg='+lg+'&n=5');
		slideMenu.makeMenu('sub2','06-10','',(lg=='fr'?'Sommaire des parutions 6 à 10':'Summaries from n°6 to 10'));
			slideMenu.makeMenu('sub3','N°06','ra_publ.php?lg='+lg+'&n=6');
			slideMenu.makeMenu('sub3','N°07','ra_publ.php?lg='+lg+'&n=7');
			slideMenu.makeMenu('sub3','N°08','ra_publ.php?lg='+lg+'&n=8');
			slideMenu.makeMenu('sub3','N°09','ra_publ.php?lg='+lg+'&n=9');
			slideMenu.makeMenu('sub3','N°10','ra_publ.php?lg='+lg+'&n=10');
		slideMenu.makeMenu('sub2','11-15','',(lg=='fr'?'Sommaire des parutions 11 à 15':'Summaries from n°11 to 15'));
			slideMenu.makeMenu('sub3','N°11','ra_publ.php?lg='+lg+'&n=11');
			slideMenu.makeMenu('sub3','N°12','ra_publ.php?lg='+lg+'&n=12');
			slideMenu.makeMenu('sub3','N°13','ra_publ.php?lg='+lg+'&n=13');
			slideMenu.makeMenu('sub3','N°14','ra_publ.php?lg='+lg+'&n=14');
			slideMenu.makeMenu('sub3','N°15','ra_publ.php?lg='+lg+'&n=15');
		slideMenu.makeMenu('sub2','16-20','',(lg=='fr'?'Sommaire des parutions 16 à 20':'Summaries from n°16 to 20'));
			slideMenu.makeMenu('sub3','N°16','ra_publ.php?lg='+lg+'&n=16');
			slideMenu.makeMenu('sub3','N°17','ra_publ.php?lg='+lg+'&n=17');
			slideMenu.makeMenu('sub3','N°18','ra_publ.php?lg='+lg+'&n=18');
			slideMenu.makeMenu('sub3','N°19','ra_publ.php?lg='+lg+'&n=19');
			slideMenu.makeMenu('sub3','N°20','ra_publ.php?lg='+lg+'&n=20');
		slideMenu.makeMenu('sub2','21-25','',(lg=='fr'?'Sommaire des parutions 21 à 25':'Summaries from n°21 to 25'));
			slideMenu.makeMenu('sub3','N°21','ra_publ.php?lg='+lg+'&n=21');
			slideMenu.makeMenu('sub3','N°22','ra_publ.php?lg='+lg+'&n=22');
			slideMenu.makeMenu('sub3','N°23','ra_publ.php?lg='+lg+'&n=23');
			slideMenu.makeMenu('sub3','N°24','ra_publ.php?lg='+lg+'&n=24');
			slideMenu.makeMenu('sub3','N°25','ra_publ.php?lg='+lg+'&n=25');
		slideMenu.makeMenu('sub2','26-30','',(lg=='fr'?'Sommaire des parutions 26 à 30':'Summaries from n°26 to 30'));
			slideMenu.makeMenu('sub3','N°26','ra_publ.php?lg='+lg+'&n=26');
			slideMenu.makeMenu('sub3','N°27','ra_publ.php?lg='+lg+'&n=27');
			slideMenu.makeMenu('sub3','N°28','ra_publ.php?lg='+lg+'&n=28');
			slideMenu.makeMenu('sub3','N°29','ra_publ.php?lg='+lg+'&n=29');
			slideMenu.makeMenu('sub3','N°30','ra_publ.php?lg='+lg+'&n=30');
		slideMenu.makeMenu('sub2','31-32','',(lg=='fr'?'Sommaire des parutions 31 et 32':'Summaries from n°31 and 32'));
			slideMenu.makeMenu('sub3','N°31','ra_publ.php?lg='+lg+'&n=31');
			slideMenu.makeMenu('sub3','N°32','ra_publ.php?lg='+lg+'&n=32');
		slideMenu.makeMenu('sub2',(lg=='fr'?'Hors Série':'Special editions'),'ra_s.php?lg='+lg);
	slideMenu.makeMenu('sub',(lg=='fr'?'Rechercher':'Search'),'ra_req.php?lg='+lg,(lg=='fr'?'Rechercher un article, un auteur, un mot clef...':'Search a article, a author, a keyword...'));
	/*slideMenu.makeMenu('sub',(lg=='fr'?'Tarifs':),'ra_tarifs.php?lg='+lg,(lg=='fr'?'Tarifs des parutions':))*/
	slideMenu.makeMenu('sub',(lg=='fr'?'Contact':'Contact'),'ra_gen.php?lg='+lg+'#n2',(lg=='fr'?'Contacter les coordonnateurs de la revue':'Contact the editors'));

//Menu Colloques -----------------------
slideMenu.makeMenu('top',(lg=='fr'?'Les Colloques':'Symposium'),'');
	slideMenu.makeMenu('sub','Montpellier 2009','http://www.umr5059.univ-montp2.fr/spip.php?rubrique51',(lg=='fr'?'Colloque de Montpellier':'Montpellier symposium'),'_blank');
	slideMenu.makeMenu('sub','Aix 2007','http://www.mmsh.univ-aix.fr/archeometrie07/',(lg=='fr'?'Colloque d´Aix en Provence':'Aix en Provence symposium'),'_blank');
	slideMenu.makeMenu('sub','Saclay 2005','http://www.ladir.cnrs.fr/GMPCA2005/',(lg=='fr'?'Colloque de Saclay':'Saclay symposium'),'_blank');
	slideMenu.makeMenu('sub','Bordeaux 2003','./gmpca2003',(lg=='fr'?'Colloque de Bordeaux':'Bordeaux symposium'),'_blank');
	slideMenu.makeMenu('sub','La Rochelle 2001','http://www.univ-lr.fr/manifestations/Gmpca/archeometrie/',(lg=='fr'?'Colloque de La Rochelle':'La Rochelle symposium'),'_blank');
	slideMenu.makeMenu('sub',(lg=='fr'?'De 1976 à 2009':'From 1976 to 2009'),'colloque.php?lg='+lg,(lg=='fr'?'Tous les colloques':'All the symposiums'));

//Menu Prix -----------------------
slideMenu.makeMenu('top',(lg=='fr'?'Le Prix du GMPCA':'GMPCA award'));
	slideMenu.makeMenu('sub',(lg=='fr'?'Pourquoi ?':'Why ?'),'prix.php?lg='+lg);
	slideMenu.makeMenu('sub',(lg=='fr'?'Quand ? Comment ?':'When and How ?'),'prix.php?lg='+lg+'#3');
	slideMenu.makeMenu('sub',(lg=='fr'?'Les lauréats':'Prize-winners'),'prix.php?lg='+lg+'#2');

//Menu Liens -----------------------
slideMenu.makeMenu('top',(lg=='fr'?'Liens':'Links'),'')
	slideMenu.makeMenu('sub',(lg=='fr'?'Groupes homologues':'Equivalent groups'),'liens.php?lg='+lg+'#1');
	slideMenu.makeMenu('sub',(lg=='fr'?'Sites thématiques':'Thematic sites'),'liens.php?lg='+lg+'#2');
	slideMenu.makeMenu('sub',(lg=='fr'?'Institutions':'Institutions'),'liens.php?lg='+lg+'#3');
	slideMenu.makeMenu('sub',(lg=='fr'?'Formations':'Formations'),'formations.php');

//Menu Developpemement -----------------------
	slideMenu.makeMenu('sub',(lg=='fr'?'Au sujet du site':'About the site'),'dev.php?lg='+lg);

//Bascule langue lg
if (extension=='php'){
	var txt=window.location.pathname+(lg=='fr'?'?lg=en':'?lg=fr')+window.location.hash;
	if (lg=='fr') slideMenu.makeMenu('top','English version',txt);
	else slideMenu.makeMenu('top','Version Française',txt);

	/*var txt=''; for(i=0;i<url_arg.length;i++) { txt=txt+url_arg[i]+'='+(url_arg[i]=='lg'?(url_val[i]=='fr'?'en':'fr'):url_val[i])+(i+1<url_arg.length?'&':''); }
	slideMenu.makeMenu('top',(lg=='fr'?'English version':'Version Française'),window.location.pathname+'?'+txt+window.location.hash);*/
}

//Initiating the menu !! 
slideMenu.init();
/*Mod(5) 280604
alert('Identifiant SlideMenu2 : '+idx);
slideMenu.switchMenu(url.flm);
*/





