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 (window.attachEvent) window.attachEvent("onload", sfHover);

//Versteckten Text aufklappen
function toggledisplay (id, indicator){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		var pic = document.getElementsByName(indicator);
		obj.style.display = (obj.style.display=='block'?'none':'block');
		pic[0].src = (obj.style.display=='block'?'media/quadrat-mit-hacken_rot.jpg':'media/quadrat-mit-hacken.jpg');
	} else if(document.all) { // IE
		id.style.display = (id.style.display=='block'?'none':'block');
		indicator.src = (id.style.display=='block'?'media/quadrat-mit-hacken_rot.jpg':'media/quadrat-mit-hacken.jpg');
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = (document.id.style.display=='block'?'none':'block');
		document.indicator.src = (document.id.style.display=='block'?'media/quadrat-mit-hacken_rot.jpg':'media/quadrat-mit-hacken.jpg');
	}
}

function popup(url,myWidth,myHeight) {
	var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    myTop = (myTop/5)*3;
	options = "scrollbars=no,status=yes,width="+myWidth+",height="+myHeight+",top="+myTop+",left="+myLeft;
	Win = window.open(url,"Popup", options);
	Win.focus();
}

function showInfo(fileName) {
	switch (fileName) {
		case 'kundeninformationen':
		case 'datenschutzerklaerung':
		case 'agb':
			var dir = 'shopfiles';
			var width = 500;
			var height = 600;
			break;
		default:
			return false;
			break;
	}

	options = "scrollbars=yes, location=no, status=no, width="+width+",height="+height;
	var win = window.open(dir + '/' + fileName + '.html', "Informationen", options);
	win.focus();
}