function printStyleSwitcher()
{
	/* The second is for Opera 6 */
	if (!document.getElementsByTagName || !document.getElementsByTagName("link")[0].nodeType)
	{
		return;
	}
	document.write("<div class=\"styleswitcher\">");
	document.write("<span class=\"versteckt\">Layout w&auml;hlen: </span>");
	document.write("<a href=\"/impressum\" onclick=\"return setStyle('Standard')\" title=\"Standard-Layout\" class=\"stylestandard\">&rarr;|T|&larr;</a> ");
	document.write("<a href=\"/impressum\" onclick=\"return setStyle('Flexibel')\" title=\"Flexibles Layout\" class=\"styleflexibel\">|&larr;T&rarr;|</a>");
	document.write("</div>");
	if (document.cookie && (m = document.cookie.match(/style=([a-z]+)/i))) setStyle(m[1]);
}

function setStyle(title)
{
	//if (!title) return false;
	var i;
	var l = document.getElementsByTagName("link");
	for (i = l.length - 1; i >= 0; i--)
	{
		if (l[i].getAttribute("rel") && l[i].getAttribute("rel").indexOf("stylesheet") >= 0)
		{
			/* Works in all browsers. Do not edit! */
			l[i].disabled = true;
			if (l[i].getAttribute("title") == title) l[i].disabled = false;
		}
	}
	if (document.cookie.indexOf(title) < 0) document.cookie = "style=" + title;
	return false;
}

function foto(a, w, h)
{
	/* Disable scrollbars for small images in IE */
	var b = w ? "no" : "yes";
	var c = '<html><head><title>Foto - Breitendorf</title><style type="text/css">';
	c += 'html,body{background:#EEE;border:0;height:100%;margin:0;padding:0;text-align:center;width:100%;}';
	if (!w) c += 'body{overflow:-moz-scrollbars-horizontal;overflow-x:scroll;}';
	c += 'img{border:14px solid #EEE;border-bottom:0;}</style></head><body>';
	c += '<a href="' + a.href + '" onclick="window.close()"><img src="' + a.href + '" alt="Foto" title="Fenster schlie&szlig;en"></a>';
	c += '</body></html>';
	/* Default scrollbar size is 16px */
	if (!w) { w = 800; h += 16; }
	w += 28;
	h += 27;
	/* This specifies the inner size without the scrollbars */
	var s = window.open("", "Foto", "width=" + w + ",height=" + h + ",dependent=yes,resizable=yes,scrollbars=" + b);
	if (!s) return true;
	s.document.open("text/html", "replace");
	s.document.write(c);
	s.document.close();
	/* This recenters the image in IE */
	/* if (s.resizeBy) s.resizeBy(0, 1); */
	s.focus();
	return false;
}
