moved resize_image function to PHPFSPOT class
[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
30 }
31
32 function refreshAvailableTags()
33 {
34    // update available tags
35    content = document.getElementById("available_tags");
36    content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_available_tags');
37 }
38
39 function refreshSelectedTags()
40 {
41    // update selected tags
42    content = document.getElementById("selected_tags");
43    content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_selected_tags');
44 }
45
46 function showPhotoIndex()
47 {
48    HTML_AJAX.replace(document.getElementById("content"), 'rpc.php?action=show_photo_index');
49
50 //   content = document.getElementById("content");
51 //   content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_photo_index');
52 }
53
54 function showBubbleDetails(object, id, direction)
55 {
56    HTML_AJAX.replace(object, 'rpc.php?action=showbubbledetails&id=' + id + '&direction=" + direction');
57 }
58