  var popupCookieDauer = 600; // in Sekunden
var popupFensteroptionen = "width=0,height=0,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no";
var popupTimeout = 8000;
var popupVerzoegerung = 44440;
var seite = "http://www.heichelheim.de/popup.html";

var start = 0;
var laufschrift = "\u0020"+laufschrift1+"\u0020";
var stop = laufschrift.length;

function lauftext() {
	
	


document.ticker.ticker.value = "" + laufschrift.substring(start,stop) + " " + laufschrift.substring(0,start);
start++;
if(start >= stop) { start = 0; }
setTimeout("lauftext()", 200);
}


function GrafikAnzeigen(GrafikURL, Breite, Hoehe)
{
	Fensteroptionen="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";

	Grafikfenster=window.open("", "", Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
	Grafikfenster.focus();
	Grafikfenster.document.open();
	with(Grafikfenster)
	{
		document.write("<html><head>");
		document.write("<title>Zoom</title>");
		document.write("</head>");
		document.write("<body leftmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" topmargin=\"0\">");
		document.write("<img border=\"0\" onclick=\"window.close();\" src=\""+ GrafikURL +"\" title=\"Zum Schließen auf das Foto klicken\"><p>Zum Schließen auf das Foto klicken</p>");
		document.write("</body></html>");
	}
}


function CookieLesen (name)
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen)
	{
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		{
			return CookieEinlesen (j); 
		}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0)
		{
			break;
		}
	}
	return null;
}

function CookieSetzen (name, value)
{
	var argv = CookieSetzen.arguments;
	var argc = CookieSetzen.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");
}

function CookieLoeschen (name)
{
	var exp = new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = CookieLesen (name);
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var exp = new Date(); 
exp.setTime(exp.getTime() + (popupCookieDauer*1000));

function CookieEinlesen(offset)
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	{
		endstr = document.cookie.length;
	}
	return unescape(document.cookie.substring(offset, endstr));
}

function PopUpCheck()
{
	var count = CookieLesen('PopUp');
	var popupWindow = "";
	if (count == null)
	{
		count=1;
		CookieSetzen('PopUp', count, exp);
		setTimeout('popupWindow=window.open(seite, "", popupFensteroptionen)',popupVerzoegerung);
//		popupWindow.setTimeout('window.close()',popupTimeout);
	}
	else
	{
		count++;
		CookieSetzen('PopUp', count, exp);
	}
}