The manage relational table automatically creates an array to help you pre-select. So you can remove the recordset you have created for that purpose.
The array name is:
$WA_PreSelect_RelationalTable_1
and you can see it is created on lines 276-296
To use that array to do the selections you can add this code to your checkboxes:
<input type="checkbox" value="<?php echo $row_prod['ProdIDType']; ?>" <?php echo(in_array($row_prod['ProdIDType'],$WA_PreSelect_RelationalTable_1)?"checked":""); ?>>