var DataAntigaVideo="";
function show_player2(video) // funçao que mostra o player
{
	if(video.indexOf('.wmv')!=-1 || video.indexOf('.avi')!=-1 || video.indexOf('.asf')!=-1 || video.indexOf('.mpe')!=-1 || video.indexOf('.mpg')!=-1 || video.indexOf('.mpeg')!=-1) // vídeo em windows media
		{
		document.write('<OBJECT CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="320" height="304" bgcolor="black" type="application/x-mplayer2">');
		document.write('<PARAM NAME="ShowControls" VALUE="1">');
		document.write('<PARAM NAME="ShowDisplay" VALUE="1">');
		document.write('<PARAM NAME="ShowStatusBar" VALUE="1">');
		document.write('<PARAM NAME="autostart" VALUE="true">');
		document.write('<PARAM NAME="autorewind" VALUE="0">');
		document.write('<PARAM NAME="ShowPositionControls" VALUE="1">');
		document.write('<PARAM NAME="ShowTracker" VALUE="1">');
		document.write('<PARAM NAME="URL" VALUE="'+video+'">');
		document.write('<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">');
		document.write('<PARAM name="uiMode" value="full">');
		document.write('<PARAM name="PlayCount" value="1">');
		document.write('<EMBED SRC="'+video+'" width="320" height="304" bgcolor="black" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/" type="application/x-mplayer2" ShowControls=1 ShowDisplay=0 ShowStatusBar=0 autostart=1 autorewind=0 ShowPositionControls=1 ShowTracker=1></EMBED>');
		document.write('</OBJECT>');
		}
	else // .mov .mp4 - vídeo em quicktime
		{
		document.write('<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="256" bgcolor="black" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0">');
		document.write('<PARAM NAME="cache" VALUE="TRUE">');
		document.write('<PARAM NAME="controller" VALUE="TRUE">');
		document.write('<PARAM NAME="scale" VALUE="tofit">');
		document.write('<PARAM NAME="type" VALUE="video/quicktime">');
		document.write('<PARAM NAME="autoplay" VALUE="true">');
		document.write('<PARAM NAME="src" VALUE="'+video+'">');
		document.write('<PARAM NAME="pluginspage" VALUE="http://www.apple.com/quicktime/download/indext.html">');
		document.write('<EMBED SRC="'+video+'" width="320" height="256" bgcolor="black" pluginspage="http://www.apple.com/quicktime/download/indext.html" type="video/quicktime" cache="true" controler="true" scale="tofit"></EMBED>');
		document.write('</OBJECT>');
		}
document.write( '<div id="player_controls"><table cellpadding="0" cellspacing="0" border="0" width="99%"><tr align="center">' );
document.write( '<td><a href="javascript:;" onClick="javascript:document.email.submit()"><img class="faketext" src="http://j.i.uol.com.br/player/bt_email.gif" height="14" border="0"></a></td>' );
	if ((location.href.indexOf("videoId=")!=-1 && videoId!="" && videoId<vv.length))
	{
	i=videoId;
	}
	else
	{
	i=0;
	}
	pv = vv[i].split('|');
document.write( '<td><a href="'+pv[0]+'"><img class="faketext" src="http://j.i.uol.com.br/player/bt_download.gif" height="14" border="0" alt="Clique com o botão direito e escolha a opção salvar destino como."></a></td>' );
document.write( '<td><a href="javascript:;" onClick="javascript:player_showHelp()"><img class="faketext" src="http://j.i.uol.com.br/player/bt_ajuda.gif" height="14" border="0"></a></td>' );
document.write( '</tr></table></div>' );
// document.write( '<div style="padding:2 2 2 2px; font-family:arial; ">Para copiar um vídeo, clique com o botão direito do mouse em DOWNLOAD e escolha a opção "salvar destino como".</div>' );
}

function baixa_video(video) // funcao que faz o download
{
	pv = vv[video].split('|');
	location.href=pv[0];
}

function show_videolist() // função que mostra a lista de vídeos
{
for(i=0;i<vv.length;i++)
	{
	pv = vv[i].split('|');
	icone = (pv[0].indexOf('.mov')!=-1 || pv[0].indexOf('.mp4')!=-1 || pv[0].indexOf('.wmv')!=-1 || pv[0].indexOf('.avi')!=-1 || pv[0].indexOf('.asf')!=-1 || pv[0].indexOf('.mpe')!=-1 || pv[0].indexOf('.mpg')!=-1 || pv[0].indexOf('.mpeg')!=-1 || pv[0].indexOf('.jhtm')!=-1 || pv[0].indexOf('.htm')!=-1 || pv[0].indexOf('.shl')!=-1) ? 'assistir' : 'instalar' ; // escolhe o ícone
	document.write('<table border="0" cellpadding="6" cellspacing="0" width="436" style="border-bottom: solid White 1px;"><tr><td width="14" bgcolor="'+JgConCor(1)+'">');
	document.write('<img src=http:\/\/img.uol.com.br/ico_'+icone+'.gif border=0>');
	document.write('</td><td id="gray-0" width="100%">');
	if(pv[0].indexOf('.mov')!=-1 || pv[0].indexOf('.mp4')!=-1 || pv[0].indexOf('.wmv')!=-1 || pv[0].indexOf('.avi')!=-1 || pv[0].indexOf('.asf')!=-1 || pv[0].indexOf('.mpe')!=-1 || pv[0].indexOf('.mpg')!=-1 || pv[0].indexOf('.mpeg')!=-1)
	{
		document.write('<a href="javascript:play_video('+i+')">'+pv[1]+'<br>');
	}
	else if(pv[0].indexOf('.jhtm')!=-1 || pv[0].indexOf('.htm')!=-1 || pv[0].indexOf('.shl')!=-1)
	{
		document.write('<a href="'+pv[0]+'">'+pv[1]+'<br>');
	}
	else
	{
		document.write('<a href="javascript:baixa_video('+i+')">'+pv[1]+'<br>');
	}
	document.write('<span style="color:'+JgConCor(1)+';">'+pv[2]+'</span></a>');
	document.write('</td><td id="gray-1">');
	document.write(pv[3]);
	document.write('</td></tr></table>');
	}
}

function show_playerlist() // função que mostra a lista de vídeos
{
for(i=0;i<vv.length;i++)
	{
	pv = vv[i].split('|');
		if(location.href.indexOf("videoId=")!=-1 && videoId==i)
		{
		document.write('<p id="atual" class="video"><span>'+pv[1]+' <span style="color:'+JgConCor(1)+';">'+pv[2]+'</span></span></p>');
		}
		else
		{
			if(pv[0].indexOf('.mov')!=-1 || pv[0].indexOf('.mp4')!=-1 || pv[0].indexOf('.wmv')!=-1 || pv[0].indexOf('.avi')!=-1 || pv[0].indexOf('.asf')!=-1 || pv[0].indexOf('.mpe')!=-1 || pv[0].indexOf('.mpg')!=-1 || pv[0].indexOf('.mpeg')!=-1)
			{
				document.write('<p class="video"><a href="javascript:play_video('+i+')">'+pv[1]+' <span style="color:'+JgConCor(1)+';">'+pv[2]+'</span></a></p>');
			}
			if(pv[0].indexOf('.jhtm')!=-1 || pv[0].indexOf('.htm')!=-1 || pv[0].indexOf('.shl')!=-1)
			{
				document.write('<p class="video"><a href="'+pv[0]+'">'+pv[1]+' <span style="color:'+JgConCor(1)+';">'+pv[2]+'</span></a></p>');
			}
		}
	}
}