function CheckFields()
{
	if (document.contato.nome.value == "")
	{
		alert("Campo nome em branco.");
		document.contato.nome.focus();
		return false;
	}
	else if (document.contato.email.value == "")
	{
		alert("Campo email em branco.");
		document.contato.email.focus();
		return false;
	}
	else if (document.contato.clube.value == "")
	{
		alert("Campo clube em branco.");
		document.contato.clube.focus();
		return false;
	}
	else if (document.contato.distrito.value == "")
	{
		alert("Campo distrito em branco.");
		document.contato.distrito.focus();
		return false;
	}
	return true;
}

function Wopen(NomePagina)
{
	window.open(NomePagina, "", "toolbars=no,menubar=no,statusbar=no,scrollbars=no,width=400,height=300,left=200,rigth=200");
}

/*
 * Função para escrever uma tag
 * HTML numa página dinâmicamente.
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @Version 1.0, March 12, 2003;
 */
function WriteHTMLTag(foto)
{
	var tag = "<img src='"+foto+"' name='Foto' width='400' height='300'>";
	return document.write(tag);
}

/*
 * Função que pega o valor de qualquer
 * variável URL passada para uma página.
 * ex:
 * url = pagina.html?nome=valor;
 * var name = GetURLVariable('nome');
 * document.write(name);
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @Version 1.0, March 12, 2003;
 */
function GetURLVariable(varname)
{
	var	href = window.location.search;
	var	valor =	'';
	for (i = href.lastIndexOf(varname + '=')  + varname.length + 1; ((href.substr(i, 1) != '&') && (href.substr(i, 1) != '')); i++)
		valor = valor + href.substr(i, 1);
	return valor;
}

/*
 * Função para retroceder
 * as fotos em infoco
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @Version 1.0, February 25, 2003;
 */
function Anterior()
{
	if (which > 0)
	{
		window.status = '';
		which--;
		document.images.photoslider.src = photos[which];
		what--;
		document.form.descricao.value = text[what];
	}
}

/*
 * Função para avançar
 * as fotos em infoco
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @Version 1.0, February 25, 2003;
 */
function Proxima()
{
	if (which < photos.length - 1)
	{
		which++;
		document.images.photoslider.src = photos[which];
		what++;
		document.form.descricao.value = text[what];
	}
	else 
		alert("Fim da galeria.");
}

/*
 * Função para capturar o click do mouse.
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @return: ano;
 * @Version 1.0, February 25, 2003;
 */
function click() 
{
	if (event.button == 2) 
	alert ("Copyright © "+year+", INSOMNIA. Todos os direitos reservados.");
}

/*
 * Função para capturar as teclas do teclado.
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @return: ano;
 * @Version 1.0, February 25, 2003;
 */
function Tecla(e) 
{
	if (event.keyCode == 16)
		alert ("Copyright © "+year+", INSOMNIA. Todos os direitos reservados.");
	if (event.keyCode == 78)
		alert ("Copyright © "+year+", INSOMNIA. Todos os direitos reservados.");
	if (event.keyCode == 17)
		alert ("Copyright © "+year+", INSOMNIA. Todos os direitos reservados.")
}

/*
 * Função que serve para
 * deixar o cursor no campo
 * nome assim que o usuário chegar
 * na página de cadastro.
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @Version 1.0, February 18, 2003;
 */
function FocusNome()
{
	document.form.nome.focus();
}

/*
 * Função para exibir as 
 * fotos em tamanho grande.
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @Version 1.0, February 17, 2003;
 */
function MM_openBrWindow(theURL,winName,features) 
{
  window.open(theURL,winName,features);
}

/*
 * Função para retornar o ano.
 *
 * @Author: Developed by Gustavo V. L. de Almeida;
 * @return: ano;
 * @Version 1.0, February 06, 2003;
 */
function ShowDate()
{
	var year = new Date();
	return document.write(year.getYear());
}
