<%@  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"); %>
<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.DeveloperBookForm.AvailablePages.attachEvent('ondblclick',removeSelectedPage);
            document.DeveloperBookForm.AssignedPages.attachEvent('ondblclick',addSelectedPage);
            document.DeveloperBookForm.AvailableRoles.attachEvent('ondblclick',removeSelectedRole);
            document.DeveloperBookForm.AssignedRoles.attachEvent('ondblclick',addSelectedRole);
            document.DeveloperBookForm.AvailableClasses.attachEvent('ondblclick',removeSelectedClass);
            document.DeveloperBookForm.AssignedClasses.attachEvent('ondblclick',addSelectedClass);
        }
        else{
            for(var i=0;i<document.DeveloperBookForm.AvailablePages.length;i++){
                document.DeveloperBookForm.AvailablePages[i].addEventListener("dblclick",removeSelectedPage,false);
            }
            for(var i=0;i<document.DeveloperBookForm.AssignedPages.length;i++){
                document.DeveloperBookForm.AssignedPages[i].addEventListener("dblclick",addSelectedPage,false);
            }
            for(var i=0;i<document.DeveloperBookForm.AvailableRoles.length;i++){
                document.DeveloperBookForm.AvailableRoles[i].addEventListener("dblclick",removeSelectedRole,false);
            }
            for(var i=0;i<document.DeveloperBookForm.AssignedRoles.length;i++){
                document.DeveloperBookForm.AssignedRoles[i].addEventListener("dblclick",addSelectedRole,false);
            }
            for(var i=0;i<document.DeveloperBookForm.AvailableClasses.length;i++){
                document.DeveloperBookForm.AvailableClasses[i].addEventListener("dblclick",removeSelectedClass,false);
            }
            for(var i=0;i<document.DeveloperBookForm.AssignedClasses.length;i++){
                document.DeveloperBookForm.AssignedClasses[i].addEventListener("dblclick",addSelectedClass,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=="AvailablePages")
                        toList.options[toList.length].addEventListener("dblclick",removeSelectedPage,false);
                    else if(toList.name="AssignedPages")
                        toList.options[toList.length].addEventListener("dblclick",addSelectedPage,false);
                    else 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="AvailableClasses")
                        toList.options[toList.length].addEventListener("dblclick",removeSelectedClass,false);
                    else if(toList.name="AssignedClasses")
                        toList.options[toList.length].addEventListener("dblclick",addSelectedClass,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.DeveloperBookForm;

        mvLoadFromPack("DB_MiscellaneousData_Name", "<%= c.toScript(c.var("DB_MiscellaneousData_Value")) %>" );
        sortLists(form.AssignedClasses);
        sortLists(form.AvailableClasses);
        sortLists(form.AssignedRoles);
        sortLists(form.AvailableRoles);
        sortLists(form.AssignedPages);
        sortLists(form.AvailablePages);

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

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

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

        document.DeveloperBookForm.DB_TaskName_Name.focus();
    }


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

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

        var form = document.DeveloperBookForm;

        var bookName    = form.DB_TaskName_Name.value;
        var classPath   = form.DB_TaskClassPath_Name.value;
        var displayKey  = form.DB_DisplayNameKey_Name.value;
        var pageList    = GetAssignedPagesCommaDelimitedString();
        var roleList    = GetAssignedRolesCommaDelimitedString();
        var classList   = GetAssignedClassesCommaDelimitedString();
        var desc        = form.DB_DescriptionData_Name.value;
        var misc        = mvGetValuesAsPack("DB_MiscellaneousData_Name");
        var addMod      = form.AddOrModify.value;
        var descKey     = form.DB_DescNameKey_Name.value;
        var version     = form.DB_Version_Name.value;

        window.opener.setBookInfo(bookName, classPath, displayKey, pageList,
                                     roleList, classList, desc, misc, addMod,
                                     descKey, version);
        window.close();
   }


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


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


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

        var oldName = form.Old_Book_Name.value;
        var bookName = form.DB_TaskName_Name.value;
        var addOrModify = form.AddOrModify.value;

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

        var bookList = form.DB_Book_List_Name.value;
        var bookArray = bookList.split(",");

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


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


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


    /*******************
     * FUNCTION HEADER *
     *******************/
    function addSelectedPage()
    {
        var form = document.DeveloperBookForm;
        moveSelectItems(form.AssignedPages, form.AvailablePages);
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function removeSelectedPage()
    {
        var form = document.DeveloperBookForm;
        moveSelectItems(form.AvailablePages, form.AssignedPages);
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function addSelectedClass()
    {
        var form = document.DeveloperBookForm;
        moveSelectItems(form.AssignedClasses, form.AvailableClasses);
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function removeSelectedClass()
    {
        var form = document.DeveloperBookForm;
        moveSelectItems(form.AvailableClasses, form.AssignedClasses);
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function addUnavailableClass()
    {
        var form = document.DeveloperBookForm;
        var listLength = form.AssignedClasses.length;
        var newAttr = form.DB_NewClass.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.AssignedClasses.options[listLength] = newoption;

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

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

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

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

        sortLists(form.AssignedClasses.options);

        return;
    }


    /*******************
     * FUNCTION HEADER *
     *******************/
    function GetAssignedRolesCommaDelimitedString()
    {
        var roleString = "";
        var form = document.DeveloperBookForm;
        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 GetAssignedPagesCommaDelimitedString()
    {
        var pageString = "";
        var form = document.DeveloperBookForm;
        var listLength = form.AssignedPages.length;
        if (listLength != 0)
        {
            assignedPagesArray = new Array(listLength);

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


    /*******************
     * FUNCTION HEADER *
     *******************/
    function GetAssignedClassesCommaDelimitedString()
    {
        var classString = "";
        var form = document.DeveloperBookForm;
        var listLength = form.AssignedClasses.length;
        if (listLength != 0)
        {
            assignedClassArray = new Array(listLength);

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

            // Convert array into string
            classString = assignedClassArray.join(",")
        }
        return classString;
    }


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

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

        return;
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function setPageListFocus(list)
    {
        var form = document.DeveloperBookForm;

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

        return;
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function setClassListFocus(list)
    {
        var form = document.DeveloperBookForm;

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

        return;
    }


</SCRIPT>
</HEAD>

<BODY   TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF"
        onLoad="onPageLoad()">
<form   name="DeveloperBookForm"
        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="Selected_Item"
                value="">

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

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

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

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

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

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

    <!-- ************* -->
    <!-- CONTENT TABLE -->
    <!-- ************* -->
    <% c.set("FormHeader.title", c.toDisplay(c.string("DevelopersForm.Book.BookInformation")));
       c.set("FormHeader.helpFile", "base/xmlinstallfile_propertybookinfo.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.Book.BookId")) %>
            </td>
            <td valign="baseline" class="mediumtext">
                <input  type="text"
                        name="DB_TaskName_Name"
                        value="<%= c.var("DB_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.Book.BookIdExample")) %>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
        <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 valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Book.VersionNumber")) %>
            </td>
            <td valign="baseline" class="mediumtext">
                <input  type="text"
                        name="DB_Version_Name"
                        value="<%= c.var("DB_Version_Value") %>"
                        size="4">
            </td>
        </tr>
        </tr>
            <td colspan="2" class="smalltext">
                &nbsp;
            </td>
        <tr>
        <!-- CLASSPATH -->
        <tr>
            <td colspan="2" class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.Book.Classpath")) %>
            </td>
        </tr>
            <td colspan="2" class="smalltext">
                &nbsp;
            </td>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Book.ClasspathName")) %>
            </td>
            <td valign="baseline" class="mediumtext">
                <input  type="text"
                name="DB_TaskClassPath_Name"
                value="<%= c.var("DB_TaskClassPath_Value") %>"
                size="30">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Book.ClasspathNameExample")) %>
            </td>
        </tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
        <!-- RESOURCE FILE -->
        <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="DB_DisplayNameKey_Name"
                value="<%= c.var("DB_DisplayNameKey_Value") %>"
                size="30">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Book.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="DB_DescNameKey_Name"
                value="<%= c.var("DB_DescNameKey_Value") %>"
                size="30">
            </td>
        </tr>
        <tr>
            <td class="smalltext2d">
                &nbsp;
            </td>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Book.DescKeyExample")) %>
            </td>
        </tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
    </table>

    <!-- *************** -->
    <!-- PAGE ASSIGNMENT -->
    <!-- *************** -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.Book.PageAssignment")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Book.PagesAssignToBook")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Book.BookInstruction")) %>
            </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.Book.AvailablePages")) %>
            </td>
            <td align="left">
            </td>
            <td align="left" valign="bottom" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Book.AssignedPages")) %>
            </td>
        </tr>
        <tr>
            <td>
                <SELECT name="AvailablePages" size=6 style="WIDTH: 180px"
                    multiple ondblclick="removeSelectedPage()"
                    onchange="setPageListFocus(this)">
                    <% c.set("i", "0");
                          /*IF AvailablePageList.Count == 0 */%>
                            <!--<OPTION value="NoName"><%= c.toDisplay(c.var("Generic.EmptyListBracket")) %>-->
                        <%/*ENDIF */
                      while (c.lt(c.var("i"), c.var("AvailablePageList.Count"))) { %>
                        <OPTION value="<%= c.toDisplay(c.var("AvailablePageList.Element."+c.var("i"))) %>"><%= c.toDisplay(c.var("AvailablePageList.Element."+c.var("i"))) %>
                        <% c.inc("i");
                       } %>
                </SELECT>
            </td>
            <td>
                <table>
                    <tr>
                        <td valign="bottom">
                            <a href="#" onClick="javascript:removeSelectedPage();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowRight.image") %>" alt="<%= c.string("Button.ArrowRight.alt") %>" title="<%= c.string("Button.ArrowRight.alt") %>" border=0></a>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <a href="#" onClick="javascript:addSelectedPage();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowLeft.image") %>" alt="<%= c.string("Button.ArrowLeft.alt") %>" title="<%= c.string("Button.ArrowLeft.alt") %>" border=0></a>
                        </td>
                    </tr>
                </table>
            </td>
            <td>
                <SELECT name="AssignedPages" size=6 style="WIDTH: 180px"
                    multiple ondblclick="addSelectedPage()"
                    onchange="setPageListFocus(this)">
                    <% c.set("i", "0");
                          /*IF AssignedPageList.Count == 0 */%>
                            <!--<OPTION value="NoName"><%= c.toDisplay(c.var("Generic.EmptyListBracket")) %>-->
                        <%/*ENDIF */
                       while (c.lt(c.var("i"), c.var("AssignedPageList.Count"))) { %>
                        <OPTION value="<%= c.toDisplay(c.var("AssignedPageList.Element."+c.var("i"))) %>"><%= c.toDisplay(c.var("AssignedPageList.Element."+c.var("i"))) %>
                        <% c.inc("i");
                       } %>
                </SELECT>
            </td>
        </tr>
        <tr>
            <td colspan="3" >
                &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.Book.BookAssignToRoles")) %>
            </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.var("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") %>" title="<%= 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") %>" title="<%= 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.var("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>

    <!-- ************************ -->
    <!-- TARGET CLASS OBJECT TYPE-->
    <!-- ************************ -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="tablesubhead1">
                <%= c.toDisplay(c.string("DevelopersForm.Book.TargetClassObjectType")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="middle" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Book.ObjectTypes")) %>
            </td>
        </tr>
        <tr>
            <td class="smalltext">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="top" class="smalltext2d">
                <%= c.toDisplay(c.string("DevelopersForm.Book.ObjectTypesInstruction")) %>
            </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.Book.AvailableClasses")) %>
            </td>
            <td align="left">
            </td>
            <td align="left" valign="bottom" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Book.AssignedClasses")) %>
            </td>
        </tr>
        <tr>
            <td>
                <SELECT name="AvailableClasses" size=9 style="WIDTH: 190px"
                    multiple ondblclick="removeSelectedClass()"
                    onchange="setClassListFocus(this)">
                    <% c.set("i", "0");
                          /*IF Sch_ClassList.Count == 0 */%>
                            <!--<OPTION value="NoName"><%= c.toDisplay(c.var("Generic.EmptyListBracket")) %>-->
                        <%/*ENDIF */
                       while (c.lt(c.var("i"), c.var("Sch_ClassList.Count"))) { %>
                        <OPTION value="<%= c.toDisplay(c.var("Sch_ClassList.Element."+c.var("i"))) %>"><%= c.toDisplay(c.var("Sch_ClassList.Element."+c.var("i"))) %>
                        <% c.inc("i");
                       } %>
                </SELECT>
            </td>
            <td>
                <table>
                    <tr>
                        <td valign="bottom">
                            <a href="#" onClick="javascript:removeSelectedClass();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowRight.image") %>" alt="<%= c.string("Button.ArrowRight.alt") %>" title="<%= c.string("Button.ArrowRight.alt") %>" border=0></a>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <a href="#" onClick="javascript:addSelectedClass();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowLeft.image") %>" alt="<%= c.string("Button.ArrowLeft.alt") %>" title="<%= c.string("Button.ArrowLeft.alt") %>" border=0></a>
                        </td>
                    </tr>
                </table>
                <BR>
            </td>
            <td valign = "top">
                <table>
                    <tr>
                        <td>
                            <SELECT name="AssignedClasses" size=5 style="WIDTH: 190px"
                                multiple ondblclick="addSelectedClass()"
                                onchange="setClassListFocus(this)">
                                <% c.set("i", "0");
                                      /*IF DB_Assigned_ClassList.Count == 0 */%>
                                        <!--<OPTION value="NoName"><%= c.toDisplay(c.var("Generic.EmptyListBracket")) %>-->
                                    <%/*ENDIF */
                                   while (c.lt(c.var("i"), c.var("DB_Assigned_ClassList.Count"))) { %>
                                    <OPTION value="<%= c.toDisplay(c.var("DB_Assigned_ClassList.Element."+c.var("i"))) %>"><%= c.toDisplay(c.var("DB_Assigned_ClassList.Element."+c.var("i"))) %>
                                    <% c.inc("i");
                                   } %>
                            </SELECT>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <a href="#" onClick="javascript:addUnavailableClass();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.ArrowUp.image") %>" alt="<%= c.string("Button.ArrowUp.alt") %>" title="<%= c.string("Button.ArrowUp.alt") %>" border=0></a>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input  type="text" name="DB_NewClass" 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.Book.UnavailableClasses")) %>
            </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.Book.BookDescription")) %>
            </td>
            <td valign="bottom">
                <textarea   name="DB_DescriptionData_Name"
                            rows="4"
                            cols="30"
                            maxlength="64"
                            wrap=virtual><%= c.toDisplay(c.var("DB_DescriptionData_Value")) %></textarea>
            </td>
        </tr>
        </tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td valign="top" class="mediumtext">
                <%= c.toDisplay(c.string("DevelopersForm.Book.Other")) %>
            </td>
            <td>
                <% c.set("MVStringEditor_name", "DB_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.Book.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") %>"
                    title="<%= 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") %>"
                    title="<%= c.string("Button.Cancel.alt") %>"
                    border=0></a>
            </td>
        </tr>
    </table>
</form>
</BODY></HTML>

