<input type="hidden" /><!-- The template must not start with a script tag. This would be ignored by IE //-->
<script type="text/javascript">
lang = {$lang};
</script>
<script type="text/javascript" src="{$htmlBase}/frontend/nagvis-js/js/ManageBackgrounds.js"></script>
<form name="create_image" id="create_image" method="POST" action="javascript:submitFrontendForm('{$htmlBase}/server/core/ajax_handler.php?mod=ManageBackgrounds&amp;act=doCreate', 'create_image');" enctype="" onsubmit="return check_image_create();">
    <table name="mytable" class="mytable" id="table_create_image">
        <tr><th class="cat" colspan="2"><h2>{$langCreateBackground}</h2></th></tr>
        <tr><td class="tdlabel" style="color:red;">{$langBackgroundName}</td><td class="tdfield"><input type="text" name="image_name" value="" onBlur="" /></td></tr>
        <tr>
          <td class="tdlabel" style="color:red;">{$langBackgroundColor}</td>
          <td class="tdfield">
            <div id="image_color_container" class="picker">
            <input type="text" id="image_color" name="image_color" value="#" style="width:148px" />
            <a href="javascript:void(0);" onClick="togglePicker('image_color');">
            <img src="{$htmlImages}/internal/picker.png" alt="{$langColorSelect}" />
            </a></div>
            <script type="text/javascript">
            var o = document.getElementById('image_color');
            o.color = new jscolor.color(o, \{pickerOnfocus:false,adjust:false,hash:true});
            o = null;
            </script>
            </td>
        </tr>
        <tr><td class="tdlabel" style="color:red;">{$langBackgroundWidth}</td><td class="tdfield"><input type="text" name="image_width" value="" onBlur="" /></td></tr>
        <tr><td class="tdlabel" style="color:red;">{$langBackgroundHeight}</td><td class="tdfield"><input type="text" name="image_height" value="" onBlur="" /></td></tr>
        <tr><td class="tdlabel" colspan="2" align="center"><input class="submit" type="submit" name="submit" value="{$langCreate}" /></td></tr>
    </table>
</form>

<form name="new_image" id="new_image" method="POST" action="{$htmlBase}/server/core/ajax_handler.php?mod=ManageBackgrounds&amp;act=doUpload" enctype="multipart/form-data" onsubmit="return check_image_add();">
    <table name="mytable" class="mytable" id="table_new_image">
        <tr><th class="cat" colspan="2"><h2>{$langUploadBackground}</h2></th></tr>
        <input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
        <tr><td class="tdlabel" >{$langChooseImage}</td><td class="tdfield"><input class="upload" type="file" name="image_file" value="" /></td></tr>
        <tr><td class="tdlabel" colspan="2" align="center"><input class="submit" type="submit" name="submit" value="{$langUpload}" /></td></tr>
    </table>
</form>

<form name="image_delete" id="image_delete" method="POST" action="javascript:submitFrontendForm('{$htmlBase}/server/core/ajax_handler.php?mod=ManageBackgrounds&amp;act=doDelete', 'image_delete');" enctype="" onsubmit="return check_image_delete();">
    <table name="mytable" class="mytable" id="table_image_delete">
        <tr><th class="cat" colspan="2"><h2>{$langDeleteBackground}</h2></th></tr>
        <tr>
            <td class="tdlabel">{$langChooseImage}</td><td class="tdfield">
                <select name="map_image" onChange="" onBlur="">
                    <option value=""></option>
                    {foreach $images image}
                    <option value="{$image}">{$image}</option>
                    {/foreach}
                </select>
            </td>
        </tr>

        <tr><td class="tdlabel" colspan="2" align="center"><input class="submit" type="submit" name="submit" value="{$langDelete}" /></td></tr>
    </table>
</form>
