function getElementsByClassName(clsName)
{
	if (document.getElementsByTagName)
	{
		var i, matches=new Array();
		var els=document.all?document.all:document.getElementsByTagName("*");

		for(i=0; i<els.length; i++)
		{
			if(els.item(i).className==clsName)
			{
				matches.push(els.item(i));
			}
		}
		return matches;
	}
}

if (document.all){
	function startIEList()
	{
		if (getElementsByClassName)
		{
			var ieULs = getElementsByClassName('iemenu');
			if (navigator.appVersion.substr(22,3)!="5.0")
			{
				/** IE script to cover <select> elements with <iframe>s **/
				for (j=0; j<ieULs.length; j++)
				{
					//ieULs[j].innerHTML = ('<iframe src="about:blank" scrolling="no" frameborder="0"></iframe>' + ieULs[j].innerHTML);
					ieULs[j].innerHTML = ('<iframe src="' + webRoot + 'blank.htm" scrolling="no" frameborder="0"></iframe>' + ieULs[j].innerHTML);
					var ieMat = ieULs[j].firstChild;
					ieMat.style.height="185px";
				}
			}
			
			
			var navRoot = getElementsByClassName("iehover");
			for (i=0; i<navRoot.length; i++)
			{
				node = navRoot[i];
				if (node.nodeName=="LI")
				{
					node.onmouseover=function()
					{
						this.className+=" sfhover";
						this.style.cursor="hand";
					}
					node.onclick=function()
					{
						if (this.firstChild.nodeName=="A")
						{
							window.event.cancelBubble=true;
							window.location=this.firstChild.href;
						}
					}
				}
				node.onmouseout=function()
				{
					this.className=this.className.replace(" sfhover", "");
					this.style.cursor="auto";
				}
			}

			navRoot = getElementsByClassName("iehoverspec");
			for (i=0; i<navRoot.length; i++)
			{
				node = navRoot[i];
				if (node.nodeName=="LI")
				{
					node.onmouseover=function()
					{
						this.className+=" sfhover";
						this.style.cursor="hand";
					}
					node.onclick=function()
					{
						if (this.firstChild.nodeName=="A")
						{
							window.event.cancelBubble=true;
							window.location=this.firstChild.href;
						}
					}
				}
				node.onmouseout=function()
				{
					this.className=this.className.replace(" sfhover", "");
					this.style.cursor="auto";
				}
			}

		}
	}
	if (window.attachEvent)
		window.attachEvent("onload", startIEList);
	else
		window.addEventListener('load',startIEList,false);
}
else
{
	function noPropClick(e)
	{
		e.stopPropagation();
		window.location=this.firstChild.href;
	}
	
	function startList()
	{
		if (getElementsByClassName)
		{
			navRoot = getElementsByClassName("iehover");
			for (i=0; i<navRoot.length; i++)
			{
				node = navRoot[i];
				if (node.nodeName=="LI")
				{
					if (node.firstChild.nodeName=="A")
					{
						node.addEventListener("click", noPropClick, false);
					}
					node.onmouseover=function()
					{
						if (this.firstChild.nodeName=="A")
						{
							this.style.cursor="pointer";
						}
					}
					node.onmouseout=function()
					{
						if (this.firstChild.nodeName=="A")
						{
							this.style.cursor="auto";
						}
					}
				}
			}
			
			navRoot = getElementsByClassName("iehoverspec");
			for (i=0; i<navRoot.length; i++)
			{
				node = navRoot[i];
				if (node.nodeName=="LI")
				{
					if (node.firstChild.nodeName=="A")
					{
						node.addEventListener("click", noPropClick, false);
					}
					node.onmouseover=function()
					{
						if (this.firstChild.nodeName=="A")
						{
							this.style.cursor="pointer";
						}
					}
					node.onmouseout=function()
					{
						if (this.firstChild.nodeName=="A")
						{
							this.style.cursor="auto";
						}
					}
				}
			}
			
		}
	}
	if (window.attachEvent)
		window.attachEvent("onload", startList);
	else
		window.addEventListener('load',startList,false);
}
