<!--
//******************************************************************************
// Active DHTML/CSS Menu - 2002~2006
// Gilles Gomez - alizesonline.com
//******************************************************************************


ie4 = (document.all)?true:false;						//IE 4/5 compatible
dom = (document.getElementById)?true:false;					//DOM compatible

menu = new Array;
var nbItem=0;
var menuOpener=false;
var menuOn=false;
var menuHighlighted=false;
var watchEnable = true;
var refresh=false;
var overElement=false;
var closeSub=false;
var resetHighlighted=false;
var xOffset=0;
var navWidth;
var variableWidth;
var update="javascript:window.alert(\"Currently being updated\")";


//******************************************************************************
//Patch to work with an unknown domain path or a CDRom
//domainDir= the name of the domain name or CD directory
//then all paths are: domainPath/relative_path_of_the_file
//******************************************************************************

//var domainDir="alizes";
var domainDir="alizesonline.com";
var urlString=document.location.toString();
var homePos=urlString.search(domainDir) + domainDir.length + 1;
var domainPath=urlString.substring(0,homePos);


//******************************************************************************
//Global variables - to be modified as necessary
//******************************************************************************

var menuTop=55;									// The top of the menu
var menuLeft=200;								// Starting left position of the menu
var menuWidth=60;								// Width of each menu title
var menuHeight=32;								// Height of each menu title
var subWidth=200;								// Width of submenus
var subHeight=16;								// Height of each submenu line
var subPosTop=false;								// Submenus to the top
var menuClass0="menu1";								// CSS class of menus (out)
var menuClass1="menu3";								// CSS class of menus (over)
var menuClass2="menu2";								// CSS class of menus (selected)
var subLayer="subBox";								// CSS class of submenus (box)
var subClass0="sub1";								// CSS class of submenus (out)
var subClass1="sub2";								// CSS class of submenus (over)
var menuTimeOut=50;								// TimeOut (in ms)
var resetWhenOver=true;								// Reset the highlighted color when the mouse is over the menu
var contentWidth=780;								// Width of the content of the page
var leftMargin=20;								// Left margin of the page
var sideClass="sideMenu";							// CSS class of the left side menu
var sitemapClass="sitemap";							// CSS class of the site map


//******************************************************************************
//menuItem object creator. Do not modify
//******************************************************************************

function menuItem(title_, url0, posLeft, width_, nb, posTop, h){
	this.title=title_;
	this.url0=url0;
	this.posLeft=posLeft;
	this.width=width_;
	this.nb=nb;
	this.posTop=posTop;
	this.height=h;

	this.item = new Array;
	this.url = new Array;
	this.family = new Array;
}


//******************************************************************************
//Here are the parameters of the menu bar
//
//Use as follow:
//
//	menu[nbItem]=new menuItem();
//	menu[nbItem].title="*** Title of the first item of the menu ***";
//	menu[nbItem].url0="*** http://url_of_page ***";
//	this.posLeft="*** x position of the menu ***";
//	this.width="*** width of the menu ***";
//
//	nbItem+=1;		*** Next menu Item ***
//
//	menu[nbItem]=new menuItem();
//	menu[nbItem].title="*** Title of the second item of the menu ***";
//	menu[nbItem].url0="*** http://url_of_page ***";
//	
//	menu[nbItem].item[1]="*** Title of the first line of the submenu ***";
//	menu[nbItem].url[1]="*** http://url_of_page ***";
//	menu[nbItem].family[1]="*** optional - to create several submenus ***";
//	
//	menu[nbItem].item[2]="Titel of the next line of the submenu";
//	menu[nbItem].url[2]="*** http://url_of_page ***";
//	menu[nbItem].family[2]="*** optional - to create several submenus ***";
//
//	nbItem+=1;		*** Next menu Item ***
//
//	...			*** And so on till the end of the menu ***
//
//	Here we go...
//
//******************************************************************************




//******************************************************************************
//Beginning of the programm
//Do not modify from this point to the bottom of the page
//******************************************************************************


//******************************************************************************
// Initialisation
//******************************************************************************

function initMenu(){
	
	createOffset();								// Correction of position depending on the size of the page
	
	nbItem=menu.length;							// # of menu items

	for(i=0;i<nbItem;i++){
		if(!menu[i].posLeft){
			menu[i].posLeft=menuLeft+xOffset+(i*menuWidth)+i;	// left of items
			variableWidth=false;
		}
		else{
			menu[i].posLeft+=xOffset;
			variableWidth=true;
		}
		if(!menu[i].width){
			menu[i].width=menuWidth;				// width of items
			variableWidth=false;
		}
		menu[i].nb=menu[i].item.length;					// # of submenus items
		menu[i].height=(menu[i].nb-1)*subHeight;			// height of submenus
		if(subPosTop) menu[i].posTop=menuTop-3-menu[i].height;		// top of submenus
		else menu[i].posTop=menuTop+menuHeight;
	}
}


//******************************************************************************
// This function creates the menu to the page
//******************************************************************************

function createMenu(menuOn){
	
	if(!menu[0].height) initMenu();
	
	if(ie4||dom){								// menu
		for(i=0;i<nbItem;i++){
			//Title of Item
			if(menu[i].nb){
				if(menuOn==i){
					document.writeln("<div id='title"+ i +"' style='position:absolute; left:"+ menu[i].posLeft +"px; width:"+ menu[i].width +"px; height:"+ menuHeight +"px; top:"+ menuTop +"px; z-index:1' onMouseOver=\"changeMenu("+ i +",true,this,'menu',1,'nothing',false)\" onMouseOut=\"changeMenu("+ i +",false,this,'menu',2,true,false)\" class='"+ menuClass2 +"'>");
				}
				else{
					document.writeln("<div id='title"+ i +"' style='position:absolute; left:"+ menu[i].posLeft +"px; width:"+ menu[i].width +"px; height:"+ menuHeight +"px; top:"+ menuTop +"px; z-index:1' onMouseOver=\"changeMenu("+ i +",true,this,'menu',1,'nothing',false)\" onMouseOut=\"changeMenu("+ i +",false,this,'menu',0,true,false)\" class='"+ menuClass0 +"'>");
				}
			}
			else{
				if(menuOn==i){
					document.writeln("<div id='title"+ i +"' style='position:absolute; left:"+ menu[i].posLeft +"px; width:"+ menu[i].width +"px; height:"+ menuHeight +"px; top:"+ menuTop +"px; z-index:1' onMouseOver=\"changeMenu("+ i +",'hide',this,'menu',1,'nothing',false)\" onMouseOut=\"changeMenu("+ i +",false,this,'menu',2,'nothing',false)\" class='"+ menuClass2 +"'>");
				}
				else{
					document.writeln("<div id='title"+ i +"' style='position:absolute; left:"+ menu[i].posLeft +"px; width:"+ menu[i].width +"px; height:"+ menuHeight +"px; top:"+ menuTop +"px; z-index:1' onMouseOver=\"changeMenu("+ i +",'hide',this,'menu',1,'nothing',false)\" onMouseOut=\"changeMenu("+ i +",false,this,'menu',0,'nothing',false)\" class='"+ menuClass0 +"'>");
				}
			}
			document.writeln("<a href='"+ menu[i].url0 +"'>"+ menu[i].title +"</a></div>");

			//Scroll menu if exists
			if(menu[i].nb){
				document.writeln("<div id='menu"+ i +"' style='position:absolute; left:"+ menu[i].posLeft +"px; top:"+ menu[i].posTop +"px; z-index:2; visibility:hidden' class='"+ subLayer +"'>");
				for(j=1;j<menu[i].nb;j++) {
					document.writeln("<div class='"+ subClass0 +"' onMouseOver=\"changeMenu(0,false,this,'sub',1,false,false)\" onMouseOut=\"changeMenu(0,false,this,'sub',0,true,true)\">");
					document.writeln("<a href='"+ menu[i].url[j] +"'>"+ menu[i].item[j] +"</a></div>");
				}
				document.writeln("</div>");
			}	
		}
		
		if((!menuOn)&&(menuOn!=0))resetWhenOver=false;			// Test for Menu highlight and color reset
		else{
			menuHighlightedN=menuOn;				// creates the Highlighted menu object
			menuHighlighted=createTitleObject(menuOn);
		}
		
		closeSub=window.setTimeout("watchDog()",menuTimeOut);
		
		onresize=moveMenu;
	}
	
	else{									// For old browsers only
		document.writeln("<div align='center'>");
		document.writeln("| ");
		for(i=0;i<nbItem;i++){
			document.writeln("<a href='"+ menu[i].url0 +"'\">"+ menu[i].title +"</a> | ");
		}
		document.writeln("</div>");
	}
}


//******************************************************************************
// This part handles the DHTML menu
//******************************************************************************


// This function hides all layers
function hideAll(){
	if (dom){
		for (i=0;i<nbItem;i++){
			menuName = "menu"+i;
			if(menu[i].nb) document.getElementById(menuName).style.visibility = 'hidden';
		}
	}
	else if (ie4){
		for (i=0;i<nbItem;i++){
			menuName = "menu"+i;
			if(menu[i].nb) document.all[menuName].style.visibility = 'hidden';
		}
	}
	if(refresh) menuStyleReset();
}


// This functions hides all layers when timeout is reached
function watchDog(){
	if(watchEnable){
		hideAll();
		watchEnable = false;
	}
}


// This function changes the menu, opens submenus, changes styles and set flags
// n = number of the layer
// visible = true, "hide" or false (false means nothing happens)
// who = this or false (false means no Style will be changed)
// what = "menu" or "sub"
// how = 0 or 1 or 2 (indicates the color)
// watch = "nothing" or true or false (nothing means watchEnable will not be changed)
// ref = true or false (false means refresh will not be changed)

function changeMenu(n, visible, who, what, how, watch, ref){
	if(visible){								// Menu section enabled
		hideAll();							// Close all submenus
		if(visible!="hide"){						// Open a submenu if not "hide"
			watchEnable = false;
			window.clearTimeout(closeSub);
			menuName = "menu"+n;
			if (dom) document.getElementById(menuName).style.visibility = 'visible';
			else if (ie4) document.all[menuName].style.visibility = 'visible';
		}
	}

	if(who){								// Change object style section enabled
		if(what=="menu"){						// Object is a menu
			if(how==1){
				overElement=true;
				if(resetWhenOver) changeMenuStyle(menuHighlighted,menuClass0);
				changeMenuStyle(who,menuClass1);
				menuOpener=who;
			}
			else if(how==2){
				overElement=true;
				changeMenuStyle(who,menuClass2);
				menuOpener=who;
			}
			else{
				changeMenuStyle(who,menuClass0);
				if(resetHighlighted)window.clearTimeout(resetHighlighted);
				if(resetWhenOver) resetHighlighted=window.setTimeout("if(!overElement)changeMenuStyle(menuHighlighted,menuClass2)",menuTimeOut);
				overElement=false;
			}
		}
		if(what=="sub"){						// Object is a submenu
			if(how){
				overElement=true;
				if(ie4||dom) changeMenuStyle(who,subClass1);
				if(menuOpener){					// Resets the menuOpener Class
					changeMenuStyle(menuOpener,menuClass1);
				}
			}
			else{
				overElement=false;
				changeMenuStyle(who,subClass0);
			}
		}
	}

	if(watch==false){
		watchEnable=false;						// Resets the watchEnable flag
		window.clearTimeout(closeSub);					// Disables the timer
	}
	else if(watch==true){
		watchEnable=true;						// Sets the watchEnable flag
		window.clearTimeout(closeSub);					// Hides the submenus
		closeSub=window.setTimeout("watchDog()",menuTimeOut);
	}

	if(ref) refresh=true;							// Sets the refresh flag
}


// This function resets the style of the menu item
function menuStyleReset(){
	if(menuOpener){
		if(menuOpener!=menuHighlighted){				// menuOpener is not the current item
			changeMenuStyle(menuOpener,menuClass0);
			if(resetWhenOver)changeMenuStyle(menuHighlighted,menuClass2);
		}
		else{								// menuOpener is the current item
			changeMenuStyle(menuOpener,menuClass2);
		}
		menuOpener=false;
	}
	refresh=false;
}


// This function changes a style
function changeMenuStyle(who,styleName){
	if(ie4||dom)who.className=styleName;
}


//This function returns a Title/Menu Object from a number
function createTitleObject(n){
	layerName="title"+n;
	if(dom)highlight=document.getElementById(layerName);
	else if(ie4)highlight=document.all[layerName];
	return highlight;
}

// This function creates an offset to place the menu to the page depending on the size of the window
function createOffset(){
	if (document.body) navWidth=document.body.clientWidth;
	else navWidth=window.innerWidth;
	xOffset=leftMargin+parseInt((navWidth-contentWidth)/2);
	
	nav=navigator.userAgent;						// Correction for obsolete browsers
	if(nav.indexOf("Netscape/7") > 0) xOffset-=20;				// Netscape 7/Win
	if(nav.indexOf("MSIE 4") > 0) xOffset-=20;				// MSIE4/Win
	if(nav.indexOf("MSIE 5") > 0) xOffset-=20;				// MSIE5/Win
	
	if(xOffset<=leftMargin) xOffset=leftMargin;
}

// This function moves the menu if the window is resized
function moveMenu() {
	if (document.body) newNavWidth=document.body.clientWidth;
	else newNavWidth=window.innerWidth;
	
	if (newNavWidth!=navWidth){
		oldOffset=xOffset;
		createOffset();
		for(i=0;i<nbItem;i++){
			if(variableWidth)menu[i].posLeft=menu[i].posLeft+xOffset-oldOffset;
			else menu[i].posLeft=menuLeft+xOffset+(i*menuWidth)+i;
			titleName = "title"+i;
			subName = "menu"+i;
			if(dom){ 
				eval("document.getElementById(titleName).style.left='"+menu[i].posLeft+"px'");
				if(menu[i].nb) eval("document.getElementById(subName).style.left='"+menu[i].posLeft+"px'");
			}
			else if (ie4){
				eval("document.all[titleName].style.left='"+menu[i].posLeft+"px'");
				if(menu[i].nb) eval("document.all[subName].style.left='"+menu[i].posLeft+"px'");
			}
		}
	}
}

// This function creates the left side menu
function createSideMenu(i,n){

	if(!menu[0].height) initMenu();
	
	var family;
	if(menu[i].nb){
		document.writeln("<div class='"+ sideClass +"'>");
		for(j=1;j<menu[i].nb;j++) {
			if(menu[i].family[j]){
				if(j==1) family=menu[i].family[j];
				else{
					if(family!=menu[i].family[j]){
						family=menu[i].family[j];
						document.writeln("</div>");
						document.writeln("<div class='"+ sideClass +"'>");
					}
				}
			}
			if(j==n) document.writeln("<p>"+ menu[i].item[j] +"&nbsp;</p>");
			else document.writeln("<p><a href='"+ menu[i].url[j] +"'>"+ menu[i].item[j] +"</a>&nbsp;</p>");
		}
		document.writeln("</div>");
	}
}

// This function creates the sitemap
function createSitemap(){

	if(!menu[0].height) initMenu();
	
	document.writeln("<div class='"+ sitemapClass +"'>");
	for(i=0;i<nbItem;i++) {
		document.writeln("<p><strong><a href='"+ menu[i].url0 +"'>"+ menu[i].title +"</a></strong></p>");
		if(menu[i].nb){
			document.writeln("<blockquote>");
			for(j=1;j<menu[i].nb;j++) document.writeln("<p><a href='"+ menu[i].url[j] +"'>"+ menu[i].item[j] +"</a></p>");
			document.writeln("</blockquote>");
		}
	}
	document.writeln("</div>");
}
//-->