<a href="Library.asp?Nav=ModifyLibrary&LibraryID=<%=lngLibraryID%>"><img alt="Edit the options for this library" border="0" src="Resources/Buttons/EditSmall.gif" onMouseOver="this.style.cursor='hand'"></a>
'Loop through all of the items in the survey and render them.
If rsItems.EOF = False Then
Do While Not rsItems.EOF
lngOrderNumber = rsItems("order_number")
lngItemID = rsItems("item_id")
%>
<tr>
<td width="8"> </td>
<td valign="top" width="2%">
<%
If flgFirstItem = False Then 'Only display the up arrow if it's NOT the first item on a page
%>
<a href="javascript:reorderItem('<%=lngItemID%>', '<%=lngOrderNumber%>', 'Up');"><img alt="Move this item up one position" border="0" src="Resources/Images/ArrowUp.gif" onMouseOver="this.style.cursor='hand'"></a>
<%
End If
'Check to make sure that this isn't the last item on the page before displaying the down arrow
rsItems.MoveNext
If rsItems.EOF = False Then
%>
<a href="javascript:reorderItem('<%=lngItemID%>', '<%=lngOrderNumber%>', 'Down');"><img alt="Move this item down one position" border="0" src="Resources/Images/ArrowDown.gif" onMouseOver="this.style.cursor='hand'"></a>
<%
End If
rsItems.MovePrevious
%>
</td>
<td valign="top" width="91%">
<%DisplayFormattedItem rsItems, False, False%>
</td>
<td valign="top" width="7%">
<a href="javascript:itemClicked('<%=lngItemID%>', '<%=lngOrderNumber%>', 'Insert');"><img border="0" alt="Insert a new item above this item" src="Resources/Buttons/InsertSmall.gif" onMouseOver="this.style.cursor='hand'"></a>
<a href="javascript:itemClicked('<%=lngItemID%>', '<%=lngOrderNumber%>', 'Edit');"><img alt="Edit this item" border="0" src="Resources/Buttons/EditSmall.gif" onMouseOver="this.style.cursor='hand'"></a>
<a href="javascript:deleteItem('<%=lngItemID%>', '<%=lngOrderNumber%>', '<%=lngLibraryID%>');"><img alt="Delete this item" border="0" src="Resources/Buttons/DeleteSmall.gif" onMouseOver="this.style.cursor='hand'"></a>
<a href="javascript:copyItem('<%=lngItemID%>', '<%=lngOrderNumber%>', '<%=lngLibraryID%>');"><img alt="Copy this item" border="0" src="Resources/Buttons/CopySmall.gif" onMouseOver="this.style.cursor='hand'"></a>
</td>
<td width="8"> </td>
</tr>
<tr>
<td width="8"> </td>
<td colspan="3"><hr></td>
<td width="8"> </td>
</tr>
<%
rsItems.MoveNext
'If the EOF has been reached, close out the table surrounding the the last page.
If rsItems.EOF = True Then
%>
<tr>
<td width="8"> </td>
<td valign="top" colspan="2">
<span class="Normal">Click on the "Insert" button to add an item here.</span>
</td>
<td>
<a href="javascript:itemClicked('', '<%=(CLng(lngOrderNumber) + 1)%>', 'Insert');"><img alt="Insert a new item at the bottom of the library" border="0" src="Resources/Buttons/InsertSmall.gif" onMouseOver="this.style.cursor='hand'"></a>
</td>
<td width="8"> </td>
</tr>
<%
End If
'Set the flag to indicate that this is no longer the first item on the page
flgFirstItem = False
Loop
Else 'rsItems.EOF = True -- There are no items
%>
<tr>
<td width="8"> </td>
<td valign="top" colspan="2" width="710">
<span class="Normal">Click on the Insert button to add an item here.</span>
</td>
<td width="15">
<a href="javascript:itemClicked('', '<%=(CLng(lngOrderNumber) + 1)%>', 'Insert');"><img alt="Insert an item in this library" border="0" src="Resources/Buttons/InsertSmall.gif" onMouseOver="this.style.cursor='hand'"></a>