// v1.3.0
var g_Menus=[];function Menu(menuItems,menuPos,brdrClr,rootItemId)
{if(!document.body||!document.body.style)
return;this.m_MenuItems=menuItems;this.m_MenuPos=menuPos;this.m_BorderClr=brdrClr;this.m_nId=g_Menus.length;this.m_RootBackgroundClr;this.m_eRootSelected=null;this.m_RootItemId=rootItemId;this.m_Index=[];this.m_Children=[];this.mExpand=MenuExpand;this.mCollapse=MenuCollapse;this.mOnClick=MenuOnClick;this.mOnMouseOut=MenuOnMouseOut;this.mOnMouseOver=MenuOnMouseOver;this.mOnMouseDown=MenuOnMouseDown;this.m_MenuPos_def={'block_top':0,'block_left':0,'top':0,'left':0,'width':-1,'height':22,'hide_delay':0,'expd_delay':0,'css':{'inner':'','outer':''}};this.mGetProperties=function(key){return this.m_MenuPos_def[key];};this.m_Root=this;this.m_nDepth=-1;this.m_nX=0;this.m_nY=0;this.m_nLeft=0;for(var order=0;order<menuItems.length;order++)
new MenuItem(this,order);g_Menus[this.m_nId]=this;}
function MenuCollapse(id)
{clearTimeout(this.m_ShowTimer);var n_tolevel=(id?this.m_Index[id].m_nDepth:0);if(n_tolevel==0&&this.m_eRootSelected!=null)
{this.m_eRootSelected.e_oelement.style.backgroundColor=this.m_RootBackgroundClr;this.m_eRootSelected=null;}
for(id=0;id<this.m_Index.length;id++)
{var o_curritem=this.m_Index[id];if(o_curritem.m_nDepth>n_tolevel&&o_curritem.b_visible)
{o_curritem.e_oelement.style.visibility='hidden';o_curritem.b_visible=false;}}
if(!id)
this.o_current=null;}
function MenuExpand(id)
{if(this.m_HideTimer)
return;var oitem=this.m_Index[id];if(this.o_current&&this.o_current.m_nDepth>=oitem.m_nDepth)
this.mCollapse(oitem.m_nId);this.o_current=oitem;if(!oitem.m_Children)
return;this.m_RootBackgroundClr=oitem.e_oelement.style.backgroundColor;oitem.e_oelement.style.backgroundColor=this.m_BorderClr;this.m_eRootSelected=oitem;var xPos=0;if(this.m_RootItemId!=null)
{var ri=document.getElementById(this.m_RootItemId);var tmpe=ri.offsetParent;xPos=ri.offsetLeft;while(tmpe!=null)
{xPos+=tmpe.offsetLeft;tmpe=tmpe.offsetParent;}}
for(var order=0;order<oitem.m_Children.length;order++)
{var o_curritem=oitem.m_Children[order];if(order==0)
o_curritem.e_oelement.style.borderTop='outset '+this.m_BorderClr+' 1px';if(order>=oitem.m_Children.length-1)
{if(navigator.appName.indexOf('MicroSoft')&&parseInt(navigator.appVersion)<5)
o_curritem.e_oelement.style.borderBottom='inset '+this.m_BorderClr+' 1px';else
o_curritem.e_oelement.style.borderBottom='inset '+this.m_BorderClr+' 6px';}
o_curritem.e_oelement.style.borderLeft='outset '+this.m_BorderClr+' 1px';o_curritem.e_oelement.style.borderRight='inset '+this.m_BorderClr+' 1px';if(xPos>0)
o_curritem.e_oelement.style.left=oitem.m_nX+xPos+'px';o_curritem.e_oelement.style.visibility='visible';o_curritem.b_visible=true;}}
function MenuOnClick(id)
{return Boolean(this.m_Index[id].m_MenuItems[1]);}
function MenuOnMouseOut(id)
{var oitem=this.m_Index[id];if(oitem.m_MenuItems[0])
{oitem.e_oelement.className=oitem.mGetStyle(0,0);oitem.e_ielement.className=oitem.mGetStyle(1,0);}
oitem.mUpdateStatus(7);this.m_HideTimer=setTimeout('g_Menus['+this.m_nId+'].mCollapse();',oitem.mGetProperties('hide_delay'));}
function MenuOnMouseOver(id)
{clearTimeout(this.m_HideTimer);this.m_HideTimer=null;clearTimeout(this.m_ShowTimer);var oitem=this.m_Index[id];oitem.mUpdateStatus();if(oitem.m_MenuItems[0])
{oitem.e_oelement.className=oitem.mGetStyle(0,1);oitem.e_ielement.className=oitem.mGetStyle(1,1);}
if(oitem.mGetProperties('expd_delay')<0)
return;this.m_ShowTimer=setTimeout('g_Menus['+this.m_nId+'].mExpand('+id+');',oitem.mGetProperties('expd_delay'));}
function MenuOnMouseDown(id)
{var oitem=this.m_Index[id];if(oitem.m_MenuItems[0])
{oitem.e_oelement.className=oitem.mGetStyle(0,2);oitem.e_ielement.className=oitem.mGetStyle(1,2);}
this.mExpand(id);}
function MenuItem(parent,order)
{this.m_nDepth=parent.m_nDepth+1;this.m_MenuItems=parent.m_MenuItems[order+(this.m_nDepth?4:0)];if(!this.m_MenuItems)
return;this.m_Root=parent.m_Root;this.m_Parent=parent;this.m_nOrder=order;this.m_nId=this.m_Root.m_Index.length;this.m_Root.m_Index[this.m_nId]=this;parent.m_Children[order]=this;var root=this.m_Root;var menuPos=this.m_Root.m_MenuPos;this.mGetProperties=MenuGetProperties;this.mGetStyle=MenuGetStyle;this.mUpdateStatus=MenuUpdateStatus;this.m_nX=order?parent.m_Children[order-1].m_nX+this.mGetProperties('left'):parent.m_nX+this.mGetProperties('block_left');this.m_nY=order?parent.m_Children[order-1].m_nY+this.mGetProperties('top'):parent.m_nY+this.mGetProperties('block_top');var width=this.mGetProperties('width');var height=this.mGetProperties('height');if(width==-1)
{this.m_nX=root.m_nLeft+this.mGetProperties('block_left');if(this.m_MenuItems[3]!=-1)
width+=this.m_MenuItems[3];}
if(!this.m_nDepth)
{if(this.m_MenuItems[0]!=null)
{document.write
('<a id="e'+root.m_nId+'_'+this.m_nId+'o" class="'+this.mGetStyle(0,0)+'" '
+'href="'+this.m_MenuItems[1]+'"'+(this.m_MenuItems[2]&&this.m_MenuItems[2]['tw']?' target="'+this.m_MenuItems[2]['tw']+'"':'')+' '
+'style="position: absolute; '+'top: '+this.m_nY+'px; '+'left: '+this.m_nX+'px; '+'width: '+width+'px; '+'height: '+height+'px;" '
+'onclick="return g_Menus['+root.m_nId+'].mOnClick('+this.m_nId+');" '
+'onmouseout="g_Menus['+root.m_nId+'].mOnMouseOut('+this.m_nId+');" '
+'onmouseover="g_Menus['+root.m_nId+'].mOnMouseOver('+this.m_nId+');" '
+'onmousedown="g_Menus['+root.m_nId+'].mOnMouseDown('+this.m_nId+');">'
+'<div id="e'+root.m_nId+'_'+this.m_nId+'i" class="'+this.mGetStyle(1,0)+'" '
+'>'+this.m_MenuItems[0]+'</div></a>\n');}}
else if(this.m_MenuItems[0].substr(0,4)=="<hr>"||this.m_MenuItems[1]=="")
{document.write
('<a id="e'+root.m_nId+'_'+this.m_nId+'o" class="'+this.mGetStyle(0,0)+'" '
+'style="position: absolute; '+'top: '+this.m_nY+'px; '+'left: '+this.m_nX+'px; '+'width: '+width+'px; '+'height: '+height+'px; '
+(!this.m_nDepth?'':'visibility: hidden; ')
+'z-index: '+this.m_nDepth+';" '
+'onmouseout="g_Menus['+root.m_nId+'].mOnMouseOut('+this.m_nId+');" '
+'onmouseover="g_Menus['+root.m_nId+'].mOnMouseOver('+this.m_nId+');">'
+'<div id="e'+root.m_nId+'_'+this.m_nId+'i" class="'+this.mGetStyle(1,0)+'" '
+'>'+this.m_MenuItems[0]+'</div></a>\n');}
else
{document.write
('<a id="e'+root.m_nId+'_'+this.m_nId+'o" class="'+this.mGetStyle(0,0)+'" '
+'href="'+this.m_MenuItems[1]+'"'+(this.m_MenuItems[2]&&this.m_MenuItems[2]['tw']?' target="'+this.m_MenuItems[2]['tw']+'"':'')+' '
+'style="position: absolute; '+'top: '+this.m_nY+'px; '+'left: '+this.m_nX+'px; '+'width: '+width+'px; '+'height: '+height+'px; '
+(!this.m_nDepth?'':'visibility: hidden; ')
+'z-index: '+this.m_nDepth+';" '
+'onclick="return g_Menus['+root.m_nId+'].mOnClick('+this.m_nId+');" '
+'onmouseout="g_Menus['+root.m_nId+'].mOnMouseOut('+this.m_nId+');" '
+'onmouseover="g_Menus['+root.m_nId+'].mOnMouseOver('+this.m_nId+');" '
+'onmousedown="g_Menus['+root.m_nId+'].mOnMouseDown('+this.m_nId+');">'
+'<div id="e'+root.m_nId+'_'+this.m_nId+'i" class="'+this.mGetStyle(1,0)+'" '
+'>'+this.m_MenuItems[0]+'</div></a>\n');}
this.e_ielement=document.getElementById('e'+root.m_nId+'_'+this.m_nId+'i');this.e_oelement=document.getElementById('e'+root.m_nId+'_'+this.m_nId+'o');if(this.mGetProperties('width')==-1)
{if(this.m_MenuItems[3]==-1)
root.m_nLeft+=this.e_oelement.offsetWidth;else
root.m_nLeft+=this.m_MenuItems[3];}
this.b_visible=!this.m_nDepth;if(this.m_MenuItems.length<4)
return;this.m_Children=[];for(var order=0;order<this.m_MenuItems.length-4;order++)
new MenuItem(this,order);}
function MenuGetProperties(key)
{var value=null;var level=this.m_Root.m_MenuPos[this.m_nDepth];if(level)
value=level[key];return(value==null?this.m_Parent.mGetProperties(key):value);}
function MenuGetStyle(pos,state)
{var css=this.mGetProperties('css');var oclass=css[pos?'inner':'outer'];if(typeof(oclass)=='string')
return oclass;for(var currst=state;currst>=0;currst--)
{if(oclass[currst])
return oclass[currst];}}
function MenuUpdateStatus(clear)
{if(this.m_MenuItems[2]!=null)
window.setTimeout("window.status=unescape('"+(clear?'':(this.m_MenuItems[2]&&this.m_MenuItems[2]['sb']?escape(this.m_MenuItems[2]['sb']):escape(this.m_MenuItems[0])+(this.m_MenuItems[1]?' ('+escape(this.m_MenuItems[1])+')':'')))+"')",10);}