function Anfang()
	{
	if (document.referrer.match(/sammlerpoint\.de/))
		{}
	else 
		{AdsZaehlen();}
	loadStyle();
	}
 function AdsZaehlen()
	{
	var AnzahlAds = WertAusgeben().match(/@/g);
	if (AnzahlAds)
		{if (Math.floor(AnzahlAds.length/3) == AnzahlAds.length/3)
			{}
			else {self.name=""}
		}
	else {self.name=""};
	}
spzzchn=  "*+-./_@";
function ersetze(text,find,repl)
	{
	var found = text.indexOf(find);
	var retVal= ""; var start = 0;
    while(found != -1)
		{
		retVal +=text.substring(start,found) +repl;
		start = found+find.length;
		found =text.indexOf(find,start);
		}
	retVal +=text.substring(start,text.length);
	return retVal;
	}

function WertSpeichern(eingabe) 
	{
	var a=escape(eingabe);
	for(var i=0;i<spzzchn.length;i++) 
		a=ersetze(a,spzzchn.charAt(i),"%X"+i);
		a=ersetze(a,"%","_");
		self.name=self.name + a;
		self.location.href=document.URL;
		}
function WertAusgeben() 
	{
	var b=""+self.name;
	b=ersetze(b,"_","%");
	for(var i=0;i<spzzchn.length;i++) 
		b=ersetze(b,"%X"+i,spzzchn.charAt(i));
		b=unescape(b);
		return b;
	}
function inkorb(Obj2)
	{
	self.name=self.name + Obj2;
	self.location.href=document.URL;
	}
function leeren()
	{
	bestaetigung = confirm ("Wollen Sie wirklich alle Waren aus dem Warenkorb löschen ?");
	if (bestaetigung == true)
		{
		self.name="";
		self.location.href=document.URL;
		}
	}
function zurkasse()
	{
//	self.location.href="../kasse.htm";
	self.location.href="/kasse.htm";
	}
function newWindow(datei) {
	window.open(datei,"name","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=500,height=400");
}
function BildZeigen(event,id) {
	/*if (document.all){mx=event.clientX;my=event.clientY;}
	else {mx=event.pageX;my=event.pageY;}
	document.getElementById(id).style.left = mx;
	document.getElementById(id).style.top = my;*/
	document.getElementById(id).style.visibility = "visible";
}
function BildVerstecken(id) {
	document.getElementById(id).style.visibility = "hidden";
}
