function storeCaret(text) { 
	if (text.createTextRange) {
		text.caretPos = document.selection.createRange().duplicate();
	}
}
function AddText(text) {
	if (document.book.obsah.createTextRange && document.book.obsah.caretPos) {      
		var caretPos = document.book.obsah.caretPos;      
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
		text + ' ' : text;
	}
	else document.book.obsah.value += text;
	document.book.obsah.focus(caretPos)
}
