function HidLayer(layer)
{
	browser=navigator.appName;
	if (browser == "Netscape")
	{
		if (document.layers[layer].visibility == "show")
		{
			document.layers[layer].visibility = "hide";
		}
	}
	else if (browser == "Microsoft Internet Explorer")
	{
		if (document.all[layer].style.visibility == "visible")
		{
			document.all[layer].style.visibility = "hidden";
		}
	}
}


function HidAllLayers()
{
	HidLayer('submenu1');
	HidLayer('submenu2');
	HidLayer('submenu6');
//	HidLayer('submenu7');
}


function ShowLayer(layer)
{
	browser=navigator.appName;
	HidAllLayers();
	if (browser == "Netscape")
	{
		document.layers[layer].visibility = "show";
	}
	else if (browser == "Microsoft Internet Explorer")
	{
		document.all[layer].style.visibility = "visible";
	}
}


function Validar_FaleConosco()
{
	if (document.Form.Nome.value == "")
	{
		window.alert("Preencha o campo \"Nome\".")
		document.Form.Nome.focus()
		return (false)
	}
	
	
	email=document.Form.Email.value;
	if (email == "")
	{
		window.alert("Preencha o campo \"E-mail\".")
		document.Form.Email.focus()
		return (false);
	}
	else if ((email.indexOf ('@', 0) == -1)||(email.indexOf ('.', 0) == -1))
	{
		alert("Preencha o campo \"E-mail\" corretamente.\nExemplo: nome@provedor.com.br");
		document.Form.Email.focus();
		return (false);
	}
	
	
	if (document.Form.Comentarios.value == "")
	{
		window.alert("Preencha o campo \"Opiniões, comentários, ...\".")
		document.Form.Comentarios.focus()
		return (false)
	}
	else
	{
	return (true);
	}
}


function Validar_Cadastrase()
{
	if (document.Form.Nome.value == "")
	{
		window.alert("Preencha o campo \"Nome\".")
		document.Form.Nome.focus()
		return (false)
	}
	
	
	if (document.Form.Atividade.value == "")
	{
		window.alert("Preencha o campo \"Atividade\".")
		document.Form.Atividade.focus()
		return (false)
	}
	
	
	email=document.Form.Email.value;
	if (email == "")
	{
		window.alert("Preencha o campo \"E-mail\".")
		document.Form.Email.focus()
		return (false);
	}
	else if ((email.indexOf ('@', 0) == -1)||(email.indexOf ('.', 0) == -1))
	{
		alert("Preencha o campo \"E-mail\" corretamente.\nExemplo: nome@provedor.com.br");
		document.Form.Email.focus();
		return (false);
	}
	
	
	if (document.Form.Telefone.value == "")
	{
		window.alert("Preencha o campo \"Telefone\".")
		document.Form.Telefone.focus()
		return (false)
	}
	
	
	if (document.Form.Endereco.value == "")
	{
		window.alert("Preencha o campo \"Endereco\".")
		document.Form.Endereco.focus()
		return (false)
	}
	
	
	if (document.Form.Bairro.value == "")
	{
		window.alert("Preencha o campo \"Bairro\".")
		document.Form.Bairro.focus()
		return (false)
	}
	
	
	if (document.Form.Cidade.value == "")
	{
		window.alert("Preencha o campo \"Cidade\".")
		document.Form.Cidade.focus()
		return (false)
	}
	
	
	if (document.Form.Estado.value == "")
	{
		window.alert("Preencha o campo \"Estado\".")
		document.Form.Estado.focus()
		return (false)
	}
	
	
	if (document.Form.CEP.value == "")
	{
		window.alert("Preencha o campo \"CEP\".")
		document.Form.CEP.focus()
		return (false)
	}
	else
	{
	return (true);
	}
}
