<!-- can create numerous menus by calling Menu1, Menu2 etc and using the appropriate number in the main body script -->
<!-- menu can be horizontal or vertical - change in main body script -->
<!-- may need to add font tags to all menu item names as if a CSS file is used in main site this over-rides the embedded style size within the script -->
<!-- menu item entry -->

var Menu1 = new Array ()
var subMenu1 = new Array ()

Menu1[0] = new Array("<font size=1>Home</font>", "index.php","_top", "left")
     subMenu1[0] = new Array()
	 
Menu1[1] = new Array("<font size=1>Young Blood<br>Mineral Cosmetics</font>", "young_blood.php","_top", "left")
     subMenu1[1] = new Array()
     subMenu1[1][0] = new Array ("<font size=1>Face</font>", "products.php?cat=63","_top")
     subMenu1[1][1] = new Array ("<font size=1>Eyes</font>", "products.php?cat=64","_top")
     subMenu1[1][2] = new Array ("<font size=1>Lips</font>", "products.php?cat=65","_top")
     subMenu1[1][3] = new Array ("<font size=1>Tools</font>", "products.php?cat=66","_top")              
	 subMenu1[1][4] = new Array ("<font size=1>Product Information", "young_blood.php","_top")	 
	 
Menu1[2] = new Array("<font size=1>Doctor's<br>Dermatologic<br>Formula (DDF) </font>", "doctor_dermatologic_formula.php","_top", "left")
     subMenu1[2] = new Array()
     subMenu1[2][0] = new Array ("<font size=1>Anti Aging Restore</font>", "products.php?cat=42","_top")
     subMenu1[2][1] = new Array ("<font size=1>Anti Aging Prevent</font>", "products.php?cat=43","_top")
     subMenu1[2][2] = new Array ("<font size=1>Acne Treatment</font>", "products.php?cat=44","_top")
     subMenu1[2][3] = new Array ("<font size=1>Body & Sun</font>", "products.php?cat=45","_top")              
     subMenu1[2][4] = new Array ("<font size=1>Sensitive & Alergic</font>", "products.php?cat=46","_top")
     subMenu1[2][5] = new Array ("<font size=1>Hyperpigmentation</font>", "products.php?cat=47","_top")
	 subMenu1[2][6] = new Array ("<font size=1>DDF Information", "doctor_dermatologic_formula.php","_top")

Menu1[3] = new Array("<font size=1>Jan Marini</font>", "jan_marini_range.php","_top", "left")
     subMenu1[3] = new Array()
	 subMenu1[3][0] = new Array ("<font size=1>Age Intervention</font>", "products.php?cat=48","_top")
     subMenu1[3][1] = new Array ("<font size=1>Cleansing</font>", "products.php?cat=4","_top")
     subMenu1[3][2] = new Array ("<font size=1>Lifting & Tightening</font>", "products.php?cat=5","_top")
     subMenu1[3][3] = new Array ("<font size=1>Resurfacing Agent & Treatment</font>", "products.php?cat=6","_top")
     subMenu1[3][4] = new Array ("<font size=1>Hydration</font>", "products.php?cat=7","_top")              
     subMenu1[3][5] = new Array ("<font size=1>Sun Protection</font>", "products.php?cat=8","_top")
     subMenu1[3][6] = new Array ("<font size=1>Jan Marini Information", "jan_marini_range.php","_top")

Menu1[4] = new Array("<font size=1>Nimue</font>", "nimue_range.php","_top", "left")
     subMenu1[4] = new Array()
     subMenu1[4][0] = new Array ("<font size=1>Skin Care Range</font>", "products.php?cat=9","_top")
	 subMenu1[4][1] = new Array ("<font size=1>Boosters</font>", "products.php?cat=49","_top")             
     subMenu1[4][2] = new Array ("<font size=1>Concentrated Actives</font>", "products.php?cat=10","_top")
     subMenu1[4][3] = new Array ("<font size=1>Perscriptives</font>", "products.php?cat=11","_top")
     subMenu1[4][4] = new Array ("<font size=1>Enhancers</font>", "products.php?cat=12","_top")             
     subMenu1[4][5] = new Array ("<font size=1>Funtional Additives</font>", "products.php?cat=13","_top")
     subMenu1[4][6] = new Array ("<font size=1>Synergistic Sun Care</font>", "products.php?cat=14","_top")
     subMenu1[4][7] = new Array ("<font size=1>Youth Range</font>", "products.php?cat=15","_top")
     subMenu1[4][8] = new Array ("<font size=1>Body Range</font>", "products.php?cat=16","_top")
     subMenu1[4][9] = new Array ("<font size=1>Sample Envelopes</font>", "products.php?cat=17","_top")
     subMenu1[4][10] = new Array ("<font size=1>Treatment Foundation</font>", "products.php?cat=18","_top")
     subMenu1[4][11] = new Array ("<font size=1>Nimue Information</font>", "nimue_range.php","_top")

Menu1[5] = new Array("<font size=1>Dermatologic<br>Cosmetic<br>Laboratories(DCL)</font>", "dermatologic_cosmetic_laboratories.php","_top", "left")
     subMenu1[5] = new Array()
     subMenu1[5][0] = new Array ("<font size=1>Face Cleansers</font>", "products.php?cat=51","_top")
	 subMenu1[5][1] = new Array ("<font size=1>Face Moisturisers</font>", "products.php?cat=52","_top")             
     subMenu1[5][2] = new Array ("<font size=1>Eye Care </font>", "products.php?cat=53","_top")
     subMenu1[5][3] = new Array ("<font size=1>Masks</font>", "products.php?cat=54","_top")
     subMenu1[5][4] = new Array ("<font size=1>Toners</font>", "products.php?cat=55","_top")             
     subMenu1[5][5] = new Array ("<font size=1>Treatments</font>", "products.php?cat=56","_top")
     subMenu1[5][6] = new Array ("<font size=1>Skin</font>", "products.php?cat=57","_top")
     subMenu1[5][7] = new Array ("<font size=1>Sun</font>", "products.php?cat=58","_top")
     subMenu1[5][8] = new Array ("<font size=1>Hair</font>", "products.php?cat=59","_top")
     subMenu1[5][9] = new Array ("<font size=1>Body</font>", "products.php?cat=60","_top")
     subMenu1[5][10] = new Array ("<font size=1>DCL Information</font>", "dermatologic_cosmetic_laboratories.php","_top")

Menu1[6] = new Array("<font size=1>Dermalogica</font>", "dermalogica_range.php","_top", "left")
     subMenu1[6] = new Array()
     subMenu1[6][0] = new Array ("<font size=1>Cleansers</font>", "products.php?cat=19","_top")
     subMenu1[6][1] = new Array ("<font size=1>Conditioners</font>", "products.php?cat=20","_top")
     subMenu1[6][2] = new Array ("<font size=1>Moisturisers</font>", "products.php?cat=21","_top")
     subMenu1[6][3] = new Array ("<font size=1>Masques</font>", "products.php?cat=22","_top")              
     subMenu1[6][4] = new Array ("<font size=1>Concentrated Boosters</font>", "products.php?cat=23","_top")
     subMenu1[6][5] = new Array ("<font size=1>Specialities</font>", "products.php?cat=24","_top")
     subMenu1[6][6] = new Array ("<font size=1>Solar Defence System</font>", "products.php?cat=25","_top")
     subMenu1[6][7] = new Array ("<font size=1>Spa Body Therapy</font>", "products.php?cat=26","_top")
     subMenu1[6][8] = new Array ("<font size=1>Daily Groomers</font>", "products.php?cat=27","_top")
     subMenu1[6][9] = new Array ("<font size=1>Treatment Foundation</font>", "products.php?cat=28","_top")
     subMenu1[6][10] = new Array ("<font size=1>Basic Kits</font>", "products.php?cat=29","_top")
     subMenu1[6][11] = new Array ("<font size=1>Ingestibles</font>", "products.php?cat=30","_top")
     subMenu1[6][12] = new Array ("<font size=1>Dermalogica Information</font>", "dermalogica_range.php","_top")

Menu1[7] = new Array("<font size=1>Barbaras Mineral<br>Makeup</font>", "mineral_makeup_range.php","_top", "left")
     subMenu1[7] = new Array()
     subMenu1[7][0] = new Array ("<font size=1>Foundation & Concealers</font>", "products.php?cat=34","_top")
     subMenu1[7][1] = new Array ("<font size=1>Face Blusher</font>", "products.php?cat=35","_top")
     subMenu1[7][2] = new Array ("<font size=1>Eyeshadows, Eyeliners & Mascaras</font>", "products.php?cat=36","_top")
     subMenu1[7][3] = new Array ("<font size=1>Lipsticks & Liners</font>", "products.php?cat=37","_top")              
     subMenu1[7][4] = new Array ("<font size=1>Brushes & Accessories</font>", "products.php?cat=38","_top")
     subMenu1[7][5] = new Array ("<font size=1>Barbara Panagos Information</font>", "mineral_makeup_range.php","_top")

Menu1[8] = new Array("<font size=1>Nailtiques</font>", "nailtiques_range.php","_top", "left")
     subMenu1[8] = new Array()
     subMenu1[8][0] = new Array ("<font size=1>Nailtiques Full Range</font>", "products.php?cat=32","_top")
     subMenu1[8][1] = new Array ("<font size=1>Nailtiques Information</font>", "nailtiques_range.php","_top")

Menu1[9] = new Array("<font size=1>Orly Nail Varnish</font>", "orly_range.php","_top", "left")
     subMenu1[9] = new Array()
     subMenu1[9][0] = new Array ("<font size=1>Orly Full Range</font>", "products.php?cat=33","_top")
     subMenu1[9][1] = new Array ("<font size=1>Orly Information</font>", "orly_range.php","_top")

Menu1[10] = new Array("<font size=1>Harley Street<br>Skin Clinic</font>", "harley_street_skin_intro.php","_top", "left")
     subMenu1[10] = new Array()
     subMenu1[10][0] = new Array ("<font size=1>Skin Care Range</font>", "products.php?cat=61","_top") 
	 subMenu1[10][1] = new Array ("<font size=1>Dr Khan</font>", "harley_street_skin_khan.php","_top")
     subMenu1[10][2] = new Array ("<font size=1>Conditions</font>", "harley_street_skin_conditions.php","_top")
     subMenu1[10][3] = new Array ("<font size=1>Treatments</font>", "harley_street_skin_treatments.php","_top")
     subMenu1[10][4] = new Array ("<font size=1>Introduction</font>", "harley_street_skin_intro.php","_top")

Menu1[11] = new Array("<font size=1>Dr Mike Tee<br>Consultations</font>", "dr_tee.php","_top")
     subMenu1[11] = new Array()

Menu1[12] = new Array("<font size=1>Fido Handbags</font>", "products.php?cat=39","_top", "left")
     subMenu1[12] = new Array()

Menu1[13] = new Array("<font size=1>Jewellery Range</font>", "products.php?cat=40","_top", "left")
     subMenu1[13] = new Array()

Menu1[14] = new Array("<font size=1>Full Product Range</font>", "categories.php","_top", "left")
     subMenu1[14] = new Array()

Menu1[15] = new Array("<font size=1>Search For Product</font>", "search.php","_top")
     subMenu1[15] = new Array()

Menu1[16] = new Array("<font size=1>FREE Consultation</font>", "consultation.php","_top")
     subMenu1[16] = new Array()

Menu1[17] = new Array("<font size=1>Wedding Makeup<br>Service</font>", "wedding_makeup.php","_top")
     subMenu1[17] = new Array()

Menu1[18] = new Array("<font size=1>Salon Treatments</font>", "salon_treatments.php","_top")
     subMenu1[18] = new Array()

Menu1[19] = new Array("<font size=1>Hand Made Shoes</font>", "handmade_shoes.php","_top")
     subMenu1[19] = new Array()

Menu1[20] = new Array("<font size=1>View Shopping Cart</font>", "cart.php","_top")
     subMenu1[20] = new Array()

Menu1[21] = new Array("<font size=1>Shop Information</font>", "shopinfo.php","_top")
     subMenu1[21] = new Array()

Menu1[22] = new Array("<font size=1>Terms & Conditions</font>", "terms.php","_top")
     subMenu1[22] = new Array()

Menu1[23] = new Array("<font size=1>Join our Newsletter</font>", "newsletter.php","_top")
     subMenu1[23] = new Array()

Menu1[24] = new Array("<font size=1>Sign our Guestbook</font>", "guestbook.php","_top")
     subMenu1[24] = new Array()

Menu1[25] = new Array("<font size=1>Contact Information</font>", "contact.php","_top")
     subMenu1[25] = new Array()

Menu1[26] = new Array("<font size=1>Company Profile</font>", "company_profile.php","_top")
     subMenu1[26] = new Array()

Menu1[27] = new Array("<font size=1>Enquiry Form</font>", "enquiry.php","_top")
     subMenu1[27] = new Array()

Menu1[28] = new Array("<font size=1>Other Links</font>", "links.php","_top")
     subMenu1[28] = new Array()

<!-- menu format -->
menuStyle = "3d"                                       // menu style (flat, 3d)
cellPadding = "4"                                      // space around cells in menu - cell padding - also see menu width below
cellBorder = 1                                         // border width (for no border - 0)
verticalOffset = "0"                                   // distance below main meu header of sub menu 
horizontalOffset = "6"                                 // distance sub menu away from main menu 
subMenuDelay = 2                                       // time sub menu stays visible for (in seconds)
subIndicate = 1                                        // show image if a sub menu is present (use 0 for "no") 
indicator = "<img src='menu_script/arrow.gif' border='0'>"         // symbol to show if a sub menu is present (subIndicate must be to set to 1)
                                                               
<!-- main menu format -->
menuWidth = "125px"              // width of menu item - use 0 for default (resizes itself) - also see cell pading above
borderColor = "#000000"          // border colour (flat mode only)
borderHighlight = "#91C567"      // border highlight colour (3d mode only)
borderShadow = "#91C567"         // border shadow colour (3d mode only)
menuBackground = "#ffffff"       // cell background colour
menuHoverBackground = "#eff4fb"  // cell background colour on mouse rollover
fontFace = "verdana"             // font face
fontColour = "#91C567"           // font colour
fontHoverColour = "#2b83c4"      // font colour on mouse rollover
fontSize = "10px"                // font Size
fontDecoration = "none"          // style of the link text (none, underline, overline, line-through)
fontWeight = "normal"            // font weight (normal, bold)

<!-- sub menu format -->
smenuWidth = "0"                 // width of menu item - use 0 for default (resizes itself) - also see cell pading above
sborderColor = "#000000"         // border colour (flat mode only)
sborderHighlight = "#91C567"     // border highlight colour (3d mode only)
sborderShadow = "#91C567"        // border shadow colour (3d mode only)
smenuBackground = "#ffffff"      // cell background colour
smenuHoverBackground = "#eff4fb" // Cell Background Colour on mouse rolloverr
sfontFace = "verdana"            // font face
sfontColour = "#91C567"          // font colour
sfontHoverColour = "#2b83c4"     // font colour on mouse rollover
sfontSize = "10px"               // font size
sfontDecoration = "none"         // style of the link text (none, underline, overline, line-through)
sfontWeight = "normal"           // font weight (normal, bold)

quantity = 1

<!-- browser checker -->
var isIE = (document.getElementById && document.all)?true:false;
var isNS4 = (document.layers)?true:false;
var isNS6 = (document.getElementById && !document.all)?true:false;
var timer;
var obj = (isIE)?"document.all":"document.getElementById"

<!-- menu styles -->
function createStyles(quant){
styleBorder=(menuStyle.split(",")[quant-1].toLowerCase() == "flat")?cellBorder:0 
  document.writeln ('<style>');
  document.writeln ('.rcMenuStatic'+quant+' {font-family:'+fontFace.split(",")[quant-1]+';font-size:'+fontSize.split(",")[quant-1]+';color:'+fontColour.split(",")[quant-1]+';font-weight:'+fontWeight.split(",")[quant-1]+';background-color:'+menuBackground.split(",")[quant-1]+'; cursor:hand; text-decoration:'+fontDecoration.split(",")[quant-1]+'}');
  document.writeln ('.rcMenuHover'+quant+'  {font-family:'+fontFace.split(",")[quant-1]+';font-size:'+fontSize.split(",")[quant-1]+';color:'+fontHoverColour.split(",")[quant-1]+';font-weight:'+fontWeight.split(",")[quant-1]+';background-color:'+menuHoverBackground.split(",")[quant-1]+'; cursor:hand; text-decoration:'+fontDecoration.split(",")[quant-1]+'}');
  document.writeln ('.rcSubMenuStatic'+quant+' {font-family:'+sfontFace.split(",")[quant-1]+';font-size:'+sfontSize.split(",")[quant-1]+';color:'+sfontColour.split(",")[quant-1]+';font-weight:'+sfontWeight.split(",")[quant-1]+';text-decoration:'+sfontDecoration.split(",")[quant-1]+';background-color:'+smenuBackground.split(",")[quant-1]+'; cursor:hand}');
  document.writeln ('.rcSubMenuHover'+quant+'  {font-family:'+sfontFace.split(",")[quant-1]+';font-size:'+sfontSize.split(",")[quant-1]+';color:'+sfontHoverColour.split(",")[quant-1]+';font-weight:'+sfontWeight.split(",")[quant-1]+';text-decoration:'+sfontDecoration.split(",")[quant-1]+';background-color:'+smenuHoverBackground.split(",")[quant-1]+'; cursor:hand}');
  document.writeln ('</style>');
}

<!-- build and show the main menu items -->
function showMenus(quant,definedOrientation)
{
  createStyles(quant);
  if(definedOrientation!=""){orientation=definedOrientation}
  if (orientation.toLowerCase() == "vertical"){document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+borderColor.split(",")[quant-1]+'">')}
  else{document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+borderColor.split(",")[quant-1]+'"><tr>')}  
  for (x=0; x<eval("Menu"+quant).length; x++)
  {
    if (orientation.toLowerCase()=="vertical") document.writeln('<tr>')
    document.writeln ('<td width="'+menuWidth+'" onclick="tdMouseClick(\''+quant+'mainLink'+x+'\')" onMouseOver="hoverMenu(); popDown(\''+quant+'\','+x+', \''+quant+'button'+x+'\',\''+orientation+'\'); " onMouseOut="clearMenu('+quant+','+x+')" ')
    if (menuStyle.split(",")[quant-1].toLowerCase() == "3d"){document.writeln ('style="border-left:'+cellBorder+'px solid '+borderHighlight.split(",")[quant-1]+';border-top:'+cellBorder+'px solid '+borderHighlight.split(",")[quant-1]+';border-right:'+cellBorder+'px solid '+borderShadow.split(",")[quant-1]+';border-bottom:'+cellBorder+'px solid '+borderShadow.split(",")[quant-1]+';"');}        

    document.writeln ('><div id="'+quant+'button'+x+'"><table border="0" cellpadding="'+cellPadding.split(",")[quant-1]+'" cellspacing="0" width="100%"><tr><td class="rcMenuStatic'+quant+'" id="'+quant+'cell'+x+'" nowrap>');
    document.writeln ('<a id="'+quant+'mainLink'+x+'" href="'+eval("Menu"+quant)[x][1]+'" target="'+eval("Menu"+quant)[x][2]+'" class="rcMenuStatic'+quant+'">'+eval("Menu"+quant)[x][0]+'</a></td>');
    if (subIndicate == 1&&eval("subMenu"+quant)[x].length>=1){
      document.writeln('<td class="rcMenuStatic'+quant+'" id="'+quant+'cell'+x+'a" align="right">');
      document.writeln ('<a id="'+quant+'mainLink'+x+'a" href="'+eval("Menu"+quant)[x][1]+'" target="'+eval("Menu"+quant)[x][2]+'" class="rcMenuStatic'+quant+'">'+indicator+'</a></td>');}
    document.writeln ('</tr></table></div></td>');    
    if (orientation.toLowerCase()=="vertical") document.writeln('</tr>')
  }
  if (orientation.toLowerCase() == "vertical"){document.writeln ('</table>');}
  else{document.writeln ('</tr></table>');}   

<!-- build menu sub items -->
  for (x=0; x<eval("Menu"+quant).length; x++)
  { 
    if (eval("subMenu"+quant)[x].length > 0)
    {     
      document.writeln ('<div id="'+quant+'MENU'+x+'" style="visibility:hidden; position:absolute; z-index:2" >');
      document.writeln ('<table width="'+smenuWidth.split(",")[quant-1]+'" border="0" cellpadding="'+cellPadding.split(",")[quant-1]+'" cellspacing="'+styleBorder+'" bgColor="'+sborderColor.split(",")[quant-1]+'">');
      for (y=0; y<eval("subMenu"+quant)[x].length; y++)
      {
        document.writeln ('<tr>');
        if (eval("subMenu"+quant)[x][y][1].indexOf("#") != -1)
        {
          document.writeln ('<td bgColor="'+eval("subMenu"+quant)[x][y][2]+'" id="'+quant+'subMenu'+x+y+'" onMouseOver="hoverMenu(); highlightMenu(\'sub\','+x+','+y+',\'\','+quant+')" nowrap')
          if (menuStyle.split(",")[quant-1].toLowerCase() == "3d"){document.writeln ('style="border-left:'+cellBorder+'px solid '+sborderHighlight.split(",")[quant-1]+';border-top:'+cellBorder+'px solid '+sborderHighlight.split(",")[quant-1]+';border-right:'+cellBorder+'px solid '+sborderShadow.split(",")[quant-1]+';border-bottom:'+cellBorder+'px solid '+sborderShadow.split(",")[quant-1]+';"');}
          document.writeln ('><p style="font-family:'+sfontFace.split(",")[quant-1]+'; font-size:'+sfontSize.split(",")[quant-1]+'; color:'+eval("subMenu"+quant)[x][y][1]+'"id="'+quant+'subLink'+x+y+'">'+eval("subMenu"+quant)[x][y][0]+'</p></td></tr>');
        }
        else
        {
          document.writeln ('<td id="'+quant+'subMenu'+x+y+'" class="rcSubMenuStatic'+quant+'" onMouseOver="hoverMenu(); highlightMenu(\'sub\','+x+','+y+',\'\','+quant+')" onMouseOut="clearMenu('+quant+','+x+');" onclick="tdMouseClick(\''+quant+'subLink'+x+y+'\')" nowrap')
          if (menuStyle.split(",")[quant-1].toLowerCase() == "3d"){document.writeln ('style="border-left:'+cellBorder+'px solid '+sborderHighlight.split(",")[quant-1]+';border-top:'+cellBorder+'px solid '+sborderHighlight.split(",")[quant-1]+';border-right:'+cellBorder+'px solid '+sborderShadow.split(",")[quant-1]+';border-bottom:'+cellBorder+'px solid '+sborderShadow.split(",")[quant-1]+';"');}
          document.writeln ('><a id="'+quant+'subLink'+x+y+'" href="'+eval("subMenu"+quant)[x][y][1]+'" target="'+eval("subMenu"+quant)[x][y][2]+'" class="rcSubMenuStatic'+quant+'">'+eval("subMenu"+quant)[x][y][0]+'</a></td></tr>');
        }
      }
      document.writeln ('</table></div>');
    }
  }
} 

<!-- change colour or menu and submenu items when the mouse hovers over -->  
function highlightMenu(element,mainMenu,dropMenu,state,quant)
{
  hoverMenu();
  state=(state == "hover")?"rcMenuHover"+quant:"rcMenuStatic"+quant
  if (element == "sub")
  {
    for (x=0; x < eval("subMenu"+quant)[mainMenu].length; x++)
    {
      if (eval("subMenu"+quant)[mainMenu][x][1].indexOf("#") == -1){
        eval(obj+'("'+quant+'subMenu'+mainMenu+x+'").className = "rcSubMenuStatic'+quant+'"')
        eval(obj+'("'+quant+'subLink'+mainMenu+x+'").className = "rcSubMenuStatic'+quant+'"')
      }
    } 
    if (eval("subMenu"+quant)[mainMenu][dropMenu][1].indexOf("#") == -1)  {
      eval(obj+'("'+quant+'subMenu'+mainMenu+dropMenu+'").className="rcSubMenuHover'+quant+'"')
      eval(obj+'("'+quant+'subLink'+mainMenu+dropMenu+'").className="rcSubMenuHover'+quant+'"')
    }
  }
  else
  {
    eval(obj+'("'+quant+'cell'+mainMenu+'").className = "'+state+'"')
    eval(obj+'("'+quant+'mainLink'+mainMenu+'").className = "'+state+'"')
    if (subIndicate == 1&&eval("subMenu"+quant)[mainMenu].length>=1)
    {
      eval(obj+'("'+quant+'cell'+mainMenu+'a").className = "'+state+'"')
      eval(obj+'("'+quant+'mainLink'+mainMenu+'a").className = "'+state+'"')
    }
  }
}

<!-- find positioning for sub menus -->
function getOffset(obj, dim) 
{
  if(dim=="left") 
  {     
    oLeft = obj.offsetLeft;    
    while(obj.offsetParent!=null) 
    {    
      oParent = obj.offsetParent     
      oLeft += oParent.offsetLeft 
      obj = oParent 	
    }
    return oLeft
  }
  else if(dim=="top")
  {
    oTop = obj.offsetTop;
    while(obj.offsetParent!=null) 
    {
      oParent = obj.offsetParent
      oTop += oParent.offsetTop
      obj = oParent 	
    }
    return oTop
  }
  else if(dim=="width")
  {
    oWidth = obj.offsetWidth
    return oWidth
  }  
  else if(dim=="height")
  {
    oHeight = obj.offsetHeight
    return oHeight
  }    
  else
  {
    alert("Error: invalid offset dimension '" + dim + "' in getOffset()")
    return false;
  }
}

<!-- show sub menus -->
function popDown(quant, param, id, orientation)
{
  var cellBorderOffset = (isNS6)?cellBorder:eval(cellBorder*2)
  var browserAdjustment = (isNS6)?cellBorder:0
  var menu;
  var button;

  if (id)
  {    
    getOffset(eval(obj+'(id)'),'left');
    getOffset(eval(obj+'(id)'),'top');    
    getOffset(eval(obj+'(id)'),'width');  
    getOffset(eval(obj+'(id)'),'height');
    
    if (eval("Menu"+quant+"["+param+"][3]")=="right" && eval("subMenu"+quant+"["+param+"].length")>0) 
    { 
      oLeft=oLeft  
      oLeft=oLeft+oWidth; 
      getOffset(eval(obj+'("'+quant+'MENU'+param+'")'),'width');
      oLeft=oLeft-oWidth ;
      alignAdjustment = cellBorder*2 + 1
    }
    else 
    {
      alignAdjustment = 0
      oLeft=oLeft
    }    
  }  

  
  n = 0;    
  while (n < eval("Menu"+quant).length)
  {          
    menu = quant+"MENU"+n
    if (param == n)
    {
      theObj = eval(obj+'(menu)');
      if (theObj)
      {
         theObj.style.visibility = "visible"
          if (orientation.toLowerCase()=="vertical"){
            theObj.style.left=(menuStyle.split(",")[quant-1].toLowerCase()=="flat")?oLeft+oWidth+cellBorder+parseInt(horizontalOffset.split(",")[quant-1]):oLeft+oWidth+cellBorderOffset+parseInt(horizontalOffset.split(",")[quant-1]);
            theObj.style.top=(menuStyle.split(",")[quant-1].toLowerCase()=="flat")?oTop-cellBorder+parseInt(verticalOffset.split(",")[quant-1]):oTop+parseInt(verticalOffset.split(",")[quant-1])-browserAdjustment}
          else{
            theObj.style.left=(menuStyle.split(",")[quant-1].toLowerCase()=="flat")?oLeft-cellBorder+parseInt(horizontalOffset.split(",")[quant-1])+alignAdjustment:oLeft+parseInt(horizontalOffset.split(",")[quant-1])-browserAdjustment+alignAdjustment;
            theObj.style.top=(menuStyle.split(",")[quant-1].toLowerCase()=="flat")?oTop+oHeight+cellBorder+parseInt(verticalOffset.split(",")[quant-1]):oTop+oHeight+cellBorderOffset+parseInt(verticalOffset.split(",")[quant-1]);}
        }
      
       highlightMenu('main',n,'','hover',quant)
       if (eval("subMenu"+quant)[param].length > 0)
       {
         for (x=0; x<eval("subMenu"+quant)[param].length; x++)
         {
           if(eval("subMenu"+quant)[param][x][1].indexOf("#") == -1){
             eval (obj+'("'+quant+'subMenu'+param+x+'").className = "rcSubMenuStatic'+quant+'"')
             eval (obj+'("'+quant+'subLink'+param+x+'").className = "rcSubMenuStatic'+quant+'"')  
           }       
         }
       }
    }
    else 
    {  
      for (x=1; x<quantity+1; x++)
      {       
        menu = x+"MENU"+n   
        //alert(menu)     
        if (eval(obj+'(menu)'))
        {
          eval(obj+'(menu).style.visibility = "hidden"')            
        }
        highlightMenu ('main',n,'','static',quant)
      }
    }

    n++
  }  
}

<!-- re-set timer for sub menus -->
function hoverMenu()
{
  if(timer)
  clearTimeout(timer)
}

<!-- set timer for sub menus -->
function clearMenu(quant,menu)
{
  setDelay = subMenuDelay*1000
  delay = (eval("subMenu"+quant)[menu].length > 0)?setDelay:1
  
  timer = setTimeout("popDown("+quant+","+(eval("Menu"+quant).length + 1)+")",delay)
}

<!-- when you click the box, perform the same function as if the user had clicked the hyperlink -->
function tdMouseClick(theElement)
{
  eval(obj+'(theElement).click()')
}