	var stepCol = 7;
	var stepExp = 5;
	var timeCol = 5;
	var timeExp = 5;
	var mh = new Array( );
	
	function initMenu( )
	{
		for( i=0; i<mi.length; i++ )
		{
			if( document.getElementById( mi[i] ) )
			{
				mh[i] = document.getElementById( mi[i] ).scrollHeight;
				collapse( mi[i] , 0 );
			}
		}
	}
	
	function collapse( id , type )
	{
		
		if( document.getElementById( id ) )
		{
			if( type == 0 )
			{
				document.getElementById( id ).style.overflow = 'hidden';
			}
			
			if( type == 0 )
			{
				var height = document.getElementById( id ).scrollHeight;
			}
			else {
				var height = document.getElementById( id ).style.height.substr( 0 , (-2+document.getElementById( id ).style.height.length) );
			}
			
			if( height > stepCol )
			{
				document.getElementById( id ).style.height = (parseInt(height)-stepCol) +'px';
				setTimeout( "collapse( '"+ id +"' , 1 );" , timeCol );
			}
			else {
				document.getElementById( id ).style.display = 'none';
			}
		}
	}
	
	function expand( id , height , type )
	{
		if( document.getElementById( id ) )
		{
			if( type == 0 )
			{
				collapseAll( id );
				document.getElementById( id ).style.overflow = 'hidden';
				document.getElementById( id ).style.display = '';
			}
			
			var cheight = document.getElementById( id ).style.height.substr( 0 , (-2+document.getElementById( id ).style.height.length) );
			
			if( cheight < height )
			{
				
				document.getElementById( id ).style.height = (parseInt(cheight)+stepExp) +'px';
				setTimeout( "expand( '"+ id +"' , '"+ height +"' , 1 );" , timeExp );
			}
			else {
				document.getElementById( id ).style.height = height +'px';
			}
		}
	}
	
	function collapseAll( id )
	{
		for( i=0; i<mi.length; i++ )
		{
			if( mi[i] != id )
			{
				if( document.getElementById( id ) )
				{
					collapse( mi[i] , 0 );
				}
			}
		}
	}

