{if !isset($js_object)}
    {$js_object = $id}
{/if}    
{if $type == 'div'}
    <div id="{$id}_form" style="display:none;" class="editablepopform ui-dialog ui-widget ui-widget-content ui-corner-all">
{elseif $type == 'qplan'}
    <form id="{$id}_form"
          class="editablepopform ui-widget ui-widget-content ui-corner-all"
          action=""  method="POST" enctype="multipart/form-data"
          onsubmit="return false;">
{else}
    <form id="{$id}_form" style="display:none;"
        class="editablepopform ui-dialog ui-widget ui-widget-content ui-corner-all"
        action=""  method="POST" enctype="multipart/form-data"
        onsubmit="{$js_object}.save(); return false;">
        <input type="submit" style="display:none;visibility:hidden;width:0;height:0;" />
{/if}
{if $type neq 'qplan'}
    <div class="menu ui-widget-header ui-corner-all mobile_big">
        <span id="{$id}_pagi_nosave" style="display:none; visibility:hidden;" class="menu-btn dialog_make_btn16 mobile_big ui-corner-all mobile_hide hideforviewonly"></span>
        <span id="{$id}_pagi_save" onclick="{$js_object}.save();" class="menu-btn ui-corner-all hideforviewonly">
            <span class="dialog_make_btn16 ok mobile_big ui-corner-all" title="{$i.basic_save}"></span>
            <span id="{$id}_pagi_save_title" class="mobile_hide">{$i.basic_save}</span>
        </span>
        <span id="{$id}_pagi_save_close" style="display:none;" onclick="{$js_object}.save(false, 123);" class="menu-btn ui-corner-all">
            <span class="dialog_make_btn16 ok mobile_big ui-corner-all" title="{$i.basic_save}"></span>
            <span class="mobile_hide">{$i.basic_save} & </span>{$i.basic_close}
        </span>
        {if $id eq 'mailoutbox' or $id eq 'mailinbox'}
            <span id="{$id}_pagi_save_add_opentask" style="display:none;" onclick="{$js_object}.save(false, 456);" class="menu-btn ui-corner-all">
                <span class="dialog_make_btn16 ok-add-opentask ok mobile_big ui-corner-all" title="{$i.basic_save} & {$i.basic_add_opentask}"></span>
                <span class="mobile_hide">{$i.basic_save} & </span><span class="save-add-opentask">{$i.basic_add_opentask}</span>
            </span>
        {* {/if} *}
        {elseif $id eq 'user_options_email'}
            <span id="{$id}_pagi_save_without_authcheck" style="display:none;" onclick="{$js_object}.save(false);" class="menu-btn ui-corner-all">
                <span class="dialog_make_btn16 ok nocheck mobile_big ui-corner-all" title="{$i.basic_save_without_authcheck}"></span>
                <span class="mobile_hide">{$i.basic_save_without_authcheck}</span>
            </span>
        {/if}
        {if $id eq 'calculateaccordingexpenditure_level_of_completion'}
            <span id="{$id}_pagi_save_and_transfer" style="display:none;" onclick="{$js_object}.save(false, 789);" class="menu-btn ui-corner-all">
                <span class="dialog_make_btn16 ok mobile_big ui-corner-all" title="{$i.basic_save} & {$i.calcexp_transfer}"></span>
                <span class="mobile_hide">{$i.basic_save} & </span>{$i.calcexp_transfer}
                <span class="dialog_make_btn16 planned_to_invoiced ui-corner-all ui-corner-all " title="{$i.basic_save} & {$i.calcexp_transfer}"></span>
            </span>
        {/if}

        <span onclick="{$js_object}.close();" class="menu-btn dialog_make_btn16 close mobile_big ui-corner-all" title="{$i.basic_cancel}"></span>
        <span class="info ui-corner-all hideforviewonly" id="{$id}_form-info"></span>
        <span class="info ui-corner-all" id="{$id}_form-info2"></span>
        <span onclick="editablePopup.maximizeView('{$id}');" class="menu-btn dialog_make_btn16 maximize mobile_big ui-corner-all" title="{$i.basic_fullscreen}"></span>
    </div>
{/if}
    <div id="{$id}_div" class="ui-dialog-content">
