function startList()
{
	navRoot = $("nav");
	if (document.all&&document.getElementById&&!navigator.plugins.length)
	{
		var SubHider = $('sub_help_layer');
		for (i=0; i<navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI")
			{
				node.onclick=function(e)
				{
					if (!e)
					{
						e = window.event;
					}
					var srcItem = (e.srcElement) ? e.srcElement : e.target;
					if ((this.className.indexOf(" clicked") != -1) && (srcItem.parentNode == this))
					{
						this.className = this.className.replace(" clicked", "");
					}
					else
					{
						closeAllMain();
						this.className += " clicked";
					}
				}
				node.onmouseover=function()
				{
					this.className+=" over";
				}
				node.onmouseout=function()
				{
					this.className=this.className.replace(" over", "");
				}
				if (node.hasChildNodes())
				{
					for (j=0; j<node.childNodes.length; j++)
					{
						subnode = node.childNodes[j];
						if (subnode.nodeName=="UL")
						{
							for (k=0; k<subnode.childNodes.length; k++)
							{
								leaf = subnode.childNodes[k];
								if (leaf.nodeName=="LI")
								{
									leaf.onmouseover=function()
									{
										this.className+=" over";
										if (document.getElementById(this.id + '_sub'))
										{
											subdimensions = menuGetXY(this.id + '_sub');
											subdimensions[1] = subdimensions[1] + 1;
											SubHider.style.left=subdimensions[0] + 'px';
											SubHider.style.top=subdimensions[1] + 'px';
											SubHider.style.width=document.getElementById(this.id + '_sub').clientWidth + 3;
											SubHider.style.height=document.getElementById(this.id + '_sub').clientHeight + 2;
											SubHider.style.display='block';
											//alert('Left: ' + SubHider.style.left + ' Top: ' + SubHider.style.top + ' Display: ' + SubHider.style.display + ' width: ' + SubHider.style.width + ' height: ' + SubHider.style.height);
										}
									}
									leaf.onmouseout=function()
									{
										this.className=this.className.replace(" over", "");
										SubHider.style.display='none';
									}
								}
							}
						}
					}
				}
			}
		}
	}
	else
	{
		for (i=0; i<navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI")
			{
				node.onclick=function(e)
				{
					if (!e)
					{
						e = window.event;
					}
					var srcItem = (e.srcElement) ? e.srcElement : e.target;
					if ((this.className.indexOf("clicked") != -1) && (srcItem.parentNode == this))
					{
						this.className = this.className.replace("clicked", "");
					}
					else
					{
						closeAllMain();
						this.className += " clicked";
					}
				}
			}
		}
	}
}

function menuGetXY(ObjName)
{
	Cord = new Array();
	leftpos = document.getElementById(ObjName).offsetLeft;
	toppos = document.getElementById(ObjName).offsetTop;
	if (document.getElementById(ObjName).style.position!='absolute')
	{
		aTag = document.getElementById(ObjName);
		do
		{
			aTag = aTag.offsetParent;
			leftpos += aTag.offsetLeft;
			toppos += aTag.offsetTop;
			if (aTag.style.position=='absolute')
			{
				leftpos -= aTag.offsetLeft;
				toppos -= aTag.offsetTop;
				break;
			}
		} while(aTag.tagName!="BODY" && aTag.tagName!="HTML");
	}
	Cord[0]=leftpos;
	Cord[1]=toppos;
	return Cord;
}
function closeAllMain()
{
	var navRoot = $("nav");
	for (var i=0; i<navRoot.childNodes.length; i++)
	{
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI")
		{
			node.className = node.className.replace(" clicked", "");
			node.className = node.className.replace("clicked", "");
		}
	}
}
