function CDropDownMenuHelper()
{
	this.sSelectedMenu = "";
	this.aHelperDiv = new Array();
	
	this.Add = CDropDownMenuHelper_Add;
	this.MenuOver = CDropDownMenuHelper_MenuOver;
	this.MenuOut = CDropDownMenuHelper_MenuOut;
	this.Show = CDropDownMenuHelper_Show;
	this.Hide = CDropDownMenuHelper_Hide;
}

function CDropDownMenuHelper_Add( sDefaultLayerId, sAlternativeLayerId )
{
	var oTempDropDownMenuItem = new CDropDownMenuHelperItem( sDefaultLayerId, sAlternativeLayerId );
	this.aHelperDiv[ this.aHelperDiv.length ] = oTempDropDownMenuItem;
}

function CDropDownMenuHelper_Show()
{
	for( var i = 0; i < this.aHelperDiv.length; i++ )
	{
		this.aHelperDiv[ i ].Show();
	}
}

function CDropDownMenuHelper_Hide()
{
	for( var i = 0; i < this.aHelperDiv.length; i++ )
	{
		this.aHelperDiv[ i ].Hide();
	}	
}

function CDropDownMenuHelper_MenuOver( sName )
{
	this.sSelectedMenu = sName;
	this.Hide();
}

function CDropDownMenuHelper_MenuOut( sName )
{
	if( this.sSelectedMenu == sName )
	{
		this.Show();
	}
}

function CDropDownMenuHelperItem( sDefaultLayerId, sAlternativeLayerId )
{
	if( typeof( CObject ) != "undefined" )
	{
		this.oDefaultLayer = new CObject( sDefaultLayerId );
		this.oAlternativeLayer = new CObject( sAlternativeLayerId );
	}
	
	this.Hide = CDropDownMenuHelperItem_Hide;
	this.Show = CDropDownMenuHelperItem_Show;
}


function CDropDownMenuHelperItem_Hide(  )
{
	this.oDefaultLayer.SetDisplay( false );
	this.oAlternativeLayer.SetDisplay( true );
}

function CDropDownMenuHelperItem_Show(  )
{
	this.oDefaultLayer.SetDisplay( true );
	this.oAlternativeLayer.SetDisplay( false );
}