// JavaScript Document
function sShowComments(i,t){
	goAJAX("sBlogComm"+i,'ajax/e.blogs.loadcomments.php', 'i=' + i + '&t=' + t);
	GetId('sBlogComm'+i).style.display='';
	OcultarVtna();
	}
function sDisplayComments(i){
	//element.style.display
	var x=GetId('sBlogComm'+i).style;
	if (x.display=='none'){
		//Effect.BlindDown('sBlogComm'+i);
		x.display='';
		//x.display='';
		}else{
			x.display='none';
			}
	}

// comReplyId = the id of the comment if itīs a reply comment, or 0 if itīs not
function sAddNewComment(i,t,comReplyId){
	winajax('Add New Comment','350','200','ajax/e.blogs.addcomment.php','i='+i+'&t='+t+'&reply='+comReplyId);
	}
function SubmitComment(i,t){
	if (GetId('frmComment').Comment==''){
		alert('Please enter your Comment');
		}else{
		var xP= 'i=' + i + '&t=' + t;
		xP = xP + '&Comment=' + GetId('frmComment').Comment.value;
		goAJAX('frmComment','ajax/e.blogs.addcomment.php', xP);
		}
	}
function sCommVote(i,v){
	// v es 1 o 2, 2 es negativo, el destino lo procesa y hace en echo del valor actual en votos
	// i es el id del comentario
	// CommVote + i es el id del div que tiene el valor del voto, puede ser el que contiene los botones para votar a favor o en contra
	var xP= 'i=' + i + '&v=' + v;
	goAJAX('sCommVote_'+i,'ajax/e.blogs.vote.php', xP);
	}
	
function AddComment(){
	GetId('btnCerrarVtna').style.display='none';
	var http='com_body='+GetId("frmAddComment").com_body.value;
	http += '&i='+GetId("frmAddComment").i.value;
	http += '&t='+GetId("frmAddComment").t.value;
	http += '&reply='+GetId("frmAddComment").reply.value;
	goAJAX("frmAddComment",'ajax/e.blogs.addcomment.php', http);
}
function sShowProfile(i){
	winajax('View Profile','350','350','ajax/blogs.show.profile.php','i='+i);
	}
