$xtpl->assign("film_b", "");
    $xtpl->assign("prepress_js", "");
} else {
    $xtpl->assign("prepress_js", prepress_js());
    $x = -1;
    $prepressrows = array();
    $prepressrownum = array();
    $index = array("ctp_a" => $q = 0, "ctp_b" => $p = 0, "flm_a" => $r = 0, "flm_b" => $t = 0);
}
for ($i = 0; $i < count($prepresslines); $i++) {
    $type = $prepresslines[$i]->type . "_" . $prepresslines[$i]->side;
    if (empty($prepressrows[$type]) || is_null($prepressrows[$type])) {
        $prepressrows[$type] = "";
    }
    $index[$type]++;
    $prepressrows[$type] = $prepressrows[$type] . $focus->getPrepressRow($prepresslines[$i], $index[$type], true);
    $x = $x + 1;
    $prepressrownum[$x] = $type;
    $validation_script = $validation_script . ' addToValidate("EditView", "' . $prepresslines[$i]->type . '_count_' . $prepresslines[$i]->side . '_' . $index[$type] . '", "int",true, ""); ';
}
if ($index['ctp_a'] > 0 || $index['ctp_b'] > 0) {
    $validation_script .= 'toggleDisplay("ctp");';
}
if ($index['flm_a'] > 0 || $index['flm_b'] > 0) {
    $validation_script .= 'toggleDisplay("film");';
}
for ($i = 0; $i < count($prepressrownum); $i++) {
    $type = $prepressrownum[$i];
    $xtpl->assign($prepressrownum[$i], $prepressrows[$type]);
}
//Assign Ink