var id function bookmarkDone transport if id src indexOf plus png -1 i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var id;
function bookmarkDone(transport) {
if($(id).src.indexOf('plus.png') == -1)
$(id).src = $(id).src.replace('minus.png', 'plus.png');
else $(id).src = $(id).src.replace('plus.png', 'minus.png');
}
function callAjaxBookmark(id1, s, baseurl) {
id = id1;
var myAjax = new Ajax.Request(baseurl + '/ajax/bookmark',
{method: 'get', parameters: {id: s},
onComplete: bookmarkDone});
}
function tbookDone(transport) {
if($('tbookcount' + id).value > 0 && ($('tbookcountg' + id).innerHTML - $('tbookcount' + id).value) >= 0) {
$('tbookcountg' + id).innerHTML = $('tbookcountg' + id).innerHTML - $('tbookcount' + id).value;
$('bull' + id).style.color = "#05b300";
}
else $('bull' + id).style.color = "#e41b1b";
}