//IVW
document.write('<IMG NAME="ivwpic1" SRC="http://sport1.ivwbox.be/cgi-bin/ivw/CP/' + sp1IvwId + ';?r=' + escape(document.referrer)+'&d='+(Math.random()*100000)+'" WIDTH="1" HEIGHT="1" ALIGN=RIGHT>');

//SITESTAT
var u = sp1SitestatUrl;

//Amateur-Sonderregel
var idx = u.indexOf('.AmateureTemplate');
if (idx > -1) {
	u = u.substring(0,idx);
	if (typeof(sp1AmatInfo) != 'undefined') {
		var r = '';
		for (var i = 0; i < sp1AmatInfo.length; i++) {
			var c = sp1AmatInfo.charAt(i);
			if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '.') {
				r += c;
			}
		}
		u += '.' + r;
	}
}
//Amateur-Sonderregel-Ende

if (u.indexOf('.') == 0) u = 'www-sport1-be' + u;
u = u.replace(/\_/g,'-');
u += '&ns__t='+(new Date()).getTime();
var x=document.referrer;
x=(x.lastIndexOf('/')==x.length-1)?x.substring(x.lastIndexOf('/'),0):x;
if(x.length>0) u+='&ns_referrer='+escape(x);

var ns_l = 'http://sitestat3.sport1.be/sport1/de/s?'+u;
ns_1=new Image();ns_1.src=ns_l;

// Externe Pixel und PIs auf Userinteraktionen
var pixelcallerinuse=false;
window.pixel=new Array();
window.sPixel = '';
function callPixel(url) {
	if (pixelcallerinuse) {
		setTimeout('callPixel("' + url + '")', 1000);
		return;
	}
	pixelcallerinuse=true;
	var x = new Image();
	x.src = url;
	window.pixel[window.pixel.length] = x;
	window.sPixel += url + '\n';
	pixelcallerinuse=false;
}
function showPixel() {alert(window.sPixel);}
document.write('<div id="iframepixellayer" style="position:absolute;visibility:hidden">nix</div>');
function addCountIvwCode(s) {
	eval(s);
	if (!window.xPixelCallCode) window.xPixelCallCode = '';
	window.xPixelCallCode+=s;
}

var iframepixelcallerinuse = true; 
window.setTimeout('iframepixelcallerinuse = false;',1000);
function callIframePixel(url) {  
	if (iframepixelcallerinuse) {
		setTimeout('callIframePixel("' + url + '")', 200);    return;  
	}
	iframepixelcallerinuse=true;
	var x = document.getElementById('iframepixellayer');
	x.innerHTML='nix';
	x.innerHTML='<iframe src="'+url+'" width=200 height=200 onload="iframepixelcallerinuse=false"></iframe>';
	window.sPixel += url + '\n';
}
function countivw(x){
	if (window.callPixel) {
		if(window.document.images.ivwpic1) callPixel(window.document.images.ivwpic1.src);
		if (typeof(ns_1) != 'undefined') {
			var y = ns_1.src;
			if (x)  y = y.substring(0,y.indexOf('&')) + '.' + x + y.substring(y.indexOf('&'));
			callPixel(y);
		}
	}
	if (window.xPixelCallCode) eval(window.xPixelCallCode);
}
