if (NewCase(`$val`)==1)
{
   $sql="insert into Responses (CaseID, qID, rValue, uID, rOK) " . 
        "values (`$val`,`RE_Id`,`$val`,`" . 
        $_SESSION[`UserId`] . "`, `2`)";
   $stat=ExecuteSQL($sql);
   SetCaseForm(`$val`,`RE_ListingDetail`);
   return 1;
}