	function	anContainer()
	{
		this.entries			=	new	Array();
		this.entryCnt			=	0;
		this.currentEntry		=	-1;
		this.currentSubEntry	=	-1;
		this.layer				=	false;
		
		this.aE					=	tncAddEntry;
		this.aSE				=	tncAddSubEntry;
		this.printDiv			=	ancPrintDiv;
		this.getHTML			=	ancGetHTML;
		this.init				=	ancInit;
		this.getOpenMenu		=	ancGetOpenMenu;
		this.openMenu			=	ancOpenMenu;

		this.hi					=	ancHi;
		this.lo					=	ancLo;
	}

	function	ancHi( id, img )
	{
		if( !document.getElementById )
			return	false;
		
		var	tmp				=	document.getElementById( "menuimg" + id );
		tmp.src				=	img + "_1.gif";
	}
	
	function	ancLo( id, img )
	{
		if( !document.getElementById )
			return	false;
		
		var	tmp				=	document.getElementById( "menuimg" + id );
		tmp.src				=	img + ".gif";
	}

	function	ancGetOpenMenu( app, appsub )
	{
		for( var i = 0; i < this.entryCnt; i++ )
		{
			if( this.entries[i].title == app )
			{
				this.currentEntry	=	i;

				for( var j = 0; j < this.entries[i].entryCnt; j++ )
				{
					if( this.entries[i].entries[j].title == appsub )
						this.currentSubEntry	=	j;
				}
				break;
			}
		}	
	}
	
	function	ancInit()
	{
		this.layer			=	mdl_getLayer( "appnav" );
		
		var	tmp				=	mdl_getImage( "apppos" );
		mdl_moveLayerTo( this.layer, mdl_getImageX( tmp ), mdl_getImageY( tmp ) );
		mdl_showLayer( this.layer );
	}

	function	ancOpenMenu( id )
	{
		if( this.currentEntry == id )
			this.currentEntry	=	-1;
		else
			this.currentEntry	=	id;

		var	tmp		=	this.getHTML();
		var	html	=	"";
		
		for( i = 0; i < tmp.length; i++ )
			html	=	html + "\n" + tmp[i];

		mdl_changeLayerContent( this.layer, html );
	}

	function	ancPrintDiv()
	{
		var	html	=	this.getHTML();

		document.writeln( '<div id="appnav">' );

		for( var i = 0; i < html.length; i++ )
			document.writeln( html[i] );

		document.writeln( '</div>' );
	}
	
	function	ancGetHTML()
	{
		var	html	=	new	Array();

		var	count	=	0;

		html[count++]	=	'<table border="0" cellpadding="0" cellspacing="0">';
		html[count++]	=	'<tr>';
		html[count++]	=	'	<td background="skins/blue/img/nav/bg.gif" align="right">';
		html[count++]	=	'		<img src="skins/blue/img/hd/'+seasonFolder+'/navh.gif" width="204" height="27" alt="" border="0"><br>';
		html[count++]	=	'		<table width="100%" border="0" cellpadding="0" cellspacing="0">';
		html[count++]	=	'		<tr>';
		html[count++]	=	'			<td valign="top">';
		
		
		for( var i = 0; i < this.entryCnt; i++ )
		{
			if( this.entries[i].entryCnt == 0 )
			{
				html[count++]	=	'<table border="0" cellpadding="2" cellspacing="0">';
				html[count++]	=	'	<tr>';
				html[count++]	=	'		<td><a href="'+this.entries[i].url+'" target="'+this.entries[i].target+'" onMouseOver="an.hi( ' + this.entries[i].id + ', \'skins/blue/img/nav/br\' );" onMouseOut="an.lo( ' + this.entries[i].id + ', \'skins/blue/img/nav/br\' );"><img id="menuimg' + this.entries[i].id + '" src="skins/blue/img/nav/br.gif" width="13" height="13" alt="" border="0"></a></td>';
				html[count++]	=	'		<td><a href="'+this.entries[i].url+'" target="'+this.entries[i].target+'" class="nav" onMouseOver="an.hi( ' + this.entries[i].id + ', \'skins/blue/img/nav/br\' );" onMouseOut="an.lo( ' + this.entries[i].id + ', \'skins/blue/img/nav/br\' );">'+this.entries[i].title+'</a></td>';
				html[count++]	=	'	</tr>';
				html[count++]	=	'</table>';
			}
			else
			{
				if( this.currentEntry == i )
					var	icon	=	"skins/blue/img/nav/bm";
				else
					var	icon	=	"skins/blue/img/nav/bp";

				html[count++]		=	'<table border="0" cellpadding="2" cellspacing="0">';
				html[count++]		=	'	<tr>';
				html[count++]		=	'		<td><a href="javascript:an.openMenu( ' + this.entries[i].id + ' );" onMouseOver="an.hi( ' + this.entries[i].id + ', \''+icon+'\' );" onMouseOut="an.lo( ' + this.entries[i].id + ', \''+icon+'\' );"><img id="menuimg' + this.entries[i].id + '" src="'+icon+'.gif" width="13" height="13" alt="" border="0"></a></td>';
				html[count++]		=	'		<td><a href="javascript:an.openMenu( ' + this.entries[i].id + ' );" class="nav" onMouseOver="an.hi( ' + this.entries[i].id + ', \''+icon+'\' );" onMouseOut="an.lo( ' + this.entries[i].id + ', \''+icon+'\' );">' + this.entries[i].title + '</a></td>';
				html[count++]		=	'	</tr>';
				html[count++]		=	'</table>';

				//	current app is active
				if( this.currentEntry == i )
				{	
					for( var j = 0; j < this.entries[i].entryCnt; j++ )
					{
						html[count++]		=	'<table border="0" cellpadding="2" cellspacing="0">';
						html[count++]		=	'	<tr>';
						html[count++]		=	'		<td colspan="2"><img src="skins/blue/img/px.gif" width="30" height="1" alt="" border="0"><a href="' + this.entries[i].entries[j].url + '" target="' + this.entries[i].entries[j].target + '" class="navitem">' + this.entries[i].entries[j].title + '</a></td>';
						html[count++]		=	'	</tr>';
						html[count++]		=	'</table>';

					}
				}
			}
		}
		html[count++]	=	'			</td>';
		html[count++]	=	'			<td align="right" valign="bottom"><img src="skins/blue/img/nav/ends.gif" width="24" height="74" alt="" border="0"></td>';
		html[count++]	=	'		</tr>';
		html[count++]	=	'		</table>';
		html[count++]	=	'	</td>';
		html[count++]	=	'</tr>';
		html[count++]	=	'</table>';
		html[count++]	=	'<img name="menuend" src="skins/blue/img/nav/end.gif" width="204" height="34" alt="" border="0"><br>';

		return	html;
	}

