function setup_highlights(){
	
	function counter(){
		this.value=1; //made this an ojbect so it can be passed by reference and updated in the onclick handlers
	}
	var pageno = new counter();
	var maxpages = 5; 	//this is really ghetto that this value is being duplicated here 
						//and in highlights.php (it is calculated automatically there so no need to ever change it), 
						//but time is a factor so...
	
	function getXMLHTTP(){
		var xhr = false;
		if (window.XMLHttpRequest) {
			xhr = new XMLHttpRequest();
		}
		else if (window.ActiveXObject) {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
		return xhr;
	}
	
	function updatePage(theData, pageno, xhr, maxpages){
		var theDiv = document.getElementById("highlights");	
		theDiv.innerHTML = theData;
		
		//handle next/previous clicks to paginate and get other highlights
		var fwd = document.getElementById('highlights_nav_fwd');
		var back = document.getElementById('highlights_nav_back');
		
		fwd.onclick = function(){
			if (pageno.value < maxpages) {
				pageno.value++;
			}
			xhr.open("GET", "/blog/wp-content/themes/YouServed/highlights.php?pageno="+pageno.value, true);
			xhr.send(null);
			return false;
			
		}
		back.onclick = function(){
			if (pageno.value > 1) {
				pageno.value--;
			}
			xhr.open("GET", "/blog/wp-content/themes/YouServed/highlights.php?pageno="+pageno.value, true);
			xhr.send(null);
			return false;
		}
	}
	
	var xhr = getXMLHTTP();
	
	if (xhr) {
		xhr.onreadystatechange = function(){
			if (xhr.readyState == 4) {
				if (xhr.status == 200 || xhr.status == 304){
					var theData = xhr.responseText;
					updatePage(theData, pageno, xhr, maxpages);			
				}
				else{
					//alert("Error communicating to web service!");
				}
			}
			if (xhr.readyState == 1 || xhr.readyState == 2){
					var theData = '<img src="i/spinner.gif"/>';
					updatePage(theData);
			}
		}
	
						
		//get initial highlights on page load
		xhr.open("GET", "/blog/wp-content/themes/YouServed/highlights.php?pageno="+pageno.value, true);
		xhr.send(null);

	}
	
}