-function prepare_preload(img, width, height, evt, filename)
+function display_image_num(num, element_id)
+{
+ var screen_size = find_width();
+ var adjusted_size;
+
+ if (global_image_list[num][2] == -1) {
+ // no size information, use our pessimal guess
+ adjusted_size = max_image_size(screen_size);
+ } else {
+ adjusted_size = pick_image_size(screen_size, [ global_image_list[num][2], global_image_list[num][3] ]);
+ }
+
+ var img = display_image(adjusted_size[0], adjusted_size[1], global_image_list[num][0], global_image_list[num][1], element_id);
+
+ if (element_id == "image") {
+ // we want to shrink the box as much as possible if we know the true
+ // size of the image
+ center_image(num);
+
+ document.getElementById('linkbg1').href = global_bookmark_url_base + (num+1);
+ document.getElementById('linkbg2').href = global_bookmark_url_base + (num+1);
+ document.getElementById('linkbg3').href = global_bookmark_url_base + (num+1);
+ }
+
+ return img;
+}
+
+function prepare_preload(img, num)