
var runWhenOpenedTimer = 0; 

function mm_isOpen(menuName) 
{ 
  menuObj = gmobj("menu" + getMenuByName(menuName)); 
  if (ns4) { 
    return (menuObj.visibility == "show"); 
  } 
  else { 
    return (menuObj.style.visibility != "hidden"); 
  } 
} 

function mm_runWhenOpened(menuName, functionToRun) 
{ 
  var checkInterval = 100;  //msec 
  var funcStr = "mm_runWhenOpened(\"" + menuName + "\", " + "\"" + functionToRun + "\")"; 

  if (! mm_isOpen(menuName)) { 
    runWhenOpenedTimer = setTimeout(funcStr, checkInterval); 
  } 
  else { 
    clearTimeout(runWhenOpenedTimer); 
    runWhenOpenedTimer = setTimeout(functionToRun, 0); 
  } 
} 

function testFunction(menuName) 
{ 
  alert("Test function: I'm now doing whatever with the menu named: " + menuName);
} 


_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150            // The time delay before menus open on mouse over
_followSpeed=5                // Follow scrolling speed
_followRate=50                // Follow scrolling Rate
_subOffsetTop=5               // Sub menu top offset
_subOffsetLeft=-10            // Sub menu left offset
_scrollAmount=3               // Only needed for Netscape 4.x
_scrollDelay=20               // Only needed for Netcsape 4.x



with(menuStyle=new mm_style()){
onbgcolor="#CFE2D1";
oncolor="#407348";
offbgcolor="#579b63";
offcolor="#ebf3ec";
bordercolor="#66a26a";
borderstyle="outset";
borderwidth=1;
separatorcolor="#CFE2D1";
separatorsize=1;
padding=3;
fontsize=12;
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="#ffffff";
pagebgcolor="#83ba8c";
headercolor="#000000";
headerbgcolor="#ffffff";
high3dcolor="#c4d8e6";
low3dcolor="#579b63";
swap3d=1;
overfilter="Fade(duration=0.2)";
outfilter="randomdissolve(duration=0.3)";
}


with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=78;
screenposition="center";
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;"); 
aI("text=Milonic;showmenu=Milonic;"); 
aI("text=Partners;showmenu=Partners;"); 
aI("text=Links;showmenu=Links;"); 

}


with(milonic=new menuname("Milonic")){
style=menuStyle;
aI("text=Product Purchasing Page;onclass=mainOn1;url=http://www.milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
aI("text=FAQ;url=http://www.milonic.com/menufaq.php;");
aI("text=Discussion Forum;url=http://www.milonic.com/forum/;");
aI("text=Software License Agreement;url=http://www.milonic.com/license.php;");
aI("text=Privacy Policy;url=http://www.milonic.com/privacy.php;");
}

with(milonic=new menuname("Partners")){
style=menuStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;status=(aq) Web Server Hosting & Services;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
aI("text=WebSmith;url=websmith;");

}

with(milonic=new menuname("Links")){
style=menuStyle;
aI("text=Apache Web Server;url=http://www.apache.org/;status=Apache Web Server, the basis of Milonic's Web Site;");
aI("text=MySQL Database Server;url=http://ww.mysql.com/;status=MySQL, Milonic's Prefered Choice of Database Server;");
aI("text=PHP - Development;url=http://www.php.net/;status=PHP - Web Server Scripting as used by Milonic;");
aI("text=phpBB Web Forum System;url=http://www.phpbb.net/;status=PHP Based Web Forum, Milonic's Recommended Forum Software;");
aI("text=Anti Spam Tools;showmenu=Anti Spam;status=Anti Spam Solutions, as used by Milonic;");
}

with(milonic=new menuname("Anti Spam")){
style=menuStyle;
aI("text=Spam Cop;url=http://www.spamcop.net/;");
aI("text=Mime Defang;url=http://www.mimedefang.org/;");
aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}

drawMenus();

// first derive the name of the sub menu however you need to 
var subMenuName = "Partners"; 

// now build the function string to pass 
var functionString = "testFunction('" + subMenuName + "')"; 

// start the waiting... 
mm_runWhenOpened("Main Menu", functionString); 