var menu = document.getElementById('sidemenu');

pid = location.href;

if(pid.indexOf('pid=') > 0)
{
	pidStart = pid.indexOf('pid=');
	pidLength = pid.indexOf('&', pidStart);
	pid = pid.substring(pidStart,pidLength);

	for(i=0;i<menu.childNodes.length;i++)
	{
		if(menu.childNodes[i].nodeName == 'LI')
		{
			var activeLI = false;
			var currentLI = menu.childNodes[i];
			for(j=0;j<currentLI.childNodes.length;j++)
			{
				if(currentLI.childNodes[j].className == 'dropbox_top')
				{
					var dropboxtop = currentLI.childNodes[j];
					for(l=0;l<dropboxtop.childNodes.length;l++)
					{
						if(dropboxtop.childNodes[l].nodeName == 'A')
						{
							var thisLink = dropboxtop.childNodes[l].href;
							if(thisLink.indexOf(pid)>0)
							{
								currentLI.className = "over"
								activeLI = true;
							}
						}
					}
				}
				if(currentLI.childNodes[j].className == 'dropbox_content' && activeLI)
				{
					currentLI.childNodes[j].style.display = 'block';
					activeDiv = currentLI.childNodes[j];
				}
			}
		}
	}
}
