var ie6 = !window.getComputedStyle && navigator.appVersion.indexOf("MSIE 7") == -1;
function init_menu(){
	var root = $("left-menu");
	var parent = $T("UL", root)[0];
	var items = $T("LI", root);
	items.each(function(item){
		if(ie6){
			item.onmouseover = function(){
				if(this.className.indexOf("here") != -1){
					return
				}
				this.className = "over";
			}
			item.onmouseout = function(){
				this.className = this.className.replace("over", "");
			}
		}
		if(item.parentNode == parent){
			var dd = $C("dropdown", item, "DIV");
			if(dd){
				item.className += " initializing";
				item.link = $T("A", item)[0];
				item.dropdown = dd[0];
				item.dropdown.ul = $T("UL", item.dropdown)[0];
				item.dropdown.style.left = item.link.offsetWidth + 15 + "px";
				var max_width = 0;
				var links = $T("A", item.dropdown);
				links.each(function(link){
					if(link.offsetWidth > max_width){
						max_width = link.offsetWidth;
					}
				})

				item.dropdown.style.width = max_width + 45 + "px";				
				
				if(ie6){
					item.dropdown.top = $C("dd-top", item.dropdown, "DIV")[0];
					item.dropdown.top.corner = $C("corner", item.dropdown.top, "DIV")[0];
					item.dropdown.bottom = $C("dd-bottom", item.dropdown, "DIV")[0];
					item.dropdown.top.corner.style.left = max_width + 45 - 14 + "px";

				}
				item.className = item.className.replace("initializing", "");
			}
		}
	})
}