function tracking(url) {
	url = url.replace(/\#/g, '.');
	url = url.replace(/\|/g, '/');
	url = url.replace(/\_auf_Rechnung_bestellen_/g, 'http:');
	url = url.replace(/\_rechung_rechnug_/g, 'partners.webmasterplan.com');
	url = url.replace(/\y89/g, 'www');
	url = url.replace(/\y87/g, 'zanox');
	fenster = window.open();
	fenster.window.location = url;
	return true;
}


function tracking2(url) {
	url = url.replace(/\#/g, '.');
	url = url.replace(/\|/g, '/');
	url = url.replace(/\_auf_Rechnung_bestellen_/g, 'http:');
	url = url.replace(/\_rechung_rechnug_/g, 'partners.webmasterplan.com');
	url = url.replace(/\y89/g, 'www');
	url = url.replace(/\y87/g, 'zanox');
	return url;
}


function tracking3(link, newurl) {
	link.href2=link;
	link.href=newurl;
}


function zeigeGutschein(shopId, code, actionId, node, url, fname1) {
	
	var p = node.parentNode.tagName;
	var cont = document.createElement("iframe");
	cont.setAttribute("src",url);
	cont.setAttribute("width","0px");
	cont.setAttribute("scroll","auto");
	cont.setAttribute("height","0px");
	cont.setAttribute("style","border:none; visibility: hidden;");
	
	document.getElementById("lk"+shopId).appendChild(cont);
//	document.getElementById("couponCon"+actionId).nodeValue =' ';
	var coupon = document.getElementById("coupon"+actionId);
	coupon.firstChild.nodeValue = code;
	node.href = url;
	node.target = '_blank'
	node.onclick = '';
	node.firstChild.nodeValue ='Jetzt bestellen mit Gutschein-Code:';
	
	return false;
}

/**
 * Zeigt auf eine Einstiegsseite z.B. www.lensbeste.de/amazon/
 * 
 * 
 * @param shopId
 * @param code
 * @param actionId
 * @param node
 * @param url
 * @param fname1
 * @return
 */
function zeigeEinstiegSeite(shopId, einstiegUrl, actionId, node, url, fname1) {
	
	var p = node.parentNode.tagName;
	var cont = document.createElement("iframe");
	cont.setAttribute("src",url);
	cont.setAttribute("width","0px");
	cont.setAttribute("scroll","auto");
	cont.setAttribute("height","0px");
	cont.setAttribute("style","border:none; visibility: hidden;");
	
	document.getElementById("lk"+shopId).appendChild(cont);
//	document.getElementById("couponUrl"+actionId).nodeValue =' ';
	
	var coupon = document.getElementById("coupon"+actionId);
	coupon.firstChild.nodeValue = '';
	node.href = einstiegUrl;
	node.target = '_blank'
	node.onclick = '';
	node.firstChild.nodeValue ='Ihr Gutschein wurde in den Warenkorb gelegt!';
	window.open(einstiegUrl,'','','');

	return false;
}

function Lesezeichen(SeitenTitel, SeitenURL, Kommentar)
{
	 if (window.sidebar)
	    {
	    // firefox
	    window.external.addPanel(SeitenTitel,SeitenURL,Kommentar);
	    }
	  else if(window.opera && window.print)
	    {
	    // opera
	    var elem = document.createElement('a');
	    elem.setAttribute('href',SeitenURL);
	    elem.setAttribute('title',SeitenTitel);
	    elem.setAttribute('rel','sidebar');
	    elem.click();
	    }
	  else if(document.all)
	    {
	    // ie
	    window.external.AddFavorite(SeitenURL,SeitenTitel);
	    }
}





