function checaSubmit ()
{
	if ( frmPesquisa.txtPalavra.value == "" )
	{
		alert( " Preencha uma frase ou palavra a procurar. ");
		return false;
	}
	else
	{
		bPode = false;
		
		for ( i=0; i<frmPesquisa.elements.length; i++ )
			if ( frmPesquisa.elements[i].name.substr( 0, 11 ) == "chkSistema_" )
				if ( frmPesquisa.elements[i].checked )
					bPode = true;
		
		if ( bPode )
			return true;
		else
		{
			alert(" É necessário preencher pelo menos um sistema para procurar");
			return false;
		}
	}
}

function mostraDetalhes (pPagina, pSerial)
{
	window.open(pPagina+'?pSerial='+pSerial, pSerial, 'resizable=0,toolbar=0,status=0,menubar=true,scrollbars=0,width=656, height=439,top=110,left=50');
}

function mostraNoticia (pPagina, pSerial )
{
	window.open(pPagina+'?pSerial='+pSerial, pSerial, 'resizable=0,toolbar=0,status=0,menubar=true,scrollbars=0,width=590, height=350,top=30,left=30');
}

function checaTodos ( valor )
{	
	for ( i = 0; i < frmPesquisa.elements.length; i++ )
	{
		if ( frmPesquisa.elements[i].type == "checkbox" )
			frmPesquisa.elements[i].checked = valor;
	}
}

function checaCategoria( categoria, valor )
{
	for ( i = 0; i < frmPesquisa.elements.length; i++ )
	{
		if ( frmPesquisa.elements[i].type == "hidden" )
			if ( frmPesquisa.elements[i].name.substr(5) == categoria )
				eval( "frmPesquisa." + frmPesquisa.elements[i].value ).checked = valor;
	}	
}
