var lastMenu='';

var menuTimer=0;

var menuCoords=new Object();



function showMenu(name,show){

	if(!show)return menuTimer=setTimeout("MM_showHideLayers('"+name+"','','hide')",250);

	if(name==lastMenu)menuTimer=clearTimeout(menuTimer);	

	else MM_showHideLayers(lastMenu,'','hide');

	lastMenu=name;

	var leftOffset=(window.innerWidth?window.innerWidth:document.body.clientWidth)/2-(menuCoords.width?menuCoords.width/2:0);

	var menu=MM_findObj(name);

	if(!menu||!menuCoords[name])return;

	if(menu.style)menu=menu.style;

	menu.left=leftOffset+menuCoords[name][0];

	MM_showHideLayers(name,'','show');

}

function drawMenu(name,coords,items,totalWidth,className){

	if(!coords||!coords.length)coords=[0,0];

	if(!items||!items.length)items=['No Items Found.'];

	if(parseInt(navigator.appVersion)<4||(!document.all&&!document.getElementById&&!document.layers))return;

	menuCoords[name]=coords;

	if(totalWidth)menuCoords.width=totalWidth;

	var tagName=(document.layers)?'layer':'div';

	var tagStyle=(document.layers)?'left="'+coords[0]+'" nowrap top="'+coords[1]+'"; visibility="hide" zIndex="1" ':'style="position:absolute;left:'+coords[0]+';top:'+coords[1]+';z-index:1;visibility:hidden;"';

	var container=['<'+tagName+' id="'+name+'" class="'+(className?className:name)+'" onmouseover="showMenu(\''+name+'\',true)" onmouseout="showMenu(\''+name+'\',false)" '+tagStyle+'>','</'+tagName+'>'];

	container[0]+='<table border="0" cellspacing="0" cellpadding="0"><tr>';

	container[1]='</tr></table>'+container[1];

	var dropMenu='';

	for(var i=0;i<items.length;i++){

		if(i>0)dropMenu+='<td>|</td>';

		dropMenu+='<td nowrap>&nbsp;'+items[i]+'&nbsp;</td>';

	}

	document.write(container.join(dropMenu));

}


