function minusculas(theElement)
{
	theElement.value = theElement.value.toLowerCase();
}
function mascaradata(keypress,objeto)
{
	campo = eval (objeto);
	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;
	}
	else
		return false;
}
function impedemenoremaior(keypress)
{
	if (keypress == 60 || keypress == 62)
		return false;
	return true;
}
function checkuncheckall(theElement)
{
	var theForm = theElement.form;
	for (i = 0; i < theForm.length; i++)
	{
		if (theForm[i].type == 'checkbox' && !theForm[i].disabled & theForm[i].name != 'todos')
			theForm[i].checked = theElement.checked;
	}
}
function confirmaexclusao(theTextConfirm,theTextError,theForm)
{
    var encontrou = false;
	for (i = 0; i < theForm.length; i++)
	{
		if (theForm[i].type == 'checkbox' && !theForm[i].disabled & theForm[i].name != 'todos' && theForm[i].checked)
			encontrou = true;
	}
	if (encontrou)
	{
		if (confirm(theTextConfirm))
		    theForm.submit();
	}
	else
		alert(theTextError);
}
function startupload(progressID)
{
    janela("progress.asp?progressid="+progressID,null,410,200);
}
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 categoriaajax(elemCategoria,elemSubcategoria)
{
	var xmlHttp;
	try
	{
		xmlHttp = new XMLHttpRequest();
	}
	catch (e)
	{
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e)
			{
				alert("O seu navegador não suporta AJAX!");
				return false;
			}
		}
	}
	var categoria = elemCategoria.options[elemCategoria.selectedIndex].value;
	xmlHttp.open("GET","categoriaajax.asp?id="+categoria,true);
	xmlHttp.onreadystatechange = function()
	{
		if (xmlHttp.readyState == 4)
		{
			elemSubcategoria.options.length = 0;
			var r = xmlHttp.responseText;
			while (r.indexOf('¦') != -1)
			{
				var opt = document.createElement("option");
				elemSubcategoria.options.add(opt);
				var conjunto = r.substring(0,(i = r.indexOf('¦')));
				r = r.substring(++i);
				var parte1 = conjunto.substring(0,(i = conjunto.indexOf('·')));
				var parte2 = conjunto.substring(++i);
				opt.value = parte1;
				opt.text = parte2;
			}
			elemSubcategoria.selectedIndex = -1;
		}
	}
	xmlHttp.send(null);
}
function verificaemail(theForm)
{
	if (theForm.email.value == '')
	{
		alert('Digite o 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(';') != -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('.com.br.') != -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(']') != -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('"') != -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;
		}
	}
	return true;
}
function verificadata(theForm)
{
	if (theForm.data.value == '')
	{
		alert('Digite a data!');
		theForm.data.focus();
		return false;
	}
	else
	{
		var dia = parseInt(theForm.data.value.substring(0,2),10);
		var mes = parseInt(theForm.data.value.substring(3,5),10);
		var ano = parseInt(theForm.data.value.substring(6,10),10);
		data = new Date();
		if (dia <= 31 && mes <= 12 && ano >= 1900)
		{
			if (theForm.data.value.substring(0,1) == '0' && theForm.data.value.substring(1,2) != '0' || theForm.data.value.substring(0,1) != '0')
			{
				if (theForm.data.value.substring(2,3) == '/')
				{
					if (theForm.data.value.substring(3,4) == '0' && theForm.data.value.substring(4,5) != '0' || theForm.data.value.substring(3,4) != '0')
					{
						if (theForm.data.value.substring(5,6) == '/')
						{
							if (theForm.data.value.substring(6,7) == '0' || theForm.data.value.substring(6,7) == '' && theForm.data.value.substring(7,8) != '0')
							{
								alert('Verifique a data!');
								theForm.data.focus();
								return false;
							}
							if (mes == 2)
							{
								if ((dia > 0) && (dia <= 29))
								{
									if (dia == 29)
									{
										if ((ano % 4) != 0)
										{
											alert('Verifique a data!');
											theForm.data.focus();
											return false;
										}
									}
								}
								else
								{
									alert('Verifique a data!');
									theForm.data.focus();
									return false; 
								}
							}
							if ((mes == 4) || (mes == 6) || (mes == 9) || (mes == 11))
							{
								if (!((dia > 0 ) && (dia <= 30)))
								{
									alert('Verifique a data!');
									theForm.data.focus();
									return false;
								}
							}
							if ((mes == 1) || (mes == 3) || (mes == 5) || (mes ==7) || (mes == 8) || (mes == 10) || (mes == 12))
							{
								if (!((dia > 0) && (dia <= 31)))
								{
									alert('Verifique a data!');
									theForm.data.focus();
									return false;
								}
							}
						}
						else
						{
							alert('Verifique a data!');
							theForm.data.focus();
							return false;
						}
					}
					else
					{
						alert('Verifique a data!');
						theForm.data.focus();
						return false;
					}
				}
				else
				{
					alert('Verifique a data!');
					theForm.data.focus();
					return false;
				}
			}
			else
			{
				alert('Verifique a data!');
				theForm.data.focus();
				return false;
			}
		}
		else
		{
			alert('Verifique a data!');
			theForm.data.focus();
			return false;
		}
	}
	return true;
}
function verificaarquivosobr(theForm,progressID)
{
    ext1 = theForm.arquivo1.value;
    ext1 = ext1.substring(ext1.length-3,ext1.length);
    ext1 = ext1.toLowerCase();
    ext2 = theForm.arquivo2.value;
    ext2 = ext2.substring(ext2.length-3,ext2.length);
    ext2 = ext2.toLowerCase();
    ext3 = theForm.arquivo3.value;
    ext3 = ext3.substring(ext3.length-3,ext3.length);
    ext3 = ext3.toLowerCase();
    if (theForm.ext1.value == '' && ext1 == '')
    {
	    alert('Selecione o arquivo!');
	    theForm.arquivo1.focus();
	    return false;	
    }
    if (ext1 != '' && ext1 != 'swf' && ext1 != 'jpg' && ext1 != 'gif' && ext1 != 'png')
    {
		alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: SWF, JPG, GIF e PNG!');
		theForm.arquivo1.focus();
	    return false;
    }
    if ((ext1 == 'swf' || theForm.ext1.value == 'swf') && (ext2 != '' || ext3 != ''))
    {
        alert('A inclusão de um SWF impede a inclusão de outros arquivos!');
        return false;
    }
    if (theForm.ext2.value == '' && ext2 == '' && ext3 != '')
    {
        alert('Verifique a ordem de inclusão dos arquivos!');
        theForm.arquivo2.focus();
        return false;
    }
    if (ext2 != '' && ext2 != 'jpg' && ext2 != '.gif' && ext2 != '.png')
    {
        alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: JPG, GIF e PNG!');
        theForm.arquivo2.focus();
        return false;
    }
    if (ext3 != '' && ext3 != 'jpg' && ext3 != '.gif' && ext3 != '.png')
    {
        alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: JPG, GIF e PNG!');
        theForm.arquivo3.focus();
        return false;
    }
    theForm.ext1.value = ext1;
    theForm.ext2.value = ext2;
    theForm.ext3.value = ext3;
    if (ext1 != '' || ext2 != '' || ext3 != '')
	    startupload(progressID);
    return true;
}
function verificaarquivoobr1(theForm,progressID)
{
	ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
	if (ext == '')
    {
	    alert('Selecione o arquivo!');
	    theForm.arquivo.focus();
	    return false;	
    }
    if (ext != '' && ext != 'jpg' && ext != 'gif' && ext != 'png')
    {
		alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: JPG, GIF e PNG!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
	if (ext != '')
		startupload(progressID);
    return true;
}
function verificaarquivoobr2(theForm,progressID)
{
	ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
	if (ext == '')
    {
	    alert('Selecione o arquivo!');
	    theForm.arquivo.focus();
	    return false;	
    }
    if (ext != '' && ext != 'mp3')
    {
		alert('O arquivo selecionado não pode ser enviado. Formato permitido: MP3!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
	if (ext != '')
		startupload(progressID);
    return true;
}
function verificaarquivoobr3(theForm,progressID)
{
	ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
	if (ext == '')
    {
	    alert('Selecione o arquivo!');
	    theForm.arquivo.focus();
	    return false;	
    }
    if (ext != '' && ext != 'wmv' && ext != 'mpg' && ext != 'avi')
    {
		alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: WMV, MPG e AVI!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
	if (ext != '')
		startupload(progressID);
    return true;
}
function verificaarquivoobr4(theForm,progressID)
{
	ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
	if (ext == '')
    {
	    alert('Selecione o arquivo!');
	    theForm.arquivo.focus();
	    return false;	
    }
    if (ext != '' && ext != 'swf')
    {
		alert('O arquivo selecionado não pode ser enviado. Formato permitido: SWF!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
	if (ext != '')
		startupload(progressID);
    return true;
}
function verificaarquivosnobr(theForm,progressID)
{
    ext1 = theForm.arquivo1.value;
    ext1 = ext1.substring(ext1.length-3,ext1.length);
    ext1 = ext1.toLowerCase();
    ext2 = theForm.arquivo2.value;
    ext2 = ext2.substring(ext2.length-3,ext2.length);
    ext2 = ext2.toLowerCase();
    ext3 = theForm.arquivo3.value;
    ext3 = ext3.substring(ext3.length-3,ext3.length);
    ext3 = ext3.toLowerCase();
    if (ext1 != '' && ext1 != 'jpg' && ext1 != 'gif' && ext1 != 'png')
    {
		alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: JPG, GIF e PNG!');
		theForm.arquivo1.focus();
	    return false;
    }
	if ((theForm.ext1.value == '' && ext1 == '' && ext2 != '') || (theForm.ext1.value == '' && ext1 == '' && ext3 != '') || (theForm.ext2.value == '' && ext2 == '' && ext3 != ''))
    {
        alert('Verifique a ordem de inclusão dos arquivos!');
        theForm.arquivo2.focus();
        return false;
    }
    if (ext2 != '' && ext2 != 'jpg' && ext2 != '.gif' && ext2 != '.png')
    {
        alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: JPG, GIF e PNG!');
        theForm.arquivo2.focus();
        return false;
    }
    if (ext3 != '' && ext3 != 'jpg' && ext3 != '.gif' && ext3 != '.png')
    {
        alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: JPG, GIF e PNG!');
        theForm.arquivo3.focus();
        return false;
    }
    theForm.ext1.value = ext1;
    theForm.ext2.value = ext2;
    theForm.ext3.value = ext3;
    if (ext1 != '' || ext2 != '' || ext3 != '')
	    startupload(progressID);
    return true;
}
function verificaarquivonobr(theForm,progressID)
{
    ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
    if (ext != '' && ext != 'jpg')
    {
		alert('O arquivo selecionado não pode ser enviado. Formato permitido: JPG!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
    if (ext != '')
	    startupload(progressID);
    return true;
}
function verificaarquivonobr1(theForm,progressID)
{
    ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
    if (ext != '' && ext != 'jpg' && ext != 'gif' && ext != 'png')
    {
		alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: JPG, GIF e PNG!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
    if (ext != '')
	    startupload(progressID);
    return true;
}
function verificaarquivonobr2(theForm,progressID)
{
    ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
    if (ext != '' && ext != 'mp3')
    {
		alert('O arquivo selecionado não pode ser enviado. Formato permitido: MP3!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
    if (ext != '')
	    startupload(progressID);
    return true;
}
function verificaarquivonobr3(theForm,progressID)
{
    ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
    if (ext != '' && ext != 'wmv' && ext != 'mpg' && ext != 'avi')
    {
		alert('O arquivo selecionado não pode ser enviado. Formatos permitidos: WMV, MPG e AVI!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
    if (ext != '')
	    startupload(progressID);
    return true;
}
function verificaarquivonobr4(theForm,progressID)
{
    ext = theForm.arquivo.value;
    ext = ext.substring(ext.length-3,ext.length);
	ext = ext.toLowerCase();
    if (ext != '' && ext != 'swf')
    {
		alert('O arquivo selecionado não pode ser enviado. Formato permitido: SWF!');
		theForm.arquivo.focus();
	    return false;
    }
	theForm.ext.value = ext;
    if (ext != '')
	    startupload(progressID);
    return true;
}
function adminindex(theForm)
{
    if (theForm.usuario.value == '' || theForm.senha.value == '')
    {
        alert('Acesso restrito!');
        theForm.usuario.value = '';
        theForm.senha.value = '';
        theForm.usuario.focus();
        return false;
    }
    if (theForm.usuario.value.indexOf(' ') != -1 || theForm.senha.value.indexOf(' ') != -1 || theForm.usuario.value.indexOf('\"') != -1 || theForm.senha.value.indexOf('\"') != -1 || theForm.usuario.value.indexOf('\'') != -1 || theForm.senha.value.indexOf('\'') != -1)
    {
        alert('Acesso restrito!');
        theForm.usuario.value = '';
        theForm.senha.value = '';
        theForm.usuario.focus();
        return false;
    }
    return true;
}
function adminusuarios(theForm,incluir,progressID)
{
    if (theForm.nome.value == '')
	{
		alert('Digite o nome!');
		theForm.nome.focus();
		return false;
	}
	if (!verificaemail(theForm))
	    return false;
	if (theForm.acesso.selectedIndex == -1)
	{
		alert('Selecione a hierarquia de acesso!');
		theForm.acesso.focus();
		return false;
	}
	if (theForm.usuario.value == '')
	{
		alert('Digite o nome de usuário!');
		theForm.usuario.focus();
		return false;
	}
	if (theForm.usuario.value.length < 5)
	{
		alert('Escolha um nome de usuário com pelo menos 5 caracteres!');
		theForm.usuario.value = '';
		theForm.usuario.focus();
		return false;
	}
	if (theForm.usuario.value.indexOf(' ') != -1)
	{
		alert('O nome de usuário não permite a inclusão de espaços!');
		theForm.usuario.value = '';
		theForm.usuario.focus();
		return false;
	}
	if (theForm.usuario.value.indexOf('\"') != -1)
	{
		alert('O nome de usuário não permite a inclusão de aspas!');
		theForm.usuario.value = '';
		theForm.usuario.focus();
		return false;
	}
	if (theForm.usuario.value.indexOf('\'') != -1)
	{
		alert('O nome de usuário não permite a inclusão de aspas!');
		theForm.usuario.value = '';
		theForm.usuario.focus();
		return false;
	}
	if (incluir)
	{
	    if (theForm.senha.value == '')
		{
			alert('Digite a senha!');
			theForm.senha.focus();
			return false;
		}
		if (theForm.senha.value.length < 5)
		{
			alert('Escolha uma senha com pelo menos 5 caracteres!');
			theForm.senha.value = '';
			theForm.senha.focus();
			return false;
		}
		if (theForm.senha.value.indexOf(' ') != -1)
		{
			alert('A senha não permite a inclusão de espaços!');
			theForm.senha.value = '';
			theForm.senha.focus();
			return false;
		}
		if (theForm.senha.value.indexOf('\"') != -1)
		{
			alert('A senha não permite a inclusão de aspas!');
			theForm.senha.value = '';
			theForm.senha.focus();
			return false;
		}
		if (theForm.senha.value.indexOf('\'') != -1)
		{
			alert('A senha não permite a inclusão de aspas!');
			theForm.senha.value = '';
			theForm.senha.focus();
			return false;
		}
		if (theForm.senhaconf.value == '')
		{
			alert('Confirme a senha!');
			theForm.senhaconf.focus();
			return false;
		}
		if (theForm.senha.value != theForm.senhaconf.value)
		{
			alert('Verifique a senha!');
			theForm.senha.value = '';
			theForm.senhaconf.value = '';
			theForm.senha.focus();
			return false;
		}
	}
	if (!verificaarquivonobr(theForm,progressID))
	    return false;
    return true;
}
function adminlinks(theForm)
{
    if (theForm.link.value == '')
	{
		alert('Digite o nome do link!');
		theForm.link.focus();
		return false;
	}
	if (theForm.url.value == '')
	{
		alert('Digite o caminho!');
		theForm.url.focus();
		return false;
	}
    return true;
}
function admincategorias(theForm)
{
    if (theForm.categoria.value == '')
	{
		alert('Digite o nome da categoria!');
		theForm.categoria.focus();
		return false;
	}
    return true;
}
function adminsubcategorias(theForm)
{
    if (theForm.subcategoria.value == '')
	{
		alert('Digite o nome da subcategoria!');
		theForm.subcategoria.focus();
		return false;
	}
    return true;
}
function adminbanners(theForm,progressID)
{
    if (theForm.banner.value == '')
	{
		alert('Digite o nome do banner!');
		theForm.banner.focus();
		return false;
	}
	if (theForm.posicao.selectedIndex == -1)
	{
		alert('Selecione a posição do banner!');
		theForm.posicao.focus();
		return false;
	}
	if (!verificaarquivosobr(theForm,progressID))
	    return false;
	return true;
}
function admintextos(theForm)
{
	if (!verificadata(theForm))
	    return false;
	if (theForm.categoria_id.selectedIndex == -1)
	{
		alert('Selecione a categoria!');
		theForm.categoria_id.focus();
		return false;
	}
	if (theForm.subcategoria_id.selectedIndex == -1)
	{
		alert('Selecione a subcategoria!');
		theForm.subcategoria_id.focus();
		return false;
	}
    if (theForm.titulo.value == '')
	{
		alert('Digite o título!');
		theForm.titulo.focus();
		return false;
	}
	return true;
}
function adminimagens(theForm,progressID)
{
	if (!verificaarquivosnobr(theForm,progressID))
	    return false;
	return true;
}
function adminconteudo(theForm,acao,progressID)
{
	if (acao == 'in')
	{
		tipo = theForm.tipo.selectedIndex
		if (tipo == -1)
		{
			alert('Selecione o tipo!');
			theForm.tipo.focus();
			return false;
		}
	}
	else
		tipo = parseInt(theForm.tipo.value);
	if (theForm.conteudo.value == '')
	{
		alert('Digite o conteúdo!');
		theForm.conteudo.focus();
		return false;
	}
	if (tipo == 4)
	{
		if (acao == 'in')
		{
			if (!verificaarquivoobr1(theForm,progressID))
			return false;
		}
		else
		{
			if (!verificaarquivonobr1(theForm,progressID))
				return false;
		}
	}
	else
	{
		if (tipo == 5)
		{
			if (acao == 'in')
			{
				if (!verificaarquivoobr2(theForm,progressID))
					return false;
			}
			else
			{
				if (!verificaarquivonobr2(theForm,progressID))
					return false;
			}
		}
		else
		{
			if (tipo == 6)
			{
				if (acao == 'in')
				{
					if (!verificaarquivoobr3(theForm,progressID))
						return false;
				}
				else
				{
					if (!verificaarquivonobr3(theForm,progressID))
						return false;
				}
			}
			else
			{
				if (tipo == 7)
				{
					if (acao == 'in')
					{
						if (!verificaarquivoobr4(theForm,progressID))
							return false;
					}
					else
					{
						if (!verificaarquivonobr4(theForm,progressID))
							return false;
					}
				}
			}
		}
	}
	return true;
}
function sitebusca(theForm)
{
	if (theForm.termo.value == '')
	{
		alert('Digite o termo de busca!');
		theForm.termo.focus();
		return false;
	}
	if (theForm.termo.value.length < 4)
	{
		alert('Escolha um termo de busca com pelo menos 4 caracteres!');
		theForm.termo.focus();
		return false;
	}
	return true;
}
function sitecontato(theForm)
{
	if (theForm.nome.value == '')
	{
		alert('Digite o seu nome!');
		theForm.nome.focus();
		return false;
	}
	if (!verificaemail(theForm))
	    return false;
	if (theForm.mensagem.value == '')
	{
		alert('Digite a sua mensagem!');
		theForm.mensagem.focus();
		return false;
	}
	return true;
}