document.WM = new Object();
document.WM.menu = new Object();
document.WM.menu.dropdown = new Array();

function WM_initializeToolbar()
{
	var i;
	if (document.all)
	{
		for(i = 0; i < document.all('contentPane').all.length; i++)
		{
			if ((document.all('contentPane').all[i].className == 'contentHeader') || (document.all('contentPane').all[i].className == 'contentLinks'))
			{
				document.WM.menu.dropdown[document.WM.menu.dropdown.length] = document.all('contentPane').all[i];
			}
		}
	}
	else if (document.getElementsByTagName && document.getElementById)
	{
		var contained = document.getElementById('contentPane').getElementsByTagName('div');
		for(i = 0; i < contained.length; i++)
		{
			if ((contained[i].getAttribute('class') == 'contentHeader') || (contained[i].getAttribute('class') == 'contentLinks'))
			{
				document.WM.menu.dropdown[document.WM.menu.dropdown.length] = contained[i];
			}
		}
	}
}

function WM_collapse(item)
{
	if(document.WM.menu.dropdown.length)
	{
		if (document.WM.menu.dropdown[item + 1].style.display == 'none')
		{
			document.WM.menu.dropdown[item + 1].style.display = '';
		}
		else
		{
			document.WM.menu.dropdown[item + 1].style.display = 'none';
		}
	}
}

window.onload=WM_initializeToolbar;


