// Use Freely as long as following disclaimer is intact ::
//---------------------------------------------------------------
// Cross Browser Multi-Orientation Menu v1.4 1st May 2004
// This script written by Rik Comery. www.ricom.co.uk
// For support, visit the "Resources" section at www.ricom.co.uk
// All rights reserved.
// Please read the instructions.htm file for configuration instructions. If this is not available, the entire menu script
// with images and instructions can be downloaded at http://ricom.co.uk/resources/navigation-menu/navigation-menu.php
// MENU ITEMS ///////////////////////////////////////////////////////////////
// DUPLICATE THIS ENTIRE SECTION FOR MULTIPLE MENUS. PLEASE SEE THE INSTRUCTIONS FILE FOR DETAILS ///////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
menuStyle = "flat" // Menu Style (flat, 3d)
cellPadding = "2" // Cell Padding
cellBorder = 1 // Border width (for no border, enter 0)
verticalOffset = "0" // Vertical offset of Sub Menu.
horizontalOffset = "0" // Horizontal offset of Sub Menu.
subMenuDelay = 0.1 // Time sub menu stays visible for (in seconds)
subIndicate = 0 // Show if a sub menu is present (use 0 for "no")
indicator = "" // Symbol to show if a sub menu is present (subIndicate must be to set to 1)
// Use standard HTML
tag. You can use a character instead of an image.
// e.g. indicator = ">"
// Main Menu Items
borderColor = "" // Border Colour (flat mode only)
borderHighlight = "" // Border Highlight Colour (3d mode only)
borderShadow = "" // Border Shadow Colour (3d mode only)
menuBackground = "" // Cell Background Colour
menuHoverBackground = "" // Cell Background Colour on mouse rollover
fontFace = "verdana" // Font Face
fontColour = "#FFFFFF" // Font Colour
fontHoverColour = "#FFFFFF" // Font Colour on mouse rollover
fontSize = "11px" // Font Size
fontDecoration = "none" // Style of the link text (none, underline, overline, line-through)
fontWeight = "normal" // Font Weight (normal, bold)
// Sub Menu Items
sborderColor = "#4A4A9C" // Border Colour (flat mode only)
sborderHighlight = "" // Border Highlight Colour (3d mode only)
sborderShadow = "" // Border Shadow Colour (3d mode only)
smenuBackground = "#0D0D51" // Cell Background Colour
smenuHoverBackground = "#5151D3" // Cell Background Colour on mouse rolloverr
sfontFace = "verdana" // Font Face
sfontColour = "#FFFFFF" // 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)
quantity = 1
////// END FORMAT MENU ///////////////////////////////////////////////////////////////////
////// 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"
// Menu Styles
function createStyles(quant){
styleBorder=(menuStyle.split(",")[quant-1].toLowerCase() == "flat")?cellBorder:0
document.writeln ('');
}
// Build and show the main menu items
function showMenus(quant,definedOrientation)
{
createStyles(quant);
if(definedOrientation!=""){orientation=definedOrientation}
if (orientation.toLowerCase() == "vertical"){document.writeln ('
')}
else{document.writeln ('')}
for (x=0; x')
document.writeln (' | ');
if (orientation.toLowerCase()=="vertical") document.writeln('
')
}
if (orientation.toLowerCase() == "vertical"){document.writeln ('
');}
else{document.writeln ('NieuwsLinks |
');}
// Build the sub menu items
for (x=0; x 0)
{
document.writeln ('');
}
}
}
// 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++)
{
eval(obj+'("'+quant+'subMenu'+mainMenu+x+'").className = "rcSubMenuStatic'+quant+'"')
eval(obj+'("'+quant+'subLink'+mainMenu+x+'").className = "rcSubMenuStatic'+quant+'"')
}
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 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()')
}
var Menu1 = new Array ()
var subMenu1 = new Array ()