function flooding(cmax) {var obj = document.jreact.comments;var c = eval(obj.value.length);if (c > cmax) {obj.value = obj.value.substring(0, cmax-3) + '...';alert('<?php echo LANG_FORM_FLOOD ?>');obj.focus();}}function pasteTag(newText) {var obj = document.jreact.comments; obj.focus();if (obj.selectionStart || obj.selectionStart == '0') {var startPos = obj.selectionStart;var endPos = obj.selectionEnd;obj.value = obj.value.substring(0, startPos) + newText + obj.value.substring(endPos, obj.value.length);obj.selectionStart = startPos + newText.length;obj.selectionEnd = startPos + newText.length;} else if (document.selection) {sel = document.selection.createRange();var orgLen = sel.text.length;sel.text = newText;sel.moveStart('character', -newText.length + orgLen);} else {obj.value += newText;}}
