
    var what;
    var font;
    var weight;
    var size;
    var clean = new Array();
  	var chFont = {

            setFont : function (font,weight,size) {
                what.fontFamily = font ? font : "Times New Roman";
                what.fontWeight = weight ? weight : "normal";
                what.fontSize = size ? size+"px" : 16+"px";
                window.name = size+"|"+weight+"|"+font;
            },

            init : function () {
                clean = window.name ? window.name.split('|') : "";
                size = clean[0] ? clean[0] : 16;
                weight = clean[1] ? clean[1] : 'normal';
                font = clean[2] ? clean[2] : "Times New Roman";
                var buttons = document.getElementsByTagName('input');
				
				//what = document.getElementById('content_box').style;
                window.onload = function() { 
				alert("test");
                    what = document.getElementById('content_box').style;
                    what.fontFamily = font;
                    what.fontWeight = weight;
                    what.fontSize = size+"px";
/* NEU HINZUGEFÜGT */
                 /*
   document.getElementById('fontsel').onchange = function () {
                                font = this.value;
                                chFont.setFont(font,weight,size);
                            }
*/
/* ENDE NEU */
                    for (var i = 0; i < buttons.length; i++) {
                        if (buttons[i].className == 'ffchange') {
		            buttons[i].onclick = function() {
                                font = this.value;
                                chFont.setFont(font,weight,size);
                            }
                        }
                        if (buttons[i].className == 'fwchange') {
		            buttons[i].onclick = function() {
                                weight = this.value == "Fettschrift" ? 'bold' : 'normal';
                                chFont.setFont(font,weight,size);
                            }
                        }
                        if (buttons[i].className == 'fschange') {
		            buttons[i].onclick = function() {
						
                                size = this.value;
                                chFont.setFont(font,weight,size);
                            }
                        }
                    } 
	        }
            }
        };
           

