function trim(str)
{
  return str.replace(/^\\s*|\\s*$/g,'');
}; 

function DoFind()
{
  ok = 1;     
  if (trim(document.find.q.value) == '')
  {     
    alert("Enter search keywords.");  
    ok = 0;
  } else 
  {  
    q = trim(document.find.q.value);
    if (q.length < 3)
    {     
      alert("Search keywords should be bigges 2 chars.");  
      ok = 0;
    };
  };
   
  if (ok == 1) { return true; } else {return false; }; 
}; 