$CS_Process=$_SESSION[CS_Process];

if ($CS_Process>0)
{
echo "<br><p>";
echo "2. Select an <b>event</b>: ";
if ($prm=="SetEvent")
{
   $lblEvent=$_REQUEST[`lblEvent`];
   $_SESSION[`CS_Event`]=$lblEvent;
}
else $lblEvent=$_SESSION[`CS_Event`];

echo "<select name=lblEvent size=1 class=input200 onchange=DoPostBack(0,`SetEvent`);>";

echo "<option value=``> </option>";

$sql="select CaseID as EventId, rValue as Event from Responses where qID=`CS_Event_Desc` and isDeleted=0 and rInstance=`$CS_Process` order by CaseID";
$res=GetResultset($sql);
if(!$row = mysql_fetch_assoc($res))
{
   return false;
}
do
{
    if ($lblEvent == $row["EventId"])
       echo "<option selected=`yes` value=`" , $row["EventId"] , "`>" , $row["EventId"] ," - " , $row["Event"] , "
";
    else
       echo "<option value=`" , $row["EventId"] , "`>" , $row["EventId"] ," - " , $row["Event"] , "
";
    }
while ($row = mysql_fetch_assoc($res));

echo "</select>";
}