function toolb (a,b)
{
var ein,pruf,a,b,e;
var format=new Object();

if(b=="ABSATZ"){
format.e=null;
Object.prototype.eingabe=' [/ABSATZ] ';
}else{
Object.prototype.e=window.prompt('Bitte geben Sie den zu formatierenten Text ein',' ');
Object.prototype.eingabe=format.e;
}

if(format.e !=undefined ){
if(format.e !=' '){
format.eingabe=' ['+b+'] '+format.e+' [/'+b+'] ';
}
}

if(document.forms[document.forms.length-1].elements[a] !=undefined){
Object.prototype.form=document.forms.length-1;
Object.prototype.value=document.forms[format.form].elements[a].value;
if(format.eingabe !=undefined){
document.forms[format.form].elements[a].value=format.value+format.eingabe;
document.forms[format.form].elements[a].focus ();
}
}
return true;

}
function vorschau(area){
var htmlhead,htmlfood,c;

if(document.forms[document.forms.length-1].elements[area] !=undefined){
var foo=document.forms[document.forms.length-1].elements[area];
var a=foo.value;
var s=new Array("[/ABSATZ]","[STRONG]","[/STRONG]","[KURSIV]","[/KURSIV]");
var e=new Array("<br />","<strong>","</strong>","<i>","</i>");

for (var i=0;i < s.length;i++) {
while (a.indexOf(s[i])>-1) {
pos= a.indexOf(s[i]);
a = "" + (a.substring(0, pos) + e[i] +
a.substring((pos + s[i].length), a.length));
}
}

return newW(a,foo);
}else{
return true;
}
}
function newW(a,foo){

var win=new Object();
Object.prototype.htmlhead='<html><head><meta http-equiv="content-type" content="text/html;charset=utf-8" /><meta name="rights" content="www.zimmer-atlas.de/" /><meta name="author" content="www.konstanten.net, André Dietze" />';
Object.prototype.htmlhead+='<link href="./css/body.css" type="text/css" rel="stylesheet" media="all" /><title>-</title></head><body ><div align="left">';
Object.prototype.htmlfood='</div><hr />[ <a href="javascript:self.close()">Fenster schlie&szlig;en</a> ]</body></html>';
Object.prototype.text=a;foo.focus ();
Object.prototype.dow=window.open('','','width=400,height=400,scrollbars=yes');
win.dow.document.open();
win.dow.document.write(win.htmlhead+''+win.text+''+win.htmlfood);
win.dow.document.close();

return true;
}
function changeDayClass(setClass,nameSBox){
var c=setClass.split(":");
GetElement(nameSBox).className =c['0'];
//alert(GetElement(nameSBox).className =c['0']);
}

function error(a){
}
function GetElement(div){

if(document.all){
return document.all(div);
}
else if(document.getElementById){
return document.getElementById(div);
};
}
