/* 	
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FUNCTION: clk = Used for click through reporting
			valId: Id of hit
			searchFormName: Which form holds the query element?
			queryElementName: What element holds the query text?
			intContentConsumerId: Consumer Id for the interface
			strClickTickerRoot: Local path to the Click application.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*/
function clk(valId) {
	var strClickedUrl 			= encodeURIComponent(document.getElementById(valId).getAttribute("href"));
	var strClickedAnchorText 	= encodeURIComponent(document.getElementById(valId).innerHTML);
	var strAssociatedQuery 		= encodeURIComponent(document.forms[searchFormName].elements[queryElementName].value);
	var strClickTickerRoot		= "/shared/search/clickTicker.cfm";
	var strClickTickerUrl;		
	var strContateChar;
	strParentURL				= encodeURIComponent(strParentUrl);

	if (strClickTickerRoot.indexOf("?")>= 0) {
		strContateChar = "&";
	}
	else {
		strContateChar = "?";
	}
	
	strClickTickerUrl = strClickTickerRoot + strContateChar + "aq=" + strAssociatedQuery + "&cci=" + intContentConsumerId + "&pu=" + strParentURL + "&cu=" + strClickedUrl + "&cat=" + strClickedAnchorText;
	
	//alert (strClickTickerUrl);
	
	// branch for native XMLHttpRequest object
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		req.open("GET", strClickTickerUrl , true);
		req.send(null);
				
	// branch for IE/Windows ActiveX version
	} else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");
		if (req) {
			req.open("GET", strClickTickerUrl , true);
			req.send();
		}
	}
}