if(typeof(article) == "undefined" || article == null) var article = new Object();
if(typeof(article.navi) == "undefined"){
	article.navi = new Object();
	article.navi.busy = false;
	article.navi.to = null;
	article.navi.onMouseDown = function(){
		if(article.navi.busy) return;
		article.navi.busy = true;
		var ul = this.getElementsByTagName("ul")[0];
		if(typeof(ul) == "undefined") return;
		ul.style.display = (ul.style.display == "none" || ul.style.display == "") ? "block" : "none";
		article.navi.to = setTimeout(article.navi.onMouseUp,200);
	}
	article.navi.onMouseOver = function(){
	}
	article.navi.onMouseOver___ = function(){
		if(article.navi.busy) return;
		var ul = this.getElementsByTagName("ul")[0];
		if(typeof(ul) == "undefined") return;
		var items = [];
		for(var i=0;i<ul.childNodes.length;i++){
			var child = ul.childNodes[i];
			if(child.tagName.toLowerCase() == "li") items.push({li:child,display:child.style.display});
		}
		if(ul.style.display == "block" || items.length < 1) return;
		article.navi.busy = true;
		//alert("show childs "+items.length);
		for(var i=0;i<items.length;i++) items[i].li.style.display = "none";
		ul.style.display = "block";
		var next = function(){
			var itm = items.shift();
			itm.li.style.display = itm.display;
			if(items.length < 1){
				clearInterval(iv);
				article.navi.busy = false;
			}
		}
		var iv = setInterval(next,100);
	}
	article.navi.onMouseOver__ = function(){
		if(article.navi.busy) return;
		var ul = this.getElementsByTagName("ul")[0];
		if(typeof(ul) == "undefined") return;
		var items = [];
		for(var i=0;i<ul.childNodes.length;i++){
			var child = ul.childNodes[i];
			if(child.tagName.toLowerCase() == "li") items.push({li:child,display:child.style.display});
		}
		if(ul.style.display == "block" || items.length < 1) return;
		article.navi.busy = true;
		//for(var i=0;i<items.length;i++) items[i].li.style.display = "none";
		ul.style.display = "block";
		ul.style.overflow = "hidden";
		var ulHeight = ul.offsetHeight;
		ul.style.height = "0px";
		var next = function(){
			ul.style.height = (parseInt(ul.style.height)+2)+"px";
			//document.body.appendChild(document.createTextNode(ul.style.height+","+ul.offsetHeight+" >= "+ulHeight));
			//document.body.appendChild(document.createElement("br"));
			//if(parseInt(ul.offsetHeight) >= ulHeight){
			if(parseInt(ul.style.height) >= ulHeight){
				clearInterval(iv);
				article.navi.busy = false;
			}
		}
		var iv = setInterval(next,5);
	}
	article.navi.onMouseUp = function(){
		article.navi.busy = false;
		clearTimeout(article.navi.to);
	}
}

