// JavaScript Document

function aendereSchriftgroesse() {
	if( document.body.style.fontSize == '14pt' ) {;
		document.body.style.fontSize = '11pt';	
	}
	else {
		document.body.style.fontSize = '14pt';			
	}
	return false;
}

function setzeSchriftgroesse(groesse) {
	return document.body.style.fontSize = groesse;	
}

var schriftgroesse = {
	umgebung : null,
	fontSizeNormal : '11pt',
	fontSizeGross : '14pt',

	initFontSizeNormal : function(groesse) {
		schriftgroesse.fontSizeNormal = groesse;		
	},
	initFontSizeGross : function(groesse) {
		schriftgroesse.fontSizeGross = groesse;		
	},

	init : function(umgebungid) {
		schriftgroesse.umgebung = document.getElementById(umgebungid);	
		while( schriftgroesse.umgebung.firstChild ) {
			schriftgroesse.umgebung.removeChild(schriftgroesse.umgebung.firstChild);
		}
		link = document.createElement("a");
		link.id = "schriftgroesse-aendern-link";
		link.setAttribute("href","javascript:schriftgroesse.aendern()");
		link.appendChild(document.createTextNode(""));
		link.firstChild.nodeValue = "Schrift vergrößern";
		schriftgroesse.umgebung.appendChild( link );
		return schriftgroesse;
	},

	aendern : function() {
		groesse = document.body.style.fontSize;
		if (groesse == schriftgroesse.fontSizeGross) {
			document.body.style.fontSize = schriftgroesse.fontSizeNormal;
			link.firstChild.nodeValue = "Schrift vergrößern";
		}
		else {
			document.body.style.fontSize = schriftgroesse.fontSizeGross;			
			link.firstChild.nodeValue = "Schrift verkleinern";
		}
	}
}