function login()
{
var username = document.form.username.value
if (username==""){
	alert("Digite seu nome de usuário!");
	document.form.username.focus()
	return false
	}
var password = document.form.password.value
if (password==""){
	alert("Digite sua Senha de Acesso!");
	document.form.password.focus()
	return false
	}
}
function categorias()
{
window.open('relacao_categorias.asp','','scrollbars=yes,resizable=no,width=340,height=400');
}
function saida() {
var sistema = confirm("Você tem certeza de que deseja sair do sistema?");
if (sistema == true){
window.open('logout.asp','_parent');
}
}
function altera_senha() {

	//Initialise variables
        var errorMsg = "";
        var errorMsgLong = "";

	     //Check for a password
        if (document.form.password.value.length <= 3){
                errorMsg += "A Senha deve ter pelo menos 4 caracteres";
        }

        //Check both passwords are the same
        if ((document.form.password.value) != (document.form.repeat_password.value)){
                errorMsg += "A Senha não coincide com a que você digitou!";
                document.form.password.value = "";
                document.form.repeat_password.value = "";
        }
        //If there is a problem with the form then display an error
	if ((errorMsg != "") || (errorMsgLong != "")){
		msg = "";

		errorMsg += alert(msg + errorMsg + "\n" + errorMsgLong);
		return false;
	    }

	return true;
        }
function inoperante()
{
alert("Funçao temporariamente desabilitada.\nPedimos desculpas pelo transtorno!");
}
function desenvolvimento()
{
alert("Em Desenvolvimento!");
}
function reportd()
{
window.open('reportd.asp','','scrollbars=yes,resizable=no,width=700,height=480,menubar=no,location=yes');
}
function reportpath()
{
window.open('reportpath.asp','','scrollbars=yes,resizable=no,width=700,height=480,menubar=no,location=yes');
}
function reportpathy()
{
window.open('reportpathy.asp','','scrollbars=yes,resizable=no,width=700,height=480,menubar=no,location=yes');
}
