3 content = document.getElementById("content");
4 content.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=showphoto&id=' + id));
9 content = document.getElementById("content");
10 content.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=showcredits'));
13 function Tags(mode, id)
16 // add the tag to users session
17 HTML_AJAX.grab(encodeURI('rpc.php?action=addtag&id=' + id));
19 else if(mode == "del") {
20 // del the tag from users session
21 HTML_AJAX.grab(encodeURI('rpc.php?action=deltag&id=' + id));
23 else if(mode == "reset") {
24 HTML_AJAX.grab(encodeURI('rpc.php?action=resettags'));
26 else if(mode == "condition") {
27 setCheckedValue(id, id.value);
28 HTML_AJAX.grab(encodeURI('rpc.php?action=tagcondition&mode=' + id.value));
31 refreshAvailableTags();
32 refreshSelectedTags();
37 function refreshAvailableTags()
39 // update available tags
40 content = document.getElementById("available_tags");
41 content.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=show_available_tags'));
44 function refreshSelectedTags()
46 // update selected tags
47 content = document.getElementById("selected_tags");
48 content.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=show_selected_tags'));
51 function showPhotoIndex()
53 HTML_AJAX.replace(document.getElementById("content"), encodeURI('rpc.php?action=show_photo_index'));
56 function showBubbleDetails(object, id, direction)
58 HTML_AJAX.replace(object, encodeURI('rpc.php?action=showbubbledetails&id=' + id + '&direction=" + direction'));
61 // if photo index is currently shown, refresh it
62 function refreshPhotoIndex()
64 if(document.getElementById("matrix") != undefined) {
69 function click(object)
76 // set the radio button with the given value as being checked
77 // do nothing if there are no radio buttons
78 // if the given value does not exist, all the radio buttons
79 // are reset to unchecked
80 function setCheckedValue(condition, value) {
82 var count = condition.length;
83 if(count == undefined) {
84 condition.checked = (condition.value == value.toString());
87 for(var i = 0; i < count; i++) {
88 condition[i].checked = false;
89 if(condition[i].value == value.toString()) {
90 condition[i].checked = true;
95 function startsearch()
97 searchfor = document.getElementsByName('searchfor')[0].value;
98 HTML_AJAX.grab(encodeURI('rpc.php?action=search&for=' + searchfor));