if(navigator.appName != 'Microsoft Internet Explorer') {
	window.captureEvents(Event.RESIZE);
	window.onresize = enable_nav;
}

function enable_nav() {
	var uls = document.getElementsByTagName('UL');
	if(navigator.appName == 'Microsoft Internet Explorer') {
		var Hoehe = window.document.getElementById('border_bg').clientHeight - 224;
		for(i = 0; i < uls.length; i++) {
			if(uls[i].className == 'nav_dropdown') {
				var lis = uls[i].getElementsByTagName('li');
				for(i = 0; i < lis.length; i++) {
					var as = lis[i].getElementsByTagName('a');
					if(lis[i].lastChild.tagName == 'UL' && lis[i].parentNode.className == 'nav_dropdown' && lis[i].className != 'active') {
						as[0].onmouseover = function() {
							this.parentNode.style.background = '#000 url(/img/ru/menu_back_arrow_hover.gif) no-repeat';
						}

						as[0].onmouseout = function() {
							this.parentNode.style.background = '#282 url(/img/ru/menu_back_arrow.gif) no-repeat';
						}

						lis[i].onmouseover = function() {
							this.lastChild.style.display = 'block';
							Hoehe = window.document.getElementById('border_bg').clientHeight - 224;
							this.lastChild.style.height = Hoehe;
						}

						lis[i].onmouseout = function() {
							this.lastChild.style.display = 'none';
						}

					} else if(lis[i].lastChild.tagName == 'UL' && lis[i].parentNode.className == 'nav_dropdown') {

						lis[i].onmouseover = function() {
							this.lastChild.style.display = 'block';
							Hoehe = window.document.getElementById('border_bg').clientHeight - 224;
							this.lastChild.style.height = Hoehe;
						}

						lis[i].onmouseout = function() {
							this.lastChild.style.display = 'none';
						}
					}
				}
			}
		}

		for(i = 0; i < uls.length; i++) {

			if(uls[i].className == 'mini_nav') {

				lis = uls[i].getElementsByTagName('li');

				for(i = 0; i < lis.length; i++) {

					if(lis[i].className != 'active') {

						lis[i].onmouseover = function() {
							this.style.background = '#000 url(/img/ru/menu_back_hover.gif) no-repeat';
						}

						lis[i].onmouseout = function() {
							this.style.background = '#282 url(/img/ru/menu_back.gif) no-repeat';
						}
					}
				}
			}
		}

	} else {

		Hoehe = window.document.getElementById('border_bg').offsetHeight-224;
		
		uls = document.getElementsByTagName('UL');

		for(var i = 0; i < uls.length; i++) {

			if(uls[i].className == 'nav_dropdown') {
			var uuls = uls[i].getElementsByTagName('ul');

			for(i = 0; i < uuls.length; i++) {

				if(uuls[i].parentNode.parentNode.className == 'nav_dropdown')
					uuls[i].style.height = Hoehe+"px";

				}
			}
		}
	}
}