var url = "../../includes/page_types/article-blog/update_com_rating.php?";
var id;
    
    
    function rate_comment(current, thumb, cid ) {
      id = cid;
      http.open("GET", url + "current=" + current + "&thumb=" + thumb + "&id=" + id, true);
      http.onreadystatechange = handleHttpResponse;
      http.send(null);
    }
    
    
    function handleHttpResponse() {
      if (http.readyState == 4) {
        elementid = 'com_'+id;
        document.getElementById(elementid).innerHTML = http.responseText;
      }
    }
    

function getHTTPObject() {
      var xmlhttp;
      if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        try {
          xmlhttp = new XMLHttpRequest();
        } catch (e) {
          xmlhttp = false;
        }
      }
      return xmlhttp;
    }
    
var http = getHTTPObject(); // We create the HTTP Object
