<!--

var zmenu_anchorStyle = "headerMenu";
var zmenu_anchorBgColor_n = "#003399";
var zmenu_anchorBgColor_f = "#0066cc";
var zmenu_anchorBgColor_s = "#cccccc";
var zmenu_anchorColor_n = "#0066cc";
var zmenu_anchorColor_f = "#0066cc";
var zmenu_anchorColor_s = "#0066cc";

var zmenu_itemStyle = "headerMenu2";
var zmenu_itemBgColor_n = "#cccccc";
var zmenu_itemBgColor_f = "#FFFFFF";
var zmenu_itemBgColor_s = "#FFFFFF";
var zmenu_itemColor_n = "#000000";
var zmenu_itemColor_f = "#FFFFFF";
var zmenu_itemColor_s = "#FFFFFF";

var zmenu_anchorBorder = 0;
var zmenu_anchorBorderColor = "#D50209";

var zmenu_boxBorder = 1;
var zmenu_boxBorderColor = "#1F477A";

var zmenu_mouseout = 0;
var zmenu_focus = 1;
var zmenu_closetimeout = 220;
var zmenu_opentimeout = 220;

var zmenu_openTimerID = -1;


var if_NN6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
var if_NN  = (document.layers) ? true : false;
var if_IE  = (document.all) ? true : false;

function z_getElement(id){
	if(if_IE)
		return eval('document.all["'+id+'"]');
	else
   	if(if_NN6)
   		return document.getElementById(id);
		//else 
		//	return eval( 'document.layers["'+id+'"]' );*/
}



function zmenu(scriptname, posx, posy, anchor_name, anchor_url, width, id, anchorclass, anchor_a_name) {
	
	this.posx = posx;
	this.posy = posy;

		
	this.scriptname = scriptname;
	this.anchor_name = anchor_name;
	this.anchor_a_name = anchor_a_name;
	this.anchor_url = anchor_url;
	this.list = Array();
	this.writeSelf = zmenu_writeSelf;
	this.setState = zmenu_setState;
	this.refresh = zmenu_refresh;
	this.addItem = zmenu_addItem;
	this.setItemState = zmenu_setItemState;
	this.itemRefresh = zmenu_itemRefresh;
	this.writeBox = zmenu_writeBox;
	this.doTask = zmenu_doTask;
	this.timerID = -1;
	this.state = zmenu_mouseout;
	this.width = width;
	this.anchorid = id;
	this.anchorclass = anchorclass;
	
	
}





function zmenu_refresh(){

	z_menu_item = z_getElement(this.scriptname);
	
	switch(this.state){
		case 1:
			if(this.timerID > 0)
				clearTimeout(this.timerID);

			if(zmenu_openTimerID > 0)
				clearTimeout(zmenu_openTimerID);
			
			z_menu_item.bgColor = zmenu_anchorBgColor_f;
			
			zmenu_openTimerID = setTimeout("zmenu_openBox('zmenu_"+this.scriptname+"', 'zmenu_"+this.scriptname+"box')", zmenu_opentimeout);

		break;
			
		case 0:
		default:
			z_menu_item.bgColor = zmenu_anchorBgColor_n;
			this.timerID = setTimeout("zmenu_closeBox('zmenu_"+this.scriptname+"', 'zmenu_"+this.scriptname+"box')", zmenu_closetimeout);
		break;
	}
}

function zmenu_openBox(anchor_name, box_name){
	vis_box = z_getElement(box_name);
	vis_box.style.visibility = 'visible';
}

function zmenu_writeSelf(){
	document.write("<td bgcolor='"+zmenu_anchorBgColor_n+"' width='150px' id='"+this.scriptname+"' class='"+this.anchorclass+"' onmouseover='"+this.scriptname+".setState(zmenu_focus);' onmouseout='"+this.scriptname+".setState(zmenu_mouseout);'><div style='position:relative'>");
		this.writeBox();
	document.write("</div>");
	document.write("<nobr><a href='"+this.anchor_url+"'>"+this.anchor_name+"</a></nobr>");		
	document.write("</td>");
}


function zmenu_writeBox(){
	if(this.list.length > 0){ // && if_IE){
		document.write("<div id='zmenu_"+this.scriptname+"box' style='width:151px;border-left: 1px solid white;border-right: 1px solid white;POSITION: absolute; LEFT: "+this.posx+"px; TOP: "+this.posy+"px; VISIBILITY:hidden; zIndex:100000;' onmouseover='"+this.scriptname+".setState(zmenu_focus);' onmouseout='"+this.scriptname+".setState(zmenu_mouseout);'>");
		for(i=0;i<this.list.length;i++){
			document.write("<div id='"+this.list[i].scriptname+"' class='"+zmenu_itemStyle+"' onmouseover='"+this.scriptname+".setItemState("+i+", zmenu_focus)' onmouseout='"+this.scriptname+".setItemState("+i+", zmenu_mouseout)' onclick='"+this.scriptname+".doTask("+i+");'>"+this.list[i].name+"</div>");
		}
		document.write("</div>");
	}
}
function zmenu_doTask(num){
	if(num == -1){
		if(this.anchor_url.length > 3)
			document.location.href = this.anchor_url;
	} else {
		if(num < this.list.length && num >= 0){
			if(this.list[num].url.length > 3)
				document.location.href = this.list[num].url;
		}
	}
}

function zmenu_setItemState(itemID, state){
	if(this.list[itemID].state != state){
		this.list[itemID].state = state;
		this.itemRefresh(itemID);
	}
}

function zmenu_addItem(name, url, a_name){
	this.list[this.list.length] = new zmenu_item(name, url, a_name);
	this.list[this.list.length-1].scriptname = this.scriptname+"_item"+(this.list.length-1);
}

function zmenu_item(name, url, a_name){
	this.name = name;
	this.url = url;
	this.state = zmenu_mouseout;
	this.a_name = a_name;
}

function zmenu_setState(state){
	if(this.state != state){
		this.state = state;
		this.refresh();
	}
	
}

function zmenu_itemRefresh(itemID){
	
	vis_item = z_getElement(this.list[itemID].scriptname);
	
	switch(this.list[itemID].state){
		case 1:
			vis_item.className = "headerMenu2Cur";
			vis_item.style.cursor = "hand";
		break;

		case 0:
		default:
			vis_item.className = "headerMenu2";
		break;
	}
	
}

function zmenu_closeBox(anchor_name, box_name){
	vis_box = z_getElement(box_name);
	vis_box.style.visibility = 'hidden';
}
-->