+// set the radio button with the given value as being checked
+// do nothing if there are no radio buttons
+// if the given value does not exist, all the radio buttons
+// are reset to unchecked
+function setCheckedValue(condition, value) {
+
+ var count = condition.length;
+ if(count == undefined) {
+ condition.checked = (condition.value == value.toString());
+ return;
+ }
+ for(var i = 0; i < count; i++) {
+ condition[i].checked = false;
+ if(condition[i].value == value.toString()) {
+ condition[i].checked = true;
+ }
+ }
+}
+
+function startTagSearch(searchfor)
+{
+ HTML_AJAX.grab(encodeURI('rpc.php?action=tag_search&for=' + searchfor));
+ refreshAvailableTags();
+ refreshSelectedTags();
+ showPhotoIndex();
+
+}
+
+function clearSearch()
+{
+ document.getElementsByName('searchfor')[0].value = '';
+}