<!--
// mps mediaworks webprojects */
// nav1_vorb.js */
// NAVIGATION VORBELEGUNG Version 0.9.1 by Nikolai Vogel 2001-10-13
// zuletzt angepasst am 25.10.2001 von Alexander Baumgartl */

// the subclass MyNavigationLink can be used
// to either shorten or broaden the constructor
// and overwrite the write method according to the website

/**
 * class NavigationLink
 * 
 * This class represents a link/a row in the navigation
 *
 * Navigation.addLink is called using a NavigationLink-Object
 * as parameter.
 * To provide visibility of the row NavigationLink::write() is called.
 * This should always be done by using Navigation::write()
 * 
 * Parameters:
 * integer navLevel:	hirarchy level of the item in the navigation
 *						(0: root, 1: toplevel)
 * string linkUrl:		relative link to the page or #
 *						(uses Navigation::basePath as base)
 * string linkOnClick:	provide a javascript to handle clicks
 *						e.g. oNav.getJsOnClickLink('oNav') to expand/collapse nodes
 * string linkText:		shown text for this navigation link
 * variant linkImage:	reserved for an optional Image used for this link
 * string linkStyle:	name of a the css stylesheet used for this link
 *						(depending on the write method() there should also be a 
 * 						version with the suffixes "-curr", "-anc", "-cld")
 */
 function MyNavigationLink(navLevel, linkUrl, linkOnClick, linkText, linkImage) {
	// specific styles/classes are only allowed 
	// on the top level of the navigation 
	linkStyle = 'navlink1';
	this.NavigationLink(navLevel, linkUrl, linkOnClick, linkText, linkStyle);
	this.linkImage = linkImage;
	// "navigation","Projektidee", 10, "#29448A"
}
MyNavigationLink.prototype = new NavigationLink("","",0,"");
//MyNavigationLink.prototype.constructor = MyNavigationLink;

/**
 * NavigationLink.write()
 *
 * This method actualy writes the navigation link
 * to the document object.
 * It's responsible for look and feel and for so 
 * has to be overwritten in a derived class (see navigation_custim.js)
 */
MyNavigationLink.prototype.getHtml = function () {
	/*
	 * classes we need from the css style sheet:
	 * a.navigation:	defines navigation links (this depends on the linkStyle parameter to the constructor)
	 * a.navigationakt:	defines highlighted navigation links to show current path
	 * 
	 * images we need:
	 * navigation_mark:			Marker/bullet point for link entries
	 * navigation_mark-cur:		highlighted version of above to mark current path
	 * navigation_mark_over:	highlighted version of above for roll over effect
	 * navigation_mark_over-cur:	highlighted version of above to mark current path
	 * navigation_mark-anc, navigation_mark_over-anc, navigation_mark-cld, navigation_mark_over-cld
	 * navigation_mark_transp:	transparent version of above as (??)
	 * (rem: if you don't really need as much images, just copy them on each other)
	 *
	 * members to use for html output (in order of preference):
	 * int navLevel:		level of navigation (1=toplevel)
	 * string linkStyleWithSuffix:	class name for css style sheet notation (e.g. navigation, navigation-akt)
	 * string linkText:		text to display for the link
	 * string linkHref:		complete url for the navigation link for the href attribute
	 *						(This should always be adapted to current host or filesystem-drive)
	 * string zaehler:		counter for creating image id for later reference (e.g. for MouseOver-Event)
	 * string linkCurrentSuffix:	suffix "-cur" when in current navigation path or "" else
	 *						used to modify styles e.g. image filenames
	 */
	var sHtmlLink = '';
	
	// this.linkCurrent suffix is either '' or '-akt' to provide a
	// simple way of highlighting the current nodes
	
	if (this.navLevel==0) {
		// do not display the super/root node
	}
	else {
		sHtmlLink += '\n<tr align="left">'
					// indent
					+ '\n<td width="' + this.navLevel + '0" colspan="' + this.navLevel + '" align="left" valign="top"></td>'
					// marker
					+ '\n<td width="10" align="left" valign="top">'
					+ '\n<img src="/_weblib/navigation.epo/_images/navigation_mark'+this.linkCurrentSuffix+'.gif" border="0" width="9" height="7" name="nav_mark_'+this.zaehler+'"></td>'
					// link itself
					+ '\n<td class="navlevel'+ this.navLevel +'" valign="top" align="left" colspan="'+(6-this.navLevel)+'">'
					+ '\n<a class="'+this.linkStyleWithSuffix+'"'
					+ ' href="'+ this.linkHref  +'"'
					+ ' onClick="' + this.linkOnClick + '"'
					+ ' onMouseOver="RolloverOnMouseOver(\'nav_mark_'+this.zaehler+'\',\'/_weblib/navigation.epo/_images/navigation_mark_over'+this.linkCurrentSuffix+'.gif\');"'
					+ ' onMouseOut="RolloverOnMouseOut(\'nav_mark_'+this.zaehler+'\');"'
					+ '>'+ this.linkText + '</a>'
					+ '\n<br></td></tr>'
					// vertical spacing
					+ '\n<tr><td colspan="7" align="left"><img src="/_weblib/navigation.epo/_images/spacer.gif" border="0" width="1" height="3"></td>'
					+ '</tr>\n\n';
	}
	//oDebug.write(sHtmlLink);
	return(sHtmlLink);
	
}

var oNav = new Navigation();

oNav.sHtmlHeader = '\n<table width="180" border="0" cellpadding="0" cellspacing="0">'
			+ '\n<tr class="navlevel1">'
			+ '<td width="10"><img src="/_images/all/spacer.gif" border="0" width="10" height="1"></td><td width="10"><img src="/_images/all/spacer.gif" border="0" width="10" height="1"></td><td width="10"><img src="/_images/all/spacer.gif" border="0" width="10" height="1"></td><td width="10"><img src="/_images/all/spacer.gif" border="0" width="10" height="1"></td><td width="10"><img src="/_images/all/spacer.gif" border="0" width="10" height="1"></td><td width="10"><img src="/_images/all/spacer.gif" border="0" width="10" height="1"></td>'
			+ '\n<td width="180"> </td></tr>';
oNav.sHtmlFooter = '\n</table>';

// maximum depth of navigation
oNav.navtiefe = 5;
// expand navigation right from start up to level x
oNav.gesamtnavbis = 2;
// expand/show current/selected path from x to y
oNav.gewaehltnavab = 1;
oNav.gewaehltnavbis = 5; // deeper links won be expanded
// angewaehlten Pfad ganz anzeigen - gesamtnavbis, gewaehltnav u. gewaehltnavbis bleiben gueltig
oNav.nurpfad = false;
// nur jeweils Bereiche aus ausgewaehltem Level anzeigen
oNav.nuraktpfad = true;
// base path for defined links on this site
// e.g. oNav.basePath = '/ecap/site';
// e.g. oNav.basePath = '/report/site';
oNav.basePath = '';

// insert super node (not visible in most navigations)
oNav.addLink(new MyNavigationLink(0, '/en/index.htm', oNav.getJsOnClickLink('oNav'), 'root node', '', ''));

// -->
