+function initSlider()
+{
+ var sliderEl = document.getElementById ? document.getElementById("slider-1") : null;
+ var inputEl = document.forms[0]["slider-input-1"];
+ var s = new Slider(sliderEl, inputEl);
+ s.setMinimum(1);
+ s.setMaximum(10);
+ s.setValue(sliding_time);
+ document.getElementById("current_slide_time").innerHTML = sliding_time + "s Interval";
+ s.onchange = function () {
+ sliding_time = s.getValue();
+ document.getElementById("current_slide_time").innerHTML = sliding_time + "s Interval";
+ if(!sliding_paused && sliding) {
+ clearInterval(sliding);
+ sliding = setInterval("nextSlide()", sliding_time*1000);
+ }
+ };
+ window.onresize = function () {
+ s.recalculate();
+ };
+
+}
+
+function update_sort_order(obj)
+{
+ var objTemp = new Object();
+ objTemp['value'] = obj.options[obj.selectedIndex].value;
+
+ var retr = HTML_AJAX.post('rpc.php?action=update_sort_order', objTemp);
+
+ if(retr == "ok") {
+ showPhotoIndex();
+ }
+ else {
+ window.alert(retr);
+ }
+
+} // update_sort_order()
+
+
+function keyDown(e) {
+ var evt = (e) ? e:(window.event) ? window.event:null;
+
+ if(evt) {
+ var key = (evt.charCode) ? evt.charCode :
+ ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
+
+
+ if(key == 37) /* left curosr */ {
+ if(document.getElementById('prev_link')) {
+ var prev_link = document.getElementById('prev_link').href;
+ window.location.href = prev_link;
+ }
+ return;
+ }
+ if(key == 38) /* up cursor */ {
+ }
+ if(key == 39) /* right curosr */ {
+ if(document.getElementById('next_link')) {
+ var next_link = document.getElementById('next_link').href;
+ window.location.href = next_link;
+ }
+ return;
+ }
+ }
+}
+
+document.onkeydown=keyDown;
+if(document.layers) {
+ document.captureEvents(Event.KEYDOWN);
+}
+