//campo dtnasc (guiaprof)
function LimpaCpo(theField) {
  document.all.form1.dtnasc.value="" ;
}

function AltCpo(theField,Status) {
  if (Status==1) {
     if (theField.value=="dia/mês/ano") {
        theField.value="" ;
     }
  } else {
     if (theField.value=="") {
        theField.value="dia/mês/ano" ;
     }
  }
}

//campo fone (guia-prof)
function LimpaCpo2(theField) {
  document.all.form1.fone.value="" ;
}

function AltCpo2(theField,Status) {
  if (Status==1) {
     if (theField.value=="(xx)") {
        theField.value="" ;
     }
  } else {
     if (theField.value=="") {
        theField.value="(xx)" ;
     }
  }
}

//campo assuntoM (guia-prof)
function LimpaCpo3(theField) {
  document.all.form1.assuntoM.value="" ;
}

function AltCpo3(theField,Status) {
  if (Status==1) {
     if (theField.value=="PROVAS E CONSULTAS") {
        theField.value="" ;
     }
  } else {
     if (theField.value=="") {
        theField.value="PROVAS E CONSULTAS" ;
     }
  }
}


<!-- Valida Endereço de EMAIL
function checkEmail(form) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value)){
return (true)
}
alert("Endereço de E-mail inválido.")
return (false)

	if (form.nome.value == "")
		{
		e = "S";
		alert("O campo Nome precisa estar preenchido");
		form.nome.focus();
		}	
	if (form.email.value == "")
		{
		e = "S";
		alert("O campo E-mail precisa estar preenchido");
		form.email.focus();
		}
	}


//  FIM -->

// Validação de Formulário 2
function verificamail(entered, alertbox)
{
with (entered)
{
apos=value.indexOf("@"); 
dotpos=value.lastIndexOf(".");
lastpos=value.length-1;
if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
{if (alertbox) {alert(alertbox);} return false;}
else {return true;}
}
} 

function cpvazio(entered, alertbox)
{
with (entered)
{
if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}
// <form onSubmit="return validaform(this)"
function validaform(thisform)
{
with (thisform)
{
if (cpvazio(Nome,"Informe seu nome.")==false) {Nome.focus(); return false;};
if (cpvazio(matricula,"Informe sua matrícula.")==false) {matricula.focus(); return false;};
if (verificamail(email,"E-mail inválido")==false) {email.focus(); return false;};
}
}
// FIM Validação de Formulário 2 -->

