_menuCloseDelay=500;
_menuOpenDelay=0;
_subOffsetTop=0;
_subOffsetLeft=0;


function disableDrag()
{
	menuObj = gmobj("menu" + DragLayer);
	menuObj.onmousedown = null;
	menuObj.onmouseup = null;
	DragLayer = -1;
}

function mm_changeItemProperty(menuName, itemName, codeRef, newValue, updateDisplay)
{
  menuName = menuName.toLowerCase();
  for (i=0; i<_mi.length; i++)
    if (_mi[i][1].replace(/\&nbsp\;/ig,' ') == itemName && _m[_mi[i][0]][1] == menuName) break;
  if (i == _mi.length) return;
  _mi[i][codeRef] = newValue;
  if (updateDisplay) BDMenu(_mi[i][0]);
}

function mainIsDragable(dragState)
{
  if (dragState) {
    mm_changeItemProperty('main','Drag Mode: <b>Off</b>',86,true,0);                      // change first item, dragable = true (makes whole menu dragable)
    mm_changeItemProperty('main','Drag Mode: <b>Off</b>',59,'move',0);                    // change first item, pointer = move
    mm_changeItemProperty('main','Drag Mode: <b>Off</b>',1,'Drag Mode: <b>On</b>',0);     // change first item, text = Drag Mode: <b>On</b>
    mm_changeItemProperty('main','Drag on/off',2,"javascript:mainIsDragable(false)",1);   // change first item, url = javascript:mainIsDragable(false)
  }
  else {
    mm_changeItemProperty('main','Drag Mode: <b>On</b>',86,false,0);                      // change first item, dragable = false (makes whole menu dragable)
    mm_changeItemProperty('main','Drag Mode: <b>On</b>',59,'default',0);                  // change first item, pointer = default (arrow)
    mm_changeItemProperty('main','Drag Mode: <b>On</b>',1,'Drag Mode: <b>Off</b>',0);     // change first item, text = Drag Mode: <b>Off</b>
    mm_changeItemProperty('main','Drag on/off',2,"javascript:mainIsDragable(true)",1);    // change first item, url = javascript:mainIsDragable(true)
    disableDrag();
  }
}




with(menuStyle1=new mm_style()){
onbgcolor="#CFE2D1";
oncolor="#407348";
offbgcolor="#67a973";
offcolor="#ffffff";
bordercolor="#66a26a";
borderstyle="solid";
borderwidth=1;
separatorcolor="#e3eee4";
separatorsize=2;
headercolor="#FFFFFF";
headerbgcolor="#477e51";
padding=3;
fontsize=11;
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
high3dcolor="#e3eee4";
low3dcolor="#9fcaa7";
swap3d=1;
subimage="submenu_arrow-off.gif";
onsubimage="submenu_arrow-on.gif";
subimagepadding=3;
}

with(milonic=new menuname("main")){
style=menuStyle1;
top=15;
left=20;
alwaysvisible=1;
itemwidth=110;
aI("text=Drag Mode: <b>Off</b>;url=;pointer=default;offbgcolor=#477e51;onbgcolor=#477e51;offcolor=#ffffff;oncolor=#ffffff;");
aI("text=Search;showmenu=search;");
aI("text=News;showmenu=news;");
aI("text=Drag on/off;url=javascript:mainIsDragable(true);");
}

with(milonic=new menuname("news")){
style=menuStyle1;
aI("text=Newspapers;showmenu=newspapers");
aI("text=Networks;showmenu=networks");
aI("text=Tech News;showmenu=technews");
}

with(milonic=new menuname("newspapers")){
style=menuStyle1;
aI("text=Los Angeles Times;url=http://www.latimes.com/");
aI("text=New York Times;url=http://www.nytimes.com/");
aI("text=USA Today;url=http://www.usatoday.com/");
aI("text=Wall Street Journal;url=http://www.wsj.com/");
aI("text=Washington Post;url=http://www.washingtonpost.com/");
}

with(milonic=new menuname("networks")){
style=menuStyle1;
aI("text=ABC News;url=http://abcnews.go.com/");
aI("text=BBC News;url=http://news.bbc.co.uk/shared/hi/interstitial-news.stm");
aI("text=CBS News;url=http://www.cbsnews.com/");
aI("text=CNN;url=http://www.cnn.com/");
aI("text=FOX News;url=http://www.foxnews.com/");
aI("text=MSNBC;url=http://www.msnbc.com/");
}

with(milonic=new menuname("technews")){
style=menuStyle1;
aI("text=CNET News;url=http://news.com.com/");
aI("text=Slash Dot;url=http://www.slashdot.com/");
aI("text=Tech Web;url=http://www.techweb.com/");
aI("text=Wired;url=http://www.wired.com/");
}

with(milonic=new menuname("search")){
style=menuStyle1;
aI("text=Google;url=http://www.google.com/");
aI("text=Yahoo;url=http://www.yahoo.com/");
aI("text=Others;showmenu=otherSearch");
}

with(milonic=new menuname("OTHerSearch")){
style=menuStyle1;
aI("text=Altavista;url=http://www.altavista.com/");
aI("text=Ask Jeeves;url=http://www.ask.com/");
aI("text=Excite;url=http://www.excite.com/;id=what_the_fuck;");
aI("text=Go.com;url=http://infoseek.go.com/");
aI("text=Lycos;url=http://www.lycos.com/");
}

drawMenus();

