<!--

function onError( inputObject, errorMessage )
{
	alert(errorMessage);
	inputObject.focus();
	inputObject.select();
	
}

function checkPeriodo ()

{ 
var box = eval("document.Busqueda.fechas[1]"); 
box.checked=true;
}

function checkMinSize ( objectValue, minSize )

{ if ( objectValue.length < minSize )
		return false;
	else
		return true;
}

function checkEmail ( objectValue )

{
	if ( objectValue.length == 0 )
		return false;
			
	if ( !checkMinSize( objectValue, 8 ) )
		return false;
	
	var foundAt 	= false;
	var foundPeriod = false;
	
	for ( i = 0; i < objectValue.length; i++ )
	{
		if ( objectValue.charAt(i) == "@" )
			foundAt = true;
			
		if ( objectValue.charAt(i) == "." )
			foundPeriod = true;
	}
	
	if ( foundAt && foundPeriod )
		return true;
	else
		return false;
}


function MAIL_Validator(theForm)
{

if (!checkEmail(theForm.email.value))
  {
   onError(theForm.email,"POR FAVOR, INGRESA UN EMAIL VALIDO");
	return false;
      } 
return (true);
}

function BUSQUEDA_Validator(theForm)
{

if ( !checkMinSize( theForm.criterio.value, 2 ) )
  {
   onError(theForm.criterio,"POR FAVOR, INGRESA MAS DE DOS CARACTERES EN LA BUSQUEDA");
	return false;
      } 

return (true);
}


//-->