/* author: jos.berkemeijer@planet.nl , Generated by AceHTML Freeware http://freeware.acehtml.com , Creation date: 05-14-2004 */
//<![CDATA[
// Version : activation on : onmouseover & onclick ; horizontal & vertical menu's tested in ie-6+ and netscape-7.1
// Do not remove this notice.  Copyright 2000-2004 by Mike Hall. See http://www.brainjar.com for terms of use.

//----------------------------------------------------------------------------
// Code to determine the browser and version.
//----------------------------------------------------------------------------

function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isOP    = false;  // Opera
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "Opera";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isOP = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as Netscape 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }

  s = "MSIE";
  if ((i = ua.indexOf(s))) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
  
}

var browser = new Browser();

//----------------------------------------------------------------------------
// Code for handling the menu bar and active button.
//----------------------------------------------------------------------------

var activeButton = null;

function buttonClick(event, menuId) {

  var button;

  // Get the target button element.

  if (browser.isIE)
    button = window.event.srcElement;
  else
    button = event.currentTarget;

  // Blur focus from the link to remove that annoying outline.

  button.blur();

  // Associate the named menu to this button if not already done.
  // Additionally, initialize menu display.

  if (button.menu == null) {
    button.menu = document.getElementById(menuId);
    if (button.menu.isInitialized == null)
      menuInit(button.menu);
  }

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the button, if not already done.

  if (button.onmouseout == null)
    button.onmouseout = buttonOrMenuMouseout;

  // Exit if this button is the currently active one.

  if (button == activeButton)
    return false;

  // [END MODIFIED]

  // Reset the currently active button, if any.

  if (activeButton != null)
    resetButton(activeButton);

  // Activate this button, unless it was the currently active one.

  if (button != activeButton) {
    depressButton(button);
    activeButton = button;
  }
  else
    activeButton = null;

  return false;
}

function buttonMouseover(event, menuId) {

  var button;

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Activates this button's menu if no other is currently active.

  if (activeButton == null) {
    buttonClick(event, menuId);
    return;
  }

  // [END MODIFIED]

  // Find the target button element.

  if (browser.isIE)
    button = window.event.srcElement;
  else
    button = event.currentTarget;

  // If any other button menu is active, make this one active instead.

  if (activeButton != null && activeButton != button)
    buttonClick(event, menuId);
}

function depressButton(button) {

  var x, y;

  // Update the button's style class to make it look like it's
  // depressed.

  button.className += " menuButtonActive";

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the button, if not already done.

  if (button.onmouseout == null)
    button.onmouseout = buttonOrMenuMouseout;
  if (button.menu.onmouseout == null)
    button.menu.onmouseout = buttonOrMenuMouseout;

  // [END MODIFIED]

  // [MODIFIED @JNB 2004-04-17 ] submenuposition right or under menubutton depending
  // on horizontal or vertical menu. Global vaiable : jbmenu_pos:
  // v = vertical menu & positioning submenu right from menubutton
  // h = horizontal menu & positioning submenu under menubutton
  
  // Position the associated drop down menu under the button and
  // show it.

  x = getPageOffsetLeft(button)+(jbmenu_pos=="v")*(button.offsetWidth-1);
  y = getPageOffsetTop(button) +(jbmenu_pos=="h")*(button.offsetHeight-1);
  
  // [END MODIFIED @JNB 2004-04-17 ] 
  
  // For IE, adjust position.

  if (browser.isIE) {
    x += button.offsetParent.clientLeft;
    y += button.offsetParent.clientTop;
  }

  button.menu.style.left = x + "px";
  button.menu.style.top  = y + "px";
  button.menu.style.visibility = "visible";   
}

function resetButton(button) {

  // Restore the button's style class.

  removeClassName(button, "menuButtonActive");

  // Hide the button's menu, first closing any sub menus.

  if (button.menu != null) {
    closeSubMenu(button.menu);
    button.menu.style.visibility = "hidden";
  }
}

//----------------------------------------------------------------------------
// Code to handle the menus and sub menus.
//----------------------------------------------------------------------------

function menuMouseover(event) {

  var menu;

  // Find the target menu element.

  if (browser.isIE)
    menu = getContainerWith(window.event.srcElement, "DIV", "menu");
  else
    menu = event.currentTarget;

  // Close any active sub menu.

  if (menu.activeItem != null)
    closeSubMenu(menu);
}

function menuItemMouseover(event, menuId) {

  var item, menu, x, y;

  // Find the target item element and its parent menu element.

  if (browser.isIE)
    item = getContainerWith(window.event.srcElement, "A", "menuItem");
  else
    item = event.currentTarget;
  menu = getContainerWith(item, "DIV", "menu");


  // Close any active sub menu and mark this one as active.

  if (menu.activeItem != null)
    closeSubMenu(menu);
  menu.activeItem = item;

  // Highlight the item element.

  item.className += " menuItemHighlight";
 
  // Initialize the sub menu, if not already done.

  if (item.subMenu == null) {
    item.subMenu = document.getElementById(menuId);
    if (item.subMenu.isInitialized == null)
      menuInit(item.subMenu);
  }
// [MODIFIED @JNB 2004-04-28 ] new  menu's always 'on top'  (don't remove double coded !)
 menuhz(item.subMenu.style.zIndex)
 item.subMenu.style.zIndex=menuhzindex+5
 menuhz(item.subMenu.style.zIndex)
 item.subMenu.style.zIndex=menuhzindex+5
// [END MODIFIED @JNB 2004-04-28 ] 
  
  
  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the sub menu, if not already done.

  if (item.subMenu.onmouseout == null)
    item.subMenu.onmouseout = buttonOrMenuMouseout;

  // [END MODIFIED]

  // Get position for submenu based on the menu item.

  x = getPageOffsetLeft(item) + item.offsetWidth;
  y = getPageOffsetTop(item);

  // Adjust position to fit in view.

  var maxX, maxY;

  if (browser.isIE) {
    maxX = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) +
      (document.documentElement.clientWidth != 0 ? document.documentElement.clientWidth : document.body.clientWidth);
    maxY = Math.max(document.documentElement.scrollTop, document.body.scrollTop) +
      (document.documentElement.clientHeight != 0 ? document.documentElement.clientHeight : document.body.clientHeight);
  }
  if (browser.isOP) {
    maxX = document.documentElement.scrollLeft + window.innerWidth;
    maxY = document.documentElement.scrollTop  + window.innerHeight;
  }
  if (browser.isNS) {
    maxX = window.scrollX + window.innerWidth;
    maxY = window.scrollY + window.innerHeight;
  }
  maxX -= item.subMenu.offsetWidth;
  maxY -= item.subMenu.offsetHeight;

  if (x > maxX)
    x = Math.max(0, x - item.offsetWidth - item.subMenu.offsetWidth
      + (menu.offsetWidth - item.offsetWidth));
  y = Math.max(0, Math.min(y, maxY));

  // Position and show the sub menu.

  item.subMenu.style.left = x + "px";
  item.subMenu.style.top  = y + "px";
  item.subMenu.style.visibility = "visible";

  // Stop the event from bubbling.

  if (browser.isIE)
    window.event.cancelBubble = true;
  else
    event.stopPropagation();
}

function closeSubMenu(menu) {

  if (menu == null || menu.activeItem == null)
    return;

  // Recursively close any sub menus.

  if (menu.activeItem.subMenu != null) {
    closeSubMenu(menu.activeItem.subMenu);
    menu.activeItem.subMenu.style.visibility = "hidden";
    menu.activeItem.subMenu = null;
  }
  removeClassName(menu.activeItem, "menuItemHighlight");
  menu.activeItem = null;
}

// [MODIFIED] Added for activate/deactivate on mouseover. Handler for mouseout
// event on buttons and menus.

function buttonOrMenuMouseout(event) {

  var el;


  // If there is no active button, exit.
 
  if (activeButton == null)
    return;

  // Find the element the mouse is moving to.

  if (browser.isIE)
    el = window.event.toElement;
  else if (event.relatedTarget != null)
      el = (event.relatedTarget.tagName ? event.relatedTarget : event.relatedTarget.parentNode);

  // If the element is not part of a menu, reset the active button.

  if (getContainerWith(el, "DIV", "menu") == null) {
    resetButton(activeButton);
    activeButton = null;
  }
}

// [END MODIFIED]

//----------------------------------------------------------------------------
// Code to initialize menus.
//----------------------------------------------------------------------------

function menuInit(menu) {

  var itemList, spanList;
  var textEl, arrowEl;
  var itemWidth;
  var w, dw;
  var i, j;

  // For IE, replace arrow characters.

  if (browser.isIE) {
    menu.style.lineHeight = "2.5ex";
    spanList = menu.getElementsByTagName("SPAN");
    for (i = 0; i < spanList.length; i++)
      if (hasClassName(spanList[i], "menuItemArrow")) {
        spanList[i].style.fontFamily = "Webdings";
        spanList[i].firstChild.nodeValue = "4";
      }
  }

  // Find the width of a menu item.

  itemList = menu.getElementsByTagName("A");
  if (itemList.length > 0)
    itemWidth = itemList[0].offsetWidth;
  else
    return;

	
	
  // For items with arrows, add padding to item text to make the
  // arrows flush right.

  for (i = 0; i < itemList.length; i++) {
    spanList = itemList[i].getElementsByTagName("SPAN");
    textEl  = null;
    arrowEl = null;
    for (j = 0; j < spanList.length; j++) {
      if (hasClassName(spanList[j], "menuItemText"))
        textEl = spanList[j];
      if (hasClassName(spanList[j], "menuItemArrow"))
        arrowEl = spanList[j];
    }
    if (textEl != null && arrowEl != null) {
      textEl.style.paddingRight = (itemWidth 
        - (textEl.offsetWidth + arrowEl.offsetWidth)) + "px";
      // For Opera & Netscape , remove the negative right margin to fix a display bug.
      if (browser.isOP | browser.isNS)
        arrowEl.style.marginRight = "0px";
    }
  }

// [MODIFIED @JNB 2004-04-28 ] to be able to set negative margins
   // Fix IE hover problem by setting an explicit width on first item of
  // the menu.
  
if (browser.isIE) {var maxw=0;
 for (var i=0; i<itemList.length; i++){ maxw=Math.max(maxw,itemList[i].offsetWidth); }
 for (var i=0; i<itemList.length; i++){ itemList[i].style.width = maxw+"px"; }
 }
// [END MODIFIED @JNB 2004-04-28 ] 	

  // Mark menu as initialized.

  menu.isInitialized = true;
}

//----------------------------------------------------------------------------
// General utility functions.
//----------------------------------------------------------------------------

function getContainerWith(node, tagName, className) {

  // Starting with the given node, find the nearest containing element
  // with the specified tag name and style class.

  while (node != null) {
    if (node.tagName != null && node.tagName == tagName &&
        hasClassName(node, className))
      return node;
    node = node.parentNode;
  }

  return node;
}

function hasClassName(el, name) {

  var i, list;

  // Return true if the given element currently has the given class
  // name.

  list = el.className.split(" ");
  for (i = 0; i < list.length; i++)
    if (list[i] == name)
      return true;

  return false;
}

function removeClassName(el, name) {

  var i, curList, newList;

  if (el.className == null)
    return;

  // Remove the given class name from the element's className property.

  newList = new Array();
  curList = el.className.split(" ");
  for (i = 0; i < curList.length; i++)
    if (curList[i] != name)
      newList.push(curList[i]);
  el.className = newList.join(" ");
}

function getPageOffsetLeft(el) {

  var x;

  // Return the x coordinate of an element relative to the page.

  x = el.offsetLeft;
  if (el.offsetParent != null)
    x += getPageOffsetLeft(el.offsetParent);

  return x;
}

function getPageOffsetTop(el) {

  var y;

  // Return the x coordinate of an element relative to the page.

  y = el.offsetTop;
  if (el.offsetParent != null)
    y += getPageOffsetTop(el.offsetParent);

  return y;
}

// [MODIFIED @JNB 2004-04-22 ] 
// Write initial stylesheet voor JBMENU functions including horizontal & vertical menu's and optional activation on "click" & "onmouseover" 
var menu_inss='<style type="text/css" > div.vertmenu * a.menuButton {white-space: nowrap;display:block}'
menu_inss+='div.menu{position: absolute; visibility: hidden;top:0px;z-index: 101;filter: progid:DXImageTransform.Microsoft.Shadow(direction=135,color=#808080,strength=3);}' 
menu_inss+='</style>'
document.write (menu_inss)

// [END MODIFIED @JNB 2004-04-22 ] 


//]]>

//[[[ JBMENU functions added by J.N. Berkemeijer @JNB 2004-04-22 

// User functions

function menuCreate(Mname,Morientation,Mms){
// Mname = any valid & unique menu name
// Morientation : "h" = horizontal , "v" = vertical
// Mms : "sub" = submenu ; "main" = mainmenu

// General settings ! (don't change this unless ykwyd)
 // General initial fontsize for main & sub menu's
menu_gfs='font-size: 8pt;'
 // General initial padding & Shadow-Filter main menu's
menu_gps='padding: 4px 2px 4px 2px;filter: progid:DXImageTransform.Microsoft.Shadow(direction=135,color=#808080,strength=3);'
 // General initial buttonsetting
menu_gbs='text-align: left;top: 0px;z-index: 100;cursor: default;position: relative; text-decoration: none; background-color: transparent;left: 0px;'
menu_gbs+='margin: 0px 0px 0px 1px;padding: 2px 2px 2px 6px;'
 // General initial Itemsetting
menu_gis='cursor: default; text-decoration: none;display: block;text-decoration: none;white-space: nowrap;color:#FF3300;padding: 3px 1em;'
 // General hoverstyle
menu_ghs='color: #FFFFFF;background-color: #4B0082;'

//Initial settings
menu_rules=new Array;menu_rulenr=0;jbmenu_pos="h";menuButtonMaxWidth=0;
menu_name=Mname; menuhzindex=1000;
menu_ms=Mms;menuccc=0;menuddd=0
// stylesheet i.c. main menu
var ms='#'+Mname+'style';
// stylesheet i.c. sub menu
var ss='#'+Mname;
menu_sq=(menu_ms!='sub')
//Fill  menu content
if (Morientation=='v'){menuhv='vertmenu';} else{menuhv='hormenu';};
if (menu_sq){cins='<div class="'+menuhv+'" id="'+Mname+'" style="position:absolute;visibility:hidden;"  onmousemove="jbmenu_pos=\''+Morientation+'\';"><div class="menuBar" id="'+Mname+'style"  onmousemove="jbmenu_pos=\''+Morientation+'\';">'}
else {cins='<div class="menu" id="'+Mname+'"  onmouseover="menuMouseover(event)">';} 
menu_content =cins;

//shorthand stylesheet slectorgroups i.c. main menu
// main menu style sec
menu_idstyle=ms;
// general text style for main menu & submenu's
menu_gntxtstyle=ms+', '+ms+' a.menuButton, '+ms+' a.menuButton div.menu, '+ms+' a.menuButton div.menu a.menuItem' ;
menu_gntxtstylec='{';
// specific barstyle for each main menu bar sec (no text)
menu_barstyle=ms;
menu_barstylec='{'+menu_gfs+menu_gps;
// specific style for buttons sec in de main menu 
menu_butstyle=ms+' a.menuButton';
menu_butstylec='{'+menu_gbs;
// color, bgcolor,border for &hover/active settings for menu & buttons
menu_colhstyle=ms+' a.menuButtonActive, '+ms+' a.menuButtonActive:hover';
menu_colhstylec='{';
// color, bgcolor,border for hover/active settings for menu-items
menu_itcolhstyle=ms+' * a.menuItem:hover , '+ms+' * a.menuItemHighlight';
menu_itcolhstylec='{';
// color, bgcolor,border for non-hover/active settings for menu-items
menu_itcolnstyle=ms+' * div.menu, '+ms+' *  div.menu a.menuItem';
menu_itcolnstylec='{';

//shorthand stylesheet slectorgroups i.c. specific submenu
// normal submenu style i.c. outside border etc.
menu_substyle=ss;
menu_substylec='{'+menu_gfs;
// submenu normal inside style menuItems
menu_subnstyle=ss+' a';
menu_subnstylec='{'+menu_gis;
// submenu hover/active style menuItems
menu_subostyle=ss+'  a.menuItem:hover,'+ss+'  a.menuItemHighlight';
menu_subostylec='{'+menu_ghs;
};


function menuTextStyle(Msize,Mweight,Mfamily){;
// Msize= font size; ex. 12pt
// Mweight = font weight; ex. normal, bold, etc.
// Mfamily = font family ; ex. Verdana, Arial, ...
var mw="" , mf="";
if (Mfamily!=undefined){mf=';font-family:'+Mfamily+';'};
if (Mweight!=undefined){mw=';font-weight:'+Mweight+';'};
var st='font-size:'+Msize+';'+mw+mf;
if (menu_ms!='sub'){menu_gntxtstylec+=st}
else{menu_subnstylec+=st;menu_substylec+=st;}
};

function menuColor(Mcolor,McolorOMO,Mbgcolor,MbgcolorOMO){;
// Mcolor :menu textcolor
// McolorMO :menu textcolor On Mouse Over
// Mbgcolor :menu backgroundcolor
// MbgcolorMO :menu backgroundcolor On Mouse Over
var cn='color:'+Mcolor+'; background-color:'+Mbgcolor+';' ;
var co='color:'+McolorOMO+'; background-color:'+MbgcolorOMO+';' ;
if (menu_sq){menu_gntxtstylec+=cn;menu_colhstylec+=co;} 
else{menu_subnstylec+=cn;menu_substylec+=cn;menu_subostylec+=co;} 
};

function menuWidth(Mwidth){;
// Mwidth :menu width; ex. 22em, 100px, 30%, etc.
// only main bar width will be specified; other width's are automatically set
menu_width=Mwidth; menu_gntxtstylec+='width:'+Mwidth+';' ;
};

function menuWidthIE(Mwidth){;
// Mwidth :menu width; ex. 22em, 100px, 30%, etc.
// only main bar width will be specified; other width's are automatically set
if (document.all){menu_width=Mwidth; menu_gntxtstylec+='width:'+Mwidth+';' ;}
};



function menuBarWidth(Mwidth){;
// Mwidth :menu Bar width 
// in incidental cases overwrite Bar-width
menuButtonMaxWidth=parseFloat(Mwidth)
};




function menuGeneralStyle(Mstyle){;
// Mstyle :standard css style; ex. "padding: 0px;" , etc
if (menu_ms!='sub'){ menu_gntxtstylec+=Mstyle+';'}
else {menu_substylec+=Mstyle;}
};

function menuOnMousOverStyle(Mstyle){;
// Mstyle :standard css style; ex. "padding: 0px;" , etc
if (menu_ms!='sub'){menu_colhstylec+=Mstyle+';'}
else {menu_subostylec+=Mstyle;};
};

function menuBarStyle(Mstyle){;
// Mstyle :standard css style; ex. "padding: 0px;" , etc
if (menu_ms!='sub'){menu_barstylec+=Mstyle+';'}
else {menu_substylec+=Mstyle;};
};

function menuButtonStyle(Mstyle){;
// Mstyle :standard css style; ex. "padding: 0px;" , etc
menu_butstylec+=Mstyle+';';
};

function menuItemStyle(Mstyle){;
// Mstyle :standard css style; ex. "padding: 0px;" , etc
menu_subnstylec+=Mstyle+';';
};

function menuAddButton(Msubname,Mcontent){;
// Msubname = Submenu name ; Case No submenu : Msubname="none"
// Mcontent : any (!) HTML /CSS content
var ins=""; if (Msubname!="none"){;
ins=' onclick="return buttonClick(event, \''+Msubname+'\');" onmouseover="buttonMouseover(event, \''+Msubname+'\');" ';
};
menu_content+='<a class="menuButton"  '+ins+'>'+Mcontent+'</a>';
menuButtonMaxWidth=Math.max(menuButtonMaxWidth,Mcontent.length);
};

function menuAddButtonClick(Msubname,Mcontent){;
// Msubname = Submenu name ; Case No submenu : Msubname="none"
// Mcontent : any (!) HTML /CSS content
var ins=""; if (Msubname!="none"){;
ins=' onclick="return buttonClick(event, \''+Msubname+'\');"  ';
};
menu_content+='<a class="menuButton"  '+ins+' title="Please click" >'+Mcontent+'</a>';
menuButtonMaxWidth=Math.max(menuButtonMaxWidth,Mcontent.length);
};

function menuAddItem(Msubname,Mcontent){;
// Msubname = Submenu name ; Case No submenu : Msubname="none"
// Mcontent : any (!) HTML /CSS content
var ins;if (Msubname!="none"){Mcontent+="&#160;";
ins='<a class="menuItem"  href="" onclick="return false;" onmouseover="menuItemMouseover(event, \''+Msubname+'\');" >';
ins+='<span class="menuItemText" >'+Mcontent+'</span><span class="menuItemArrow">&#9654;</span></a>';
menu_content+=ins;
}
else{menu_content+='<a class="menuItem"  href="" onclick="return false;" >'+Mcontent+'</a>';
};
};

function menuAddItemClick(Msubname,Mcontent){;
// Msubname = Submenu name ; Case No submenu : Msubname="none"
// Mcontent : any (!) HTML /CSS content
var ins;if (Msubname!="none"){Mcontent+="&#160;";
ins='<a class="menuItem"  href=""   onmouseover="if  (menuccc==1 & (\'hidden\'==document.getElementById(\''+Msubname+'\').style.visibility)){menuccc=0;};if (menuccc==1 ){menuItemMouseover(event, \''+Msubname+'\')};return false" onclick="menuccc=0;menuItemMouseover(event, \''+Msubname+'\');return false" onmouseout="if (menuccc==1 ){menuItemMouseover(event, \''+Msubname+'\')};return false" >';
ins+='<span class="menuItemText" >'+Mcontent+'</span><span class="menuItemArrow" onmouseover="menuccc=1;menuItemMouseover(event, \''+Msubname+'\')" onmouseout="menuccc=0">&#9654;</span></a>';
menu_content+=ins;
}
else{menu_content+='<a class="menuItem"  href="" onclick="return false;">'+Mcontent+'</a>';
};
};


function menuAddLinkItem(Mcontent,Mlink,Mtitle){;
// Msubname = Submenu name ; 
// Mcontent : any (!) HTML /CSS content
//Mlink= url of the link
// Mtitle = [optional]  information on mouse over
var tit; if (Mtitle==undefined) { tit='' } else { tit='TITLE="'+Mtitle+'" ' };
var ins='<a class="menuItem"  href=""><span onclick="window.location=\''+Mlink+'\';return false;" ';
ins+='onmouseover="this.style.cursor=\'hand\';"  '+tit+' >'+Mcontent+'</span></a>';
menu_content+=ins;
};

function menuAddSeparator(Mstyle,Msigns){;
// add seperator with optional style: Mstyle
if (Mstyle==undefined) {Mstyle='border: 1px inset #FFFFFF; margin: 1px 2px;'};
menu_content+='<div style="'+Mstyle+'"></div>';
};

function menuAddAnything(Manything){;
// add anything ; No highlight supported
menu_content+=Manything;
};

function menuEnd(){;
// Close & finisch variables & stylesheets
menu_content+='</div>';
if (menu_ms!="sub"){menu_content+='</div>'};

//  Set menuwidth on max i.c. vertical main menu 
if ((menuhv=="vertmenu") & (menu_ms!="sub") & document.all ){menu_barstylec+='width:'+menuButtonMaxWidth+'em ;' };

menu_gntxtstylec+="}";menu_barstylec+="}";menu_butstylec+="}";
menu_colhstylec+="}";menu_itcolhstylec+="}";menu_itcolnstylec+="}";
menu_substylec+="}";menu_subostylec+="}";menu_subnstylec+="}";

// make & write menu stylesheets
 // main menu
sts='<style>'+menu_gntxtstyle+menu_gntxtstylec;
sts+=menu_barstyle+menu_barstylec;
sts+=menu_butstyle+menu_butstylec;
sts+=menu_colhstyle+menu_colhstylec;
sts+=menu_itcolhstyle+menu_itcolhstylec;
sts+=menu_itcolnstyle+menu_itcolnstylec;
sts+='</style>';
if (menu_ms!="sub"){document.write(sts)};

 //sub menu
sts='<style>'+menu_substyle+menu_substylec;
sts+=menu_subostyle+menu_subostylec;
sts+=menu_subnstyle+menu_subnstylec;
sts+='</style>';
if (menu_ms=="sub"){document.write(sts)};

// write main menu to screen 
document.write(menu_content);
};

function menuShow(Mname){;
// Show the menu ; relative positioned menu
// Mname = name of the menu
// Trick for Netscape to display menu over iframe or other element
if (null==document.all){document.write('<div id="netscapefake" style="position:fixed;left:0px;top:127px;width:1006px;height:2000px;" align="left" valign="top" onmouseover="netscapefaker(\'hidden\')"></div>')}

var docs=document.getElementById(Mname);
var vv=docs.className;
if (vv=="hormenu"){ww="h"}else{ww="v"};
var wr='<span style="position:absolute" onmousemove="jbmenu_pos=\''+ww+'\';" onmouseout="netscapefaker(\'visible\')" onmouseover="jbmenu_pos=\''+ww+'\';"><div class="'+docs.className+'" id="'+Mname+'" onmouseover="jbmenu_pos=\''+ww+'\';" >'+docs.innerHTML+'</div></span>';
document.writeln (wr) ;
}

function menuShowr(Mname,Mwidth){ ;
// Show the menu ; relative positioned menu
// Mname = name of the menu
// Mwidth = width )
menuShow(Mname);
document.write ('<span style="margin-left:'+Mwidth+'"></span>');
};

function menuShowa(Mname,Mleft,Mtop){;
// Show the menu ; absolute positioned menu
// Mname = name of the menu
// Mleft, Mtop = nr of pixels from the left,top (use plain numbers, do not use "px" !)
var docs=document.getElementById(Mname);vv=docs.className;
var wr="<div style='position:absolute;left:"+Mleft+"px ;top:"+Mtop+"px ;' ><scr"+"ipt>menuShow('"+Mname+"')</script></div>";
document.write (wr) ;
};

function netscapefaker(hv){;
// fakes background in Gecko/Netscape browsers to prevent the menu from cutoff onmouseover by other elements
if (null==document.all){document.getElementById("netscapefake").style.visibility=hv};
};


function menuhz(varz){;
//  set max  zIndex
menuhzindex=Math.max(menuhzindex,varz);
};

function menuArrowmargin(corr){;
// Correction "corr" of the arrowposition i.c. of submenu's ; Example: menuArrowmargin("-5px") 
document.write("<style>div.menu a.menuItem span.menuItemArrow{margin-right: "+corr+";} </style>");
};

function menuShadow(Fstrength,Fcolor,Fdirection){;
// Create or delete Shadow (only ie) Example: menuShadow(8,"blue",135)
if (Fdirection==undefined){Fdirection="135"; if (Fcolor==undefined){Fcolor="#808080";if (Fstrength==undefined){Fstrength="0"}}};
menuBarStyle("filter: progid:DXImageTransform.Microsoft.Shadow(direction="+Fdirection+",color="+Fcolor+",strength="+Fstrength+");");
};

// Different standard menustyles

function menuPreStyle(Sname){
// Define predefined styles with stylenames Sname

// Ivory
if (Sname=="Main-Ivory"){;
	menuTextStyle("10pt","normal","Verdana");menuColor("black","white","#c09070","#9999CC");
	menuGeneralStyle("background-color: ivory; border:1px groove #708090;");menuBarStyle("padding:12px 0px 12px 0px; border: 3px outset #9999cc ;");
	menuButtonStyle("margin:0px 15px 0px 15px;padding:5px 4px 5px 4px;font-weight:bold;text-decoration:underline;letter-spacing:2pt;");
}
if (Sname=="Sub-Ivory"){menuColor("#B22222","#000000","ivory","#FAEBD7");menuBarStyle("margin-left:1px;padding:2px 2px 2px 2px;border: 2px outset #e0e0e0;");
	menuItemStyle("padding: 2px 0px 2px 6px;")}

// Windows98
if (Sname=="Main-Windows98"){;
	menuTextStyle("9pt","normal","Tahoma");menuColor("#000000","#FFFFFF","#BFBFBF","#00007F");
	menuGeneralStyle("border:2px ridge #FFFFFF;");menuBarStyle("padding:6px 2px 6px 2px; border: 1px outset #000000 ;");
	menuButtonStyle("margin: -1px;padding:4px;font-weight:normal;letter-spacing:1pt;border: 2px outset #FFFFFF ;");
}
if (Sname=="Sub-Windows98"){menuColor("#000000","#FFFFFF","#BFBFBF","#00007F");menuBarStyle("padding:3px 3px 3px 3px;border: 2px outset #e0e0e0;");
	menuItemStyle("letter-spacing:1pt;padding: 3px 0px 3px 6px;")}

// WindowsXP
if (Sname=="Main-WindowsXP"){ //XP-colorset: blue: #00007F - #007ffe - #0055ff ; creme: #f7f4e1; red:#dc4b0c ; green : #38a322
	menuTextStyle("10pt","normal","Verdana, Tahoma");menuColor("#000099","#F5F5F5","#f7f4e1","#0055ff");
	menuGeneralStyle("font: bold 125% Verdana, Sans-serif;;border:1px ridge #0055ff;");
	menuBarStyle("background-color:#0055ff;padding:10px 4px 10px 4px; border: 0px normal #38a322 ;");
	menuButtonStyle("background-color:#f7f4e1;margin: 5px;padding:5px 10px 5px 10px;letter-spacing:2pt;border: 2px inset #38a322 ;");
	menuShadow(5,"#999966",135);
}
if (Sname=="Sub-WindowsXP"){menuColor("#000099","#F5F5F5","#f7f4e1","#38a322");
	menuBarStyle("background-color:#0055ff;padding:2px 2px 2px 2px;border: 2px groove #38a322;");
	menuItemStyle("margin-top:0px;margin:-1px 0px 0px 0px;padding: 2px 6px 2px 6px;border: 2px outset #f7f4e1");
	}

// Transparent
if (Sname=="Main-Transparent"){ ;
	menuTextStyle("10pt","normal","Arial");menuColor("#000000","#808080","transparent","#FFFACD");
	menuGeneralStyle("font: bold 125% Arial, Sans-serif;;border:1px ridge #0055ff;");menuBarStyle("background-color:transparent;padding:14px 4px 12px 4px; border: 0px normal #38a322 ;");
	menuButtonStyle("background-color:transparent;margin: 10px;padding:5px 10px 5px 10px;letter-spacing:2pt;border: 1px inset #4B0082 ;");
	menuShadow(2,"#999966",60);
}
if (Sname=="Sub-Transparent"){menuTextStyle("8pt","bold","Verdana");menuColor("#FFFFF0","#2F4F4F","transparent","#FFFACD");menuBarStyle("background-color:#123456;padding:2px 2px 2px 2px;border: 2px groove #38a322;");
	menuItemStyle("background-color:transparent;margin-top:0px;margin:-1px 0px 0px 0px;letter-spacing:2pt;padding: 2px 4px 2px 6px;border: 2px outset #f7f4e1");
	}

// Choco
if (Sname=="Main-Choco"){ ;
	menuTextStyle("9pt","bold","Arial,Tahoma");
	menuColor("black","NAVY","#c09070","#EEE8AA");
	menuGeneralStyle("background-color: #c09070;margin:0px;padding:0px 0px 0px 0px; ");
	menuBarStyle(" border-top: #e0b090;border-right: #906040;border-bottom: #906040;border-left: #e0b090;border-style:solid;border-width: 2px ;");
	menuButtonStyle("letter-spacing:2pt;margin-left:4px;border: 1px solid #c09070;");
	menuOnMousOverStyle("border-style:inset;");
}
if (Sname=="Sub-Choco"){menuTextStyle("8pt","normal","Verdana,Tahoma");menuColor("black","NAVY","#c09070","#EEE8AA");menuBarStyle(" border-top: #e0b090;border-right: #906040;border-bottom: #906040;border-left: #e0b090;border-style:inset;border-width: 2px ;");
	menuItemStyle("margin:-1px 0px 0px 0px;padding: 2px 0px 2px 6px;letter-spacing:1px;border: 3px inset #f7f4e1");
	menuOnMousOverStyle("border: 3px inset #ADD8E6 ;");}

// Chocreme
if (Sname=="Main-Chocreme"){ menuTextStyle("8pt","bold","Verdana");	
	menuColor("#ffffcc","#0033cc","#c09070","#D2691E");
	menuGeneralStyle(" background-color: #c09070; border:1px groove #e0b090;");
	menuBarStyle(" border-top: #e0b090;border-right: #906040;border-bottom: #906040;border-left: #e0b090;border-style:solid;border-width: 2px ;");
	}
if (Sname=="Sub-Chocreme"){
	menuGeneralStyle('font-family: "MS Sans Serif", Arial, sans-serif; font-size: 8pt; font-style: normal;');
	menuGeneralStyle('background-color: #e0e0e0;font-weight: normal; padding: 4px 2px 4px 2px;  text-align: left;');
	menuColor("black","white","#e0e0e0","#a0a0a0");menuBarStyle("border: 2px outset #e0e0e0;");
	menuColor("#B22222","#9400D3","#f5f5dc","#f5deb3");
	menuItemStyle("margin:-1px 0px 0px 0px;padding: 2px 0px 2px 6px;");
}
if (Sname=="Sub-Chocreme-gray"){;
menuGeneralStyle('font-family: "MS Sans Serif", Arial, sans-serif; font-size: 8pt; font-style: normal;');
menuGeneralStyle('background-color: #e0e0e0;font-weight: normal; padding: 4px 2px 4px 2px;  text-align: left;');
menuColor("black","white","#e0e0e0","#a0a0a0");menuBarStyle("border: 2px outset #e0e0e0;");
menuItemStyle("border: solid #C0C0C0 1px;margin: 1px 1px 1px 1px;padding: 2px 0px 2px 6px;");
}

}
//]]]