
 
 function makePOSTRequestCnt(url, parameters) {
      XHR = false;
      if (window.XMLHttpRequest) { 
         XHR = new XMLHttpRequest();
         if (XHR.overrideMimeType) {
            XHR.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) {
         try {
            XHR = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               XHR = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!XHR) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      
      XHR.onreadystatechange = alertContentsCnt;
      XHR.open('POST', url, true);
      XHR.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      XHR.setRequestHeader("Content-length", parameters.length);
      XHR.setRequestHeader("Connection", "close");
      XHR.send(parameters);
   }

   function alertContentsCnt() {
      if (XHR.readyState == 4) {
         if (XHR.status == 200) {
            //alert(XHR.responseText);
            result = XHR.responseText;
            //alert(result);          
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   
   
   
   function addCount(id) {
      var poststr = "id=" + encodeURI( id );
      makePOSTRequestCnt('daleel/counter/counter.php', poststr);
   }


