function valida_mail_g (mail) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail.value)){
	} else {
		if (mail.value == '') {

		} else {
			alert('O formato do endereço de e-mail está incorreto.');
			mail.focus()
		}
	}
}

function popup (url, w, h) {
	apopup = window.open(url,'','width=' + w + ',height=' + h + ',resizable=no,scrollbars=no');
}

function sub_menus (status) {
	if (status == '1') {
		document.all.sub_menus.style.display = 'block'
	}

	if (status == '0') {
		document.all.sub_menus.style.display = 'none'
	}

}

function chk_send (formulario) {
	if (formulario.login.value == ''){
		alert('Digite o usuário');
		return false;
	}
	if (formulario.senha.value == ''){
		alert('Digite a senha');
		return false;
	}

	return true;
}

/*function click() {
	if (event.button == 2) {}
}

function retorno () {
	return false;
}

document.onmousedown = click
document.oncontextmenu = retorno
document.onselectstart = retorno
document.ondragstart = retorno*/