liltype.SFMenu = new liltype();

liltype.SFMenu = function()
{
	if (liltype.SFMenu.parent)
	{
		this.inherited = liltype.SFMenu.parent;
		this.inherited();
//		this.dbg = new liltype.dbg("dumper");
	}
}
new liltype.SFMenu();
liltype.SFMenu.prototype = new liltype();
liltype.SFMenu.parent = liltype;

/*
	Prototype methods
*/
	liltype.push(liltype.SFMenu.prototype);
		
	liltype.top().onMouseOver = function()
	{
		this.className = liltype.CNU.add(this.className, "over");
	}
	
	liltype.top().onMouseOverRoot = function()
	{
		var i, c, node, iframe, ul;
		this.className = liltype.CNU.add(this.className, "over");
	
		for (i = 0, c = this.childNodes.length; i < c; i++)
		{
			node = this.childNodes[i];
			if (node)
			{
				if (node.nodeName == "IFRAME")
				{
					iframe = node;
				}
				else if (node.nodeName == "UL")
				{
					ul = node;
				}
			}
			
			if (ul && iframe)
			{
				iframe.style.width = ul.offsetWidth+"px";
				iframe.style.height = ul.offsetHeight+"px";
				iframe.style.left = ul.offsetLeft+"px";
				iframe.style.top = ul.offsetTop+"px";
				iframe.style.display = "block";
			}
		}
	}
	
	liltype.top().onMouseOut = function()
	{
		this.className = liltype.CNU.del(this.className, "over");
	}
	
	liltype.top().onMouseOutRoot = function()
	{
		var i, c, node;
	
		this.className = liltype.CNU.del(this.className, "over");
		
		for (i = 0, c = this.childNodes.length; i < c; i++)
		{
			node = this.childNodes[i];
			if (node)
			{
				if (node.nodeName == "IFRAME")
				{
					node.style.display = "none";
				}
			}
		}
	}
	
	liltype.top().init = function(ulId)
	{
		var navRoot;
		if (document.getElementById)
		{
			navRoot = document.getElementById(ulId);
			this.initIter(navRoot, true);
		}
	}
	
	liltype.top().initIter = function(navRoot, isRoot)
	{
		var i, c, j, d;
	
		for (i = 0, c = navRoot.childNodes.length; i < c; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI")
			{
				if (isRoot)
				{
					node.onmouseover = this.onMouseOverRoot;
					node.onmouseout = this.onMouseOutRoot;
				}
				else
				{
					node.onmouseover = this.onMouseOver;
					node.onmouseout = this.onMouseOut;
				}
	
				for (j = 0, d = node.childNodes.length; j < d; j++)
				{
					if (node.childNodes[j] && (node.childNodes[j].nodeName == "UL"))
					{
						this.initIter(node.childNodes[j], false);
					}
				}
			}
		}
	}
	
	liltype.pop();
	