<!--

var zmenu_anchorStyle = "menu1";
var zmenu_anchorBgColor_n = "white";
var zmenu_anchorBgColor_f = "white";
var zmenu_anchorBgColor_s = "white";
var zmenu_anchorColor_n = "#143181";
var zmenu_anchorColor_f = "#143181";
var zmenu_anchorColor_s = "#143181";

var zmenu_itemStyle = "menu4";
var zmenu_itemBgColor_n = "white";
var zmenu_itemBgColor_f = "#ECECEC";
var zmenu_itemBgColor_s = "#ECECEC";
var zmenu_itemColor_n = "#002145";
var zmenu_itemColor_f = "#13007C";
var zmenu_itemColor_s = "#13007C";

var zmenu_anchorBorder = 0;
var zmenu_anchorBorderColor = "white";

var zmenu_boxBorder = 1;
var zmenu_boxBorderColor = "#004CA0";






var zmenu_mouseout = 0;
var zmenu_focus = 1;
var zmenu_closetimeout = 210;
var zmenu_opentimeout = 210;

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 z_getImage(name){
	return document.images[name];
}


function zmenu(scriptname, posx, posy, anchor_name, anchor_url, width, id, anchorclass) {
	this.posx = posx;
	this.posy = posy;
	this.scriptname = scriptname;
	this.anchor_name = anchor_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;
	
	tmpimage = new Image();
	tmpimage.src = this.anchor_image_f;
	tmpimage = new Image();
	tmpimage.src = this.anchor_image_n;
	
}





function zmenu_refresh(){
	//vis_anchor = z_getImage('zmenu_image'+this.scriptname);
	//vis_box = z_getElement('zmenu_'+this.scriptname+'box');
	
	switch(this.state){
		case 1:
			if(this.timerID > 0)
				clearTimeout(this.timerID);
			//vis_anchor.src = this.anchor_image_f;
			//vis_anchor.style.cursor = "hand";
			
			if(zmenu_openTimerID > 0)
				clearTimeout(zmenu_openTimerID);
			
			zmenu_openTimerID = setTimeout("zmenu_openBox('zmenu_"+this.scriptname+"', 'zmenu_"+this.scriptname+"box')", zmenu_opentimeout);
			//document.images["bullet"+this.anchorid].src= "graphics/menu/bullet_s.gif";
			
			//vis_box.style.visibility = 'visible';
			//vis_box.visibility = 'visible';
			break;
			
		case 0:
		default:
			//vis_anchor.src = this.anchor_image_n;
			//document.images["bullet"+this.anchorid].src= "graphics/menu/bullet_n.gif";
			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(){
		if(if_IE){
			document.write("<td width='100%' onmouseover='"+this.scriptname+".setState(zmenu_focus);' onmouseout='"+this.scriptname+".setState(zmenu_mouseout);'><span class='menu' style='position:relative'>");
				this.writeBox();
			document.write("</span>");
			document.write("<a class='"+this.anchorclass+"' href='"+this.anchor_url+"' >"+this.anchor_name+"</a>");		
			document.write("</td>");
		} else {
			document.writeln("<td width='100%'><a href='"+this.anchor_url+"' class='head1'>"+this.anchor_name+"</a></td>");
		}	
}

/*
function zmenu_writeBox(){
	if(this.list.length > 0 && if_IE){
		document.write("<div id='zmenu_"+this.scriptname+"box' style='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);'><table cellpadding='0' cellspacing='0' border='0'>");
			document.write("<tr>");
				document.write("<td><img src='graphics/floatmenu/top_left.gif' width='9' height='22' border='0'></td>");
				document.write("<td background='graphics/floatmenu/bgr_top.gif' class='head11' align='right' valign='middle'>"+this.anchor_name+"</td>");
				document.write("<td><img src='graphics/floatmenu/top_right.gif' width='9' height='22' border='0'></td>");
			document.write("</tr>");
			document.write("<tr>");
				document.write("<td colspan='3' bgcolor='#003378'><img src='graphics/tr.gif' width='"+this.width+"' height='1' border='0'></td>");
			document.write("</tr>");
			document.write("<tr>");
				document.write("<td background='graphics/floatmenu/bgr_left.gif'><img src='graphics/tr.gif' width='1' height='1' border='0'></td>");
				document.write("<td bgcolor='#E6E6E6' width='"+(this.width-18)+"' align='right'><table cellpadding='2' cellspacing='0'  border='0'>");
					for(i=0;i<this.list.length;i++){
						document.write("<tr>");
						document.write("<td align='right' 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+");'><nobr>"+this.list[i].name+"</nobr></nobr></td>");
						document.write("</tr>");
					}
				document.write("</table></td>");
				document.write("<td background='graphics/floatmenu/bgr_right.gif'><img src='graphics/tr.gif' width='1' height='1' border='0'></td>");
			document.write("</tr>");
			document.write("<tr>");
				document.write("<td><img src='graphics/floatmenu/bottom_left.gif' width='9' height='9' border='0'></td>");
				document.write("<td background='graphics/floatmenu/bgr_bottom.gif' class='head11' align='right'><img src='graphics/tr.gif' width='1' height='1' border='0'></td>");
				document.write("<td><img src='graphics/floatmenu/bottom_right.gif' width='9' height='9' border='0'></td>");
			document.write("</tr>");
			document.write("</table></div>");
	}
}
*/
function zmenu_writeBox(){
	if(this.list.length > 0 && if_IE){
		document.write("<div id='zmenu_"+this.scriptname+"box' style='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);'><table cellpadding='0' cellspacing='0' border='0'>");
				document.write("<tr>");
					document.write("<td><table bgcolor='"+zmenu_boxBorderColor+"' cellpadding='2' cellspacing='"+zmenu_boxBorder+"'  border='0'>");
							for(i=0;i<this.list.length;i++){
								document.write("<tr>");
								document.write("<td bgcolor='"+zmenu_itemBgColor_n+"' id='"+this.list[i].scriptname+"' class='"+zmenu_itemStyle+"' style='color:"+zmenu_itemColor_n+"' onmouseover='"+this.scriptname+".setItemState("+i+", zmenu_focus)' onmouseout='"+this.scriptname+".setItemState("+i+", zmenu_mouseout)' onclick='"+this.scriptname+".doTask("+i+");'><nobr>&nbsp;&nbsp;&nbsp;"+this.list[i].name+"&nbsp;&nbsp;&nbsp;</nobr></td>");
								document.write("</tr>");
							}
						document.write("</table></td>");
					document.write("<td background='graphics/box_bgr1.gif'><img src='graphics/tr.gif' width='3' height='1' border='0'></td>");
				document.write("</tr>");
				document.write("<tr>");
					document.write("<td background='graphics/box_bgr2.gif' height='3'><img src='graphics/tr.gif' width='15' height='3' border='0'></td>");
					document.write("<td background='graphics/box_bgr3.gif' height='3'><img src='graphics/tr.gif' width='3' height='3' border='0'></td>");
				document.write("<tr>");			
			document.write("</table></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){
	this.list[this.list.length] = new zmenu_item(name, url);
	this.list[this.list.length-1].scriptname = this.scriptname+"_item"+(this.list.length-1);
}

function zmenu_item(name, url){
	this.name = name;
	this.url = url;
	this.state = zmenu_mouseout;
}

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.style.color = zmenu_itemColor_f;
			vis_item.bgColor = zmenu_itemBgColor_f;
			vis_item.style.cursor = "hand";
			break;

		case 0:
		default:
			vis_item.style.color = zmenu_itemColor_n;
			vis_item.bgColor = zmenu_itemBgColor_n;
			
			break;
	}
	
}

function zmenu_closeBox(anchor_name, box_name){
	vis_box = z_getElement(box_name);
	vis_box.style.visibility = 'hidden';
}
-->