function addComment(){

	var comment = $('text_comment').value;
	var comment_url = site_url+"video/addcomment/?video="+vid+"&comment="+comment;
	$('text_comment').value = '';
	AjaxSend(comment_url, 'new_comment');
	
}

function Counter() {
	
	var charscnt = $('charscnt').value;
	var area = $('text_comment').value;

	if (area.length > cl)
		$('text_comment').value = area.substring(0, cl);
	else
		$('charscnt').value = cl - area.length;
}

function fav(action){

	var fav_url;
	
	switch(action){
	
		case 'add' :
			AjaxSend(site_url+'video/addfav/?video='+vid, 'fav');
		break;
		
		case 'del' :
			AjaxSend(site_url+'video/delfav/?video='+vid, 'fav');
		break;
	}	
}

function reportVid(){
	
	AjaxSend(site_url+'video/report/?video='+vid, 'report');
	
}
