function hitCounter(pkey) {
  var updateURL = "category.process.php?pkey="+pkey;
  if (window.XMLHttpRequest) {
    xmlhttp = new XMLHttpRequest();
  } else if(window.ActiveXObject) {
    xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
  }
  xmlhttp.open("GET",updateURL,true);
  xmlhttp.send(null);
  xmlhttp.onreadystatechange=function()
  {
    if (xmlhttp.readyState==4) {
      var result=xmlhttp.responseText;
      if (result>0) {
        return true;
      }
    }
  }
}

function loadLinks(catId,searchIndex,news_id) {
  var linksURL = "paging.process.php?cPath="+catId+"&s="+searchIndex + "&news_id=" + news_id;
  if (window.XMLHttpRequest) {
    xmlhttp = new XMLHttpRequest();
  } else if(window.ActiveXObject) {
    xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
  }
  xmlhttp.open("GET",linksURL,true);
  xmlhttp.send(null);
  xmlhttp.onreadystatechange = UpdateLinks
}

function UpdateLinks () {

  if (xmlhttp.readyState == "4") {
	  	
    document.getElementById('other_news').innerHTML = xmlhttp.responseText;
  } else {
    document.getElementById('other_news').innerHTML = "<img src='images_phase1/loading.gif'>";
  }
}


