additional resolution for bubble images
[phpfspot.git] / phpfspot.js
1 function showImage(id)
2 {
3    content = document.getElementById("content");
4    content.innerHTML = HTML_AJAX.grab('rpc.php?action=showphoto&id=' + id);
5 }
6
7 function showCredits()
8 {
9    content = document.getElementById("content");
10    content.innerHTML = HTML_AJAX.grab('rpc.php?action=showcredits');
11 }
12
13 function Tags(mode, id)
14 {
15    if(mode == "add") {
16       // add the tag to users session
17       HTML_AJAX.grab('rpc.php?action=addtag&id=' + id);
18    }
19    else if(mode == "del") {
20       // del the tag from users session
21       HTML_AJAX.grab('rpc.php?action=deltag&id=' + id);
22    }
23    else if(mode == "reset") {
24       HTML_AJAX.grab('rpc.php?action=resettags');
25    }
26    
27    refreshAvailableTags();
28    refreshSelectedTags();
29    refreshPhotoIndex();
30
31 }
32
33 function refreshAvailableTags()
34 {
35    // update available tags
36    content = document.getElementById("available_tags");
37    content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_available_tags');
38 }
39
40 function refreshSelectedTags()
41 {
42    // update selected tags
43    content = document.getElementById("selected_tags");
44    content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_selected_tags');
45 }
46
47 function showPhotoIndex()
48 {
49    HTML_AJAX.replace(document.getElementById("content"), 'rpc.php?action=show_photo_index');
50
51 }
52
53 function showBubbleDetails(object, id, direction)
54 {
55    HTML_AJAX.replace(object, 'rpc.php?action=showbubbledetails&id=' + id + '&direction=" + direction');
56 }
57
58 // if photo index is currently shown, refresh it
59 function refreshPhotoIndex()
60 {
61    if(document.getElementById("matrix") != undefined) {
62       showPhotoIndex();
63    }
64 }
65