function redireciona()
{
	window.location = "index.asp";
}
function Janela(theURL,winName,w,h)
{
	l = (screen.availWidth-10 - w) / 2;
	t = (screen.availHeight-20 - h) / 2;
	features = "width="+w+",height="+h+",left="+l+",top="+t;
	features += ",screenX="+l+",screenY="+t;
	features += ",scrollbars=0,resizable=0,location=0";
	features += ",menubar=0,toolbar=0,status=0";
	window.open(theURL,winName,features);
}
function startupload(progressID)
{
	Janela("progress.asp?progressid="+progressID,null,410,200);
}
function maiusculas(objeto)
{
	campo = eval (objeto);
	campo.value = campo.value.toUpperCase();
}
function minusculas(objeto)
{
	campo = eval (objeto);
	campo.value = campo.value.toLowerCase();
}
function mascaraData(fld, keypress)
{
	campo = eval (fld);
	separador = '/'; 
	conjunto1 = 2;
	conjunto2 = 5;
	if (keypress > 47 && keypress < 58)
	{
		if (campo.value.length == conjunto1)
		{
			campo.value = campo.value + separador;
		}
		if (campo.value.length == conjunto2)
		{
			campo.value = campo.value + separador;
		}
		return true;
	}
	return false;
}
function checkUncheckAll(theElement)
{
	var theForm = theElement.form, z = 0;
	while (theForm[z].type == 'checkbox' && theForm[z].name != 'todos')
	{
		theForm[z].checked = theElement.checked;
		z++;
	}
}
function confirmSubmit(theTextConfirm,theTextError,theElement)
{
	var theForm = theElement.form, z = 0;
	var encontrou = false;
	while (theForm[z].type == 'checkbox')
	{
		if (theForm[z].checked)
			encontrou = true;
		z++;
	}
	if (encontrou)
		return confirm(theTextConfirm);
	else
		alert(theTextError);
	return false;
}
function verificaSubmitCores(theForm)
{
	if (theForm.fundo.value == '')
	{
		alert('Digite a cor do fundo!');
		theForm.fundo.focus();
		return false;
	}
	if (theForm.fundo.value.length < 6)
	{
		alert('Verifique a cor do fundo!');
		theForm.fundo.focus();
		return false;
	}
	if (theForm.texto.value == '')
	{
		alert('Digite a cor do texto!');
		theForm.texto.focus();
		return false;
	}
	if (theForm.texto.value.length < 6)
	{
		alert('Verifique a cor do texto!');
		theForm.texto.focus();
		return false;
	}
	return true;
}
function verificaSubmitBanners(theForm,progressID)
{
	if (theForm.banner.value == '')
	{
		alert('Digite o nome do banner!');
		theForm.banner.focus();
		return false;
	}
	if (theForm.acao.value != 'editar')
	{
		if (theForm.tipo.selectedIndex == -1)
		{
			alert('Selecione o tipo do banner!');
			theForm.tipo.focus();
			return false;
		}
		ext = theForm.imagem.value;
		if (ext != '')
		{
			ext = ext.substring(ext.length-3,ext.length);
			ext = ext.toLowerCase();
			if (ext != 'jpg' && ext != 'swf')
			{
				alert('O arquivo selecionado não poderá ser enviado. Formatos permitidos: JPG ou SWF!');
				theForm.imagem.focus();
				return false;
			}
		}
		else
		{
			alert('Selecione a imagem do banner!');
			theForm.imagem.focus();
			return false;
		}
		ext_2 = theForm.imagem_2.value;
		if (ext_2 != '')
		{
			ext_2 = ext_2.substring(ext_2.length-3,ext_2.length);
			ext_2 = ext_2.toLowerCase();
			if (ext_2 != 'jpg')
			{
				alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
				theForm.imagem_2.focus();
				return false;
			}
		}
		ext_3 = theForm.imagem_3.value;
		if (ext_3 != '')
		{
			if ((theForm.tem.value == '' && ext == '') || (theForm.tem_2.value == '' && ext_2 == ''))
			{
				alert('Inclua as imagens na ordem correta!');
				theForm.imagem_2.focus();
				return false;
			}
			ext_3 = ext_3.substring(ext_3.length-3,ext_3.length);
			ext_3 = ext_3.toLowerCase();
			if (ext != 'jpg' || ext_2 != 'jpg' || ext_3 != 'jpg')
			{
				alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
				theForm.imagem_3.focus();
				return false;
			}
		}
		if (ext != '' || ext_2 != '' || ext_3 != '')
			startupload(progressID);
	}
	else
	{
		ext = theForm.imagem.value;
		if (ext != '')
		{
			ext = ext.substring(ext.length-3,ext.length);
			ext = ext.toLowerCase();
			if (ext != 'jpg' && ext != 'swf')
			{
				alert('O arquivo selecionado não poderá ser enviado. Formatos permitidos: JPG ou SWF!');
				theForm.imagem.focus();
				return false;
			}
		}
		ext_2 = theForm.imagem_2.value;
		if (ext_2 != '')
		{
			if (theForm.tem.value == '' && ext == '')
			{
				alert('Inclua as imagens na ordem correta!');
				theForm.imagem.focus();
				return false;
			}
			ext_2 = ext_2.substring(ext_2.length-3,ext_2.length);
			ext_2 = ext_2.toLowerCase();
			if (ext_2 != 'jpg')
			{
				alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
				theForm.imagem_2.focus();
				return false;
			}
		}
		ext_3 = theForm.imagem_3.value;
		if (ext_3 != '')
		{
			if ((theForm.tem.value == '' && ext == '') || (theForm.tem_2.value == '' && ext_2 == ''))
			{
				alert('Inclua as imagens na ordem correta!');
				theForm.imagem_2.focus();
				return false;
			}
			ext_3 = ext_3.substring(ext_3.length-3,ext_3.length);
			ext_3 = ext_3.toLowerCase();
			if (ext_3 != 'jpg')
			{
				alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
				theForm.imagem_3.focus();
				return false;
			}
		}
		if (ext != '' || ext_2 != '' || ext_3 != '')
			startupload(progressID);
	}
	return true;
}
function verificaSubmitNoticias(theForm,progressID)
{
	if (theForm.titulo.value == '')
	{
		alert('Digite o título da notícia!');
		theForm.titulo.focus();
		return false;
	}
	if (theForm.texto.value == '')
	{
		alert('Digite o texto da notícia!');
		theForm.texto.focus();
		return false;
	}
	ext_p = theForm.foto_p.value;
	if (ext_p != '')
	{
		ext_p = ext_p.substring(ext_p.length-3,ext_p.length);
		ext_p = ext_p.toLowerCase();
		if (ext_p != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_p.focus();
			return false;
		}
	}
	ext_1 = theForm.foto_1.value;
	if (ext_1 != '')
	{
		if (theForm.tem_p.value == '' && ext_p == '')
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_1 = ext_1.substring(ext_1.length-3,ext_1.length);
		ext_1 = ext_1.toLowerCase();
		if (ext_1 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_1.focus();
			return false;
		}
	}
	ext_2 = theForm.foto_2.value;
	if (ext_2 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_2 = ext_2.substring(ext_2.length-3,ext_2.length);
		ext_2 = ext_2.toLowerCase();
		if (ext_2 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_2.focus();
			return false;
		}
	}
	ext_3 = theForm.foto_3.value;
	if (ext_3 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == '') || (theForm.tem_2.value == '' && ext_2 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_3 = ext_3.substring(ext_3.length-3,ext_3.length);
		ext_3 = ext_3.toLowerCase();
		if (ext_3 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_3.focus();
			return false;
		}
	}
	ext_4 = theForm.foto_4.value;
	if (ext_4 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == '') || (theForm.tem_2.value == '' && ext_2 == '') || (theForm.tem_3.value == '' && ext_3 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_4 = ext_4.substring(ext_4.length-3,ext_4.length);
		ext_4 = ext_4.toLowerCase();
		if (ext_4 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_4.focus();
			return false;
		}
	}
	if (ext_p != '' || ext_1 != '' || ext_2 != '' || ext_3 != '' || ext_4 != '')
		startupload(progressID);
	return true;
}
function verificaSubmitKits(theForm,progressID)
{
	if (theForm.titulo.value == '')
	{
		alert('Digite o título do kit!');
		theForm.titulo.focus();
		return false;
	}
	if (theForm.texto.value == '')
	{
		alert('Digite o texto do kit!');
		theForm.texto.focus();
		return false;
	}
	ext_p = theForm.foto_p.value;
	if (ext_p != '')
	{
		ext_p = ext_p.substring(ext_p.length-3,ext_p.length);
		ext_p = ext_p.toLowerCase();
		if (ext_p != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_p.focus();
			return false;
		}
	}
	ext_1 = theForm.foto_1.value;
	if (ext_1 != '')
	{
		if (theForm.tem_p.value == '' && ext_p == '')
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_1 = ext_1.substring(ext_1.length-3,ext_1.length);
		ext_1 = ext_1.toLowerCase();
		if (ext_1 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_1.focus();
			return false;
		}
	}
	ext_2 = theForm.foto_2.value;
	if (ext_2 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_2 = ext_2.substring(ext_2.length-3,ext_2.length);
		ext_2 = ext_2.toLowerCase();
		if (ext_2 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_2.focus();
			return false;
		}
	}
	ext_3 = theForm.foto_3.value;
	if (ext_3 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == '') || (theForm.tem_2.value == '' && ext_2 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_3 = ext_3.substring(ext_3.length-3,ext_3.length);
		ext_3 = ext_3.toLowerCase();
		if (ext_3 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_3.focus();
			return false;
		}
	}
	ext_4 = theForm.foto_4.value;
	if (ext_4 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == '') || (theForm.tem_2.value == '' && ext_2 == '') || (theForm.tem_3.value == '' && ext_3 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_4 = ext_4.substring(ext_4.length-3,ext_4.length);
		ext_4 = ext_4.toLowerCase();
		if (ext_4 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_4.focus();
			return false;
		}
	}
	if (ext_p != '' || ext_1 != '' || ext_2 != '' || ext_3 != '' || ext_4 != '')
		startupload(progressID);
	return true;
}
function verificaSubmitPublicacoes(theForm,progressID)
{
	if (theForm.titulo.value == '')
	{
		alert('Digite o título do livro/publicação!');
		theForm.titulo.focus();
		return false;
	}
	if (theForm.autor.value == '')
	{
		alert('Digite o nome do autor ou da editora!');
		theForm.autor.focus();
		return false;
	}
	ext_p = theForm.foto_p.value;
	if (ext_p == '')
	{
		alert('Selecione a imagem de capa do livro/publicação!');
		theForm.foto_p.focus();
		return false;
	}
	ext_p = ext_p.substring(ext_p.length-3,ext_p.length);
	ext_p = ext_p.toLowerCase();
	if (ext_p != 'jpg')
	{
		alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
		theForm.foto_p.focus();
		return false;
	}
	ext_1 = theForm.foto_1.value;
	if (ext_1 != '')
	{
		if (theForm.tem_p.value == '' && ext_p == '')
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_1 = ext_1.substring(ext_1.length-3,ext_1.length);
		ext_1 = ext_1.toLowerCase();
		if (ext_1 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_1.focus();
			return false;
		}
	}
	ext_2 = theForm.foto_2.value;
	if (ext_2 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_2 = ext_2.substring(ext_2.length-3,ext_2.length);
		ext_2 = ext_2.toLowerCase();
		if (ext_2 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_2.focus();
			return false;
		}
	}
	if (ext_p != '' || ext_1 != '' || ext_2 != '')
		startupload(progressID);
	return true;
}
function verificaSubmitParceiros(mode,theForm,progressID)
{
	if (theForm.tipo.selectedIndex == -1)
	{
		alert('Selecione o tipo do parceiro!');
		theForm.tipo.focus();
		return false;
	}
	if (theForm.nome.value == '')
	{
		alert('Digite o nome do parceiro!');
		theForm.nome.focus();
		return false;
	}
	ext = theForm.imagem.value;
	if (mode == 'incluir' || (mode == 'editar' && ext != ''))
	{
		if (ext == '')
		{
			alert('Selecione a logomarca do parceiro!');
			theForm.imagem.focus();
			return false;
		}
		else
		{
			ext = ext.substring(ext.length-3,ext.length);
			ext = ext.toLowerCase();
			if (ext != 'jpg')
			{
				alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
				theForm.imagem.focus();
				return false;
			}
		}
		startupload(progressID);
	}
	return true;
}
function verificaSubmitLinks(theForm)
{
	if (theForm.link.value == '')
	{
		alert('Digite o nome do link!');
		theForm.link.focus();
		return false;
	}
	if (theForm.url.value == '')
	{
		alert('Digite o endereço do link!');
		theForm.url.focus();
		return false;
	}
	return true;
}
function verificaSubmitTermos(theForm)
{
	if (theForm.termo.value == '')
	{
		alert('Digite o termo de referência!');
		theForm.termo.focus();
		return false;
	}
	return true;
}
function verificaSubmitEnquetes(theForm)
{
	if (theForm.data.value == '')
	{
		alert('Digite data da enquete!');
		theForm.data.focus();
		return false;
	}
	if (theForm.pergunta.value == '')
	{
		alert('Digite a pergunta!');
		theForm.pergunta.focus();
		return false;
	}
	return true;
}
function verificaSubmitEntrevistas(theForm,progressID)
{
	if (theForm.data.value == '')
	{
		alert('Digite data da entrevista!');
		theForm.data.focus();
		return false;
	}
	if (theForm.entrevistado.value == '')
	{
		alert('Digite o nome do entrevistado!');
		theForm.entrevistado.focus();
		return false;
	}
	if (theForm.sigla_entrevistado.value == '')
	{
		alert('Digite a sigla do entrevistado!');
		theForm.sigla_entrevistado.focus();
		return false;
	}
	if (theForm.entrevistador.value == '')
	{
		alert('Digite o nome do entrevistador!');
		theForm.entrevistador.focus();
		return false;
	}
	if (theForm.sigla_entrevistador.value == '')
	{
		alert('Digite a sigla do entrevistador!');
		theForm.sigla_entrevistador.focus();
		return false;
	}
	if (theForm.introducao.value == '')
	{
		alert('Digite o texto de introdução!');
		theForm.introducao.focus();
		return false;
	}
	ext_p = theForm.foto_p.value;
	if (ext_p != '')
	{
		ext_p = ext_p.substring(ext_p.length-3,ext_p.length);
		ext_p = ext_p.toLowerCase();
		if (ext_p != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_p.focus();
			return false;
		}
	}
	ext_1 = theForm.foto_1.value;
	if (ext_1 != '')
	{
		if (theForm.tem_p.value == '' && ext_p == '')
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_1 = ext_1.substring(ext_1.length-3,ext_1.length);
		ext_1 = ext_1.toLowerCase();
		if (ext_1 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_1.focus();
			return false;
		}
	}
	ext_2 = theForm.foto_2.value;
	if (ext_2 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_2 = ext_2.substring(ext_2.length-3,ext_2.length);
		ext_2 = ext_2.toLowerCase();
		if (ext_2 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_2.focus();
			return false;
		}
	}
	ext_3 = theForm.foto_3.value;
	if (ext_3 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == '') || (theForm.tem_2.value == '' && ext_2 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_3 = ext_3.substring(ext_3.length-3,ext_3.length);
		ext_3 = ext_3.toLowerCase();
		if (ext_3 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_3.focus();
			return false;
		}
	}
	ext_4 = theForm.foto_4.value;
	if (ext_4 != '')
	{
		if ((theForm.tem_p.value == '' && ext_p == '') || (theForm.tem_1.value == '' && ext_1 == '') || (theForm.tem_2.value == '' && ext_2 == '') || (theForm.tem_3.value == '' && ext_3 == ''))
		{
			alert('Inclua as imagens na ordem correta!');
			theForm.foto_p.focus();
			return false;
		}
		ext_4 = ext_4.substring(ext_4.length-3,ext_4.length);
		ext_4 = ext_4.toLowerCase();
		if (ext_4 != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_4.focus();
			return false;
		}
	}
	if (ext_p != '' || ext_1 != '' || ext_2 != '' || ext_3 != '' || ext_4 != '')
		startupload(progressID);
	return true;
}
function verificaSubmitOpcoes(theForm)
{
	if (theForm.opcao.value == '')
	{
		alert('Digite a opção!');
		theForm.opcao.focus();
		return false;
	}
	return true;
}
function verificaSubmitItens_Entrevistas(theForm)
{
	if (theForm.pergunta.value == '')
	{
		alert('Digite a pergunta do entrevistador!');
		theForm.pergunta.focus();
		return false;
	}
	if (theForm.resposta.value == '')
	{
		alert('Digite a resposta do entrevistado!');
		theForm.resposta.focus();
		return false;
	}
	return true;
}
function verificaSubmitEventos(theForm,progressID)
{
	if (theForm.data.value == '')
	{
		alert('Digite a data do evento!');
		theForm.data.focus();
		return false;
	}
	if (theForm.data.value.length < 10)
	{
		alert('Verifique a data do evento!');
		theForm.data.focus();
		return false;
	}
	if (theForm.evento.value == '')
	{
		alert('Digite o nome do evento!');
		theForm.evento.focus();
		return false;
	}
	ext_p = theForm.foto_p.value;
	if (ext_p != '')
	{
		ext_p = ext_p.substring(ext_p.length-3,ext_p.length);
		ext_p = ext_p.toLowerCase();
		if (ext_p != 'jpg')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
			theForm.foto_p.focus();
			return false;
		}
	}
	if (ext_p != '')
		startupload(progressID);
	return true;
}
function verificaSubmitItens_Eventos(theForm,progressID)
{
	if (theForm.legenda.value == '')
	{
		alert('Digite a legenda da foto!');
		theForm.legenda.focus();
		return false;
	}
	ext_p = theForm.foto_p.value;
	if (ext_p == '')
	{
		alert('Escolha a foto!');
		theForm.foto_p.focus();
		return false;
	}
	ext_p = ext_p.substring(ext_p.length-3,ext_p.length);
	ext_p = ext_p.toLowerCase();
	if (ext_p != 'jpg')
	{
		alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
		theForm.foto_p.focus();
		return false;
	}
	startupload(progressID);
	return true;
}
function verificaSubmitArtigos(theForm,progressID)
{
	if (theForm.data.value == '')
	{
		alert('Digite a data do artigo!');
		theForm.data.focus();
		return false;
	}
	if (theForm.titulo.value == '')
	{
		alert('Digite o título do artigo!');
		theForm.titulo.focus();
		return false;
	}
	if (theForm.autor.value == '')
	{
		alert('Digite o autor do artigo!');
		theForm.autor.focus();
		return false;
	}
	if (theForm.descricao.value == '')
	{
		alert('Digite a descrição do artigo!');
		theForm.descricao.focus();
		return false;
	}
	ext = theForm.arquivo.value;
	ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
	ext_f = theForm.foto.value;
	ext_f = ext_f.substring(ext_f.length-3,ext_f.length);
	ext_f = ext_f.toLowerCase();
	if (theForm.acao.value == 'incluir')
	{
		if (ext == '')
		{
			alert('Selecione o arquivo PDF com o artigo!');
			theForm.arquivo.focus();
			return false;
		}
		if (ext != 'pdf')
		{
			alert('O arquivo selecionado não poderá ser enviado. Formato permitido: PDF!');
			theForm.arquivo.focus();
			return false;
		}
	}
	else
	{
		if (ext != '')
		{
			if (ext != 'pdf')
			{
				alert('O arquivo selecionado não poderá ser enviado. Formato permitido: PDF!');
				theForm.arquivo.focus();
				return false;
			}
		}
	}
	if (ext_f != '' && ext_f != 'jpg')
	{
		alert('O arquivo selecionado não poderá ser enviado. Formato permitido: JPG!');
		theForm.foto.focus();
		return false;
	}
	if (ext != '' || ext_f != '')
		startupload(progressID);
	return true;
}
function verificaBusca(theForm)
{
	if (theForm.termo.value == '')
	{
		alert('Digite um termo para a busca!');
		theForm.termo.focus();
		return false;
	}
	if (theForm.termo.value.length < 4)
	{
		alert('Digite um termo para a busca com pelo menos 4 caracteres!');
		theForm.termo.focus();
		return false;
	}
	return true;
}
function verificaEnquete(theForm)
{
	z = 1;
	while (theForm[z].type == 'radio')
	{
		if (theForm[z].checked)
			return true;
		z++;
	}
	alert('Selecione uma das opções acima.');
	return false;
}
function verificaEmail(theForm)
{
	if (theForm.email.value == '')
	{
		alert('Digite seu e-mail!');
		theForm.email.focus();
		return false;
	}
	else
	{
		prim = theForm.email.value.indexOf("@");
		if (prim < 2)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("@",prim + 1) != -1)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf(".") < 1)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf(" ") != -1)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf(";") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf(".@") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("@.") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf(".com.br.") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("/") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("[") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("]") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("(") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf(")") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("'") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("\"") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
		if(theForm.email.value.indexOf("..") > 0)
		{
			alert("O e-mail informado não parece estar correto.");
			theForm.email.focus();
			return false;
		}
	}
	return true;
}
function verificaNewsletter(theForm)
{
	if (theForm.nome.value == '')
	{
		alert('Digite seu nome!');
		theForm.nome.focus();
		return false;
	}
	if (!verificaEmail(theForm))
		return false;
	if (theForm.estado.selectedIndex != 0)
	{
		if (theForm.cidade.value == '')
		{
			alert('Digite a cidade do contato!');
			theForm.cidade.focus();
			return false;
		}
	}
	return true;
}
function verificaFale(theForm)
{
	if (theForm.nome.value == '')
	{
		alert('Digite seu nome!');
		theForm.nome.focus();
		return false;
	}
	if (!verificaEmail(theForm))
		return false;
	if (theForm.mensagem.value == '')
	{
		alert('Digite sua mensagem!');
		theForm.mensagem.focus();
		return false;
	}
	return true;
}
function verificaIndique(theForm)
{
	if (theForm.nome.value == '')
	{
		alert('Digite seu nome!');
		theForm.nome.focus();
		return false;
	}
	if (theForm.nome_para.value == '')
	{
		alert('Digite o nome de seu colega!');
		theForm.nome_para.focus();
		return false;
	}
	if (!verificaEmail(theForm))
		return false;
	return true;
}
