function openWin(url, width, height)
{
	window.open(url,'popUpFenster','width='+width+',height='+height+',scrollbars=0,status=0,resizable=0');
}

function openCatalog(name)
{	
	var width = screen.width;
	if (width>1024) width=1275;
	window.open('kataloge/'+name+'/index.html','catalogWindow','width=' + width + ',height=' + screen.height + ',left=' + screen.availWidth-width/2 + ',scrollbars=0,resizable=1');
}
/*
 * kategorie: Gibt eine der Kategorien an (Damen, Herren, Sale, Blog oder Default)
 * show: boolscher Wert der angibt ob das Hintergrundbild angezeigt werden soll oder nicht
 */
function hover(elem,show,kategorie){
	
	var first_nav_elem = getPrevious(elem);
	
	if (show==true && first_nav_elem != null){
		var img_url="templates/Rumpf/gfx/hover-";
		switch (kategorie){
			case "Damen"||"women":
				img_url=img_url+"damen.png";
			break;
			case "Herren"||"men":
				img_url=img_url+"herren.png";
			break;
			case "Sale"||"sale":
				img_url=img_url+"sale.png";
			break;
			case "Blog"||"blog":
				img_url=img_url+"blog.png";
			break;
			default:
				img_url=img_url+"default.png";
		}
		elem.style.backgroundImage = "url("+img_url+")";
	}
	else{
		elem.style.backgroundImage = "none";
	}
}
function getPrevious(el) {
	function isIgnorable(node) {
		// is a comment or contains only whitespace
		return (node.nodeType == 8 || /^[\t\n\r ]+$/.test(node.data));
	}

	var prev = el;
	while (prev = prev.previousSibling) {
		if (!isIgnorable(prev)) break;
	}

	return prev;
}

