function zentralisierung()
{
	
	if(!document.getElementById("container"))
		return;
	var width;
	if (self.innerHeight) // all except Explorer
	{
		width = self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		width = document.documentElement.clientWidth;
	}
	else if (document.body) // other Explorers
	{
		width = document.body.clientWidth;
	}
		document.getElementById("container").style.left = (width-740)/2  + 'px';
		document.getElementById("hiddensearch").style.left = document.getElementById("suchebutton").offsetLeft -155 + 'px';
		document.getElementById("hiddensearch").style.top = document.getElementById("suchebutton").offsetTop+17 + 'px';

		document.getElementById("hiddenrecommend").style.left = document.getElementById("empfehlenbutton").offsetLeft + 'px';
		document.getElementById("hiddenrecommend").style.top = document.getElementById("empfehlenbutton").offsetTop+17 + 'px';
}
var defaultGroesse = parseFloat(getCookie("font")); 
if(defaultGroesse == null || isNaN(defaultGroesse) || defaultGroesse < 0)
{
	//alert(defaultGroesse);
//	alert("Setze Schrift auf Standardschriftgröße zurück.");
	defaultGroesse = 0.9; 
}
//alert(defaultGroesse);
var aktuelleGroesse = defaultGroesse;
var groesseSchritt = 0.2;
var ablauf = new Date();
var infuenfTagen = ablauf.getTime() + (5 * 24 * 60 * 60 * 1000);
ablauf.setTime(infuenfTagen);
function size(wert)
{
  if (wert == 'plus')
  {
    aktuelleGroesse += groesseSchritt;
    change(aktuelleGroesse);
			deleteCookie("font");
			setCookie("font", aktuelleGroesse,ablauf.toGMTString(), '/');


  }
  else
  {
    if (wert == 'minus')
    {
      aktuelleGroesse -= groesseSchritt;
      change(aktuelleGroesse);
			deleteCookie("font");
			setCookie("font", aktuelleGroesse,ablauf.toGMTString(), '/');

}
    else
    {
      aktuelleGroesse = aktuelleGroesse;
      change(aktuelleGroesse);
			deleteCookie("font");
			setCookie("font", aktuelleGroesse,ablauf.toGMTString(), '/');
    }
  }
}



function change(wert)

{
  var size = String(wert + 'em');
	aktuelleGroesse = wert;
  var kopf = document.getElementById('contentc');
 // var hauptteil = document.getElementById('hauptteil');
 // var fuss = document.getElementById('fuss');
//	alert(kopf.style.fontSize);
 // if(kopf.style.fontSize)
		kopf.style.fontSize= size;
//	alert(kopf.style.fontSize);
//  hauptteil.style.fontSize = size;
//  fuss.style.fontSize = size;
}
function toggle(str)
{
	if(document.getElementById(str).style.display == 'none')
	{
		document.getElementById(str).style.display = ''
	}else if(document.getElementById(str).style.display == '')
	{
		document.getElementById(str).style.display = 'none'
	}
}

/**
cookie function thanks to http://www.netspade.com/articles/2005/11/16/javascript-cookies/
 * Sets a Cookie with the given name and value.
 *
 * name       Name of the cookie
 * value      Value of the cookie
 * [expires]  Expiration date of the cookie (default: end of current session)
 * [path]     Path where the cookie is valid (default: path of calling document)
 * [domain]   Domain where the cookie is valid
 *              (default: domain of calling document)
 * [secure]   Boolean value indicating if the cookie transmission requires a
 *              secure transmission
 */
function setCookie(name, value, expires, path, domain, secure) {
			expires = expires * 1000 * 60 * 60 * 24;
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
		//alert("Setting Cookie: "+name+" value > "+value);
}

/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

/**
 * Deletes the specified cookie.
 *
 * name      name of the cookie
 * [path]    path of the cookie (must be same as path used to create cookie)
 * [domain]  domain of the cookie (must be same as domain used to create cookie)
 */
function deleteCookie(name, path, domain) {
    if (getCookie(name)) {
        document.cookie = name + "=" +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}