var msbg = Array();//menu_show_background
var msfg = Array();//menu_show_foreground
var mhbg = Array();//menu_hide_background
var mhfg = Array();//menu_hide_foreground
var mha = Array();//menu_hide_arrow

function mg(str, w, h, n)//menu_go
{ 
	var args = mg.arguments;
	if(str.search("^javascript:") == -1)
	{
		if(str.search("mailto:") == -1) str += (PROFILE.length > 0 ? "/?profile="+PROFILE : "");
		if(args.length > 1) openWindow3(str, w, h, n);  
		else document.location = str; 
	}
	else
	{
		str = str.replace("javascript:", "");
		eval(str);
	}
}

function ms(name)//menu_show
{
	var args = ms.arguments;
	if(args.length > 0) obj = args[0];
	if(args.length > 1)
	{
		n = args[1];
		if(n)
		{
			obj.style.background = msbg[n];
			obj.style.color = msfg[n];
		}
	}
	if(args.length > 2) 
	{
		name = args[2];
		if(document.getElementById(name+'_list')) document.getElementById(name+'_list').style.visibility = 'visible';
		if(document.getElementById(name+'_image')) document.images[name+'_image'].src = eval(name+"n.src");
	}
}

function mh(name)//menu_hide
{
	var args = mh.arguments;
	if(args.length > 0) obj = args[0];
	if(args.length > 1)
	{
		n = args[1];
		if(n)
		{
			obj.style.background = mhbg[n];
			obj.style.color = mhfg[n];
		}
	}
	if(args.length > 2) 
	{
		name = args[2];
		if(document.getElementById(name+'_list')) document.getElementById(name+'_list').style.visibility = 'hidden';
		if(document.getElementById(name+'_image')) document.images[name+'_image'].src = eval(name+"f.src");
	}
}

function mdn(link, name)//menu_draw_node
{
	if(mdn.arguments.length > 0)
	{
		out="<div class='"+mtype+"m'onmouseover='ms(this,"+mnumber+")'onmouseout='mh(this,"+mnumber+")'";
		if(link.length)out+="onclick=\""+link+"\"";
		out+=">"+name;
	}
	else out = "</div>";
	document.write(out);
}

function mdr(link, name, label)//menu_draw_root
{
	if(mdr.arguments.length > 0)
	{
		out="<div class='"+mtype+"m'";
		//netscape
		out+="onmouseover='ms(this,"+mnumber+",\""+label+"\")'onmouseout='mh(this,"+mnumber+",\""+label+"\")'>";
		out+="<span class='"+mtype+"mp'";
		//netscape
		if(link.length)out+="onclick=\""+link+"\"";
		else out+="style='cursor:default'";
		out+=">"+name;
		out+="</span>";
		out+="<span class='"+mtype+"ma'";
		//netscape
		out+="><img src='"+mha[mnumber]+"'border=0></span>";
	}
	else out = "</div>";
	document.write(out);
}

function mdl(label, x, y, width)//menu_draw_list
{
	if(mdl.arguments.length > 0) out="<div class='"+mtype+"ml'id='"+label+"_list'style='left:"+x+";top:"+y+";width:"+width+"'>";
	else out = "</div>";
	document.write(out);
}

function mds(link, image, label, swidth, sheight, level, alt)
{
	out ="";
	if(mds.arguments.length > 0)
	{
		if(mtype == "l") out+="<span class="+mtype+"m"+level+">";
		if(swidth > 0 && sheight > 0)
		{

			out+="<img src='"+mspacer+"'width="+swidth+" height="+sheight+" border=0>";
			if(mtype == "l") out+="<br>";
		}
		out+="<span id="+label+" onmouseover='ms(this,0,\""+label+"\")'onmouseout='mh(this,0,\""+label+"\")'style='position:relative;z-index:10'>";
		if(link) out+="<a href=\"javascript:"+link+"\">";
		out+="<img id="+label+"_image src='"+mib+image+"'";
		if(alt) out+=" alt='"+alt+"'";
		out+=" border=0>";
		if(link) out+="</a>";
	}
	else
	{
		out+="</span>";
		if(mtype == "l") out+="</span><br>";
	}
	
	document.write(out);
}
