var userlogin = "";
var count_right = 235;
function limiter_right()
{	
	//var tex = document.getElementById("clsmanagequestion_description").value;alert(tex);
	var tex = document.frmquestion_right.clsmanagequestion_description.value;
	var len = tex.length;
	if(len > count_right)
	{
		tex = tex.substring(0,count_right);
		document.frmquestion_right.clsmanagequestion_description.value = tex;
		//document.getElementById("clsmanagequestion_description").value =tex;
		return false;
	}
	document.getElementById("limitt_right").innerHTML =count_right-len;
}

function searchquestion()
{
	document.frmsearch.clsmanagequestion_hdnaction.value="search";
	document.frmsearch.clsmanagequestion_hdnsubmited.value=1;
	document.frmsearch.action=forum_http_url+"askquestion/ecquesionanswer-forum.php";
	document.frmsearch.submit();
}
function validatepostquestion(action)
{
	var frm = document.frmquestion_right;
	errmsg = "";
	if(frm.clsmanagequestion_question.value=="")
	{
	 	errmsg += "Title is required field.\r\n";
	}
	if(!userlogin && frm.clsmanagequestion_firstname.value=="" && userlogin == false)
	{
		errmsg += "Your First Name is required field.\r\n";
	}	
	if(!userlogin && frm.clsmanagequestion_email.value=="" && userlogin == false)
	{
		errmsg += "Your EMail Address is required field.\r\n";
	}
	if(frm.clsmanagequestion_captcha.value=="")
	{
		errmsg += "Verification code is required field.\r\n";
		
	}
	if(errmsg != "")
	{
		alert(errmsg);
		return false;
	}
	document.frmquestion_right.clsmanagequestion_hdnaction.value=action;
	document.frmquestion_right.clsmanagequestion_hdnsubmited.value=1;
	document.frmquestion_right.clsmanagequestion_filename.value='askaquestionright.inc';
	document.frmquestion_right.submit();
	return true;
}