var like_modul;
var like_id;

var xmlHttpObject = false;

if (typeof XMLHttpRequest != 'undefined') 
{
  xmlHttpObject = new XMLHttpRequest();
}
if (!xmlHttpObject) 
{
  try 
  {
    xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP");
  }
  catch(e) 
  {
    try 
    {
      xmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(e) 
    {
      xmlHttpObject = null;
    }
  }
}

function like(modul, id) {
  like_modul = modul;
  like_id = id;

  xmlHttpObject.open('get','like-'+modul+'-'+id+'.html');
  xmlHttpObject.onreadystatechange = handleLikeContent;
  xmlHttpObject.send(null);
  return false;
}

function handleLikeContent() {
  if (xmlHttpObject.readyState == 4)
  {
    id = like_modul+'-'+like_id;
    document.getElementById(id).innerHTML = xmlHttpObject.responseText;
  }
}
