<script type="text/javascript">
function Insert(qname, text)
{
if (text != "")
{
qname = qname.replace(/[\[\]]/g, "|");
paste("
Quote (" + qname + ")
" + text + "
\n", 0);
}
else {
_uWnd.alert('Выделите текст для цитирования','',{w:230,h:80,tm:4500});
}
}
function paste(text, flag)
{
if ((document.selection) && (flag))
{
document.addform.message.focus();
document.addform.document.selection.createRange().text = text;
}
else {
document.addform.message.value += text;
}
}
function get_selection()
{
if (window.getSelection)
{
selection = window.getSelection();
selection = selection.replace(/\r\n\r\n/gi, "_doublecaret_");
selection = selection.replace(/\r\n/gi, " ");
while (selection.indexOf(" ") !=- 1) {
selection = selection.replace(/ /gi, "");
}
selection = selection.replace(/_doublecaret_/gi, "\r\n\r\n");
}
else {
selection = document.selection.createRange().text;
}
}
</script>