// JavaScript Document
<!--
function code() {
return;
}

function storeCaret (textEl){
if (textEl.createTextRange)
textEl.caretPos = document.selection.createRange().duplicate();
} // end fn

function insertAtCaret (textEl, text) {
if (textEl.createTextRange && textEl.caretPos) {
var caretPos = textEl.caretPos;
caretPos.text =
caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
text + ' ' : text;
} else {
textEl.value  = textEl.value + text; // for non MSIE browsers just append it
}
return true;
}// fn

function DoSmilie(addSmilie){
var revisedMessage;
var currentMessage = document.EditPage.acpage_content.value;
revisedMessage = currentMessage+addSmilie;
document.EditPage.acpage_content.value=revisedMessage;
document.EditPage.acpage_content.focus();
return;
}

function DoColor(color){
insertAtCaret(document.EditPage.acpage_content, ' ' + "<font color=\"" + color + "\">  </font>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}

function DoPrompt(action){
var currentMessage = document.EditPage.acpage_content.value;
if (action == "url"){
var thisURL = prompt("Voer hier het volledige URL (adres) van de link in:", "http://");
if (thisURL == null){return;}
var thisTitle = prompt("Voer hier de titel van de website in.", "");
if (thisTitle == null){return;}
insertAtCaret(document.EditPage.acpage_content, ' ' + "<a href=\"" + thisURL + "\" target=\"_blank\">" + thisTitle + "</a>" + ' ');
document.EditPage.acpage_content.focus();
return;
}
if (action == "color"){
var thisColor = prompt("Voer hier de lettertype kleur in die je wilt gebruiken. Dat mag een kleurcode zijn zoals #ff1123 of gewoon bijvoorbeeld blue:","");
if (thisColor == null) {return; }
insertAtCaret(document.EditPage.acpage_content, ' ' + "<font color=\"" + thisColor + "\"> </font> ");
document.EditPage.acpage_content.focus();
return;
}
if (action == "email"){
var thisEmail = prompt("Voer hier het volledige emailadres in:", "");
if (thisEmail == null){return;}
insertAtCaret(document.EditPage.acpage_content, ' ' + "<a href=\"mailto:" + thisEmail + "\" target=\"_blank\">" + thisEmail + "</a>" + ' ');
document.EditPage.acpage_content.focus();
return;
}
if (action == "bold"){
var thisBold = prompt("Voer hier de tekst in die je dik gedrukt wilt weergeven:", "");
if (thisBold == null){return;}
insertAtCaret(document.EditPage.acpage_content, ' ' + "<b>" + thisBold + "</b>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "italics") {
var thisItal = prompt("Voer hier de tekst in die je CURSIEF (schuin) wilt weergeven:", "");
if (thisItal == null){return;}
insertAtCaret(document.EditPage.acpage_content, ' ' + "<i>" + thisItal + "</i>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "image"){
var thisImage = prompt("Voer hier de volledige URL (adres) van de afbeelding in:", "http://");
if (thisImage == null){return;}
insertAtCaret(document.EditPage.acpage_content, ' ' + "<img src=\"" + thisImage + "\"></img>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "enter") {
insertAtCaret(document.EditPage.acpage_content, ' ' + "<br>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "code") {
insertAtCaret(document.EditPage.acpage_content, ' ' + "<code>  </code>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "liststart") {
insertAtCaret(document.EditPage.acpage_content, ' ' + "<ul>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "listitem") {
var thisItem = prompt("Voer hier het nieuwe lijst item in. Iedere lijst moet voorafgegaan worden door een Lijst Start en afgesloten worden met een Lijst Einde.", "");
if (thisItem == null){return;}
insertAtCaret(document.EditPage.acpage_content, ' ' + "<li>" + thisItem + "</li>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "listend") {
insertAtCaret(document.EditPage.acpage_content, ' ' + "</ul>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "lettertype") {
var thisLettertype = prompt("Voer hier het lettertype in. Dit kan bijvoorbeeld TAHOMA of ARIEL zijn, voor andere mogelijkheden kijk op de uitleg pagina:","");
if (thisLettertype == null) {return; }
insertAtCaret(document.EditPage.acpage_content, ' ' + "<font face=\"" + thisLettertype + "\"> </font> ");
document.EditPage.acpage_content.focus();
return;
}
if (action == "grootte") {
var thisGrootte = prompt("Voer hier de grootte van het lettertype in. Voor bijvoorbeeld de kleinste maat kies 1. Voor een wat grotere 2 enz.","");
if (thisGrootte == null) {return; }
insertAtCaret(document.EditPage.acpage_content, ' ' + "<font size=\"" + thisGrootte + "\"> </font> ");
document.EditPage.acpage_content.focus();
return;
}
if (action == "center") {
insertAtCaret(document.EditPage.acpage_content, ' ' + "<center>  </center>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "left") {
insertAtCaret(document.EditPage.acpage_content, ' ' + "<div align=left>  </div>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "right") {
insertAtCaret(document.EditPage.acpage_content, ' ' + "<div align=right>  </div>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "paragraph") {
insertAtCaret(document.EditPage.acpage_content, ' ' + "<P>  </P>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "streep") {
var thisStreep = prompt("Voer hier de tekst in die je onderstreept wilt weergeven:", "");
if (thisStreep == null){return;}
insertAtCaret(document.EditPage.acpage_content, ' ' + "<u>" + thisStreep + "</u>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
if (action == "doorgestreept") {
var thisDoorgestreept = prompt("Voer hier de tekst in die je doorstreept wilt weergeven:", "");
if (thisDoorgestreept == null){return;}
insertAtCaret(document.EditPage.acpage_content, ' ' + "<strike>" + thisDoorgestreept + "</strike>" + ' ' );
document.EditPage.acpage_content.focus();
return;
}
}
-->
