+ } else if (which == 32 && global_select) { // space
+ select_image(global_image_list[global_image_num]);
+ }
+}
+
+function select_image(filename)
+{
+ if (!req)
+ return;
+
+ draw_text("Selecting " + filename + "...");
+
+ req.open("POST", "http://" + global_vhost + "/select", false);
+ req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ req.send("mode=single&event=" + global_evt + "&filename=" + filename);
+
+ setTimeout("fade_text(0.99)", 30);
+}
+
+function fade_text(opacity)
+{
+ set_opacity("text", opacity);
+ if (opacity > 0.0) {
+ opacity -= 0.03;
+ if (opacity < 0.0)
+ opacity = 0.0;
+ setTimeout("fade_text(" + opacity + ")", 30);
+ } else {
+ var text = document.getElementById("text");
+ if (text != null) {
+ text.parentNode.removeChild(text);
+ }