/* for use with suckerfish menus */
/*
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
		
		if(sfEls[i].parentNode.id != 'nav')
		{
			sfEls[i].parentNode.style.marginLeft = -sfEls[i].parentNode.parentNode.clientWidth+"px";
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);
*/
/* end for use with suckerfish menus */

// fix for klapper-menu in IE6
function getIeVersion()
{
	var rv;
	var ua = navigator.userAgent;
	var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
	if (re.exec(ua) != null) {
		rv = parseFloat( RegExp.$1 );
	}
	return rv;
}	
	
if(navigator.appName.indexOf('Microsoft') != -1 && getIeVersion() < 7) {

	sfHover = function() {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(/ sfhover/g), "");
			}
			if(sfEls[i].parentNode.id != 'nav')
			{
				sfEls[i].parentNode.style.marginLeft = -sfEls[i].parentNode.parentNode.clientWidth+"px";
			}
		}
	}

	if (window.attachEvent) window.attachEvent("onload", sfHover);
}
else
{
	sfHover = function() {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			if(sfEls[i].parentNode.id != 'nav')
			{
				sfEls[i].parentNode.style.marginLeft = -sfEls[i].parentNode.parentNode.clientWidth+"px";
			}
		}
	}

	if (window.attachEvent) window.attachEvent("onload", sfHover);
}
