if ((navigator.appName.indexOf ('Netscape') > -1) && (parseInt(navigator.appVersion.substr(0,1)) <= 4)) document.write ('<link rel="stylesheet" type="text/css" href="' + webRoot + '/ki-shared/netscape4.css">');
// if (navigator.userAgent.indexOf ('Opera') > -1) document.write ('<link rel="stylesheet" type="text/css" href="' + webRoot + '/ki-shared/opera.css">');

/* ======================================

   Farben für die einzelnen Menüs

====================================== */
// function tMenu (menuName, bgColorDefault, bgColorHighlight, bgColorActive, ...)
var menu = new Array ();
menu[0] = new tMenu ('navi', '#153B63', '#1B528C', '#2269B5', 0, 67);
menu[1] = new tMenu ('down', '#B4C6D9', '#A0B7CF', '#8CA8C5'); // "down"
menu[2] = new tMenu ('sub', '#B4C6D9', '#A0B7CF', '#8CA8C5'); // "Sub" / "Sub3"
menu[3] = new tMenu ('content', '#FFFFFF', '#DFE9F4', '#DFE9F4');
menu[4] = new tMenu ('content02', '#DFE9F4', '#B4C6D9', '#B4C6D9');

/* ======================================

   Menü-Funktionen

====================================== */

// Highlight or un-highlight menu items
function MenuHighlight (MenuItemID, Highlight, menuId) {

  if (debug && !Highlight) window.status = 'Menüpunkt-ID: ' + MenuItemID + ', Menü-ID: ' + menuId;
  menuId = (menuId == null) ? 0 : menuId;
  if (Highlight == 2) {
    menu[menuId].curItemName = MenuItemID;
  }

  var tdIterator = 0;
  var DocMenuItemTD = '';
  var Color = Highlight ? menu[menuId].bgColorHighlight : menu[menuId].bgColorDefault;
  Color = (Highlight == 2) ? menu[menuId].bgColorActive : Color; // Highlight Page Menu Item
  
  // Highlight all TDs which build the menu item
	if (document.all) {
	  if ( (DocMenuItemTD = eval ('document.all.td' + MenuItemID) ) && ( (MenuItemID != menu[menuId].curItemName) || (Highlight == 2) ) ) {
 		  DocMenuItemTD.style.backgroundColor = Color;
		} 
	} else if (document.body) {
	  DocMenuItemTD = document.getElementsByTagName ('td')['td' + MenuItemID];
	  if ( DocMenuItemTD && ( (MenuItemID != menu[menuId].curItemName) || (Highlight == 2) ) ) {
  	  DocMenuItemTD.style.backgroundColor = Color;
		} 
	}

} // function MenuHighlight


function PageStartup (itemName) {

	arrowRight.src = globalSharedDir + '/img/arrow-white.gif';
	arrowDown.src = globalSharedDir + '/img/arrow-white-down.gif';

  // Highlight current page menu item(s)
  var menuItemId, menuId;
  for (var i=0; i < PageStartup.arguments.length; i=i+2) {
    menuItemId = PageStartup.arguments[i];
    menuId = (PageStartup.arguments[i+1] != null) ? PageStartup.arguments[i+1] : 0;
    MenuHighlight (menuItemId, 2, menuId);
    menu[menuId].pageItemName = menuItemId;
  }	
  
  // Turn arrow of ancestor items
  var imgId = 'im' + itemName.substring (0, itemName.lastIndexOf ('cm'));
  while (imgId.indexOf ('cm') > 0 ) {
  	if (document.images[imgId]) document.images[imgId].src = arrowDown.src;
  	imgId = imgId.substring (0, imgId.lastIndexOf ('cm'));
  }
  

} // function PageStartup


/* ======================================

   Constants, global variables, type constructors

====================================== */

// "Konstanten" zur Browser-Kompatibilität
var px = '';
var visible = (document.layers) ? 'show' : 'visible';
var hidden = (document.layers) ? 'hide' : 'hidden';

var arrowDown = new Image();
var arrowRight = new Image();

function tMenu (menuName, bgColorDefault, bgColorHighlight, bgColorActive, left, top, isPopUp, opensOnMouseOver, opensOnlyOneItem) {
	
	this.name = menuName;
	this.bgColorDefault = bgColorDefault;
	this.bgColorHighlight = bgColorHighlight;
	this.bgColorActive = bgColorActive;
	this.left = left;
	this.top = top;
	this.isPopUp = isPopUp;
	this.opensOnMouseOver = opensOnMouseOver;
	this.opensOnlyOneItem = opensOnlyOneItem;

	this.curItemName = '';
	this.pageItemName = '';
	this.isCurItemOpen = false;
	this.MouseOutTimeout = 0;
	// this.item = new Array();
	
} // function tMenu 


/* ======================================

   Debug stuff

====================================== */

var debug = false;


function dm (message) {
  
  if ( debug && (document.forms.debug) ) alert (message); // document.forms.debug.elements.dta.value += message + '\n';
  
} // function dm 
