<!--   
// Use Freely as long as following disclaimer is intact ::
//---------------------------------------------------------------
// Cross Browser Multi-Orientation Menu v1.0 23rd October 2003
// This script written by Rik Comery. www.ricom.co.uk
// For support, visit the "Resources" section at www.ricom.co.uk           
// All rights reserved.                                         

// DO NOT TOUCH ///////////////
var Menu = new Array ()      //
var subMenu = new Array ()   //
///////////////////////////////

////// ADD MENU ITEMS  //////////////////////////////////////////////////////////////////////////////////////////////
//  To add a new menu item, follow the format below.  Every "Menu" must adhere to the following rules
//
//  1. Each menu has a number. i.e. "Menu[0]". This number must start at 0 and be incremented by one for each menu item added.
//  2. Whether you want a sub menu or not, each menu must have the "subMenu[x] = new Array()" line, where x is the same as the 
//     main "Menu[x]" number.
//  3. If you DO want a sub menu, you must assign it TWO numbers. i.e. "subMenu[x][x]". The first number is the same 
//     as the main "Menu" number, and the second must start at 0 and be incremented by one, for every sub menu item added.
//  4. the script is CASE SENSITIVE. 
//
//  -- Example --
//  Menu[0] = new Array ("Link Name", "URL", "Frame Target")
//    subMenu[0] = new Array()
//    subMenu[0][0] = new Array ("Link Name", "URL", "Frame Target")
//    subMenu[0][1] = new Array ("Link Name", "URL", "Frame Target")
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

   Menu[0] = new Array("Home", "index.htm","_top")
     subMenu[0] = new Array()       
     
   Menu[1] = new Array("About Dimensi", "abs.htm","_top") 
     subMenu[1] = new Array()
           
     
   Menu[2] = new Array("Company Profile", "comprofile.htm","_top")
     subMenu[2] = new Array() 
	 
   Menu[3] = new Array("Online Catalouge", "onlinecatalouge.htm","_top") 
     subMenu[3] = new Array()
    
   Menu[4] = new Array("Contact Us", "contact.htm","_top")
     subMenu[4] = new Array()   

////// FORMAT MENU  ///////////////////////////////////////////////////////////////////
orientation = "vertical"                           // Orientation of menu.  (horizontal, vertical)
menuStyle = "3d"                                     // Menu Style (flat, 3d)
cellPadding = 4                                      // Cell Padding
cellBorder = 1                                       // Include table border (for no border, enter 0)
verticalOffset = 0                                   // Vertical offset of Sub Menu. 
horizontalOffset = 0                                 // Horizontal offset of Sub Menu. 
subMenuDelay = 2                                     // Time sub menu stays visible for (in seconds)
subIndicate = 1                                      // Show if a sub menu is present (use 0 for "no")
indicator = "<img src='arrow-down.gif' border='0'>"  // Symbol to show if a sub menu is present (subIndicate must be to set to 1)
                                                     // Use standard HTML <img> tag. You can use a character instead of an image. 
                                                     // e.g.      indicator = ">"

// Main Menu Items
borderColor = "#06578F"                    // Border Colour (flat mode only)
borderHighlight = "#97BBD3"                // Border Highlight Colour (3d mode only)
borderShadow = "#31556D"                   // Border Shadow Colour (3d mode only)
menuBackground = "#2063AE"                 // Cell Background Colour
menuHoverBackground = "#88BBED"            // Cell Background Colour on mouse rollover
fontFace = "arial"                         // Font Face
fontColour = "#FFFFFF"                     // Font Colour
fontHoverColour = "#F9D824"                // Font Colour on mouse rollover
fontSize = "9pt"                           // Font Size
fontDecoration = "none"                    // Style of the link text (none, underline, overline, line-through)
fontWeight = "Bold"                      // Font Weight (normal, bold)

// Sub Menu Items
sborderColor = "#A6A684"                   // Border Colour (flat mode only)
sborderHighlight = "#E9E9E2"               // Border Highlight Colour (3d mode only)
sborderShadow = "#83837C"                  // Border Shadow Colour (3d mode only)
smenuBackground = "#DBDBCE"                // Cell Background Colour
smenuHoverBackground = "#A6A684"           // Cell Background Colour on mouse rolloverr
sfontFace = "arial"                        // Font Face
sfontColour = "#A6A684"                    // Font Colour
sfontHoverColour = "#FFFFFF"               // Font Colour on mouse rollover
sfontSize = "8pt"                          // Font Size
sfontDecoration = "none"                   // Style of the link text (none, underline, overline, line-through)
sfontWeight = "normal"                     // Font Weight (normal, bold)
sShadow = 2



////// DO NOT EDIT BELOW THIS LINE  ///////////////////////////////////////////////////////////////////

// Browser Sniffer
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"

styleBorder=(menuStyle.toLowerCase() == "flat")?cellBorder:0 

// Menu Styles
document.writeln ('<style>');
document.writeln ('.rcMenuStatic {font-family:'+fontFace+';font-size:'+fontSize+';color:'+fontColour+';font-weight:'+fontWeight+';background-color:'+menuBackground+'; cursor:hand; text-decoration:'+fontDecoration+'}');
document.writeln ('.rcMenuHover  {font-family:'+fontFace+';font-size:'+fontSize+';color:'+fontHoverColour+';font-weight:'+fontWeight+';background-color:'+menuHoverBackground+'; cursor:hand; text-decoration:'+fontDecoration+'}');
document.writeln ('.rcSubMenuStatic {font-family:'+sfontFace+';font-size:'+sfontSize+';color:'+sfontColour+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuBackground+'; cursor:hand}');
document.writeln ('.rcSubMenuHover  {font-family:'+sfontFace+';font-size:'+sfontSize+';color:'+sfontHoverColour+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuHoverBackground+'; cursor:hand}');
document.writeln ('</style>');

// Build and show the main menu items
function showMenus()
{
  if (orientation.toLowerCase() == "vertical"){document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+borderColor+'">')}
  else{document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+borderColor+'"><tr>')}  
  for (x=0; x<Menu.length; x++)
  {
    if (orientation.toLowerCase()=="vertical") document.writeln('<tr>')
    document.writeln ('<td onclick="tdMouseClick(\'mainLink'+x+'\')" onMouseOver="hoverMenu(); popDown('+x+', \'button'+x+'\'); " onMouseOut="clearMenu('+x+')" ')
    if (menuStyle.toLowerCase() == "3d"){document.writeln ('style="border-left:'+cellBorder+'px solid '+borderHighlight+';border-top:'+cellBorder+'px solid '+borderHighlight+';border-right:'+cellBorder+'px solid '+borderShadow+';border-bottom:'+cellBorder+'px solid '+borderShadow+';"');}        
    document.writeln ('><div id="button'+x+'"><table border="0" cellpadding="'+cellPadding+'" cellspacing="0" width="148pixel"><tr><td class="rcMenuStatic" id="cell'+x+'" nowrap>');
    document.writeln ('<a id="mainLink'+x+'" href="'+Menu[x][1]+'" target="'+Menu[x][2]+'" class="rcMenuStatic">'+Menu[x][0]+'</a></td>');
    if (subIndicate == 1&&subMenu[x].length>=1){
      document.writeln('<td class="rcMenuStatic" id="cell'+x+'a" align="right">');
      document.writeln ('<a id="mainLink'+x+'a" href="'+Menu[x][1]+'" target="'+Menu[x][2]+'" class="rcMenuStatic">'+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 the sub menu items
  for (x=0; x<Menu.length; x++)
  { 
    if (subMenu[x].length > 0)
    {     
      document.writeln ('<div id="MENU'+x+'" style="visibility:hidden; position:absolute; z-index:2" >');
      document.writeln ('<table border="0" cellpadding="'+cellPadding+'" cellspacing="'+styleBorder+'" bgColor="'+sborderColor+'">');
      for (y=0; y<subMenu[x].length; y++)
      {
        document.writeln ('<tr><td id="subMenu'+x+y+'" class="rcSubMenuStatic" onMouseOver="hoverMenu(); highlightMenu(\'sub\','+x+','+y+')" onMouseOut="clearMenu('+x+');" onclick="tdMouseClick(\'subLink'+x+y+'\')" nowrap')
        if (menuStyle.toLowerCase() == "3d"){document.writeln ('style="border-left:'+cellBorder+'px solid '+sborderHighlight+';border-top:'+cellBorder+'px solid '+sborderHighlight+';border-right:'+cellBorder+'px solid '+sborderShadow+';border-bottom:'+cellBorder+'px solid '+sborderShadow+';"');}
        document.writeln ('><a id="subLink'+x+y+'" href="'+subMenu[x][y][1]+'" target="'+subMenu[x][y][2]+'" class="rcSubMenuStatic">'+subMenu[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)
{
  state=(state == "hover")?"rcMenuHover":"rcMenuStatic"
  if (element == "sub")
  {
    for (x=0; x < subMenu[mainMenu].length; x++)
    {
      eval(obj+'("subMenu'+mainMenu+x+'").className = "rcSubMenuStatic"')
      eval(obj+'("subLink'+mainMenu+x+'").className = "rcSubMenuStatic"')
    }   
    eval(obj+'("subMenu'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
    eval(obj+'("subLink'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
  }
  else
  {
    eval(obj+'("cell'+mainMenu+'").className = "'+state+'"')
    eval(obj+'("mainLink'+mainMenu+'").className = "'+state+'"')
    if (subIndicate == 1&&subMenu[mainMenu].length>=1)
    {
      eval(obj+'("cell'+mainMenu+'a").className = "'+state+'"')
      eval(obj+'("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(param, id)
{
  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');
  }  
  n = 0;    
  while (n < Menu.length)
  {          
    menu = "MENU"+n
    if (param == n)
    {
      theObj = eval(obj+'(menu)');
      if (theObj)
      {
         theObj.style.visibility = "visible"

          if (orientation.toLowerCase()=="vertical"){
            theObj.style.left=(menuStyle.toLowerCase()=="flat")?oLeft+oWidth+cellBorder+horizontalOffset:oLeft+oWidth+cellBorderOffset+horizontalOffset;
            theObj.style.top=(menuStyle.toLowerCase()=="flat")?oTop-cellBorder+verticalOffset:oTop+verticalOffset-browserAdjustment}
          else{
            theObj.style.left=(menuStyle.toLowerCase()=="flat")?oLeft-cellBorder+horizontalOffset:oLeft+horizontalOffset-browserAdjustment;
            theObj.style.top=(menuStyle.toLowerCase()=="flat")?oTop+oHeight+cellBorder+verticalOffset:oTop+oHeight+cellBorderOffset+verticalOffset;}
        }
      
       highlightMenu('main',n,'','hover')
       if (subMenu[param].length > 0)
       {
         for (x=0; x<subMenu[param].length; x++)
         {
           eval (obj+'("subMenu'+param+x+'").className = "rcSubMenuStatic"')
           eval (obj+'("subLink'+param+x+'").className = "rcSubMenuStatic"')         
         }
       }
    }
    else 
    {          
      if (eval(obj+'(menu)'))
      {
        eval(obj+'(menu).style.visibility = "hidden"')            
      }
      highlightMenu ('main',n,'','static')

    }
    n++
  }  
}

// Re-set timer for sub menus
function hoverMenu()
{
  if(timer)
  clearTimeout(timer)
}

// Set timer for sub menus
function clearMenu(menu)
{
  setDelay = subMenuDelay*1000
  delay = (subMenu[menu].length > 0)?setDelay:1
  
  timer = setTimeout("popDown("+(Menu.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()')
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
////// END MENU CODE  ///////////////////////////////////////////////////////////////////
//-->
