oops, ok, here that block of code again
code:
function quickquote(pid) {
if(qqsel != "" && qqsel.indexOf("[quote]") == -1) {
var quote = qqsel;
} else {
var quote = eval("document.quickquote.qq"+pid+".value");
}
qqsel = "";
var username = eval("document.quickquote.qq"+pid+".value");
alert(quote);
document.quickreplyform.message.value += "[quote="+username+"]"+quote+"[/quote]\r\n";
document.quickreplyform.message.focus();
}
this is all in a html .tpl file btw.