/* navigation omo fix for IE6 */
function showli() { 
	this.firstChild.nextSibling.nextSibling.style.visibility = "visible";
}

function hideli() {
	this.firstChild.nextSibling.nextSibling.style.visibility = "hidden";
}

function hover4IE() {
	var LI = document.getElementById("mainnav").firstChild;
	do {
		/* omo for all but the selected node */
		if(LI.firstChild && LI.className.slice(0,3)!='sel') {
			if(LI.firstChild.nextSibling) {
				if(LI.firstChild.nextSibling.nextSibling) {
					LI.onmouseover=showli; 
					LI.onmouseout=hideli;
				}
			}
		} else if(LI.firstChild && LI.className.slice(0,3)=='sel') {
			/* in case of selected node, the subnodes have to have omo */
			if (LI.firstChild.nextSibling.nextSibling) {
				var LA = LI.firstChild.nextSibling.nextSibling.firstChild;
				do {
					if(LI.firstChild) {
						if(LA.firstChild.nextSibling) {
							if(LA.firstChild.nextSibling.nextSibling) {
								LA.onmouseover=showli; 
								LA.onmouseout=hideli;
							}
						}
					}
					LA = LA.nextSibling;
				}
				while(LA);
			}
		}
		LI = LI.nextSibling;
	}
	while(LI);
}

/* PNG fix for IE6  
function fixPNG(img) {
	if(img.getAttribute('src', false).match(/\.png$/i)) {
		var newDiv = document.createElement("div");
		img.parentNode.insertBefore(newDiv, img);
		newDiv.style.width = img.offsetWidth + 'px';
		newDiv.style.height = img.offsetHeight + 'px';
		newDiv.className = img.className;
		newDiv.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.getAttribute('src', false) + "', sizingMethod='crop', enabled=true)";
		img.style.display = 'none';
	}
}

function fixPNGs() {
	//replaces all pngs with class fixpng by a div
	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" && img.className.match(/\bfixpng\b/)) {
			fixPNG(img);
		}
	}
}
*/

/* onload */
function pageLoad() {
	try {
		// only for IE navigation important
		hover4IE();
		if (window.show_ads) {
			// if show_ads is a registered function (true if ads on page)
			show_ads();
		}
	} catch(err) {}
}