/**
* Counter Scripts
*/
function counter(objektnr) {	/* Counter */
	var produktname = objekt[objektnr]["produkt"];
	produktname = replaceIt(produktname,'"',' ');
	produktname = replaceIt(produktname,'&',' und ');
	writeCounterScript(produktname);
}

function replaceIt(string,suchen,ersetzen) {
	ausgabe = "" + string;
	while (ausgabe.indexOf(suchen)>-1) {
		pos= ausgabe.indexOf(suchen);
		ausgabe = "" + (ausgabe.substring(0, pos) + ersetzen +
		ausgabe.substring((pos + suchen.length), ausgabe.length));
	}
	return ausgabe;
}

function writeCounterScript(site) {
	   f='' + unescape(document.referrer);
	   w=screen.width;   
	   h=screen.height;
	   v=navigator.appName;   
	   if (v != 'Netscape') {var c=screen.colorDepth;}
	   else {var c=screen.pixelDepth;}      
	   jsinfo = "counter/pixel.php?site=" + site +"&jsres=" + w + "x" + h +"&jscolor=" + c + "&jsref=" + f;
	   strCounter    = "<img src = \""+jsinfo+"\" alt=\"\" height=\"1\" width=\"1\">";   
	   writeInto('counter',strCounter+"\n"); 
}		 
