function addGroupComment(){
	document.getElementById("comment_text").value = trim(document.getElementById("comment_text").value);
	document.getElementById("loading").style.display = 'none'; 
	document.getElementById("errorMsg").style.display = 'none'; 
	if(_l("comment_text") == 0){
		document.getElementById("errorMsg").style.display = ''; 
		document.getElementById("comment_text").focus();
		return;
	}
	/* disables comments button */
	document.getElementById("btnAddComment").disabled = true ;
	/* replace special characters like '&' ...*/
	strComments = _("comment_text").value ;
	for (i=0;i<strComments.length;i++){
		strComments = handleText(strComments);
		strComments = strComments.replace("?","firastunsiramibadranabedsalem");
	}
	document.getElementById("comment_text").disabled = true ;
	AJAXGet(domainName+"request/group/addGroupComment.htm?comment="+strComments+"&groupId="+_("groupId").value,commentHandler,false,true);

}
function commentHandler(sText){		 
	var temp = new Array();
	temp = sText.split('$$');
	var Status = temp[0];
	var showComments =  temp[1];	
	 if(Status == 1 && showComments == 0 ){
		AJAXGet(domainName+"request/group/getGroupComments.htm?groupId="+_("groupId").value,viewComment,false,true);
	 }else if (Status == 1 && showComments == 1){
		viewCommentApproved();
	 }else{
	 	document.getElementById("errorMsg").innerHTML = sText;
	 	document.getElementById("comment_text").disabled = false ;
	 	document.getElementById("errorMsg").style.display = '';
	 }

}
function viewCommentApproved(){
	document.getElementById("comment_text").disabled = false ;
	_("comment_text").value = '';
	_("loading").style.display = '';
	/*enabled button*/
	document.getElementById("btnAddComment").disabled = false ;
}
function viewComment(sText){
	document.getElementById("comment_text").disabled = false ;
	_("commentDiv").innerHTML = sText;
	_("comment_text").value = '';
	_("loading").style.display = '';
	/*enabled button*/
	document.getElementById("btnAddComment").disabled = false ;
}