// JavaScript Document
<!--
function consiste() {
	mail1=document.form1.frommail.value;
	mail2=document.form1.sendmail.value;
	x=mail1.indexOf('@');
	y=mail2.indexOf('@');
	
   if (document.form1.fromname.value == ""){
   		alert('Informe o seu nome !'); 
		document.form1.fromname.focus;
	    return false ;
	}
	if (document.form1.frommail.value == ""){
   		alert('Informe o seu e-mail !'); 
		document.form1.frommail.focus;
	    return false ;
	}
	if (document.form1.sendname.value == ""){
   		alert('Informe o nome do destinatário !'); 
		document.form1.sendname.focus;
	    return false ;
	}
	if (document.form1.sendmail.value == ""){
   		alert('Informe o e-mail do destinatário !'); 
		document.form1.sendmail.focus;
	    return false ;
	}
   if( x < 0 ) { 
      	alert('E-mail do remetente está incorreto.');  
		document.form1.frommail.value.focus;
        return false; 
   } 
   if( y < 1 ) { 
      	alert('E-mail do seu amigo está incorreto.');  
		document.form1.mailsend.value.focus;
        return false; 
   } 
 else{
        if(mail2.length == (y+1) || mail2.substring(y+1,y+2) == '.' ){
                alert('E-mail de destino está incorreto.');
                document.form1.mailsend.value.focus;
                return false;
        }
		y=mail2.indexOf(',');	
		if (y != -1){
		        alert('E-mail de destino está incorreto.');
                document.form1.mailsend.value.focus;
                return false;
		}	
		y=mail2.indexOf(';');	
		if (y != -1){
		        alert('E-mail de destino está incorreto.');
                document.form1.mailsend.value.focus;
                return false;
		}
   }
	document.form1.submit();
}

function cancel() {
	window.close();
}
	
function SubmitForm(){
	document.frmResultado.submit();
}

function Submit(Valor) {
	document.frmResultado.submit();
}

function SubmitDate(Valor) {
	document.frmResultado.act.value = "new";
	document.frmResultado.submit();
}

function SubmitOrder(Valor) {
	document.frmResultado.act.value = "ord";
	document.frmResultado.submit();
}

function SubmitPage(numpage){
	document.frmResultado.page.value = numpage-1;
	document.frmResultado.submit();
}

function DoPrinting(){
if (!window.print){
return
}
window.print()
}

function DoLink(){ 	 	
var sURL = unescape(window.location.href)
window.open('','EnviaNotícia','status=no,resizable=no,scrollbars=no,menubar=no,width=340,height=320,left=15,top=20') ;
document.form1.link.value = sURL; 
document.form1.submit(); 
}

function testaFormPesquisaAvancada(){
	if (document.frmSearchAdvanced.expression.value.length > 0 ||
		document.frmSearchAdvanced.accurate.value.length   > 0 ||
		document.frmSearchAdvanced.atleastone.value.length > 0 ||
		document.frmSearchAdvanced.none.value.length       > 0 ) 
	return true;
	alert("Para realizar a pesquisa, pelo menos um argumento deve ser informado.");
	return false;
}

//function testaFormPesquisa(){
//	if (document.frmPesquisaCab.expression.value.length > 0 ) 	return true;
//	alert("Para realizar a pesquisa, pelo menos um argumento deve ser informado.");
//	return false;
//}

function testaFormPesquisa(pform){
	if (pform.expression.value.length == 0){
		alert("Para realizar a pesquisa, pelo menos um argumento deve ser informado.");
		return;
	}
	pform.submit()

}


-->
