obj.selectedIndex = i;
}
+function setvar(obj, name, callback, status)
+{
+ if (!obj.options[obj.selectedIndex].value.length)
+ value = -1;
+ else
+ value = obj.options[obj.selectedIndex].value;
+
+ var source = document.getElementById('source');
+
+ if (!source) return false;
+
+ var parms = 'source=' + source.innerHTML + '&name=' + name + '&value=' + value;
+
+ ajax_request('setvar', parms, callback);
+
+ if (typeof status == 'function')
+ status(obj,value,obj.options[obj.selectedIndex].innerHTML);
+}
+
/*
* Form functions
*/