	// function to make the request to the server
function xmlhttpPost(strURL, elementID) {
	var xmlHttpReq = false;
	var self = this;
	// Mozilla/Safari
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	}
	// IE
	else if (window.ActiveXObject) {
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	self.xmlHttpReq.open('GET', strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) {
			// Call the update function
			updateBoth(self.xmlHttpReq.responseText, elementID);
		}
	}
	self.xmlHttpReq.send('');
}

	// Update the proper element with the results			
function updateBoth(str, elementID){
	document.getElementById(elementID).innerHTML = str;
	populateEvents();
	populateGallery();
}

	// Update the proper element with the results			
function updatePage(str, elementID){
	document.getElementById(elementID).innerHTML = str;
}

function xmlhttpPost2(strURL, elementID) {
	var xmlHttpReq = false;
	var self = this;
	// Mozilla/Safari
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	}
	// IE
	else if (window.ActiveXObject) {
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	self.xmlHttpReq.open('GET', strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) {
			// Call the update function
			updatePage(self.xmlHttpReq.responseText, elementID);
		}
	}
	self.xmlHttpReq.send('');
}

function pausecomp(millis) {
	var date = new Date();
	var curDate = null;
	do { curDate = new Date(); }
	while(curDate-date < millis);
} 
