function initMenu() {
	var menuEl = document.getElementById('menu');
	var menuItems = menuEl.childNodes
	var menuLength = menuItems.length;
	for (i = 0; i < menuLength; i++) {
		/*
		//init alpha
		var s = document.getElementById('submenu'+(i+1));
		if (s) {
			s.style.filter = 'Alpha(Opacity=0)';
		}
		*/

		var anchor = menuItems[i];
		anchor.onmouseover = function() {
			for (j = 0; j < menuLength; j++) {
				var s = document.getElementById('submenu'+(j+1));
				if (s) {
					s.style.display = 'none';
				}
			}
			var sub = document.getElementById('submenu'+parseInt(this.className.substr(4,1)));
			if (sub) sub.style.display = 'block';
		}
	}
}
function fadeIn(eid) {
	var el = document.getElementById(eid);
	var alpha = parseInt(el.style.filter.substr(14,3));
	if (alpha <= 0) {
		el.style.display = 'block';
	}
	else if (alpha >= 100) {
		return;
	}

	alpha += 10;
	if (alpha > 100) alpha = 100;

	el.style.filter = 'Alpha(Opacity=' + alpha + ')';
	setTimeout('fadeIn(\''+eid+'\')', 1);
}
function fadeOut(eid) {
	var el = document.getElementById(eid);
	var alpha = parseInt(el.style.filter.substr(14,3));
	if (alpha <= 0) {
		el.style.display = 'none';
		return;
	}

	alpha -= 10;
	if (alpha < 0) alpha = 0;

	el.style.filter = 'Alpha(Opacity=' + alpha + ')';
	setTimeout('fadeOut(\''+eid+'\')', 1);
}
function IE_enablePng(img) {
	img.style.display = "inline";
	if (typeof(img.style.filter) == "string") {
		img.style.width = img.offsetWidth + "px";
		img.style.height = img.offsetHeight + "px";
		img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src + "', sizingMethod='scale')";
		setTimeout(function() {
		}, 1);
		img.src = "/korea/imgs/blank.gif";
	}
}
