function postCommentAndUpdateList(boardId,threadName, currentLocale) {
	
	//var url = contextPath+"/"+liveSite+"/ajax-pages/lithiumcommentpostservlet.html"; 
	var url = "/" + currentLocale + "/infamous2/community/dummy.html";
	
//	var threadName = "123";
	var typeHereText = "Comment on this article... (Max. 400 characters)"; 
//	var currentLocale = "en_US";
//	var boardId = "en_US";
	var commentText = document.commentForm.commentText.value;
//	alert(commentText);
	if (commentText.length > 400) {
		commentText = commentText.substr(0, 400);
	}
	
	if (commentText == "" || commentText == typeHereText) {
		alert("Please enter text");
		resetPostInput(typeHereText);
	} else {
		
		var params = {boardId: boardId, threadName: threadName, commentText: commentText , currentLocale: currentLocale, pageOption: "post-comment"};	
		jQuery.post(url,params, refreshComments);
	}
}

function refreshComments(){
	document.commentForm.commentText.value = "";
	var boardId = document.commentForm.boardId.value;
	var threadName = document.commentForm.threadName.value;
	var pageSize = document.commentForm.pageSize.value;
	var locale = document.commentForm.locale.value;
	var pageNo = "1";
	var url = "/" + locale + "/infamous2/community/dummy.html";
	var params = {boardId: boardId, threadName: threadName , pageNo: pageNo, pageSize: pageSize, locale: locale, pageOption: "page-comment"};	
	jQuery.post(url,params, callbackPageComments);
}

function getCommentPage(boardId, threadName, locale, pageNo, pageSize) {
	
	var url = "/" + locale + "/infamous2/community/dummy.html";
	var params = {boardId: boardId, threadName: threadName , pageNo: pageNo, pageSize: pageSize, locale: locale, pageOption: "page-comment"};	
	jQuery.post(url,params, callbackPageComments);
}

function callbackPageComments(data){
	//alert("123");
	//alert(data);
	var content = jQuery(data).find('#comments');
//	alert(content.html());
	jQuery('#comments').html(content.html());
	var paging = jQuery(data).find('#blog_nav');
//	alert(paging.html());
	jQuery('#blog_nav').html(paging.html());

	var commentCount= jQuery(data).find('#divCommentCount');
	jQuery('#divCommentCount').html(commentCount.html());


}

