//BARRIERFREE SCRIPTS
	
	saved = 1;
	
	function setFontSize()
	{
		if( getCookieValue( 'fontsize' ) == '' )
			fontSize = '100%'; 
		else
			fontSize = getCookieValue( 'fontsize' );
		
		$('mitte').style.fontSize = fontSize;
	}
	
	function fontsizer( action )
	{		
		fontSize = ( $('mitte').style.fontSize );
		value = parseInt( fontSize );
		
		switch( action )
		{
		  case "smaller":
			newValue = value-10;
			break;
		  case "bigger":
			newValue = value+10;
			break;
		  default:
			newValue = '100';
			break;
		}
		
		saved = 1;
		
		$('mitte').style.fontSize = newValue+'%';
		
		if( getCookieValue( 'fontsize' ) != $('mitte').style.fontSize && saved == 1 )
		{
			$('settingssaved').style.display = 'none';
			$('savebfreesettings').style.display = 'block';
			saved = 0;
		}
	}
	
	function hideDiv( divname )
	{
		$(divname).style.display = 'none';
	}
	
	function saveCookie( noshowstat )
	{	
		wert1 = 'fontsize=' + $('mitte').style.fontSize;
		wert2 = 'style=' + $('style').value;
		var a = new Date();
		a = new Date(a.getTime() +1000*60*60*24*365);
		document.cookie = 'expires='+a.toGMTString()+';';
		document.cookie = wert1 + ';';
		document.cookie = wert2 + ';';
		if( !noshowstat )
		{
			$('savebfreesettings').style.display = 'none';
			$('settingssaved').style.display = 'block';
			window.setTimeout( "hideDiv('settingssaved')", 4000 );
		}
	}
	
	function getCookieValue( valueName )
	{
		if( document.cookie )
		{
			a = document.cookie;
			valueNameLength = valueName.length+1;		
			namePos = a.search(valueName);
			partOfCookie = a.substr( namePos );
			semiPos = partOfCookie.search(';');
			if( semiPos == -1 )
				semiPos = 500000;
			partOfCookie2 = partOfCookie.substr( 0, semiPos );
			cookieValue = partOfCookie2.substr( valueNameLength );
		}
		else
			cookieValue = '';
		
		return cookieValue;
	}	
	
	function showCookieValue( cookieValue )
	{
		wert = getCookieValue( cookieValue );
		alert( wert );
	}
