function printActiveX(content)
{
	document.write(content);	
}

function openVideo(video)
{
	var page = "video.php?video=" + video;
	window.open(page, 'video', 'scrollbars=no,toolbar=no,status=no,menubar=no,location=no,resizable=no,height=400,width=500');
}

function paginacao(form, id)
{
	form.page.value = id;
	form.isFind.value = "false";
	form.submit();
	return true;
}

function getSaudacao()
{
	var now        = new Date();
	var hora       = now.getHours();
	var minutes    = now.getMinutes();
	var dia_semana = (now.getDay());
	var ano        = now.getUTCFullYear();
	var dia_mes    = ((now.getDate()<10) ? "0" : "")+ now.getDate();
	var mes_atual  = now.getMonth();
	
	showData = getPeriodo(hora)+" "+getDiaSemana(dia_semana)+", "+dia_mes+" de "+getMes(mes_atual)+" de "+ano;
	document.write(showData);
}

function getMes(m)
{
	Mes = new Array("janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro");
	return Mes[m];
}

function getDiaSemana(a)
{
	diaSemana = new Array("Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado");
	return diaSemana[a];
}

function getPeriodo(s)
{
	var bd = "Bom Dia! ";
	var bt = "Boa Tarde! ";
	var bn = "Boa Noite! ";
	
	var periodo = "";
	
	if ((s >= 0) && (s < 12))
	{
		periodo = bd;
	}
	else if ((s >=12 )&&(s < 18))
	{
		periodo = bt;
	}
	else if ((s >= 18) && (s < 24))
	{
		periodo = bn;
	}
	return periodo;
}