function callToServer(id,url,zipname) {
	document.getElementById(id).innerHTML="Please be patient while your ZIP file is created. Your download will begin momentarily...";
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
	if(xmlhttp.readyState==4)
	  {
	  updateDownloadCount(id,'updatedownloadcount.php?zipname='+zipname,zipname,xmlhttp.responseText);
	  }
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}

function updateDownloadCount(id,url,zipname,responseText) {
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
	if(xmlhttp.readyState==4)
	  {
	  if(responseText!="") {
	  	document.getElementById(id).innerHTML=responseText;
	  }
	  
	  location.href='zipped/'+zipname+'.zip';
	  }
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}