function checkCount() {
	var statVal =  	gE("sub1").value;
	var utop	=	document.post.utopic;
	var utxt	=	document.post.utext;
	if (statVal.indexOf("Post Reply") !== -1 || statVal.indexOf("Edit message") !== -1) {
		if (utxt.value.length < 6) {
			alert("Message short!!!");
			utxt.focus();
		} else {
			document.post.submit();
		}
	} else {
		if (utop.value.length < tshort) {
			alert("Title short!!!");
			utop.focus();
		} else if (utxt.value.length < 6) {
			alert("Message short!!!");
			utxt.focus();
		} else if (utop.value.length > tlong) {
			alert("Title is too long!");
			utop.focus();
		} else {
			document.post.submit();
		}
	}
}
function loadText(text) {
    var txtarea = document.post.utext;
    if (txtarea.disabled != true)
	{
	    txtarea.focus();
	    text = ' ' + text + ' ';
	    if (txtarea.createTextRange && txtarea.caretPos) {
	      var caretPos = txtarea.caretPos;
	      caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
	      txtarea.focus();
	    } else {
	      txtarea.value  += text;
	      txtarea.focus();
	    }
	}
}
function qT(w) {
	var e		=	document.post.utext
	var s		=	document.selection
		e.focus();
	if(s) {
		var r	=	s.createRange()
		var d	=	r.duplicate()
		var t	=	"["+w+"]"+d.text+"[/"+w+"]";
	} else {
		var ss	=	e.selectionStart
		var se	=	e.selectionEnd
		var t	=	e.value.substring(0,ss)+"["+w+"]"+e.value.substring(ss,se)+"[/"+w+"]"+e.value.substring(se)
	}
	t		=	t.replace(/( )+\[\/(i|b|u|quote)\]/img,"[/$2]$1");
	if(d) 
		d.text	=	t;
	else {
		e.value		=	t;
		e.selectionEnd	=	e.selectionStart = ss;
	}
	return			false;
}

var hide	=	false;
function showem() {
	hide	=	!hide;
	if (hide) {
		var display = "";
	} else {
		var display = "none";
	}
	
	for(var i=1;i<=4;i++)
			gE("tr_"+i).style.display	=	display;
			
	return false;
}