//_____________________________________
/*l'objet menuBarItem() n'autorise pas le traitement script du premier paramètre (= nom de l'étiquette) ... 
*/

function createjsDOMenu() {


//_____________________________________menu langue

urlFrom = window.location;//nettoyage de la ligne d'adresse. Même si l'appel en série d'une même variable en GET  ne retient que la dernière valeur
do{
	urlFrom =  String(urlFrom).replace(/&lang=FR/,"");
	urlFrom =  String(urlFrom).replace(/&lang=UK/,"");
}
while(urlFrom.indexOf('lang=FR') != -1);

  menu1 = new jsDOMenu(120, "absolute");
  with (menu1) {
    addMenuItem(new menuItem("FRENCH", "","code:window.location='"+urlFrom+"&lang=FR'"));
    addMenuItem(new menuItem("ENGLISH", "item2",  "code:window.location='"+urlFrom+"&lang=UK'"));
  }
  
  menu1_1 = new jsDOMenu(130, "absolute");
  with (menu1_1) {
    addMenuItem(new menuItem("Item 1", "", "blank.htm"));
    addMenuItem(new menuItem("-"));
    addMenuItem(new menuItem("Item 2", "", "blank.htm"));
    addMenuItem(new menuItem("Item 3", "", "blank.htm"));
    addMenuItem(new menuItem("-"));
    addMenuItem(new menuItem("Item 4", "", "blank.htm"));
  }

//_____________________________________menu ressources
  
  menu2 = new jsDOMenu(120, "absolute");
  with (menu2) {
	//addMenuItem(new menuItem("HOME PAGE","item1", "code:window.location.href = 'indexUk.php'"));
 	addMenuItem(new menuItem("THEMES", "item2", "code:window.location.href = 'projets.php?theme=8&lang=UK'"));
    addMenuItem(new menuItem("PROJECTS", "item3", "code:window.location.href = 'projets.php?prjTheme=tout&lang=UK'"));
    addMenuItem(new menuItem("SERVICES", "item4", "code:window.location.href = 'projets.php?service=0&lang=UK'"));
    addMenuItem(new menuItem("CV", "item5", "code:window.location.href = 'projets.php?cvList=nom&lang=UK'"));
  }
  
    menu4 = new jsDOMenu(120, "absolute");
  with (menu4) {
   	addMenuItem(new menuItem("CONTACTS", "", "code:window.location.href = 'projets.php?theme=8&eta=1&lang=UK'"));
	addMenuItem(new menuItem("STATUTES","", "code:window.location.href = '/documents/5/LST 551-1 Statuts ICEDD asbl.pdf'"));
	addMenuItem(new menuItem("STRATEGY", "", "code:window.location.href = '/documents/5/FOR 53-1 Politique ICEDD.pdf'"));
  	addMenuItem(new menuItem("FLOW CHART", "", "code:window.location.href = '/documents/5/LST 553-6 Organigramme ICEDD.PDF'"));
  	addMenuItem(new menuItem("ACTIVITIES", "", "/documents/7/LST 723-1 Activites ICEDD.pdf"));
   	addMenuItem(new menuItem("QUALITY  HANDBOOK", "", "/documents/4/MAQ 422-1 Manuel Qualit\u00e9.pdf")); 
  	addMenuItem(new menuItem("NORMALIZES ISO 9001", "", "http://www.iso.org"));
   	addMenuItem(new menuItem("PLAN OF ACCESS", "", "/documents/7/DES 723-2 Plan d acces ICEDD - Vue d ensemble.pdf"));
}
  
  menu2_1 = new jsDOMenu(150, "absolute");
  with (menu2_1) {
    addMenuItem(new menuItem("COMPLETE LIST", "", "code:window.location.href = 'projets.php?theme=8&lang=UK'"));	  
    addMenuItem(new menuItem("-"));
	addMenuItem(new menuItem("ENERGY - STATISTICS", "", "code:window.location.href = 'projets.php?theme=1&lang=UK'"));
    addMenuItem(new menuItem("ENERGY - DISSEMINATION", "", "code:window.location.href = 'projets.php?theme=2&lang=UK'"));
    addMenuItem(new menuItem("ENERGY - AUDIT", "", "code:window.location.href = 'projets.php?theme=9&lang=UK'"));
    addMenuItem(new menuItem("-"));
    addMenuItem(new menuItem("ENVIRONMENT", "", "code:window.location.href = 'projets.php?theme=4&lang=UK'"));
    addMenuItem(new menuItem("-"));
   addMenuItem(new menuItem("GIS AND LAND MANAGEMENT", "", "code:window.location.href = 'projets.php?theme=5&lang=UK'"));
    //addMenuItem(new menuItem("MOBILITY", "", "code:window.location.href = 'projets.php?theme=6'"));
}
 
 

menu2_2 = new jsDOMenu(150, "absolute");
with (menu2_2) {
    addMenuItem(new menuItem("LISTE COMPL\u00c8TE", "", "code:window.location.href = 'projets.php?prjTheme=tout&lang=UK'"));	  
    addMenuItem(new menuItem("-"));
	addMenuItem(new menuItem("ENERGY - STATISTICS", "", "code:window.location.href = 'projets.php?prjTheme=stat&lang=UK'"));
    addMenuItem(new menuItem("ENERGY - DISSEMINATION", "", "code:window.location.href = 'projets.php?prjTheme=dissem&lang=UK'"));
    addMenuItem(new menuItem("ENERGY - AUDIT", "", "code:window.location.href = 'projets.php?prjTheme=audit&lang=UK'"));
    addMenuItem(new menuItem("-"));
    addMenuItem(new menuItem("ENVIRONMENT", "", "code:window.location.href = 'projets.php?prjTheme=envi&lang=UK'"));
    addMenuItem(new menuItem("-"));
   addMenuItem(new menuItem("MOBILITY - SIG AND LAND MANAGEMENT", "", "code:window.location.href = 'projets.php?prjTheme=sig&lang=UK'"));
    //addMenuItem(new menuItem("MOBILITY", "", "code:window.location.href = 'projets.php?prjTheme=mobil'"));
}
  
 menu2_3 = new jsDOMenu(150, "absolute");
with (menu2_3) {
    addMenuItem(new menuItem("BY NAME", "", "code:window.location.href = 'projets.php?cvList=nom&lang=UK'"));	  
    addMenuItem(new menuItem("BY THEME", "", "code:window.location.href = 'projets.php?cvList=theme&lang=UK'"));	  
    addMenuItem(new menuItem("BY FUNCTION", "", "code:window.location.href = 'projets.php?cvList=fonction&lang=UK'"));	  
 }
 
  //_____________________________________menu chercher
  
  menu3 = new jsDOMenu(140, "absolute");
  with (menu3) {
    addMenuItem(new menuItem("A PROJECT","item1", "blank.htm"));
    addMenuItem(new menuItem("A RESOURCE", "", "code:alert('not available yet...')"));
  }
  
  menu3_1 = new jsDOMenu(150, "absolute");
  with (menu3_1) {
    addMenuItem(new menuItem("BY THEME","", "code:alert('not available yet...')"));
    addMenuItem(new menuItem("IN A COLLECTION", "", "code:alert('not available yet...')"));
  }
  
  
    //_____________________________________menu chercher
  
  menu5 = new jsDOMenu(140, "absolute");
  with (menu5) {
	//addMenuItem(new menuItem("SEARCH BY CATEGORY","", "code:window.location.href = 'projets.php?zoom_query'"));
	addMenuItem(new menuItem("DOWNLOAD","", "/downloads/"));
    addMenuItem(new menuItem("UPLOAD", "", "/uploads/"));
	addMenuItem(new menuItem("DOWNLOAD ACROBAT READER", "", "http://www.adobe.fr/products/acrobat/readstep2.html"));
	addMenuItem(new menuItem("DOWNLOAD FLASH PLAYER", "", "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&Lang=English&P5_Language=English"));
}
  
  
  
  //menu1.items.item2.setSubMenu(menu1_1);
	menu2.items.item2.setSubMenu(menu2_1);
	menu2.items.item3.setSubMenu(menu2_2);
	menu2.items.item5.setSubMenu(menu2_3);
	menu3.items.item1.setSubMenu(menu3_1);
  
  menuBar = new jsDOMenuBar("static", "staticMenuBar");
  with (menuBar) {
	addMenuBarItem(new menuBarItem("HOME PAGE","","","","code:window.location.href = 'index-UK.php?lang=UK'"));
	addMenuBarItem(new menuBarItem("LANGUAGE", menu1));
	addMenuBarItem(new menuBarItem("WHO WE ARE ?", menu4));
 	addMenuBarItem(new menuBarItem("LISTS", menu2));
	addMenuBarItem(new menuBarItem("TOOLS", menu5,"","code:window.location.href = 'projets.php?prjTheme=tout&lang=UK'"));
	addMenuBarItem(new menuBarItem("ADVANCED SEARCH","","","", "code:window.location.href = 'projets.php?zoom_query'"));
	addMenuBarItem(new menuBarItem("TRAINING","","","", "code:window.location.href = 'http://www.icedd.be/inscription'"));
	//addMenuBarItem(new menuBarItem("test", "","","","code:window.location.href ='http://www.icedd.be'"));
setActivateMode("over");
  }
}
