	var	currentTopNav	=	'';

	var	arrows		=	new	Array();
	arrows[0]		=	new Image();
	arrows[0].src	=	"skins/blue/img/hd/ha0.gif";
	arrows[1]		=	new Image();
	arrows[1].src	=	"skins/blue/img/hd/ha1.gif";

	function	tnContainer()
	{
		this.entries	=	new	Array();
		this.layers		=	new	Array();
		this.timers		=	new	Array();
		this.entryCnt	=	0;
		
		this.aE				=	tncAddEntry;
		this.aSE			=	tncAddSubEntry;
		this.printHTML		=	tncPrintHTML;
		this.printCSS		=	tncPrintCSS;
		this.printDiv		=	tncPrintDiv;
		this.init			=	tncInit;
		this.show			=	tncShow;
		this.startHide		=	tncStartHide;
		this.hide			=	tncHide;
		this.forceHide		=	tncForceHide;
		this.hideAll		=	tncHideAll;

		this.snHi			=	tncSnHi;
		this.snLo			=	tncSnLo;
	}

	function	tncSnHi( menu, id )
	{
		if( !pageLoaded )
			return	false;

		var	img		=	mdl_getImage( "arr"+menu+"_"+id );
		img.src		=	arrows[1].src
	}
	
	function	tncSnLo( menu, id )
	{
		if( !pageLoaded )
			return	false;

		var	img		=	mdl_getImage( "arr"+menu+"_"+id );
		img.src		=	arrows[0].src
	}

	//	add main menu entry
	function	tncAddEntry( title, url, target )
	{
		this.entries[this.entryCnt]		=	new	tnEntry( this.entryCnt, title, url, target );
		this.entryCnt++;
	}

	//	add sub menu entry
	function	tncAddSubEntry( title, url, target )
	{
		var	tmp			=	new	snEntry( title, url, target );

		this.entries[(this.entryCnt-1)].entries[this.entries[(this.entryCnt-1)].entryCnt]	=	tmp;
		this.entries[(this.entryCnt-1)].entryCnt++;
	}

	//	do init stuff
	function	tncInit()
	{
		for( var i = 0; i < this.entryCnt; i++ )
		{
			this.layers[i]		=	mdl_getLayer( "sn" + this.entries[i].id );
			var	tmp				=	mdl_getImage( "tnPos" + this.entries[i].id );
			mdl_moveLayerTo( this.layers[i], ( mdl_getImageX( tmp ) + 8 ), ( mdl_getImageY( tmp ) + tmp.height ) );
		}
	}

	//	show one submenu
	function	tncShow( id )
	{
		if( !pageLoaded )
			return	false;

		this.hideAll();
		mdl_showLayer( this.layers[id] );
	}

	function	tncStartHide( id )
	{
		this.timers[id]		=	setTimeout( "tn.hide( " + id + " )", 500 );
	}

	function	tncHide( id )
	{
		if( mdl_checkMouseInLayer( this.layers[id] ) )
		{
			this.timers[id]		=	setTimeout( "tn.hide( " + id + " )", 50 );
		}
		else
			mdl_hideLayer( this.layers[id] );
	}

	function	tncForceHide( id )
	{
		mdl_hideLayer( this.layers[id] );
	}

	
	//	hide all submenus
	function	tncHideAll()
	{
		for( var i = 0; i < this.entryCnt; i++ )
		{
			clearTimeout( this.timers[i] );
			mdl_hideLayer( this.layers[i] );
		}		
	}
	
	//	print HTML
	function	tncPrintHTML( active )
	{
		for( var i = 0; i < this.entryCnt; i++ )
		{
			//	check for active entry
			if( this.entries[i].title == active )
			{
				var	bgImg	=	"skins/blue/img/px.gif";
			}
			else
			{
				var	bgImg	=	"skins/blue/img/px.gif";
			}


			if( this.entries[i].entryCnt > 0 )
			{
				document.writeln( '		<td><img name="tnPos' + this.entries[i].id + '" src="skins/blue/img/hd/hbm.gif" width="17" height="24" alt="" border="0" hspace="6"></td>' );
				document.writeln( '		<td nowrap><a href="javascript:void(0);"  onMouseOver="tn.show( ' + this.entries[i].id + ' );" onMouseOut="tn.startHide( ' + this.entries[i].id + ' );" class="headnav">'+this.entries[i].title+'</a></td>' );
				document.writeln( '		<td><img src="skins/blue/img/px.gif" width="2" height="1" alt="" border="0"></td>' );
			}

			else
			{
				document.writeln( '		<td><img name="tnPos' + this.entries[i].id + '" src="skins/blue/img/hd/hbs.gif" width="18" height="24" alt="" border="0" hspace="6"></td>' );
				document.writeln( '		<td nowrap><a href="' + this.entries[i].url + '" target="' + this.entries[i].target + '" class="headnav">' + this.entries[i].title + '</a></td>' );
				document.writeln( '		<td><img src="skins/blue/img/px.gif" width="2" height="1" alt="" border="0"></td>' );
			}
		}
	}


	//	print CSS
	function	tncPrintCSS()
	{
		document.write( '<style type="text/css">' );
		for( var i = 0; i < this.entryCnt; i++ )
		{
			document.write( '#sn' + this.entries[i].id + '	{position: absolute; top: 0px; left:0px; visibility: hidden; }' );
		}
		document.write( '</style>' );
	}


	//	print DIVs
	function	tncPrintDiv()
	{
		for( var i = 0; i < this.entryCnt; i++ )
		{
			document.write( '<div id="sn' + this.entries[i].id + '">' );
			document.writeln( '<table border="0" cellpadding="0" cellspacing="0">' );
			document.writeln( '	<tr>' );
			document.writeln( '		<td background="skins/blue/img/px_ffffff.gif"><img src="skins/blue/img/px.gif" width="1" height="1" alt="" border="0"></td>' );
			document.writeln( '		<td colspan="3" background="skins/blue/img/px_7da2c4.gif" bgcolor="#7da2c4"><img src="skins/blue/img/px.gif" width="1" height="1" alt="" border="0"></td>' );
			document.writeln( '	</tr>' );


			for( var j = 0; j < this.entries[i].entryCnt; j++ )
			{
				document.writeln( '	<tr>' );
				document.writeln( '		<td background="skins/blue/img/px_ffffff.gif"><img src="skins/blue/img/px.gif" width="1" height="1" alt="" border="0"></td>' );
				document.writeln( '		<td background="skins/blue/img/px_608db7.gif"><img name="arr'+i+'_'+j+'" src="skins/blue/img/hd/ha0.gif" width="15" height="9" alt="" border="0"></td>' );
				document.writeln( '		<td background="skins/blue/img/px_608db7.gif" nowrap>' );
				document.writeln( '			<a href="' + this.entries[i].entries[j].url + '" target="' + this.entries[i].entries[j].target + '" class="headnav" onMouseOver="tn.snHi( ' + this.entries[i].id + ',' + j + ' );" onMouseOut="tn.snLo( ' + this.entries[i].id + ',' + j + ' );">' + this.entries[i].entries[j].title + '</a><br>' );
				document.writeln( '			<img src="skins/blue/img/px.gif" width="1" height="1" alt="" border="0"><br>' );
				document.writeln( '		</td>' );
				document.writeln( '		<td background="skins/blue/img/px_608db7.gif"><img src="skins/blue/img/px.gif" width="5" height="1" alt="" border="0"></td>' );
				document.writeln( '	</tr>' );
				document.writeln( '	<tr>' );
				document.writeln( '		<td background="skins/blue/img/px_ffffff.gif"><img src="skins/blue/img/px.gif" width="1" height="1" alt="" border="0"></td>' );
				document.writeln( '		<td colspan="3" background="skins/blue/img/px_7da2c4.gif" bgcolor="#7da2c4"><img src="skins/blue/img/px.gif" width="1" height="1" alt="" border="0"></td>' );
				document.writeln( '	</tr>' );
			}

			document.writeln( '	<tr>' );
			document.writeln( '		<td><img src="skins/blue/img/px.gif" width="1" height="1" alt="" border="0"></td>' );
			document.writeln( '		<td colspan="3">' );
			document.writeln( '			<table background="skins/blue/img/px_608db7.gif" width="100%" border="0" cellpadding="0" cellspacing="0">' );
			document.writeln( '				<tr>' );
			document.writeln( '					<td><img src="skins/blue/img/hd/hss.gif" width="8" height="11" alt="" border="0"></td>' );
			document.writeln( '					<td align="center"><a href="javascript:tn.forceHide( ' + i + ' )"><img src="skins/blue/img/hd/hsc.gif" width="13" height="11" alt="" border="0"></a></td>' );
			document.writeln( '					<td align="right"><img src="skins/blue/img/hd/hse.gif" width="8" height="11" alt="" border="0"></td>' );
			document.writeln( '				</tr>' );
			document.writeln( '			</table>' );
			document.writeln( '		</td>' );
			document.writeln( '	</tr>' );
			document.writeln( '</table>' );

			document.write( '</div>' );
		}	
	}
	
	
	function	tnEntry( id, title, url, target )
	{
		this.id			=	id;
		this.title		=	title;
		this.url		=	url;
		this.target		=	target;
		
		this.entries	=	new	Array();
		this.entryCnt	=	0;
	}

	function	snEntry( title, url, target )
	{
		this.title		=	title;
		this.url		=	url;
		this.target		=	target;
	}
