// JavaScript Document
<!-- Begin HTML comment that hides the script ---------------------------------------------
function imgNavigate(szLocation, szRecKey) {
// Prior to navigating to the final page location, we need to use the szRecKey value to update
// the Clicks field in the tbladverts of Ironman database.  Either pass the value in a form field
// using a submit action (most likely how I will need to do it) or find an AJAX way to do it.

//	form.action = szLocation;
//	form.imageClick.value = szRecKey;
//	form.submit();


// Although the below line of code works, it will likely be replaced by a form action assignment
// and form submit.
	top.location.href = szLocation;
}
//-----------------------------------------------------------------------------------------
function strLoadOnClick(szLocation,szRecKey) {
	return "imgNavigate('" + szLocation + "'," + szRecKey + ");";
}
//-----------------------------------------------------------------------------------------
function imgLoadAds() {
	var intImageSpace = 0;
	var intImageOffset = 0;
	var div = document.getElementById("content");

	for(intPositionCount = 0; intPositionCount < adPosition.length; intPositionCount++) {
		for(i=1; i<= adPosition[intPositionCount]; i++) {
			div = document.getElementById("adimagespace" + (intImageOffset + i));
			div.style.display = "none";
		}
		rnd_no = Math.floor(adPosition[intPositionCount] * Math.random()) + 1;
		div = document.getElementById("adimagespace" + (intImageOffset + rnd_no));
		div.style.display = "";
		intImageOffset = intImageOffset + adPosition[intPositionCount];
	}
	t = setTimeout("imgLoadAds()",10000);
}
//-------------------------------------------------------------------- End HTML Comment --> 
