3 var image_div = document.getElementById("content");
4 image_div.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=showphoto&id=' + id));
9 var credits = document.getElementById("content");
10 credits.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=reset'));
27 else if(mode == "condition") {
28 setCheckedValue(id, id.value);
29 HTML_AJAX.grab(encodeURI('rpc.php?action=tagcondition&mode=' + id.value));
32 refreshAvailableTags();
33 refreshSelectedTags();
38 function refreshAvailableTags()
40 // update available tags
41 var avail_tags = document.getElementById('available_tags');
42 avail_tags.innerHTML = "Loading...";
43 avail_tags.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=show_available_tags'));
46 function refreshSelectedTags()
48 // update selected tags
49 var selected_tags = document.getElementById("selected_tags");
50 selected_tags.innerHTML = "Loading...";
51 selected_tags.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=show_selected_tags'));
53 // if no tags are currently selected, return false from here
54 if(selected_tags.innerHTML == "")
61 function showPhotoIndex(begin_with)
63 if(begin_with == undefined)
64 HTML_AJAX.replace(document.getElementById("content"), encodeURI('rpc.php?action=show_photo_index'));
66 HTML_AJAX.replace(document.getElementById("content"), encodeURI('rpc.php?action=show_photo_index&begin_with=' + begin_with));
69 function showBubbleDetails(object, id, direction)
71 HTML_AJAX.replace(object, encodeURI('rpc.php?action=showbubbledetails&id=' + id + '&direction=" + direction'));
74 // if photo index is currently shown, refresh it
75 function refreshPhotoIndex()
77 if(document.getElementById("matrix") != undefined || startup == 1) {
83 function click(object)
90 // set the radio button with the given value as being checked
91 // do nothing if there are no radio buttons
92 // if the given value does not exist, all the radio buttons
93 // are reset to unchecked
94 function setCheckedValue(condition, value) {
96 var count = condition.length;
97 if(count == undefined) {
98 condition.checked = (condition.value == value.toString());
101 for(var i = 0; i < count; i++) {
102 condition[i].checked = false;
103 if(condition[i].value == value.toString()) {
104 condition[i].checked = true;
109 function startTagSearch(searchfor)
111 HTML_AJAX.grab(encodeURI('rpc.php?action=tag_search&for=' + searchfor));
112 refreshAvailableTags();
113 refreshSelectedTags();
118 function setViewMode(mode)
123 function clearSearch()
125 document.getElementsByName('searchfor')[0].value = '';
128 function init_phpfspot()
130 refreshAvailableTags();
132 if(refreshSelectedTags()) {
137 function setBackGrdColor(item, color)
139 if(color == 'mouseover')
140 item.style.backgroundColor='#c6e9ff';
141 if(color == 'mouseout')
142 item.style.backgroundColor='#eeeeee';
143 if(color == 'mouseclick')
144 item.style.backgroundColor='#93A8CA';