function changeit(what, id) {
	var textfield = what.match(/_text/g);
	//alert (textfield);
	if (id == '' && textfield != '_text') return false;
	else if (id == '' && textfield == '_text') id = ' ';
	if (!document.getElementById("prevImg")) return false;
	var uri = "/img.php?"+what+"="+ escape(id) + "&r=" + Math.random();
	
	document.getElementById("prevImg").src= uri;
	if (what == 'prod') window.location.href = window.location.pathname + "?prod=" + id ;
	updatePrice();
	
}


function showHide(id,mydisplay) {

	if (mydisplay == '') var mydisplay = 'block';
	if(document.getElementById(id) && document.getElementById(id).style.display == "none") {
		document.getElementById(id).style.display = mydisplay;
		return;
	}
	if(document.getElementById(id) && document.getElementById(id).style.display == mydisplay) {
		document.getElementById(id).style.display = "none";
		return;
	}
}


function hideMsg () {
	if (document.getElementById("msg") && document.getElementById("msg").style.display != "none") {
		document.getElementById("msg").style.display = "none";
		window.clearInterval(aktiv);
	}
}

function kaufm(x) {
  var k = (Math.round(x * 100) / 100).toString();
  k += (k.indexOf(".") == -1)? ".00" : "00";
  return k.substring(0, k.indexOf(".") + 3);
}

