	// ab- und anstellen ------------------------------
	function imgon(who){
		document.getElementById(who).style.visibility = "visible";
	}
	function imgof(who){
		document.getElementById(who).style.visibility = "hidden";
	}

	// ab- und anstellen ------------------------------
	function display(who){
		document.getElementById(who).style.display = "block";
	}
	function noDisplay(who){
		document.getElementById(who).style.display = "none";
	}

	function showHide (who)
	{
		if (document.getElementById(who).style.display == "none")
		{
			display(who);
		}
		else
		{
			noDisplay(who);
		}
	}


	// get scroll position
	function getScrollPosition()
	{
		var detect = navigator.userAgent.toLowerCase();
		place = detect.indexOf('msie');
		if (place >= 0)
		{
			return document.body.scrollTop;
		}
		else
		{
			return window.pageYOffset;
		}
	}

	// scroll to an y value,
	function scroll_y (value)
	{
		window.scrollTo(0, value);
	}

	function hideBasketItem (small, big)
	{
		var detect = navigator.userAgent.toLowerCase();
		place = detect.indexOf('safari');
		if (place >= 0)
		{
			documentH = document.documentElement.offsetHeight;
			innerH = window.innerHeight;
			if (innerH + getScrollPosition() > documentH - 159 - 8)
			{
				scroll_y (documentH - innerH - 159 - 8);
			}
		}
		showHide(big);
		showHide(small);
	}

	filters = new Object();
	timeouts = new Object();
	function filterOut (filter)
	{
		clearTimeout(timeouts[filter]);
		if (filters[filter] == "on")
		{
			filters[filter] = "die";
			timeouts[filter] = window.setTimeout("filterOff('"+filter+"')", 500);
		}
	}
	function filterIn(filter)
	{
		clearTimeout(timeouts[filter]);
		//alert("in: "+filter+filters[filter]);
		if (filters[filter] == "die")
		{
			filters[filter] = "on";
			imgon("filter"+filter);
		}
	}
	function filterOn(filter)
	{
		clearTimeout(timeouts[filter]);
		filters[filter] = "on";
		imgon("filter"+filter);
	}
	function filterOff(filter)
	{
		clearTimeout(timeouts[filter]);
		if (filters[filter] == "die")
		{
			//alert("filterOff: "+filter);
			filters[filter] = "off";
			imgof("filter"+filter);
		}
	}
	function filterSwitch (filter)
	{
		clearTimeout(timeouts[filter]);
		if (document.getElementById("filter"+filter).style.visibility == "hidden")
		{
			imgon("filter"+filter);
			filters[filter] = "on";
		}
		else
		{
			imgof("filter"+filter);
			filters[filter] = "off";
		}
	}


	function switchMe (who, newState, mode)
	{
		if (newState == 'a')
		{
			if (mode == "display")
			{
				display(who+"_a");
				noDisplay(who+"_i");
			}
			else
			{
				imgon(who+"_a");
				imgof(who+"_i");
			}
		}
		else
		{
			if (mode == "display")
			{
				display(who+"_i");
				noDisplay(who+"_a");
			}
			else
			{
				imgon(who+"_i");
				imgof(who+"_a");
			}
		}
	}

	function allOffWithout(containerId, onId){
		// big
		var cont = document.getElementById(containerId);
		var children = cont.getElementsByTagName("div");
		k=0;
		for (i=0; i<children.length; i++)
		{
			//if (children[i].id != onId && children[i].id > 0)
			//if (children[i].id == containerId+k)
			var id = children[i].id;
			if (id.length > 0)
			{
				imgof(children[i].id);
				k++;
			}
		}

		imgon(onId);
		var on = document.getElementById(onId);
		var children = on.getElementsByTagName("div");
		for (i=0; i<children.length; i++)
		{
			//if (children[i].id != onId && children[i].id > 0)
			//if (children[i].id == containerId+k)
			var id = children[i].id;
			if (id.length > 0 && id.indexOf("_i") > -1)
			{
				imgon(children[i].id);
				k++;
			}
		}

	}


	// für forms
	function checktToEmpty(input, daDefault)
	{
		if (input.value == daDefault)
		{
			input.value = "";
		}
	}
	// für forms<div></div>
	function checkValueEmpty(input, daDefault)
	{
		if (!input.value.length > 0)
		{
			input.value = daDefault;
		}
	}


	// für basket
	function updateAmount(source, targetId)
	{
		var value = source.value;
		document.getElementById(targetId).value = value;
		document.getElementById(targetId+"Big").value = value;
		document.getElementById(targetId+"Small").value = value;
	}

	function attributeOver(name)
	{
		currentAttribute = name;
		imgon(name);
		positionAttributeInfo();
		attributeInterval = setInterval("positionAttributeInfo()", 23);
	}

	function attributeOut(name)
	{
		//alert("out");
		imgof(name);
		clearInterval(attributeInterval);
	}

	document.onmousemove = mouse;
	function mouse(e){
		//mouseX = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
		//mouseY = (document.all) ? window.event.y + document.body.scrollTop : e.pageY;
		mouseX = (document.all) ? window.event.x + document.body.scrollLeft : e.layerX;
		mouseY = (document.all) ? window.event.y + document.body.scrollTop : e.layerY;
	}

	function positionAttributeInfo()
	{
		var info = document.getElementById(currentAttribute);
		info.style.left = mouseX+8;
		info.style.top = mouseY-38;
	}


	function addToBasket(checkFieldId, message)
	{
		if (checkFieldId.length > 0)
		{
			if (document.getElementById(checkFieldId).value > 0)
			{
				document.forms.addToBasket.submit();
				return;
			}
			else
			{
				alert(message);
				return;
			}
		}
		document.forms.addToBasket.submit();
	}

	function updatePrice(dropdown, totalAmount)
	{
		for(i=0; i<=totalAmount; i++)
		{
			noDisplay("price"+i);
		}
		display("price"+dropdown.selectedIndex);
	}



/* very nice function from die-gestalten.de. thx */
function popup(url, w, h, f, x, y){
	if(navigator.userAgent.indexOf("Safari") != -1){
		w = w - 2;
	}
	var day = new Date();
	var id = day.getTime();
	var name = "ilovefu" + id;

	if(x == null){
		x = Math.round((screen.availWidth-w)/2);
	}
	if(y == null){
		y = Math.round((screen.availHeight-h)/2);
	}
	var features = "width="+w+",height="+h+",left="+x+",top="+y+",screenX="+x+",screenY="+y+",toolbar=no,location=no,status=no,history=no,titlebar=no,alwaysRaised";

	if(f != null){
		features += "," + f;
	}

	eval("var win"+id+" = window.open('"+url+"', '"+name+"', '"+features+"');");
	eval("win"+id+".moveTo("+x+","+y+");");
	eval("win"+id+".focus();");
}

function open_print_version(url, width, height) {
	//popup(url,width,height, 'resizable=yes,scrollbars=yes,,menubar=yes')
	w = window.open(url,'popupwin' +width+height,'width='+width+',height='+height+',location=yes,locationbar=yes,menubar=yes,resizable=yes,status=yes, scrollbars=yes,toolbar=no,directories=no,screenX=50,screenY=50');
	w.focus();
}
