function addConversationComments(){
	
	_("loading").style.display = 'none'; 
	document.getElementById("comment_text").value = trim(document.getElementById("comment_text").value);	
	if(_l("senderId") == 0){
		alert('عليك تعديل بياناتك قبل التعليق على صفحات الاعضاء')
	}
	
	if(_l("comment_text") == 0){
		alert ('الرجاء ادخال نص التعليق');
		_("comment_text").focus();
		return;
	}
	
	// disables comments button 
	_("btnAddComment").disabled = true ;
	// replace special characters like '&' ...
	strComments = _("comment_text").value ;
	for (i=0;i<strComments.length;i++){
		strComments = handleText(strComments);
	}
	AJAXGet(domainName+"addComment.php?type=0&sender_id="+_("senderId").value+"&userId="+_("userId").value+"&m5="+_("m5").value+"&comment="+strComments,commentHandler,false,true);

}

function commentHandler(sText){
	if(sText == 1){
		AJAXGet(domainName+"getCombineComments.php?userId="+_("userId").value+"&sender_id="+_("senderId").value+"&pageNumber="+
		_("pageNumber").value,viewComment,false,true);
	}else{
		alert(sText);
	}
}

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


