var xhtml = false;
if (document.contentType && document.contentType == "application/xhtml+xml") {
	// document.documentElement.namespaceURI == "http://www.w3.org/1999/xhtml"
	xhtml = true;
}

/* ********************************************************************** */

function setCookie (name, value, domain, expires, path, secure) {
	var today = new Date();
	today.setTime(today.getTime());
	if (expires) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date(today.getTime() + expires);
	var cookie = name + "=" + encodeURIComponent(value);
	if (expires)
		 cookie += "; expires=" + expires_date.toGMTString();
	if (path)
		cookie += "; path=" + path;
	if (domain)
		cookie += "; domain=" + domain;
	if (secure)
		cookie += ";secure";
	document.cookie = cookie;
}
function getCookie (name) {
	var name_index = document.cookie.indexOf(name + "=");
	if (name_index == -1)
		return null;
	var value_index = name_index + name.length + 1;
	var end = document.cookie.indexOf(";", value_index);
	if (end == -1)
		end = document.cookie.length;
	var value = decodeURIComponent(document.cookie.substring(value_index, end));
	return value;
}



/* ********************************************************************** */

function schriftgroesse_setzen () {
	window.fontsize = Number(getCookie("fontsize"));
	if (window.fontsize && !xhtml) {
		document.write('<style type="text/css">body {font-size: ' + window.fontsize + '%;}</style>');
	} else {
		window.fontsize = 70;
	}
}
schriftgroesse_setzen();

function  schrift_verkleinern () {
	if (window.fontsize > 20)
		window.fontsize -= 10;
	document.body.style.fontSize = window.fontsize + "%";
	setCookie("fontsize", window.fontsize);
}
function schrift_vergroessern () {
	if (window.fontsize < 120)
		window.fontsize += 10;
	document.body.style.fontSize = window.fontsize + "%";
	setCookie("fontsize", window.fontsize);
}
function schrift_normal () {
	window.fontsize = 70;
	document.body.style.fontSize = window.fontsize + "%";
	setCookie("fontsize", window.fontsize);
};