echo `<table border=0 width=50%><tr><td align=center>`;

$CaseId=$_SESSION[`CaseId`];

$tmpREyear=$_POST[`tmpREyear`];
if ($tmpREyear==``) $tmpREyear=$_SESSION[`PM_REyear`];
if ($tmpREyear==``) $tmpREyear=date(~Y~);
$_SESSION[`PM_REyear`]=$tmpREyear;

echo ~Year: <select name=tmpREyear size=1 onchange=`DoPostBack(0,tmpREyear);`>~;
echo `<option value=~All years~>All years</option>`;

OptionQueryResult(~select distinct substring(rValue,1,4), substring(rValue,1,4) from Responses where CaseID=`$CaseId` and IsDeleted=0 and rValue<>`` and qID=`RE_X_Date` order by rValue desc ~,$tmpREyear);

echo `</select>`;

echo `</td>`;