function DoPrompt(action) { document.EINTRAG.mtext.value=document.EINTRAG.mtext.value+action; document.EINTRAG.mtext.focus(); }
function STC (inputtext) { if (inputtext.createTextRange) inputtext.caretPos = document.selection.createRange().duplicate(); }
function insertAtCaret (inputtext, text) { if (navigator.appVersion.indexOf("MSIE")!=-1) { if (inputtext.createTextRange && inputtext.caretPos) { var caretPos = inputtext.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; } else inputtext.value  = inputtext.value + text; } else DoPrompt(text); document.EINTRAG.mtext.focus(); }
function URLeingabe () { weblink=prompt('Zuerst die URL angeben:','http://'); if (weblink!=null) { linktitel=prompt('Nun den Text der den Link darstellen soll:',''); if (linktitel!=null) { insertAtCaret(document.EINTRAG.mtext,'[URL=' + weblink + ']' + linktitel + '[/URL]'); } } }
function URLeingabeblank () { weblink=prompt('Zuerst die URL angeben:','http://'); if (weblink!=null) { linktitel=prompt('Nun den Text der den Link darstellen soll:',''); if (linktitel!=null) { insertAtCaret(document.EINTRAG.mtext,'[URLBLANK=' + weblink + ']' + linktitel + '[/URLBLANK]'); } } }
function EMAILeingabe () { maillink=prompt('Zuerst die E-Mail Adresse angeben:',''); if (maillink!=null) { mailtitel=prompt('Nun den Text der den E-Mail Link darstellen soll:',''); if (mailtitel!=null) { insertAtCaret(document.EINTRAG.mtext,'[EMAIL=' + maillink + ']' + mailtitel + '[/EMAIL]'); } } }
function BILDeingabelinks () { picture=prompt('Komplette URL des Bildes eingeben, Bild wird links ausgerichtet:','http://'); if (picture!=null) { insertAtCaret(document.EINTRAG.mtext,'[IMGL]' + picture + '[/IMGL]'); } }
function BILDeingaberechts () { picture=prompt('Komplette URL des Bildes eingeben, Bild wird rechts ausgerichtet:','http://'); if (picture!=null) { insertAtCaret(document.EINTRAG.mtext,'[IMGR]' + picture + '[/IMGR]'); } }
function LISTENeingabe() { listenpunktanzahl=prompt('Anzahl Listenpunke:','3'); if (listenpunktanzahl!=null || isNaN(listenpunktanzahl)==false) { listencode='[LISTE]\n'; for (var i=1; i<=listenpunktanzahl; i++) { listencode += '\[+]\n'; } listencode+='\[/LISTE]\n'; insertAtCaret(document.EINTRAG.mtext, listencode); } }
function MESSAGEtags(st,la){ switch(navigator.appName) { case 'Microsoft Internet Explorer': var select = document.selection.createRange(); if (select.text!='') { select.text= st + select.text + la; insertAtCaret(document.EINTRAG.mtext, select.text); } else { insertAtCaret(document.EINTRAG.mtext, st+la); } break; default : DoPrompt(st+la); break; } }

function x () {
return;
}
function DoSmilie(addSmilie) {
var revisedMessage;
var currentMessage = document.EINTRAG.mtext.value;
revisedMessage = currentMessage+addSmilie;
document.EINTRAG.mtext.value=revisedMessage;
document.EINTRAG.mtext.focus();
return;
}

