

function pngBugfix() {
	var arVersion = navigator.appVersion.split("MSIE");
	var version = parseFloat(arVersion[1]);
	if ((version >= 5.5) && (document.body.filters)) {
		for(var i = 0; i < document.images.length; i++) {
			var img = document.images[i];
			var imgName = img.src.toUpperCase();
			if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
				var imgID = (img.id) ? "id='" + img.id + "' " : "";
				var imgClass = (img.className) ? "class='" + img.className + "' " : "";
				var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
				var imgStyle = "display:inline-block;" + img.style.cssText;
				var strNewHTML = "<span " + imgID + imgClass + imgTitle;
				+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";";
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader";
				+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
				img.outerHTML = strNewHTML;
				i = i - 1;
			}
		}
	}
}

function setOnClickEvent(parentItem) {
	var LI = parentItem.firstChild.firstChild;
	do {
		LI.firstChild.onclick = hide;
		LI = LI.nextSibling;
	}
	while(LI);
}
function show() {
	hideAll();
	this.nextSibling.nextSibling.style.display = "block";
}
function hide() {
	this.parentNode.parentNode.parentNode.style.display = "none";
}
function hideAll() {
	var TD = document.getElementById("menucolumn-1");
	do {
		if(TD.firstChild) {  // a or img
			if(TD.firstChild.nextSibling) {  // #text
				if(TD.firstChild.nextSibling.nextSibling) { 
					TD.firstChild.nextSibling.nextSibling.style.display = "none";
				}
			}
		}
		TD = TD.nextSibling;
	}
	while(TD);
}
function menuBugfix() {
	var TD = document.getElementById("menucolumn-1");
	do {
		if(TD.firstChild) {  // a or img
			if(TD.firstChild.nextSibling) {  // #text
				if(TD.firstChild.nextSibling.nextSibling) {  // div
					TD.firstChild.onmouseover=show;
					setOnClickEvent(TD.firstChild.nextSibling.nextSibling);
					TD.firstChild.nextSibling.nextSibling.firstChild.style.position = "absolute";
				}
			}
		}
		TD = TD.nextSibling;
	}
	while(TD);
	hideAll();
}

function bugfixes() {
	menuBugfix();
// 	pngBugfix();
}