function openShopHelp()
{
	window.open("/produkte/shop_hilfe.php", "shophilfe" ,'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=520,height=260');
}

function addToCart(pzn)
{
	var menge = document.getElementById("menge_"+pzn).value;
	var session = document.getElementById("session_"+pzn).value;
	
	if (menge == 0) {
		alert("Eine Menge von 0 nicht leider nicht zulässig!");
		return;
	}

	var myUrl = document.forms["addToCart_"+pzn].action + "?pzn="+pzn+"&session="+session+"&menge="+menge;

	document.getElementById("menge_"+pzn).value = "0";

	gotoURL(myUrl);
}

function gotoURL( myURL ) 
{
	try {
		if ( typeof( opener ) == "undefined" || typeof( opener ) == "unknown" ||
		    	typeof( opener.name ) == "undefined" || typeof( opener.name ) == "unknown" )
		{
			if ( shopFenster.closed )	
			{
				shopFenster = window.open( myURL, "shop", "" );
//				self.focus();
				shopFenster.focus();
			}
			else 
			{
				shopFenster.location.href=myURL;
//				self.focus();
				shopFenster.focus();	
			}
		} 
		else 
		{
			opener.location.href = myURL;
			opener.blatterkatalogPopup = window;
//			self.focus();
			opener.focus();
		}
	} 
	catch ( Exception )
	{
		if( opener && !opener.closed )
		{
			opener.location.href = myURL;
//			self.focus();
			opener.focus();
		}
		else 
		{
			try {
				if ( shopFenster.closed )	
				{
					shopFenster = window.open( myURL, "shop", "" );
//					self.focus();
					shopFenster.focus();
				}
				else 
				{
					shopFenster.location.href = myURL;
//					self.focus();
					shopFenster.focus();	
				}
			} 
			catch ( Exception )
			{
					shopFenster = window.open( myURL, "shop", "" );
//					self.focus();
					shopFenster.focus();
			}
		}
	}
}


function myDivHeight() {
	if (document.getElementById("bodyLinks").offsetHeight < document.getElementById("bodyRechts").offsetHeight+68)
		document.getElementById("bodyLinks").style.height = (document.getElementById("bodyRechts").offsetHeight+45)+"px";
}
function markDel(field, layer, id)
{
	if(!confirm("Wollen Sie diese Datei wirklich entfernen?"))
		return;
	field.value = id;
	document.getElementById(layer).style.display = "none";
}
