function xmlhttpPost(obj, strURL) {
  $.getJSON(strURL+"&callback=?", {  },
    function(data){
      document.getElementById(obj).innerHTML=data['data'];
    }); 
}

function libilose_button(obj,id,url,title,category,summary,convert) {

if(category==99 || category==13) {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote-sk.png' width='54' height='87' />");
    xmlhttpPost(obj, "http://www.libilose.cz/ikonaJSON.php?mode=sk&id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());
  } else if(category==12) {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote.png' width='54' height='87' />");
    xmlhttpPost(obj, "http://www.libilose.cz/ikonaJSON.php?mode=sk2&id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());  
  } else {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote.png' width='54' height='87' />");
    xmlhttpPost(obj, "http://www.libilose.cz/ikonaJSON.php?id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());    
  }
  
}

function xmlhttpPost2(obj, obj2, strURL) {
  $.getJSON(strURL+"&callback=?", {  },
    function(data){
      document.getElementById(obj).innerHTML=data['data'];
      document.getElementById(obj2).innerHTML=data['data2'];
    }); 
}

function libilose_dvojbutton(obj,obj2,id,url,title,category,summary,convert) {

  if(category==99 || category==13) {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote-sk.png' width='54' height='87' />");
    $('#'+obj2).html("<img src='http://www.libilose.cz/img/vote-sk.png' width='54' height='87' />");
    xmlhttpPost2(obj, obj2, "http://www.libilose.cz/dvojikonaJSON.php?mode=sk&id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());
  } else if(category==12) {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote.png' width='54' height='87' />");
    $('#'+obj2).html("<img src='http://www.libilose.cz/img/vote.png' width='54' height='87' />");
    xmlhttpPost2(obj, obj2, "http://www.libilose.cz/dvojikonaJSON.php?mode=sk2&id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());  
  } else {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote.png' width='54' height='87' />");
    $('#'+obj2).html("<img src='http://www.libilose.cz/img/vote.png' width='54' height='87' />");
    xmlhttpPost2(obj, obj2, "http://www.libilose.cz/dvojikonaJSON.php?id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());  
  }

}

function libilose_minidvojbutton(obj,obj2,id,url,title,category,summary,convert) {

if(category==99 || category==13) {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote-sk.png' width='54' height='87' />");
    $('#'+obj2).html("<img src='http://www.libilose.cz/img/vote_small-sk.png' width='183' height='26' />");
    xmlhttpPost2(obj, obj2, "http://www.libilose.cz/miniikonaJSON.php?mode=sk&id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());
} else if(category==12) {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote.png' width='54' height='87' />");
    $('#'+obj2).html("<img src='http://www.libilose.cz/img/vote_small.png' width='183' height='26' />");
    xmlhttpPost2(obj, obj2, "http://www.libilose.cz/miniikonaJSON.php?mode=sk2&id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());
} else {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote.png' width='54' height='87' />");
    $('#'+obj2).html("<img src='http://www.libilose.cz/img/vote_small.png' width='183' height='26' />");
    xmlhttpPost2(obj, obj2, "http://www.libilose.cz/miniikonaJSON.php?id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());
}

}

function libilose_minibutton(obj,id,url,title,category,summary,convert) {
if(category==99 || category==13) {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote_small-sk.png' width='183' height='26' />");
    xmlhttpPost(obj, "http://www.libilose.cz/miniikonaJSON.php?mode=sk&id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());    
} else if(category==12) {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote_small.png' width='183' height='26' />");
    xmlhttpPost(obj, "http://www.libilose.cz/miniikonaJSON.php?mode=sk&id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());
} else {
    $('#'+obj).html("<img src='http://www.libilose.cz/img/vote_small.png' width='183' height='26' />");
    xmlhttpPost(obj, "http://www.libilose.cz/miniikonaJSON.php?id=" + id + "&url=" + url + "&title=" + title + "&convert=" + convert + "&category=" + category + "&summary=" + summary + "&content=" + summary + "&rnd=" + Math.random());
}
}


