doc=document;
cookiePath='';
if(cookiePath=='' && self.location.pathname!='' && self.location.protocol.toLowerCase().substring(0,4)!='file' && self.location.protocol.toLowerCase().substring(0,2)!='C:') {cookiePath=self.location.pathname;};
if(cookiePath!='') {cookiePath=cookiePath.substring(0,cookiePath.lastIndexOf('/')+1);};
cookieDomain='';
if(cookieDomain=='' && self.location.hostname!='' && self.location.protocol.toLowerCase().substring(0,4)!='file' && self.location.protocol.toLowerCase().substring(0,2)!='C:') {cookieDomain=self.location.hostname;};
function setCookie(name, value, expires) {
	var strPath=cookiePath;
	var strDomain=cookieDomain;
	var cookieStr=value;
	var cookie=name+'='+escape(cookieStr);
	var expiration=new Date();
	if (expires==-1) {
		expiration.setYear(2010);
		expiration.setMonth(01);
		expiration.setDate(01);
		} else {
		var t=expiration.getTime();
		var msPerDay=24*60*60*1000;
		t+=(msPerDay*expires);
		expiration.setTime(t);
	};
	if(expires!=0) {
		cookie+='; expires='+expiration.toGMTString();
		} else {
		cookie=name+'=';
	};
	cookie+='; path=/';
	if(strDomain!='') {
		cookie+='; domain='+strDomain;
	};
	doc.cookie=cookie;
}
function replace(string,text,by){
	var strLength = string.length, txtLength = text.length;
	if ((strLength == 0) || (txtLength == 0)) {return string;};
	var i = string.indexOf(text);
	if ((!i) && (text != string.substring(0,txtLength))) {return string;};
	if (i == -1) {return string;};
	var newstr = string.substring(0,i) + by;
	if (i+txtLength < strLength) {newstr += replace(string.substring(i+txtLength,strLength),text,by);};
	return newstr;
}
function CheckForFrame(MyMenue) {
	var p = self.location.protocol + '//' + self.location.host + self.location.pathname;
	var ref=doc.referrer;
	if (ref != '' && ref.indexOf('schmuck-anhaenger.de')==-1 && ref.indexOf('avalonstreasury.de')==-1){
		setCookie('SavRef',doc.referrer+', '+p,-1);
	};
	var f=p;
	if (p.indexOf('schmuck-anhaenger.de')!=-1) {
		f=p.substring(p.lastIndexOf('schmuck-anhaenger.de/')+21,p.length);
	};
	if (self.location.protocol.toLowerCase().substring(0,4)=='file'){
		var f=p.substring(p.lastIndexOf('Webs\\Schmuck-und-Anhaenger\\')+27,p.length);
	};
	if (window.location.search.substring(1) != ''){
		f = f + 'ques;' + window.location.search.substring(1);
	};
	f = replace(f,'?','ques;');
	f = replace(f,'&','amp;');
	f = replace(f,'=','equ;');
	f = replace(f,'"','quot;');
	f = replace(f,'Ä','Auml;');
	f = replace(f,'Ö','Ouml;');
	f = replace(f,'Ü','Uuml;');
	f = replace(f,'ä','auml;');
	f = replace(f,'ö','ouml;');
	f = replace(f,'ü','uuml;');
	f = replace(f,'ß','szlig;');
	if (f.substring(f.length-9,f.length) == 'Menue.htm' || f.substring(f.length-9,f.length) == 'Titel.htm' || f.substring(f.length-9,f.length) == 'blank.htm'){
		f = 'Willkommen.html';
	};
	if (document.layers && (self.innerHeight == 0 && self.innerWidth == 0)) {return;};
	if ((top == self) || ((document.images) ? (parent.ergi87143548 ? false : true) : (parent.frames[1].name != 'ergi87143548'))) {
		if (self.location.protocol.toLowerCase().substring(0,4)!='file'){
			var newURL = 'http://www.schmuck-anhaenger.de/enter.htm?'+f+'&'+MyMenue+'&Titel.htm';
			} else {
			var newURL = 'file:///C:/Eigene%20Dateien/Chris/Webs/Schmuck-und-Anhaenger/enter.htm?'+f+'&'+MyMenue+'&Titel.htm';
		};
		if (document.images) {
			top.location.replace(newURL);
			} else {
			top.location.href = newURL;
		};
		} else {
		if (f.indexOf('http')==-1){
			var MenueFrame = top.Menue.location.protocol + '//' + top.Menue.self.location.host + top.Menue.self.location.pathname;
			if (self.location.protocol.toLowerCase().substring(0,4)=='file'){
				var MenueFrame=MenueFrame.substring(p.lastIndexOf('\\')+1,p.length);
				} else {
				var MenueFrame=MenueFrame.substring(p.lastIndexOf('/')+1,p.length);
			};
			if (MenueFrame != MyMenue){
				if (document.images) {
					top.Menue.location.replace(MyMenue);
					} else {
					top.Menue.location.href = MyMenue;
				};
			};
		};
	};
}