<!--
	//----------------------------------------------------
	// animated layers object declaration
	//----------------------------------------------------
	var oAnimatedLayers = new Object();
	
	//----------------------------------------------------
	// animated layer methods
	//----------------------------------------------------
							
	oAnimatedLayers.registerLayer = function( sLayer, sMask, nHeight )
	{
		var oAnimatedLayer = new Object();
		
		oAnimatedLayer.nHeight		= nHeight;
		oAnimatedLayer.nTop			= -nHeight;
		oAnimatedLayer.nOpenDelta	= 3;
		oAnimatedLayer.nOpenSpeed	= 1;
		oAnimatedLayer.bOpening		= false;
		oAnimatedLayer.bAutoClose	= true;
		oAnimatedLayer.sMask		= sMask;
		oAnimatedLayer.oTimer;
		
		oAnimatedLayers[ sLayer ] = oAnimatedLayer;				
		
		setTimeout( "hideLayer( '" + sMask + "' );", 100 );		
		
	}
	
	// continueAnimation
	oAnimatedLayers.continueAnimation = function( sLayer )
	{
		var oLayerVariables = this[ sLayer ];
		
		if( oLayerVariables )
		{
			if( ( oLayerVariables.nTop > -oLayerVariables.nHeight && !oLayerVariables.bOpening ) || ( oLayerVariables.nTop < 0 && oLayerVariables.bOpening ) )
			{
				return true;
			}
			else
			{
				if( oLayerVariables.bOpening && oLayerVariables.bAutoClose )
					setTimeout( "oAnimatedLayers.closeLayer( '" + sLayer + "')", 10000 );		
					
				return false;				
			}
		}
		
		return false;
	}
	
	// animateLayer
	oAnimatedLayers.animateLayer = function( sLayer )
	{
		var oLayerVariables 	= this[ sLayer ];
		var oLayer 				= getObject( sLayer );
		
		if( ( this.continueAnimation( sLayer ) ) )
		{
			if( oLayerVariables.bOpening )
				oLayerVariables.nTop += oLayerVariables.nOpenDelta;
			else
				oLayerVariables.nTop -= oLayerVariables.nOpenDelta;
			
			oLayer.style.top = oLayerVariables.nTop;				
			
			if( ( this.continueAnimation( sLayer ) ) )
				oLayerVariables.oTimer = setTimeout( "oAnimatedLayers.animateLayer( '" + sLayer + "')", oLayerVariables.nOpenSpeed );
			else
				if( !oLayerVariables.bOpening )
					hideLayer( oLayerVariables.sMask );
		}
	}
	
	// open layer
	oAnimatedLayers.openLayer = function( sLayer, sUrl )
	{
		var oLayerVariables = this[ sLayer ];

		showLayer( oLayerVariables.sMask );
		
		if( oLayerVariables )
		{
			oLayerVariables.bOpening = true;
				
			if( sUrl )
			{			
				// safari hack
				// window[ sLayer + 'Frame' ].location.replace( sUrl );
				setTimeout( "window[ '" + sLayer + "' + 'Frame' ].location.replace( '" + sUrl + "' );", 1 );
			}
			else
			{
				this.onLoad( sLayer );
			}
		}
	}
	
	// close layer
	oAnimatedLayers.closeLayer = function( sLayer )
	{
		var oLayerVariables 	= this[ sLayer ];
		
		if( oLayerVariables )
		{
			oLayerVariables.bOpening = false;
			this.animateLayer( sLayer );
		}
	}
	
	// on load handler
	oAnimatedLayers.onLoad = function( sLayer )	
	{
		this.animateLayer( sLayer );
	}
	
	
	//--------------------------------------------------------
	function getObject( sId )
	{
		var oObject = parent.document.getElementById( sId );
		return oObject;
	}
	
	function hideLayer( sLayerName )
	{
		var oLayer = getObject( sLayerName );
		
		if( oLayer )
		{
			oLayer.style.display 		= 'none';
			oLayer.style.visibility 	= 'hidden';			

			return true;
		}
		
		return false;
	}
	
	function showLayer( sLayerName )
	{
		var oLayer = getObject( sLayerName );
		
		if( oLayer )
		{
			oLayer.style.display 		= '';
			oLayer.style.visibility 	= 'visible';			
			
			return true;
		}
		
		return false;
	}	
	
	function isLayerVisible( sLayerName )
	{		
		var oLayer = getObject( sLayerName );
		
		if( oLayer )
			return oLayer.style.visibility == 'visible';			
		
		return false;
	}
//-->