var xmlhttp;
var selectId;
function displayImage(id, rootUrl, queryStr) {
	xmlhttp=null;
	var url = rootUrl + "/displayImage.php"; // The server-side script
	// code for Mozilla, etc.
	if (window.XMLHttpRequest){
	  xmlhttp=new XMLHttpRequest()
	}
	// code for IE
	else if (window.ActiveXObject){
	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	if (xmlhttp!=null){
	  	xmlhttp.onreadystatechange=state_ChangeImage
	  	xmlhttp.open("GET", url + "?id=" + id + "&" + queryStr, true);
	  	xmlhttp.send(null);
	}
	else {
	  alert("Your browser does not support XMLHTTP.")
	}	
	return true;
}
	
function state_ChangeImage() { 
	if (xmlhttp.readyState==4){
		if (xmlhttp.status==200){
			returnText = xmlhttp.responseText;
			var div = document.getElementById('imageDisplay');
			div.style.display = "block";
			div.innerHTML = "<div class=\"closeWin\" onclick=\"hide('imageDisplay')\">close [x]</div>" + returnText;
			var div = document.getElementById('backToList');
			div.style.display = "none";

		} else {
	  		alert("Problem retrieving XML data:" + xmlhttp.statusText);
	  	}
	} else {
	}
	
}