'If no library ID has been set, then this is the first time on the page, so use the ID of the first library
If Len(lngLibraryID) = 0 Then
lngLibraryID = rsLibraries("library_id")
End If
Do While Not rsLibraries.EOF
%>
<option <% If CStr(rsLibraries("library_id")) = CStr(lngLibraryID) Then Response.Write "selected" End If %> value="<%=rsLibraries("library_id")%>"><%=rsLibraries("library_name")%></option>