//$oMenu->setImage($iMenu, "images/newsletter_16.gif");
 $oMenu->setTitle($iMenu, $sName);
 switch ($oJob->get("status")) {
     case 1:
         // Pending
         if ($oJob->get("cronjob") == 0) {
             // Standard job can be run if user has the right to do so
             if ($perm->have_perm_area_action($area, "news_job_run")) {
                 $sLnkSend = str_replace('{ID}', $iID, $sTplSend);
                 $sLnkSend = str_replace('{NAME}', addslashes($sName), $sLnkSend);
                 $oMenu->setActions($iMenu, 'send', $sLnkSend);
             }
         } else {
             if ($oJob->get("cronjob") == 1) {
                 // It's a cronjob job - no manual sending, show it blue
                 $oLnk->updateAttributes(array("style" => "color:#0000FF"));
             }
         }
         if ($perm->have_perm_area_action($area, "news_job_delete")) {
             // Job may be deleted, if user has the right to do so
             $oMenu->setActions($iMenu, 'delete', '<a title="' . $aMsg["DelTitle"] . '" href="javascript://" onclick="showDelMsg(' . $iID . ',\'' . addslashes($sName) . '\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $aMsg["DelTitle"] . '" alt="' . $aMsg["DelTitle"] . '"></a>');
         }
         break;
     case 2:
         // Sending job
         if ($perm->have_perm_area_action($area, "news_job_run")) {
             // User may try to start sending, again - if he has the right to do so
             $sLnkSend = str_replace('{ID}', $iID, $sTplSend);
             $sLnkSend = str_replace('{NAME}', addslashes($sName), $sLnkSend);
             $oMenu->setActions($iMenu, 'send', $sLnkSend);
         }
// Store messages for repeated use (speeds performance, as i18n translation is only needed once)
$aMsg = array();
$aMsg["DelTitle"] = i18n("Delete recipient", $plugin_name);
$aMsg["DelDescr"] = i18n("Do you really want to delete the following recipient:<br />", $plugin_name);
while ($oRecipient = $oRecipients->next()) {
    $iMenu++;
    $idnewsrcp = $oRecipient->get("idnewsrcp");
    $sName = $oRecipient->get("name");
    if (empty($sName)) {
        $sName = $oRecipient->get("email");
    }
    $oLnk = new cHTMLLink();
    $oLnk->setMultiLink($area, "", $area, "");
    $oLnk->setCustom("idrecipient", $idnewsrcp);
    if ($oRecipient->get("deactivated") == 1 || $oRecipient->get("confirmed") == 0) {
        $oLnk->updateAttributes(array("style" => "color:#A20000"));
    }
    $oMenu->setTitle($iMenu, $sName);
    $oMenu->setLink($iMenu, $oLnk);
    if ($perm->have_perm_area_action("recipients", "recipients_delete")) {
        $oMenu->setActions($iMenu, "delete", '<a title="' . $aMsg["DelTitle"] . '" href="javascript://" onclick="showDelMsg(' . $idnewsrcp . ',\'' . addslashes($sName) . '\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $aMsg["DelTitle"] . '" alt="' . $aMsg["DelTitle"] . '"></a>');
    }
}
$sExecScript = '
    <script type="text/javascript">       
        // Session-ID
        var sid = "' . $sess->id . '";

        // Create messageBox instance
        box = new messageBox("", "", "", 0, 0);