function DoConfirm(gast_eintrag, url) {
	if(confirm(gast_eintrag)) location.href = url;
}

function WhichClicked(ww) {
	window.document.postmodify.waction.value = ww;
}

function storeCaret(text) { 
	if (text.createTextRange) {
		text.caretPos = document.selection.createRange().duplicate();
	}
}

function AddText(text) {
	if (document.postmodify.gast_eintrag.createTextRange && document.postmodify.gast_eintrag.caretPos) {      
		var caretPos = document.postmodify.gast_eintrag.caretPos;      
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
		text + ' ' : text;
	}
	else document.postmodify.gast_eintrag.value += text;
	document.postmodify.gast_eintrag.focus(caretPos)
}

function smiley() {
	AddTxt=" :)";
	AddText(AddTxt);
}

function wink() {
	AddTxt=" ;)";
	AddText(AddTxt);
}

function cheesy() {
	AddTxt=" :D";
	AddText(AddTxt);
}

function grin() {
	AddTxt=" ;D";
	AddText(AddTxt);
}

function angry() {
	AddTxt=" >:(";
	AddText(AddTxt);
}

function sad() {
	AddTxt=" :(";
	AddText(AddTxt);
}

function shocked() {
	AddTxt=" :o";
	AddText(AddTxt);
}

function cool() {
	AddTxt=" 8)";
	AddText(AddTxt);
}

function huh() {
	AddTxt=" ???";
	AddText(AddTxt);
}

function rolleyes() {
	AddTxt=" ::)";
	AddText(AddTxt);
}

function tongue() {
	AddTxt=" :P";
	AddText(AddTxt);
}

function lipsrsealed() {
	AddTxt=" :-X";
	AddText(AddTxt);
}

function embarassed() {
	AddTxt=" :-[";
	AddText(AddTxt);
}

function undecided() {
	AddTxt=" :-/";
	AddText(AddTxt);
}

function kiss() {
	AddTxt=" :-*";
	AddText(AddTxt);
}

function cry() {
	AddTxt=" :'(";
	AddText(AddTxt);
}

