// Used to insert bbcode and smilies
function tag(text1, text2) {
if ((document.selection)) {
document.post.xtblog_msg.focus();
document.post.document.selection.createRange().text = text1+document.post.document.selection.createRange().text+text2;
}
else if(document.forms['post'].elements['xtblog_msg'].selectionStart!=undefined) {
var element = document.forms['post'].elements['xtblog_msg'];
var str = element.value;
var start = element.selectionStart;
var length = element.selectionEnd - element.selectionStart;
element.value = str.substr(0, start) + text1 + str.substr(start, length) + text2 + str.substr(start + length);
}
else {
document.post.xtblog_msg.value += text1+text2;
}
}
function show_sml(elem) {
obj = document.getElementById(elem);
if( obj.style.display == "none" ) {
obj.style.display = "block";
}
else {
obj.style.display = "none";
}
}