//Get cookie 
	function get_cookie(Name) {
	    var search = Name + "="
	    var returnvalue = "";
	    if (document.cookie.length > 0) {
	        offset = document.cookie.indexOf(search)
	        // if cookie exists
	        if (offset != -1) { 
	            offset += search.length
	            // set index of beginning of value
	            end = document.cookie.indexOf(";", offset);
	            // set index of end of cookie value
	            if (end == -1) end = document.cookie.length;
	            returnvalue=unescape(document.cookie.substring(offset, end))
	        }
	    }
	    return returnvalue;
	}

	var default_fontsize = 100;
	var current_fontsize = 100;
	var step = 10;

    function setFontSize(what){
        //set document cookie
        document.cookie="sizer="+ what + "; expires=date.toGMTString(); path=/";
    }

	function increase_fontsize()
	{
		//alert( current_fontsize + "carsten");
		if ( current_fontsize < 200)
		{
			current_fontsize += step;
		}
	    else
	    {
	    	current_fontsize = current_fontsize;
	    }		
	    document.getElementById('spalte-mitte').style.fontSize = current_fontsize + '%';
	    setFontSize(current_fontsize);
	    //alert( get_cookie("sizer") + "carsteb");
	}
	
	
	function decrease_fontsize()
	{
		//alert( current_fontsize + "carsten");
		if ( current_fontsize > 40)
		{
	    	current_fontsize -= step;
	    }
	    else
	    {
	    	current_fontsize = current_fontsize;
	    }
	    	
	    document.getElementById('spalte-mitte').style.fontSize = current_fontsize + '%';
	    setFontSize(current_fontsize);
	}
	function reset_fontsize()
	{
	    
	    document.getElementById('spalte-mitte').style.fontSize = default_fontsize + '%';
//	    setFontSize(default_fontsize);
	    document.cookie="sizer=; expires=date.toGMTString(); path=/";
	    current_fontsize = 100;
	}	
	function font_init()
	{
		if (get_cookie("sizer") != "")
		{
		    fontsize = get_cookie("sizer");
		    //alert( fontsize +"hallo");
		}
		else
		{
		    fontsize = default_fontsize;
		}   
		    
		    document.getElementById('spalte-mitte').style.fontSize = fontsize+"%";
	}
	
	function font_init_output()
	{
		document.write( 'Font size111&#160;&#160;<a href="'+ document.URL + '#" onclick="increase_fontsize(); return false;" title="Increase Font size"><img src="/g/plus.gif" alt="Increase Font size" width="11" height="11"/><\/a>&#160;&#160;');
		document.write( '<a href="'+ document.URL + '#" onclick="decrease_fontsize(); return false;" title="Decrease Font size"><img src="/g/minus.gif" alt="Decrease Font size" width="11" height="11"/><\/a>&#160;&#160;');
		document.write( '<a href="'+ document.URL + '#" onclick="reset_fontsize(); return false;" title="Reset Font size"><img src="/g/gleich.gif" alt="Reset Font size" width="11" height="11"/><\/a>'); 
	}
	
	
	
	
	/*
	var efa_bigger = ['Schriftgr&ouml;e',
    '<img src="images/misc/plus.gif" alt="Schrift gr&ouml;sser stellen" />',
    'Schrift gr&ouml;sser stellen',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    ''
    ]

	var efa_smaller = ['',
    '<img src="images/misc/minus.gif" alt="Schrift kleiner stellen" />',
    'Schrift kleiner stellen',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    ''
    ]
 	var efa_reset = ['',
    '<img src="images/misc/gleich.gif" alt="Schrift zurcksetzen" />',
    'Schrift zurcksetzen',
    '',
    '',
    '',
    '',
    '',
    '',
    '',
    ''
    ]   
    function getAllLinks(){
    
    	
	 	var html_links = getLinkHtml('increase', efa_bigger);    
		html_links += getLinkHtml('decrease', efa_smaller);
		html_links += getLinkHtml('reset', efa_reset);
		return html_links;
    }
    
    
    function  getLinkHtml (direction,properties) {
    var html = properties[0] + '<a href="#" onclick="';
    
    if ( direction = 'decrease')
    {
        html += 'decrease_fontsize();';
    }
    
    if (direction = 'increase')
    {
    	html += 'decrease_fontsize();';
    }
    if (direction = 'reset')
    {
        html += 'reset_fontsize();';
    }
    
    html +=  ' return false;"';
    html += (properties[2])?'title="' + properties[2] + '"':'';
    html += (properties[3])?'class="' + properties[3] + '"':'';
    html += (properties[4])?'id="' + properties[4] + '"':'';
    html += (properties[5])?'name="' + properties[5] + '"':'';
    html += (properties[6])?'accesskey="' + properties[6] + '"':'';
    html += (properties[7])?'onmouseover="' + properties[7] + '"':'';
    html += (properties[8])?'onmouseout="' + properties[8] + '"':'';
    html += (properties[9])?'onfocus="' + properties[9] + '"':'';
    return html += '>'+ properties[1] + '<' + '/a>' + properties[10];
}
	*/
	
	
	
	
	