/*Comments HTML format toolbar */

function mouseover(el) {
el.className = "raised";
}

function mouseout(el) {
el.className = "button";
}

function mousedown(el) {
el.className = "pressed";
}

function mouseup(el) {
el.className = "raised";
}


function format_me(v) {
var str = document.selection.createRange().text;
document.comments_form.text.focus();
document.selection.createRange().text = "<" + v + ">" + str + "</" + v + ">";
return;
}

function insert_link() {
var str = document.selection.createRange().text;
document.comments_form.text.focus();
var my_link = prompt("Enter URL:","http://");
if (my_link != null) {
document.selection.createRange().text = "<a target=\"_blank\" href=\"" + my_link + "\">" + str + "\(Link\)</a>";
}
return;
}
function format_quote() {
var str = document.selection.createRange().text;
document.comments_form.text.focus();
document.selection.createRange().text = "<blockquote>" + str + "</blockquote>";
return;
}
