function valoga(f){
	sai=false; 
	for(i=0;i<f.Login.value.length && !sai;i++){ 
		if(f.Login.value.substr(i,1)!=0)sai=true;
	}
	i--;
	f.Login.value = f.Login.value.substr(i,7);
	if (f.Login.value.length<6 || isNaN(f.Login.value)){
		alert("Digite o número de sua matrícula e dígito sem o caractere de separação.\n\nPara saber o dígito da sua matricula, contate o Setor de Atendimento ao Aluno");
		f.Login.focus();
		return false;
	}
	setTimeout("document.logag.reset()",999);
	f.js.value="";
	return true;
}
function valogpos(f){
	if (f.Login.value.length < 5 || isNaN(f.Login.value)){
		alert("Digite o número de sua matrícula");
		f.Login.focus();
		return false;
	}
	setTimeout("document.logap.reset()",999);
	f.js.value="";
	return true;
}
function valogp(f){
	if(f.Login.value.length < 11 || isNaN(f.Login.value)){
		alert("Digite o seu Login (11 números)\nSem o caractere de separação");
		f.Login.focus();
		return false;
	}
	setTimeout("document.logp.reset()",999);
	f.js.value="";
	return true;
}
function valoge(f){
	if(f.Login.value.length < 14 || isNaN(f.Login.value)){
		alert("Digite o CNPJ da sua empresa\nSem o caractere de separação");
		f.Login.focus();
		return false;
	}
	setTimeout("document.loge.reset()",999);
	f.js.value="";
	return true;
}
function valwebmail(f){
	if(f._user.value.length < 5 || f._user.value=='Seu Usuário'){
		alert("Digite seu usuário");
		f._user.focus();
		return false;
	}
	if(f._pass.value.length < 2){
		alert("Digite sua senha");
		f._pass.focus();
		return false;
	}
	setTimeout("document.form3.reset()",999);
	return true;
}

function exibeLogin(elemento){
	for(i=1;i<=4;i++){
		if (document.all) { //IS IE 4 or 5 (or 6 beta)
			eval( "document.all['pub'+i].style.display = 'none'");
		}
		if (document.layers) { //IS NETSCAPE 4 or below
			document.layers['pub'+i].display = 'none';
		}
		if (document.getElementById && !document.all) {
			maxwell_smart = document.getElementById('pub'+i);
			maxwell_smart.style.display = 'none';
		}
	}
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all[elemento].style.display = 'block'");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[elemento].display = 'block';
	}
	if (document.getElementById && !document.all) {
		maxwell_smart = document.getElementById(elemento);
		maxwell_smart.style.display = 'block';
	}
}
