<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils" %>
<%   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources");
   c.stringTable("FwResources");
   c.stringTable("BaseResources"); %>
<HTML>
<HEAD>
<TITLE><%= c.toDisplay(c.string("DevelopersForm.Task.DisplayName")) %></TITLE>
<LINK   href="<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>"
        rel="styleSheet"
        type="text/css">

<jsp:include page='<%= c.getPath("dev/MoveListItems_inc.jsp") %>' flush="true" />
<jsp:include page='<%= c.getPath("dev/eMFrameScripts_inc.jsp") %>' flush="true" />
<% c.set("MVStringEditor_mode", "mvsel"); %>
<jsp:include page='<%= c.getPath("dev/MVStringEditorScripts_inc.jsp") %>' flush="true" />

<script language="JavaScript">

    function detectBrowser(){
        var appVer = navigator.appVersion;
        var iePos = appVer.indexOf('MSIE');
        if (iePos != -1){
            document.DeveloperTaskForm.AssignedAttrs.attachEvent('ondblclick',addSelectedAttr);
            document.DeveloperTaskForm.AvailableAttrs.attachEvent('ondblclick',removeSelectedAttr);
            document.DeveloperTaskForm.AssignedRoles.attachEvent('ondblclick',addSelectedRole);
            document.DeveloperTaskForm.AvailableRoles.attachEvent('ondblclick',removeSelectedRole);
        }
        else{
            for (var i=0; i<document.DeveloperTaskForm.AssignedAttrs.length; i++) {
                document.DeveloperTaskForm.AssignedAttrs[i].addEventListener("dblclick",addSelectedAttr, false); }
            for (var i=0; i<document.DeveloperTaskForm.AvailableAttrs.length; i++) {
                document.DeveloperTaskForm.AvailableAttrs[i].addEventListener("dblclick",removeSelectedAttr, false); }
            for (var i=0; i<document.DeveloperTaskForm.AssignedRoles.length; i++) {
                document.DeveloperTaskForm.AssignedRoles[i].addEventListener("dblclick",addSelectedRole, false); }
            for (var i=0; i<document.DeveloperTaskForm.AvailableRoles.length; i++) {
                document.DeveloperTaskForm.AvailableRoles[i].addEventListener("dblclick",removeSelectedRole, false); }
        }
    }

    function moveSelectItems(fromList, toList)
    {
        var retValue = false;
        var index = -1;

        // If neither list has a selected item then just return
        if( (fromList.selectedIndex == -1) &&
            (toList.selectedIndex == -1))
        {
            return;
        }

        // If from list doesnot have a selected item then just return
        if(fromList.selectedIndex == -1)
        {
            return;
        }

        // If empty list bracket then just return
        if (fromList.options[0].text == emptyListBracket)
        {
            return;
        }

        // Move all the selected options in the formList to the toList
        for (var i=(fromList.length-1); i>=0; i--)
        {
            var iePos = navigator.appVersion.indexOf('MSIE');
            if(fromList.options[i].selected)
            {
                if(index == -1)
                {
                    index = i;
                }

                newoption = new Option(fromList.options[i].text, fromList.options[i].value, false, false);
                newoption.title = fromList.options[i].title;
                toList.options[toList.length] = newoption;

                //If not IE add ondblclick event to options
                if (iePos != -1)
                    if(toList.name=="AvailableRoles")
                        toList.options[toList.length].addEventListener("dblclick",removeSelectedRole,false);
                    else if(toList.name="AssignedRoles")
                        toList.options[toList.length].addEventListener("dblclick",addSelectedRole,false);
                    else if(toList.name="AvailableAttrs")
                        toList.options[toList.length].addEventListener("dblclick",removeSelectedAttr,false);
                    else if(toList.name="AssignedAttrs")
                        toList.options[toList.length].addEventListener("dblclick",addSelectedAttr,false);

                fromList.options[i] = null;
                retValue = true;
            }
        }

        // Remove empty list bracket
        for (var i = 0; i < toList.length; i++)
        {
            if (toList.options[i].text == emptyListBracket)
            {
                toList.options[i] = null;
                break;
            }
        }

        // Set empty list bracket
        if (fromList.length == 0)
        {
            index = 0;
            newoption = new Option(emptyListBracket, "", false, false);
            fromList.options[0] = newoption;
        }

        // Sort the toList
        sortLists(toList.options);

        // Set the focus to the fromList and set the next option as selected
        fromList.focus();
        if((fromList.length-1) < index)
        {
            fromList.options[fromList.length-1].selected = true;
        }
        else
        {
            fromList.options[index].selected = true;
        }

        return retValue;
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function onPageLoad()
    {
        var form = document.DeveloperTaskForm;

        switch("<%= c.toScript(c.var("DT_TaskType_Value")) %>")
        {
            case "urlTask":
                    form.DT_TaskType_Name[1].checked=true;
                    form.TaskURLPath.value="<%= c.toScript(c.var("DT_TaskClassPath_Value")) %>";
                break;
            default:
                    form.DT_TaskType_Name[0].checked=true;
                    form.TaskClassPath.value="<%= c.toScript(c.var("DT_TaskClassPath_Value")) %>";
        }

        mvLoadFromPack("DT_MiscellaneousData_Name", "<%= c.toScript(c.var("DT_MiscellaneousData_Value")) %>" );
        sortLists(form.AssignedAttrs);
        sortLists(form.AvailableAttrs);
        sortLists(form.AssignedRoles);
        sortLists(form.AvailableRoles);

        if (form.AvailableRoles.length > 0)
        {
            form.AvailableRoles.focus();
            form.AvailableRoles[0].selected = true;
        }

        if (form.AvailableAttrs.length > 0)
        {
            form.AvailableAttrs.focus();
            form.AvailableAttrs[0].selected = true;
        }

        form.DT_TaskName_Name.focus();
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function okSelected()
    {
        if(checkRequiredFields() == false)
        {
            return;
        }

        if(checkDuplicateNames() == false)
        {
            return;
        }

        var form = document.DeveloperTaskForm;

        var taskName    = form.DT_TaskName_Name.value;
        var taskType;

        var classPath;
        if(form.DT_TaskType_Name[1].checked == true)
        {
            taskType = form.DT_TaskType_Name[1].value;
            classPath   = form.TaskURLPath.value;
        }
        else
        {
            taskType = form.DT_TaskType_Name[0].value;
            classPath   = form.TaskClassPath.value;
        }

        var roleList    = GetAssignedRolesCommaDelimitedString();
        var displayKey  = form.DT_DisplayNameKey_Name.value;
        var mergeFile   = form.DT_MergeTemplateName_Name.value;
        var errorFile   = form.DT_ErrorTemplateName_Name.value;
        var attrList    = GetAssignedAttrsCommaDelimitedString();
        var desc        = form.DT_DescriptionData_Name.value;
        var misc        = mvGetValuesAsPack("DT_MiscellaneousData_Name");
        var addMod      = form.AddOrModify.value;
        var version     = form.DT_Version_Name.value;
        var requiredVer = form.DT_Required_Version_Name.value;
        var descKey     = form.DT_DescNameKey_Name.value;

        window.opener.setTaskInfo(taskName, taskType, classPath, roleList,
                                    displayKey, mergeFile, errorFile, attrList,
                                    desc, misc, addMod, version, requiredVer, descKey);
        window.close();
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function cancelSelected()
    {
        window.close();
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function checkRequiredFields()
    {
        var taskName = document.DeveloperTaskForm.DT_TaskName_Name.value;
        if ((taskName == null) || (taskName.length == 0))
        {
            alert("<%= c.toScript(c.string("DevelopersForm.NameRequired")) %>");
            return false;
        }
        return true;
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function clearFields()
    {
        var form = document.DeveloperTaskForm;

        form.TaskURLPath.value="";
        form.TaskClassPath.value="";

        if(form.DT_TaskType_Name[1].checked == true)
        {
            form.TaskURLPath.focus();
        }
        else
        {
            form.TaskClassPath.focus();
        }
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function GetAssignedRolesCommaDelimitedString()
    {
        var roleString = "";
        var form = document.DeveloperTaskForm;
        var listLength = form.AssignedRoles.length;

        if (listLength != 0)
        {
            assignedRolesArray = new Array(listLength);

            for (i = 0; i < listLength; i++)
            {
                if (form.AssignedRoles.options[i].text != emptyListBracket)
                {
                    assignedRolesArray[i] = urlEncode(form.AssignedRoles.options[i].text);
                }
            }
            // Convert array into string
            roleString = assignedRolesArray.join(",")
        }
        return roleString;
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function setRoleListFocus(list)
    {
        var form = document.DeveloperTaskForm;

        if (list.name == "AssignedRoles")
        {
            form.AvailableRoles.selectedIndex=-1;
        }
        else
        {
            form.AssignedRoles.selectedIndex=-1;
        }

        return;
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function setAttrListFocus(list)
    {
        var form = document.DeveloperTaskForm;

        if (list.name == "AssignedAttrs")
        {
            form.AvailableAttrs.selectedIndex=-1;
        }
        else
        {
            form.AssignedAttrs.selectedIndex=-1;
        }

        return;
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function addSelectedRole()
    {
        var form = document.DeveloperTaskForm;
        moveSelectItems(form.AssignedRoles, form.AvailableRoles);
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function removeSelectedRole()
    {
        var form = document.DeveloperTaskForm;
        moveSelectItems(form.AvailableRoles, form.AssignedRoles);
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function GetAssignedAttrsCommaDelimitedString()
    {
        var attrString = "";
        var form = document.DeveloperTaskForm;
        var listLength = form.AssignedAttrs.length;

        if (listLength != 0)
        {
            assignedAttrsArray = new Array(listLength);

            for (i = 0; i < listLength; i++)
            {
                if (form.AssignedAttrs.options[i].text != emptyListBracket)
                {
                    assignedAttrsArray[i] = urlEncode(form.AssignedAttrs.options[i].text);
                }
            }

            // Convert array into string
            attrString = assignedAttrsArray.join(",")
        }
        return attrString;
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function addUnavailableAttr()
    {
        var form = document.DeveloperTaskForm;
        var listLength = form.AssignedAttrs.length;
        var newAttr = form.DT_NewAttr.value;
        if ((newAttr == null) || (newAttr.length == 0))
        {
            return;
        }
        else
        {
            // create nes option and add to assigned attrs list
            newoption = new Option(newAttr, newAttr, false, false);
            form.AssignedAttrs.options[listLength] = newoption;

            // clear the NewAttr text field
            form.DT_NewAttr.value="";

            // set the focus to the NewAttr text field
            form.DT_NewAttr.focus();

            // select the new option in the AssignedAttrs list
            form.AssignedAttrs.options[listLength].selected=true;
        }

	    // Remove empty list bracket
        for (var i = 0; i < form.AssignedAttrs.length; i++)
        {
            if (form.AssignedAttrs.options[i].text == emptyListBracket)
            {
                form.AssignedAttrs.options[i] = null;
                break;
            }
        }

        sortLists(form.AssignedAttrs.options);

        return;
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function addSelectedAttr()
    {
        var form = document.DeveloperTaskForm;
        moveSelectItems(form.AssignedAttrs, form.AvailableAttrs);
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function removeSelectedAttr()
    {
        var form = document.DeveloperTaskForm;
        moveSelectItems(form.AvailableAttrs, form.AssignedAttrs);
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function checkDuplicateNames()
    {
        var form = document.DeveloperTaskForm;

        var oldName = form.Old_Task_Name.value;
        var taskName = form.DT_TaskName_Name.value;
        var addOrModify = form.AddOrModify.value;

        // If this is a modify, check to see if the name changed
        if(addOrModify == "ModifyTask")
        {
            if(taskName.toUpperCase() == oldName.toUpperCase())
            {
                return true;
            }
        }

        var taskList = form.DT_Task_List_Name.value;
        var taskArray = taskList.split(",");

        if(taskArray.length > 0)
        {
            for (i = 0; i < taskArray.length; i++)
            {
                if(taskName.toUpperCase() == taskArray[i].toUpperCase())
                {
                    alert("<%= c.toScript(c.string("DevelopersForm.Task.NameExist")) %>");
                    return false;
                }
            }
        }
        return true;
    }


</SCRIPT>
</HEAD>

<BODY   TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF"
        onLoad="onPageLoad()">
<form   name="DeveloperTaskForm"
        method="post"
        action="webacc">

        <input  type=hidden
                name="taskId"
                value="fw.Developer">

        <input  type=hidden
                name="merge"
                value="">

        <input  type=hidden
                name="error"
                value="dev.GenErr">

        <input  type=hidden
                name="User.context"
                value="<%= c.var("User.context") %>">

        <input  type=hidden
                name="nextState"
                value="">

        <input  type=hidden
                name="Task.SelectedButton"
                value="">

        <input  type=hidden
                name="AddOrModify"
                value="<%= c.var("AddOrModify_Value") %>">

        <input  type=hidden
                name="DT_Task_List_Name"
                value="<%= c.var("DT_Task_List_Value") %>">

        <input  type=hidden
                name="Old_Task_Name"
                value="<%= c.var("DT_TaskName_Value") %>">

    <!-- ************* -->
    <!-- CONTENT TABLE -->
    <!-- ************* -->
    <% c.set("FormHeader.title", c.toDisplay(c.string("DevelopersForm.Task.TaskInformation")));
       c.set("FormHeader.helpFile", "base/xmlinstallfile_taskinfo.html"); %>
    <jsp:include page='<%= c.getPath("dev/FormHeader_inc.jsp") %>' flush="true" />

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="2" >
                <div align="right">
                    <font color="#FF0000" class="smalltext">
                        <%= c.toDisplay(c.string("DevelopersForm.RequiredField")) %>
                    </font>
                </div>
            </td>
        </tr>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskId")) %>
            </td>
            <td valign="baseline" class="mediumtext">
                <input  type="text"
                        name="DT_TaskName_Name"
                        value="<%= c.var("DT_TaskName_Value") %>"
                        size="30">&nbsp;<font color="#FF0000">*</font>
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskIdExample")) %>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
    </table>

    <!-- ********* -->
    <!-- TASK TYPE -->
    <!-- ********* -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="2" class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskType")) %>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle">
                <input  type="radio"
                        name="DT_TaskType_Name"
                        value="snapinTask"
                        onclick="clearFields()">
            </td>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskPlugin")) %>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td valign="middle">
                <input  type="text"
                    name="TaskClassPath"
                    value=""
                    size="50">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskPluginExample")) %>
            </td>
        </tr>
        <tr>
            <td colspan="2" >
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle">
                <input  type="radio"
                        name="DT_TaskType_Name"
                        value="urlTask"
                        onclick="clearFields()">
            </td>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskURL")) %>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td valign="middle">
                <input  type="text"
                    name="TaskURLPath"
                    value=""
                    size="50">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskURLExample")) %>
            </td>
        </tr>
        <tr>
            <td colspan="2" >
                &nbsp;
            </td>
        </tr>
    </table>

    <!-- *************** -->
    <!-- TASK VERSION    -->
    <!-- *************** -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="2" height="17" class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.Module.Versioniong")) %>
            </td>
        </tr>
        <tr>
            <td colspan="2" height="11">
            </td>
        </tr>
        <tr>
            <td width="30%" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.VersionNumber")) %>
            </td>
            <td width="70%">
                <input  type="text"
                        name="DT_Version_Name"
                        value="<%= c.var("DT_Version_Value") %>"
                        size="4">
            </td>
        </tr>
        <tr>
            <td width="30%" height="20" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Module.IManagerVersion")) %>
            </td>
            <td width="70%" height="20" class="smalltext2d">
                <input  type="text"
                        name="DT_Required_Version_Name"
                        value="<%= c.var("DT_Required_Version_Value") %>"
                        size="4"><%= c.toDisplay(c.string("DevelopersForm.Module.RequiredToRun")) %>
            </td>
        </tr>
        <tr>
            <td width="30%" valign="bottom">&nbsp; </td>
            <td width="70%">&nbsp;</td>
        </tr>
    </table>

    <!-- *************** -->
    <!-- ROLE ASSIGNMENT -->
    <!-- *************** -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.RoleAssignment")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskAssignToRoles")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.RoleInstruction")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
    <tr>
    </table>
    <table>
        <tr>
            <td align="left" valign="bottom" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.AvailableRoles")) %>
            </td>
            <td align="left">
            </td>
            <td align="left" valign="bottom" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.AssignedRoles")) %>
            </td>
        </tr>
        <tr>
            <td>
                <SELECT name="AvailableRoles" size=6 style="WIDTH: 180px"
                    multiple ondblclick="removeSelectedRole()"
                    onchange="setRoleListFocus(this)">
                    <% c.set("i", "0");
                          /*IF AvailableRoleList.Count == 0 */%>
                            <!--<OPTION value="NoName"><%= c.toDisplay(c.string("Generic.EmptyListBracket")) %>-->
                        <%/*ENDIF */
                      while (c.lt(c.var("i"), c.var("AvailableRoleList.Count"))) { %>
                        <OPTION value="<%= c.toDisplay(c.var("AvailableRoleList.Element."+c.var("i"))) %>"><%= c.toDisplay(c.var("AvailableRoleList.Element."+c.var("i"))) %>
                        <% c.inc("i");
                       } %>
                </SELECT>
            </td>
            <td>
                <table>
                    <tr>
                        <td valign="bottom">
                            <a href="#" onClick="javascript:removeSelectedRole();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowRight.image") %>" alt="<%= c.string("Button.ArrowRight.alt") %>" border=0></a>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <a href="#" onClick="javascript:addSelectedRole();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowLeft.image") %>" alt="<%= c.string("Button.ArrowLeft.alt") %>" border=0></a>
                        </td>
                    </tr>
                </table>
            </td>
            <td>
                <SELECT name="AssignedRoles" size=6 style="WIDTH: 180px"
                    multiple ondblclick="addSelectedRole()"
                    onchange="setRoleListFocus(this)">
                    <% c.set("i", "0");
                          /*IF AssignedRoleList.Count == 0 */%>
                           <!--<OPTION value="NoName"><%= c.toDisplay(c.string("Generic.EmptyListBracket")) %>-->
                        <%/*ENDIF */
                       while (c.lt(c.var("i"), c.var("AssignedRoleList.Count"))) { %>
                        <OPTION value="<%= c.toDisplay(c.var("AssignedRoleList.Element."+c.var("i"))) %>"><%= c.toDisplay(c.var("AssignedRoleList.Element."+c.var("i"))) %>
                        <% c.inc("i");
                       } %>
                </SELECT>
            </td>
        </tr>
        <tr>
            <td colspan="3" >
                &nbsp;
            </td>
        </tr>
    </table>

    <!-- ************* -->
    <!-- RESOURCE FILE -->
    <!-- ************* -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="2" class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.ResourceFile")) %>
            </td>
        </tr>
            <td colspan="2" class="smalltext">
                &nbsp;
            </td>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.DisplayKey")) %>
            </td>
            <td valign="baseline" class="mediumtext">
                <input  type="text"
                name="DT_DisplayNameKey_Name"
                value="<%= c.var("DT_DisplayNameKey_Value") %>"
                size="30">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.DisplayKeyExample")) %>
            </td>
        </tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.RoleDescKey")) %>
            </td>
            <td valign="baseline" class="mediumtext">
                <input  type="text"
                name="DT_DescNameKey_Name"
                value="<%= c.var("DT_DescNameKey_Value") %>"
                size="30">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.DescKeyExample")) %>
            </td>
        </tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
    </table>

    <!-- ************* -->
    <!-- TEMPLATE FILE -->
    <!-- ************* -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="2" class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TemplateFiles")) %>
            </td>
        </tr>
            <td colspan="2" class="smalltext">
                &nbsp;
            </td>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.MergeTemplate")) %>
            </td>
            <td valign="baseline" class="mediumtext">
                <input  type="text"
                name="DT_MergeTemplateName_Name"
                value="<%= c.var("DT_MergeTemplateName_Value") %>"
                size="30">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.MergeTemplateExample")) %>
            </td>
        </tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.ErrorTemplate")) %>
            </td>
            <td valign="baseline" class="mediumtext">
                <input  type="text"
                name="DT_ErrorTemplateName_Name"
                value="<%= c.var("DT_ErrorTemplateName_Value") %>"
                size="30">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.ErrorTemplateExample")) %>
            </td>
        </tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
    </table>

    <!-- ********************* -->
    <!-- ATTRIBUTE ASSIGNEMENT -->
    <!-- ********************* -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.Task.AttributeAssignment")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.AttributeManage")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.AttributeInstruction")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
    <tr>
    </table>
    <table border="0">
        <tr>
            <td align="left" valign="bottom" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.AvailableAttributes")) %>
            </td>
            <td align="left">
            </td>
            <td align="left" valign="bottom" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.AssignedAttributes")) %>
            </td>
        </tr>
        <tr>
            <td>
                <SELECT name="AvailableAttrs" size=14 style="WIDTH: 190px"
                    multiple ondblclick="removeSelectedAttr()"
                    onchange="setAttrListFocus(this)">
                    <% c.set("i", "0");
                          /*IF Sch_AttrList.Count == 0 */%>
                            <!--<OPTION value="NoName"><%= c.toDisplay(c.string("Generic.EmptyListBracket")) %>-->
                        <%/*ENDIF */
                       while (c.lt(c.var("i"), c.var("Sch_AttrList.Count"))) { %>
                        <OPTION value="<%= c.toDisplay(c.var("Sch_AttrList.Element."+c.var("i"))) %>"><%= c.toDisplay(c.var("Sch_AttrList.Element."+c.var("i"))) %>
                        <% c.inc("i");
                       } %>
                </SELECT>
            </td>
            <td>
                <table>
                    <tr>
                        <td valign="bottom">
                            <a href="#" onClick="javascript:removeSelectedAttr();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowRight.image") %>" alt="<%= c.string("Button.ArrowRight.alt") %>" border=0></a>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <a href="#" onClick="javascript:addSelectedAttr();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowLeft.image") %>" alt="<%= c.string("Button.ArrowLeft.alt") %>" border=0></a>
                        </td>
                    </tr>
                </table>
                <BR>
            </td>
            <td valign = "top">
                <table>
                    <tr>
                        <td>
                            <SELECT name="AssignedAttrs" size=10 style="WIDTH: 190px"
                                multiple ondblclick="addSelectedAttr()"
                                onchange="setAttrListFocus(this)">
                                <% c.set("i", "0");
                                      /*IF DT_AttrList.Count == 0 */%>
                                        <!--<OPTION value="NoName"><%= c.toDisplay(c.string("Generic.EmptyListBracket")) %>-->
                                    <%/*ENDIF */
                                   while (c.lt(c.var("i"), c.var("DT_AttrList.Count"))) { %>
                                    <OPTION value="<%= c.toDisplay(c.var("DT_AttrList.Element."+c.var("i"))) %>"><%= c.toDisplay(c.var("DT_AttrList.Element."+c.var("i"))) %>
                                    <% c.inc("i");
                                   } %>
                            </SELECT>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <a href="#" onClick="javascript:addUnavailableAttr();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowUp.image") %>" alt="<%= c.string("Button.ArrowUp.alt") %>" border=0></a>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input  type="text" name="DT_NewAttr" size="28" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table border="0">
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.UnavailableAttribute")) %>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>

    <!-- ******************* -->
    <!-- GENERAL INFORMATION -->
    <!-- ******************* -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="2" class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.GeneralInformation")) %>
            </td>
        </tr>
        </tr>
            <td colspan="2" class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="top" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.TaskDescription")) %>
            </td>
            <td valign="bottom">
                <textarea   name="DT_DescriptionData_Name"
                            rows="4"
                            cols="30"
                            maxlength="64"
                            wrap=virtual><%= c.toDisplay(c.var("DT_DescriptionData_Value")) %></textarea>
            </td>
        </tr>
        </tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="top" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Task.Other")) %>
            </td>
            <td>
                <% c.set("MVStringEditor_name", "DT_MiscellaneousData_Name");
                   c.set("MVStringEditor_fixedHeight", "5");
                   c.set("MVStringEditor_mode", "mvsel"); %>
                <jsp:include page='<%= c.getPath("dev/MVStringEditor_inc.jsp") %>' flush="true" />
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Task.OtherExample")) %>
            </td>
        </tr>
    </table>

	<!-- ************ -->
	<!-- BUTTON TABLE -->
	<!-- ************ -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0" height="25">
        <tr valign="baseline" bgcolor="#FFFFFF">
            <td height="16" colspan="5" align="center" valign="middle" class="mediumtext">
                &nbsp;
            </td>
            <td height="16" align="left" valign="middle" colspan="2" class="mediumtext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="2" height="23" class="ruleabove">
                <a href="#" onClick="javascript:okSelected();return false">
                    <IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>"
                    alt="<%= c.string("Button.OK.alt") %>"
                    border=0></a>
                <a href="#" onClick="javascript:cancelSelected();return false">
                    <IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Cancel.image") %>"
                    alt="<%= c.string("Button.Cancel.alt") %>"
                    border=0></a>
            </td>
        </tr>
    </table>
</form>
</BODY></HTML>

