function addComment(url, newsID, linkID){
$.ajax({
  url: url,
  cache: false,
  success: function(html){
    $(".newCommentForm").show();
	$("#tx_extcomments_replyForm0").append(html);
	$("#replyNews_"+linkID).hide();
  }
});
}

function replyComment(url, commentID, linkID){
$.ajax({
  url: url,
  cache: false,
  success: function(html){
	$("#replyPost"+commentID).show();
	$("#replyPost"+commentID).html(html);
	$("#reply_"+linkID).hide();
	//Cufon.replace(".comments-number h3", { hover:true, fontFamily:'Existence Light' });
  }
});
}

function submitComment(objectID) {
	var firstname = $('input#tx_comments_pi1_firstname_' + objectID).val();
	var email = $('input#tx_comments_pi1_email_' + objectID).val();
	var content = $('textarea#tx_comments_pi1_content_' + objectID).val();
	var itemurl = $('input#tx_comments_pi1_itemurl_' + objectID).val();
	var itemurlchk = $('input#tx_comments_pi1_itemurlchk_' + objectID ).val();
	var currPage = $('input#tx_comments_pi1_page').val();
	var data = 'tx_comments_pi1[firstname]=' + firstname + '&tx_comments_pi1[email]=' + email + '&tx_comments_pi1[content]=' + content + '&tx_comments_pi1[itemurl]=' + itemurl + '&tx_comments_pi1[itemurlchk]=' + itemurlchk + '&tx_comments_pi1[submit]=1&tx_comments_pi1[replyTo]=' + objectID+'&tx_comments_pi1[ajaxReply]=1&no_cache=1';
	var currentUrl = document.location.href;
	if(currentUrl.indexOf('?') != -1)
		currentUrl = currentUrl+"&tx_comments_pi1[ajaxSubmit]=1";
	else 
		currentUrl = currentUrl+"?tx_comments_pi1[ajaxSubmit]=1";
	
	if(objectID==0) {
		data = data + '&tx_comments_pi1[page]=0';
	} else {
		data = data + '&tx_comments_pi1[page]=' + currPage;
	}
	currentUrl = currentUrl.replace('#comentarii', '');
	currentUrl = currentUrl.replace('#commentAddLink', '');
	$.ajax({
  url: currentUrl,
  cache: false,
  type: "POST",
  data: data,

  success: function(html){
	$("#items").html(html);
	//$("#firstComment").html(html);
	//$(".newCommentForm").show();
	$("#tx_extcomments_replyForm" + objectID).show();
	$("#reply_"+objectID).show();
//	$("#comment-user" + objectID).hide();
//	$("#post-comment" + objectID).hide();
//	Cufon.replace(".comments-number h3", { hover:true, fontFamily:'Existence Light' });
	$('body').scrollTo('.comments-number',100)
  }
 
  

});
return false;
}


function report(url, itemID) {
	var data = url+'&tx_comments_pi1[ajaxReport]=1';
$.ajax({
	url: document.location.href,
	cache: false,
	type: "POST",
	data: data,
	success: function(html){
		$("#items").html(html);
	//	Cufon.replace(".comments-number h3", { hover:true, fontFamily:'Existence Light' });
	}
});
}