var strAbsolutePath = "http://"+location.host+"/download/";

function getCount(id,elementId){
var xmlHttp =new ActiveXObject("Microsoft.XMLHTTP"); 
var url = strAbsolutePath+"getc.asp?id="+id+"&r="+Math.random();
xmlHttp.open("GET",url, true); 
xmlHttp.onreadystatechange = function(){
  if (xmlHttp.readyState == 4) {
	  if (xmlHttp.status == 200) {
	  var response = xmlHttp.responseText;
	  document.getElementById(elementId).innerHTML=response; 
	  }
  }
}
xmlHttp.send(null); 
} 
	
function setCount(id,elementId){
var xmlHttp =new ActiveXObject("Microsoft.XMLHTTP"); 
var url = strAbsolutePath+"setc.asp?id="+id+"&r="+Math.random();
xmlHttp.open("GET",url, true); 
xmlHttp.onreadystatechange = function(){
  if (xmlHttp.readyState == 4) {
	  if (xmlHttp.status == 200) {
	  var response = xmlHttp.responseText;
	  document.getElementById(elementId).innerHTML=Number(document.getElementById(elementId).innerHTML)+1;
	  }
  }
}
xmlHttp.send(null); 
} 