$the_javascript .= "\twindow.opener.document.EditView.name.value = pname;\n";
        $the_javascript .= "}\n";
        $the_javascript .= "function set_null() {\n";
        $the_javascript .= "\twindow.opener.document.EditView.paper_id.value = ''; \n";
        $the_javascript .= "\twindow.opener.document.EditView.name.value = ''; \n";
        $the_javascript .= "\twindow.close(); \n";
        $the_javascript .= "}\n";
        $the_javascript .= "</script>\n";
        $button = "<form action='index.php' method='post' name='form' id='form'>\n";
        $button .= "<input title='" . $app_strings['LBL_CLEAR_BUTTON_TITLE'] . "' accessKey='" . $app_strings['LBL_CLEAR_BUTTON_KEY'] . "' class='button' LANGUAGE=javascript onclick=\"set_null()\" type='submit' name='button' value='  " . $app_strings['LBL_CLEAR_BUTTON_LABEL'] . "  '>\n";
        $button .= "<input title='" . $app_strings['LBL_CANCEL_BUTTON_TITLE'] . "' accessKey='" . $app_strings['LBL_CANCEL_BUTTON_KEY'] . "' class='button' LANGUAGE=javascript onclick=\"window.close()\" type='submit' name='button' value='  " . $app_strings['LBL_CANCEL_BUTTON_LABEL'] . "  '>\n";
        $button .= "</form>";
    }
    $form->assign("SET_RETURN_JS", $the_javascript);
    require_once 'modules/Paper/PaperFormBase.php';
    $formBase = new PaperFormBase();
    if (isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'save') {
        $formBase->handleSave('', false, true);
    }
    $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
    $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
    $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
    $formbody = $formBase->getFormBody('', '', $_REQUEST['form']);
    $formbody = '<table><tr><td nowrap valign="top">' . str_replace('<br>', '</td><td nowrap valign="top">&nbsp;', $formbody) . '</td></tr></table>';
    $formSave = <<<EOQ
<input title='{$lbl_save_button_title}' accessKey='{$lbl_save_button_key}' class='button' type='submit' name='button' value='  {$lbl_save_button_label}  ' >&nbsp;<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button'  onClick="toggleDisplay('addform');" type='button' name='button' value='{$app_strings['LBL_CANCEL_BUTTON_LABEL']}' >
EOQ;
    $createContact = <<<EOQ
<input class='button' type='button' name='showAdd' value='{$mod_strings['LBL_ADD_PAPER']}' onClick='toggleDisplay("addform");'>
EOQ;
    $form->assign("ADDFORMHEADER", get_form_header($mod_strings['LBL_ADD_PAPER'], $formSave, false));
 * b) Charge for the original source code or your extensions other than a
 *    nominal fee to cover distribution costs where such distribution
 *    involves PHYSICAL media.
 * c) Modify or delete any pre-existing copyright notices, change notices,
 *    or License text in the Licensed Software
 * d) Assert any patent claims against the Licensor or Contributors, or
 *    which would in any way restrict the ability of any third party to use the
 *    Licensed Software.
 *
 * You must:
 * a) Document any modifications you make to this code including the nature of
 *    the change, the authors of the change, and the date of the change.
 * b) Make the source code for any extensions you deploy available via an
 *    Electronic Distribution Mechanism such as FTP or HTTP download.
 * c) Notify the licensor of the availability of source code to your extensions
 *    and include instructions on how to acquire the source code and updates.
 * d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
 *    reproduce, perform, modify, sublicense, and distribute your extensions.
 *
 * The Original Code is: C3CRM Team
 *                       http://www.c3crm.com
 *                       2006-5-19 
 *
 * The Initial Developer of the Original Code is C3CRM Team.
 * Portions created by C3CRM are Copyright (C) 2005 C3CRM
 * All Rights Reserved.
 * Contributors: Goodwill Consulting http://www.goodwill.co.id
 ********************************************************************************/
require_once 'modules/Paper/PaperFormBase.php';
$PaperForm = new PaperFormBase();
$PaperForm->handleSave('', true, false);
/**
 * Create HTML form to enter a new record with the minimum necessary fields.
 */
function get_new_record_form()
{
    require_once 'modules/Paper/PaperFormBase.php';
    $form = new PaperFormBase();
    return $form->getForm('');
}