	function viewComment(sText){
		document.getElementById("addCommentButton").disabled = false ;
		document.getElementById("comment_text").disabled = false ;
		_("comment_text").value    = '';
		_("loading").style.display = 'block'; 
		_("no").value              = parseFloat(_("no").value) + 1;
	}	
	
	function commentHandler(sText){
		if(sText === "1"){
			viewComment(sText);
		}else{
			alert(sText);
		}
	}
	
	function addClipatComment(){
		_("loading").style.display = 'none';
		_("errorMsg").style.display = 'none';
		document.getElementById("comment_text").value = trim(document.getElementById("comment_text").value);	 
		if(_l("comment_text") === "0"){
			_("errorMsg").style.display = 'block'; 
			_("comment_text").focus();
			return;
		}
		strComments = _("comment_text").value ;
		for (var i=0;i<strComments.length;i++){
			strComments = handleText(strComments);
		}
		document.getElementById("addCommentButton").disabled = true ;	
		document.getElementById("comment_text").disabled = true ;
		AJAXGet(domainName+"request/addClipatComments.php?clipId="+_("clipId").value+"&m5="+_("m5").value+"&comment="+strComments+"&by="+_("comment_by").value,commentHandler,false,true);
	}
		
	function removeClip(clipatId,data,crumbs){
		if(confirm('هل انت متأكد من انك تريد حذف هذا الكليب')){
		window.location  ='deleteClip.htm?clipId='+clipatId+'&data='+data+'&crumbs='+crumbs;
		}
	}
	
	function commentHandlerView(sText){
		_("response").style.display = 'none';
		_("commentDiv").innerHTML = sText ;
	}
	
	function getClipComments (clipId,pn){
		AJAXGet(domainName+"request/getClipComments.php?clipId="+clipId+"&pn="+pn,commentHandlerView,false,true);
	}
