echo ~<p>~;

$tfrm=$_SESSION[`PM_TransFrm`];

$string=$_REQUEST[`CS_Search_String`];
if ($string!=~~)
{
  $tValue=$_REQUEST[`CS_Search_Field`];
/*
  if ($tValue==`CaseID`)
    $where=~ ( INSTR(CaseID,`$string`)>0 or (qID=`$tValue` and INSTR(rValue,`$string`)>0)) ~;
  else
    $where=~ qID=`$tValue` and INSTR(rValue,`$string`)>0 ~;
*/

//$where=~ INSTR($tValue,`$string`)>0 ~;
$where=~ INSTR(rValue,`$string`)>0 ~;

  $extracols=array();
  echo ~<table border=5 bgcolor=lightblue><tr><td>~;
//  echo ~<hr>~;
  CSsearchCases(1,0,``,~$where~,$tfrm,$xtracols);
  echo ~</td></tr></table>~;
//  echo ~<hr><br>~;
}