	function MenuItem(myURL, myCaption, myID){
		this.target		= myURL;
		this.caption	= decodeURIComponent(myCaption);
		this.id			= myID;
		this.level		= 0;
		this.hide		= false;
		this.nextItem	= null;
		this.firstChild	= null;

		this.AddNextItem = function (myNewMenu){
			if (this.nextItem == null){
				this.nextItem = myNewMenu;
			} else {
				this.nextItem.AddNextItem(myNewMenu);
			}
		}

		this.AddChildItem = function (myNewMenu){
			if (this.firstChild == null){
				this.firstChild = myNewMenu;
			} else {
				this.firstChild.AddNextItem(myNewMenu);
			}
		}
		
		this.DisplayItems = function (mylevel){
			this.pagename = mylevel;
			
			if (this.id == this.pagename){
				document.write("<tr ");
	
				if (this.target == ""){
					document.write("onClick=\"clicked('" + this.id + "')\" ");
				}
				
				document.write("id=\"Menu_ID_" + this.id + "\" ");
				if (this.level > 1){
					document.write("style=\"display:none\"");
				}
				document.writeln(">");
				/*document.writeln("<td width='2%' class=\"td_highlight_" + this.level + "\"></td>");*/
				
				/*document.writeln("<td width='96%' style='padding-left:16px' class=\"td_menu_lvl_" + this.level + "\">");*/
				document.writeln("<td colspan='3' style='padding-left:20px' class=\"td_highlight_" + this.level + "\">");
	
				if(this.target != ""){
					document.write("<a href=\"");
					if (this.target.length > 0)
						if ((this.target.substr(0,4) != "http") && (this.target.substr(0,7) != "mailto:")) 
							document.write(GetPathToTheRoot());
					document.write(this.target + "\" ");
					document.write("class=\"level_" + this.level + "_link_highlight\"");
				
					if (this.target.length > 0)
						if (this.target.substr(0,4) == "http") document.write(" target=\"_blank\"");
					document.write(">");
				}
				
				document.writeln (this.caption);
				
				if(this.target != "") document.writeln("</a></tr>");
				
				/*document.writeln("</td><td width='2%' class=\"td_highlight_" + this.level + "\"></td></tr>");*/
			} else {
				document.write("<tr ");
	
				if (this.target == ""){
					document.write("onClick=\"clicked('" + this.id + "')\" ");
				}
				
				document.write("id=\"Menu_ID_" + this.id + "\" ");
				if (this.level > 1){
					document.write("style=\"display:none\"");
				}
				document.writeln(">");
				
				document.writeln("<td colspan='3' style='padding-left:20px' class=\"td_menu_lvl_" + this.level + "\">");
	
				if(this.target != ""){
					document.write("<a href=\"");
					if (this.target.length > 0)
						if ((this.target.substr(0,4) != "http") && (this.target.substr(0,7) != "mailto:")) 
							document.write(GetPathToTheRoot());
					document.write(this.target + "\" ");
					document.write("class=\"level_" + this.level + "_link\"");
				
					if (this.target.length > 0)
						if (this.target.substr(0,4) == "http") document.write(" target=\"_blank\"");
					document.write(">");
				}
				
				document.writeln (this.caption);
				
				if(this.target != "") document.writeln("</a>");
				
				document.writeln("</td></tr>");
			}
		
			if (this.firstChild != null) this.firstChild.DisplayItems(this.pagename);
			if (this.nextItem != null) this.nextItem.DisplayItems(this.pagename);
		}
		
		this.AssignLevelsItems = function (myLevel){
			this.level = myLevel;
			if (myLevel > 1) this.hide = true;
			if (this.firstChild != null) this.firstChild.AssignLevelsItems(myLevel+1);
			if (this.nextItem != null) this.nextItem.AssignLevelsItems(myLevel);
		}
		
		this.HideAllItems = function (){
			if (this.level > 1) {
				this.hide = true;
				document.getElementById("Menu_ID_" + this.id).style.display = "none";
			}
			if (this.firstChild != null) this.firstChild.HideAllItems();
			if (this.nextItem != null) this.nextItem.HideAllItems();
		}
		
		this.ShowAllItems = function (){
			this.hide = false;
			document.getElementById("Menu_ID_" + this.id).style.display = "";
			if (this.firstChild != null) this.firstChild.ShowAllItems();
			if (this.nextItem != null) this.nextItem.ShowAllItems();
		}
		
		this.ShowAllNextItems = function (){
			this.hide = false;
			document.getElementById("Menu_ID_" + this.id).style.display = "";
			if (this.nextItem != null) this.nextItem.ShowAllNextItems();
		}

		this.ShowAllChildItems = function (myId){
			if (this.id == myId) {
				if (this.firstChild != null) this.firstChild.ShowAllNextItems();
			} else {
				if (this.firstChild != null) this.firstChild.ShowAllChildItems(myId);
				if (this.nextItem != null) this.nextItem.ShowAllChildItems(myId);
			}
		}

		this.HideAllNextItems = function (){
			this.hide = true;
			document.getElementById("Menu_ID_" + this.id).style.display = "none";
			if (this.firstChild != null) this.firstChild.HideAllNextItems();
			if (this.nextItem != null) this.nextItem.HideAllNextItems();
		}

		this.HideAllChildItems = function (myId){
			if (this.id == myId) {
				if (this.firstChild != null) this.firstChild.HideAllNextItems();
			} else {
				if (this.firstChild != null) this.firstChild.HideAllChildItems(myId);
				if (this.nextItem != null) this.nextItem.HideAllChildItems(myId);
			}
		}
		
		this.isExpandItem = function (myId){
			myReturn = false;
			if (this.id == myId) {
				if (this.firstChild != null) myReturn = !(this.firstChild.hide);
			} else {
				if (this.firstChild != null) myReturn = myReturn || this.firstChild.isExpandItem(myId);
				if (this.nextItem != null) myReturn = myReturn || this.nextItem.isExpandItem(myId);
			}
			return(myReturn);
		}
		
		this.ShowHideItems = function (myId) {
			if (this.isExpandItem(myId)) {
				this.HideAllChildItems(myId);
			} else {
				this.ShowAllChildItems(myId);
			}
		}
		
		this.getPathItems = function (myId) {
			if (this.id == myId) {
				myResult = Array(this.id);
				return (myResult);
			} else {
				myResult = null;
				if (this.firstChild != null) myResult = this.firstChild.getPathItems(myId);
				
				if (myResult != null) {
					myResult.unshift(this.id);
				} else {
					if (this.nextItem != null) myResult = this.nextItem.getPathItems(myId);
				}
				return(myResult);
			}
		}

		
	}



	function Menu(){
		this.items			= null;
		this.PathToTheRoot	= "./";
		this.levelAssigned	= false;
		this.expandIsFix	= false;
		this.idMenuInit		= "";

		this.AddMenuItem = function (myNewMenu){
			if (this.items == null){
				this.items = myNewMenu;
			} else {
				this.items.AddNextItem(myNewMenu);
			}
		}

		this.DisplayMenu = function (){
			if (!(this.levelAssigned)) this.AssignLevels();
			if (this.items == null){
				document.writeln ("No items");
			} else {
				this.items.DisplayItems(this.idMenuInit);
			}
			if (this.expandIsFix) {
				this.ShowAll();
			} else {
				if (this.idMenuInit != "") this.initMenu(this.idMenuInit);
			}
		}
		
		this.AssignLevels = function (){
			if (this.items != null){
				this.items.AssignLevelsItems(1);
			}
			this.levelAssigned = true;
		}
		
		this.HideAll = function(){
			if (!(this.levelAssigned)) this.AssignLevels();
			if (this.items != null) this.items.HideAllItems();
		}

		this.ShowAll = function(){
			if (!(this.levelAssigned)) this.AssignLevels();
			if (this.items != null) this.items.ShowAllItems();
		}
		
		this.clickMenu = function (myId){
			if (!(this.levelAssigned)) this.AssignLevels();
			if (!(this.expandIsFix))
				if (this.items != null) this.items.ShowHideItems(myId);
		}
		
		this.initMenu = function (myId) {
			if (this.items != null){
				myPathTmp = this.items.getPathItems(myId);
				if (myPathTmp != null) {
					for(cpt=0; cpt < myPathTmp.length; cpt++){
						this.clickMenu(myPathTmp[cpt]);
					}
				}
			}
		}

	}


	function GetPathToTheRoot(){
		return(myMenu.PathToTheRoot);
	}
	
	function clicked(myIdClicked){
		myMenu.clickMenu(myIdClicked);
	}