function couponAktivieren(couponCode) {
	//document.getElementById("inhalt_fx").innerHTML = '<iframe src="/control/addpromocode/showcart?productPromoCodeId='+couponCode+'" width="1" height="1" frameborder="0"></iframe>';
	$('#inhalt_fx').append('<iframe src="/control/addpromocode/showcart?productPromoCodeId='+couponCode+'" width="1" height="1" frameborder="0"></iframe>');
}

function trimmen(str){
	while(str.substring(0,1)==' ')str=str.substring(1,str.length);
	while(str.substring(str.length-1,str.length)==' ')str=str.substring(0,str.length-1);
	return str;
}
function geschenkWaehlen(produktNr) {
	var anzahlWaren = 0;
	var prodWarenkorb ="";
	if (readCookie("persistcart")) {
		prodWarenkorb = readCookie("persistcart");
		var splitWarenkorb = prodWarenkorb.split("|");
		anzahlWaren = (splitWarenkorb.length) - 3;
		if (anzahlWaren < 1) {
			anzahlWaren = 0;
		}
	} else {
		anzahlWaren = 0;
	}
	$('#inhalt_fx').append('<iframe src="/control/setDesiredAlternateGwpProductId?alternateGwpProductId='+produktNr+'&alternateGwpLine='+anzahlWaren+'" name="geschenkWaehlen" width="0" height="0" frameborder="0"></iframe>');
}
function grafikZeichnen(trackNr_1,trackNr_2) {
	var uri = 'http://impde.tradedoubler.com/imp?type(js)pool('+trackNr_1+')a('+trackNr_2+')' + new String (Math.random()).substring (2, 11);
	document.write('<sc'+'ript type="text/javascript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
}

/* <![CDATA[ */
function cmFlashRedirect(myURL, myName){
		// myURL is the url (relative or absolute) that the link points to
		// myName is the name by which CoreMetrics will identify this link in reporting
		cmCreateManualLinkClickTag(myURL, myName);
		window.location = myURL;
}
function buyProduct(artikel,anzahl) {
	ajoutpanier = new function() {
		return addToCartModal(artikel,anzahl,'','','','','','laden...','/control/addtocartpopin/~product_id='+artikel+'/~quantity='+anzahl+'/?cmSrc=Landingpage','');
	}
}
/*function bwgeschenkpopin(xbetrag) {
	var wMitte = ($(window).width()/2)-(380/2);
	var hMitte = ($(window).height()/2)-(430/2);
	$('#container').append('<div id="bwpopin"></div>');
	$('#bwpopin').append('<div id="inahlt"></div>');
	$('#inahlt').append('<img src="/images/templates/gfx/empty_pixel.gif" id="schliessen" />');
	$('#inahlt').append('<div id="inahlttext"></div>');
	$('#inahlttext').append('<p class="inahlttext">Nur noch €'+xbetrag+' und Sie erhalten Ihre 6 Schälchen mit Tablett <span class="inahlttext_highlight">GRATIS</span></p>');
	$('bwpopin').toggle('slow',function() {
		$(this).css("left",wMitte);
		$(this).css("top",hMitte);
		$('#inahlt #schliessen').click(function() {
			$('bwpopin').toggle('slow');
			//setTimeout("$('bwpopin').toggle('slow');",5000);
		});
	})
}
*//* ]]> */

