function getAcroVersion() {
	var pluginName = "Adobe Acrobat";
	var classId = "clsid:CA8A9780-280D-11CF-A24D-444553540000";
	var version = "none";
	
	if (typeof navigator.plugins != "undefined" && navigator.userAgent.toLowerCase().indexOf("opera") != -1 || typeof document.all == "undefined") {
		if (typeof navigator.plugins[pluginName] != "undefined") {
			var description = navigator.plugins[pluginName].description;
			var index = description.toLowerCase().indexOf("escript=");
			if (index != -1) {
				index += "escript=".length;
			}
			else {
				index = description.search(/\d+.\d/);
			}
			if (index != -1) {
				version = parseFloat(description.substring(index));
			}
		}
	}
	else if (typeof document.all != "undefined" && typeof document.getElementsByTagName != "undefined") {
		var bodyNode = document.getElementsByTagName("BODY").item(0);
		var object = document.createElement("OBJECT");
		object.setAttribute("id", "pdf_data");
		object.setAttribute("classid", classId);
		object.setAttribute("width", "0");
		object.setAttribute("height", "0");
		bodyNode.appendChild(object);

		if (typeof pdf_data != "undefined") {
			if (typeof pdf_data.getVersions == "undefined") {
				if (navigator.userAgent.toLowerCase().indexOf("mac") != -1) {
					version = "mac";
				}
				else {
					version = "4.0";
				}
			}
			else {
				var description = pdf_data.getVersions();
				var index = description.toLowerCase().indexOf("escript=");
				if (index != -1) {
					index += "escript=".length;
				}
				else {
					index = description.search(/\d+\.\d/);
				}
				if (index != -1) {
					version = parseFloat(description.substring(index));
				}
			}
		}
	}
	else {
		version = "n/a";
	}
	if (!isNaN(version) && ("" + version).indexOf(".") == -1) {
		version = version + ".0";
	}
	return version;
}

function logAcroVersion() {
	// Request a phony image named after the Acrobat version.
	// This image request will be recorded in the web server log.
	var imageFile = "/shared/img/tracker.trk?acrobat=" + getAcroVersion();
	var acroImage = new Image();
	acroImage.src = imageFile;
	
	// debug
	//alert("imageFile=" + imageFile);
}

// log the Acrobat version every time this script is loaded
var onloads = (window.onload) ? (window.onload) : function () {};
window.onload = function () {
	onloads();
	logAcroVersion();
};