<!-- 
//Browser Support Code
function ajaxFunction(photo_id,photo_path,action){

	var ajaxRequest; // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	var currentTime = new Date();
	currentTime = currentTime.getTime();
	var queryString = "?photo_id=" + photo_id + "&photo_path=" + escape(photo_path) + "&referrer=" + escape(document.referrer) + "&action=" + action + "&dummyTime=" + currentTime;
	//alert('sending '+currentTime);
	ajaxRequest.open("GET", "/logstats.php" + queryString, true);
	ajaxRequest.send(null); 
}

function logPurchasedDownload(id,filePath){
	
	var ajaxRequest; // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	var currentTime = new Date();
	currentTime = currentTime.getTime();
	var queryString = "?id=" + id + "&filePath=" + escape(filePath) + "&dummyVar=" + currentTime;
	//alert(queryString);
	//alert('sending '+currentTime);
	ajaxRequest.open("GET", "/keywords/logPurchasedDownloadStats.php" + queryString, true);
	ajaxRequest.send(null); 
}

function logPurchasedDownloadOld(id,filePath){ // uses prototype.js. Worked well, but decided to use shorter one above.

	new Ajax.Request('/keywords/logPurchasedDownloadStats.php', {
	  method: 'get',
	  parameters: {id: id, filePath: filePath},
	  onSuccess: function(transport){
      var response = transport.responseText || "no response text";
      //alert("Success! \n\n" + response);
	  var i=0;
	  for (i = 0; i < 10000;++i)
	  {
	  }
    },
    onFailure: function(){ alert('Something went wrong...') }
	  });
}

//-->
