// JavaScript Document

function listaVideos(){
   $("#lista").html("<img src=\"../img/videoteca/carregando.gif\" style=\"margin-left:110px;\" />");
   
	$.post("../private/includes/videoteca/lista_videos.php", {
		   prog: $("#prog").val(),
		   busca: limpa($("#busca").val()),
		   dateIni: $("#dateIni").val(),
		   dateFim: $("#dateFim").val(),
		   buscar: true
		   },
		   function(data){
			   $("#lista").html(data);
		   }
	);
}

function listaByDate(campo){
	if($(campo).val().lenght == 10)	{
		listaVideos();	
	}
}

function showTexto() {
    if ($("#txtVideo").is(":hidden")) {
        $("#txtVideo").slideDown("slow");
        $("span.txt").html("-");
    } else {
        $("#txtVideo").hide("slow");
        $("span.txt").html("+");
    }
}

function showComents() {
    if ($("#txtComents").is(":hidden")) {
        $("#txtComents").slideDown("slow");
        $("span.coment").html("-");
    } else {
        $("#txtComents").hide("slow");
        $("span.coment").html("+");
    }
}


function showIncorp() {
    if ($("#txtIncorp").is(":hidden")) {
        $("#txtIncorp").slideDown("slow");
        $("span.inc").html("-");
    } else {
        $("#txtIncorp").hide("slow");
        $("span.inc").html("+");
    }
}

function pagina(start, codVideo){
    $("#recebe_coment").html("<img src=\"../img/videoteca/carregando.gif\" style=\"margin-left:110px;\" />");
	$.post("../private/includes/videoteca/coments.php", {
		   ID: codVideo,
		   i: start
		   }, function(data){
			   $("#recebe_coment").html(data);
			}
	);
	
}
