/**
 * @author jdemel
 */
function getXMLHttp() {
	var xmlHttp
	try {
		//Firefox, Opera 8.0+, Safari
		xmlHttp = new XMLHttpRequest();
	} catch(e) {
		//Internet Explorer
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				alert("Your browser does not support AJAX!")
				return false;
			}
		}
	}
	return xmlHttp;
}

function HandleResponse(response) {
	if (response != "") {
		alert("Response Issue: " + response);
	}
}

function record_click(this_page, this_link) {
	var xmlHttp = getXMLHttp();
	xmlHttp.onreadystatechange = function() {
		if(xmlHttp.readyState == 4) {
			HandleResponse(xmlHttp.responseText);
		}
	}
	get_link = "ClickTracker/click_tracker.php?page=" + this_page + "&link=" + this_link;
	// alert("get_link: " + get_link)
	xmlHttp.open("GET", get_link, true);
	xmlHttp.send(null);
}
