// JavaScript Document
var schriftnormal='<div id="tools3"><p><a accesskey="#" href="javascript:setFontsize(0);"><img src="bilder/fruehfoerderstelle_gleich.jpg" title ="Die Schriftgr&ouml;&szlig;e auf die normale Gr&ouml;&szlig;e stellen" alt="Die Schriftgr&ouml;&szlig;e auf die normale Gr&ouml;&szlig;e stellen" width="20" height="20" border="0" /></a></p>       <p><a  tabindex="18" href="javascript:setFontsize(0);">Normal</a></p></div>';
	
	var schriftklein='<div id="tools2"><p><a accesskey="-" href="javascript:setFontsize(-5);"><img  src="bilder/fruehfoerderstelle_minus.jpg" title ="Die Schriftgr&ouml;&szlig;e verkleinern" alt="Die Schriftgr&ouml;&szlig;e verkleinern" width="20" height="20" border="0" /></a></p><p><a tabindex="17" href="javascript:setFontsize(-5);">Kleiner</a></p></div>';

var schriftgross=' <div id="tools"><p><a  accesskey="+" href="javascript:setFontsize(5);"><img src="bilder/fruehfoerderstelle_plus.jpg" title="Die Schriftgr&ouml;&szlig;e vergr&ouml;&szlig;ern" alt="Die Schriftgr&ouml;&szlig;e vergr&ouml;&szlig;ern" width="20" height="20" border="0" /></a></p><p><a tabindex="19" href="javascript:setFontsize(5)">Gr&ouml;&szlig;er</a></p></div>';

/*setCookie('script', 'ja', null, null, '/', null);*/
var fontsize = 100.01;

function setCookie(name, wert, domain, expires, path, secure){
   var cook = name+'='+unescape(wert);
   cook += (domain) ? "; domain="+ domain : "";
   cook += (expires) ? "; expires="+expires : "";
   cook += (path) ? "; path="+path : "";
   cook += (secure) ? "; secure" : "";
   document.cookie = cook;
}

function setFontsize(size) {

  if (navigator.cookieEnabled) {

    var cookie, pair;
    var cookies = document.cookie.split(';');
    var len = cookies.length;
    var set_cookie = true;

    for(var i=0; i < len; i++) {
      cookie = cookies[i];
      while (cookie.charAt(0)==' ') cookie = cookie.substring(1, cookie.length);
      pair = cookie.split('=');

      if ((pair[0] == 'fontsizeR') || (pair[0] == 'fontsize')) {
        fontsize = pair[1];
        break;
      }
    }

    if (size == '0') {
      fontsize = 101;
    } else if (size == '') {
      set_cookie = false;
    } else {
      fontsize = (fontsize*1.0 + size*1.0);
	  if (fontsize < 71) fontsize=71;
	   if (fontsize > 190) fontsize=190;
	 
    }

	
   //var html = document.getElementsByTagName('html')[0];
var html = document.getElementById('haupt');
html.style.fontSize = (fontsize + '%');
var htmllinks = document.getElementById('links');
htmllinks.style.fontSize = (fontsize + '%');
/*html.style.width = (((933/100)*fontsize) + 'px');
var htmllinks = document.getElementById('links');
var htmlnavigation = document.getElementById('navigation');

htmllinks.style.width = (((235/100)*fontsize) + 'px');
htmlnavigation.style.width = (((235/100)*fontsize) + 'px');
*/


if (set_cookie) {
      setCookie('fontsize', fontsize, null, null, '/', null);
	  
        expires = new Date();
        next_year = expires.getTime() + (60*60*24*365);
        expires.setTime(next_year);
      setCookie('fontsizeR', fontsize, null, expires.toGMTString(), '/', null);
    }

  }

}



