function mlTab( container, index )
{
	var form = document.forms[ 0 ];
	var h = form[ ( container + "_h" ) ];
	var sa = eval( container + "_sa" );
	var currentIndex = h.value;
	var tabCount = Number( sa[ 1 ] );

	if( index >= 0 && index != currentIndex )
	{
		var active = findObj( container + "_" + index );

		active.className = sa[ 18 ];

		var activeLayer = findObj( sa[ 0 ] + "_" + index )

		if( activeLayer != null )
		{
			activeLayer.style.display = "block";
		}

		var activeLeftSep = findObj( container + "_" + index + "_il" );
		if ( activeLeftSep != null )
		{
			if ( index < 2 && tabCount > 2 || tabCount == 2 )
				activeLeftSep.src = sa[ 8 ];
			else
				activeLeftSep.src = sa[ 2 ];
		}

		var activeLeftSepTd = findObj( container + "_" + index + "_l" );
		if ( activeLeftSepTd != null )
		{
			activeLeftSepTd.className = sa[ 18 ];
		}

		var activeRightSepTd = findObj( container + "_" + index + "_r" );
		if ( activeRightSepTd != null )
		{
			activeRightSepTd.className = sa[ 18 ];
		}

		var activeRightSep = findObj( container + "_" + index + "_ir" );
		if ( activeRightSep != null )
		{
			if ( index < 2 && tabCount > 2 || tabCount == 2 )
				activeRightSep.src = sa[ 10 ];
			else
				activeRightSep.src = sa[ 5 ];
		}
		
		var vSepTdLeft = findObj( container + "_" + index + "_vl" );
		if ( vSepTdLeft != null )
		{
			vSepTdLeft.className = sa[ 22 ];
		}

		var vSepTdRight = findObj( container + "_" + index + "_vr" );
		if ( vSepTdRight != null )
		{
			vSepTdRight.className = sa[ 22 ];
		}

		var vSepImgLeft = findObj( container + "_" + index + "_ivl" );
		if ( vSepImgLeft != null )
		{
			vSepImgLeft.src = sa[ 24 ];
		}

		var vSepImgRight = findObj( container + "_" + index + "_ivr" );
		if ( vSepImgRight != null )
		{
			vSepImgRight.src = sa[ 26 ];
		}

		var activeLink = findObj( container + "_" + index + "_a" );
		activeLink.className = sa[ 20 ];

		activeLink.blur();
	}

	var bLeftImg = findObj( container + "_" + tabCount + "_il" );
	if ( bLeftImg != null )
	{
		bLeftImg.src = ( tabCount > 2 ? index == tabCount - 1 : index == tabCount - 2 ) ? sa[ 12 ] : sa[ 13 ];
	}

	var bRightImg = findObj( container + "_" + tabCount + "_ir" );
	if ( bRightImg != null )
	{
		bRightImg.src = ( index == tabCount - 1 ) ? sa[ 14 ] : sa[ 15 ];
	}
	
	var bottomMiddleSep = findObj( container + "__ibm" );
	if ( bottomMiddleSep != null )
	{
		bottomMiddleSep.src = ( Number( index ) == ( tabCount - 2 ) ) ? sa[ 16 ] : sa[ 17 ];
	}

	for ( i = 0; i < tabCount; i++ )
	{
		if( i != index )
		{
			//var isUnderActive = ( i == tabCount - 1 ) ? ( i == Number( index ) + 2 ) : ( i == Number( index ) + 1 );

			var passive = findObj( container + "_" + i );

			passive.className = sa[ 19 ];

			var passiveLayer = findObj( sa[ 0 ] + "_" + i )

			if( passiveLayer != null )
			{
				passiveLayer.style.display = "none";
			}

			var passiveLeftSep = findObj( container + "_" + i + "_il");
			if ( passiveLeftSep != null )
			{
				if ( i < 2 && tabCount > 2 || tabCount == 2 )
					passiveLeftSep.src = sa[ 9 ];
				else
					passiveLeftSep.src = ( ( Number( index ) == 0 && i == 2 ) || ( Number( index ) == 2 && i == 3 ) ) ? sa[ 3 ] : sa[ 4 ];
			}

			var passiveLeftSepTd = findObj( container + "_" + i + "_l");
			if ( passiveLeftSepTd != null )
			{
				passiveLeftSepTd.className = sa[ 19 ];
			}

			var passiveRightSepTd = findObj( container + "_" + i + "_r");
			if ( passiveRightSepTd != null )
			{
				passiveRightSepTd.className = sa[ 19 ];
			}

			var vSepTdLeft = findObj( container + "_" + i + "_vl" );
			if ( vSepTdLeft != null )
			{
				vSepTdLeft.className = sa[ 23 ];
			}

			var vSepTdRight = findObj( container + "_" + i + "_vr" );
			if ( vSepTdRight != null )
			{
				vSepTdRight.className = sa[ 23 ];
			}

			var vSepImgLeft = findObj( container + "_" + i + "_ivl" );
			if ( vSepImgLeft != null )
			{
				vSepImgLeft.src = sa[ 25 ];
			}

			var vSepImgRight = findObj( container + "_" + i + "_ivr" );
			if ( vSepImgRight != null )
			{
				vSepImgRight.src = sa[ 27 ];
			}

			var passiveRightSep = findObj( container + "_" + i + "_ir");
			if ( passiveRightSep != null )
			{
				if ( i < 2 && tabCount > 2 || tabCount == 2 )
					passiveRightSep.src = sa[ 11 ];
				else
					passiveRightSep.src = ( ( Number( index ) == 1 && i == 2 ) || ( Number( index ) == 2 && i == 3 ) ) ? sa[ 6 ] : sa[ 7 ];
			}

			var hideLink = findObj( container + "_" + i + "_a");
			hideLink.className = sa[ 21 ];
		}
	}
	
	h.value = index;
}
