function initMenu(){
	var _hold = document.getElementById('nav');
	if(_hold){
		var _list = _hold.getElementsByTagName('li');
		for(var i = 0; i  < _list.length; i++){
			var _box = _list[i].getElementsByTagName('ul')[0];
			if(_box){
				var _el = _box.getElementsByTagName('li');
				_box._el = [];
				for(var j = 0; j  < _el.length; j++) if(_el[j].parentNode == _box) _box._el.push(_el[j]);
				_list[i]._box = _box;
				_list[i].onmouseover = function(){
					this.className += ' hover';
					var _w = this._box.offsetWidth;
					for(var i = 0; i  < this._box._el.length; i++){
						this._box._el[i].style.width = _w + 'px';
						if (window.attachEvent && !window.opera) this._box._el[i].getElementsByTagName('a')[0].style.height = '1%';
					}
				}
				_list[i].onmouseout = function(){
					this.className = this.className.replace('hover', '');
					for(var i = 0; i  < this._box._el.length; i++){
						this._box._el[i].style.width = 'auto';
						if (window.attachEvent && !window.opera) this._box._el[i].getElementsByTagName('a')[0].style.height = 'auto';
					}
				}
			}
			
		}
	}
	
}
if (window.addEventListener) window.addEventListener("load", initMenu, false);
else if (window.attachEvent && !window.opera) window.attachEvent("onload", initMenu);
