var playervars = {    
	contentpath: "http://www.unilestemg.br/portal/depoimentos",
	video: dir+"/"+videos[0]+".flv",
	preview: "fundo_video.gif",							
	skin: "skin-play-seek-mute-vol.swf",
	skincolor: "0xAAAAAA"
};	
		
var params = { scale: "noscale", allowfullscreen: "true", salign: "tl", bgcolor: "#ffffff", base: "."};  	
var attributes = { align: "center" };
	
swfobject.embedSWF("http://www.unilestemg.br/portal/video_player/flvplayer/flvplayer.swf", "videoCanvas", "320", "280", "9.0.28", "http://www.unilestemg.br/portal/video_player/flvplayer/expressInstall.swf", playervars, params, attributes);

// Playlist
window.onload = function() { 
	
	for(i=1;i<=videos.length;i++)
	{
		eval("var video"+i+" = document.getElementById('video"+i+"');");
		eval("var sobre"+i+" = document.getElementById('video"+i+"');");
		eval("video"+i+".onclick = function() { var player = swfobject.getObjectById(\"videoCanvas\"); playervars.video = \""+dir+"/"+videos[i-1]+".flv\", playervars.autoplay = \"true\"; player.updatePlayer(playervars); };");
		propriedade("video"+i,"background","url('"+videos[i-1]+".jpg') 0 0 no-repeat;")
		eval("video"+i+".onmouseover = function() { sobre"+i+".src = 'http://www.unilestemg.br/portal/depoimentos/play_over.gif' }");
		eval("video"+i+".onmouseout = function() { sobre"+i+".src = 'http://www.unilestemg.br/portal/depoimentos/play_out.gif' }");
	}

	exibe_grupo(1);									  
};

function exibe_resposta(num)
{
	display('resposta'+num,'inline');
	expandir = document.getElementById('expandir'+num);
	expandir.href = 'javascript:esconde_resposta('+num+')';
	expandir.innerHTML = "[ocultar resposta]";
}
function esconde_resposta(num)
{
	display('resposta'+num,'none');
	expandir = document.getElementById('expandir'+num);
	expandir.href = 'javascript:exibe_resposta('+num+')';
	expandir.innerHTML = "[ler resposta]";
}

function imprime_depoimentos()
{
	for(num=1;num<=videos.length;num++)
	{
		document.write('<tr>');
		document.write('<td width="50%"><span class="imagem" id="video'+num+'"><img alt="play" id="sobre'+num+'" src="http://www.unilestemg.br/portal/depoimentos/play_out.gif" width="170"/><span></td>');
		document.write('<td id="pergunta'+num+'" class="pergunta" width="50%"><em>&ldquo;'+pergunta[num-1]+'&rdquo;</em></td>');
		document.write('</tr><tr>');
		document.write('<td colspan="2">');
		if(resposta[num-1]!='')
			document.write('<span id="resposta'+num+'" class="resposta">&ldquo;'+resposta[num-1]+'&rdquo;.</span><a href="javascript:exibe_resposta('+num+')" id="expandir'+num+'" class="expandir">[ler resposta]</a>');
		document.write('</td></tr>');
	}
}