function showResponse( originalRequest ) 
{ 
	var moviesTable = '<table cellpadding="0" cellspacing="0" border="0"><tr>';
	var movieData = '';
	var movieTimes = '';
	
   	var ajaxResponse = originalRequest.responseXML;
	//alert( ajaxResponse.getElementsByTagName('day')[0].firstChild.data );
	
	// get the data from the XML document for the selected day
	var dArray = ajaxResponse.getElementsByTagName('date');
	for( var a=0; a<dArray.length; a++ )
	{
		// if the date we're on in the loop is the selected date,
		// then we can construct all the needed HTML and then break 
		// out of the loop
		if( dArray[a].firstChild.firstChild.nodeValue == $('movie_times').value )
		{
			var thisDate = dArray[a].firstChild.firstChild.nodeValue;
			//alert( dArray[a].firstChild.firstChild.nodeValue );
			
			// get all the movies showing on this date
			var mArray = dArray[a].getElementsByTagName('movie');
			for( var b=0; b<mArray.length; b++ )
			{
				// reset the movie string since this is a new movie
				movieData = '<td class="homeMovie"><div class="homeMovieContainer">';
				movieTimes = '';
				
				// assign all the movies attributes to variables
				var movieId = 		mArray[b].childNodes[0].firstChild.nodeValue;
				var movieTitle = 	mArray[b].childNodes[1].firstChild.nodeValue;
				var movieRating = 	mArray[b].childNodes[2].firstChild.nodeValue;
				var movieImg = 		mArray[b].childNodes[3].firstChild.nodeValue;
				//alert( movieId +'\n'+ movieTitle +'\n'+ movieRating +'\n'+ movieImg  );
				
				movieData += '<a href="movie.php?id='+movieId+'"><img src="'+movieImg+'"></a><br />';
				movieData += '<a href="movie.php?id='+movieId+'">'+movieTitle+'</a> ('+movieRating+')<br />';
				
				// get the showtimes for each movie being shown for the selected day
				var stArray = mArray[b].getElementsByTagName('time');
				
				// loop through the showtimes for this movie
				for( var c=0; c<stArray.length; c++ )
				{
					var movieTime = stArray[c].firstChild.nodeValue;
					
					var tmp = thisDate.split('-');
					var yy = tmp[0];	yy = new Number(yy);
					var mm = tmp[1];	mm = new Number(mm);
					var dd = tmp[2];	dd = new Number(dd);
					
					var tmp = movieTime.split(':');
					var hr = tmp[0];	hr = new Number(hr);
					var mn = tmp[1];					
					
					if( mn.indexOf('AM') == '-1' && hr < 12 )
					{
						hr = hr + 12;
					}				
					var regex = /[^0-9]/g;
					mn = mn.replace(regex, '');
					//alert( mn );
					
					var now = new Date();
					var showtime = new Date();
					showtime.setFullYear(yy, mm-1, dd);
					showtime.setHours(hr);
					showtime.setMinutes(mn);
					showtime.setSeconds(0);
					//alert( showtime );
					//alert( 'now: '+now+'\n'+'show: '+showtime );
					///alert( 'now: '+now+'\n'+now.valueOf()+'\n'+'show: '+showtime+'\n'+showtime.valueOf()+'\n'+'diff: '+(showtime.valueOf()-now.valueOf()) );
					
					movieTimes += '<span class="movie-time';
					if( showtime.valueOf() <= now.valueOf() )
					{
						movieTimes += '-past';	
					}
					
					// check to see if this is a matinee, add parentheses if needed
					var mat = stArray[c].getAttribute('matinee');
					if( mat == 1 )
					{
						movieTime = '('+movieTime+')';	
					}
					
					movieTimes += '">';
					movieTimes += movieTime+'</span> | ';
				}
					
				// if the string isn't empty, then trim out the last " | "
				// since we've already added in the closing span tag, need to trim
				// it out as well, then reinsert it
				if( movieTimes != '' )
				{
					movieTimes = movieTimes.substring(0, movieTimes.length-3);
					//alert( movieTimes );
				}
				else
				{
					movieTimes += 'No showings';	
				}
				
				movieData += movieTimes+'</div></td>';
				moviesTable += movieData;
				
			}//loop through the movie array
			break;
		} // if the date selected is the one we're on in the loop
	}// loop through the date array

	// if there aren't any movies for the selected day, indicate it
	if( movieData == '' )
	{
		moviesTable += '<td class="homeMovie">Films and showtimes are not confirmed for this date. Films are booked Mondays (or Tuesdays after holidays) for the upcoming Friday. Please check back later. Thank you!</td>';	
	}
	
	var handle2 = document.getElementById('moviesShowing');
	if( handle2 )
	{
		handle2.innerHTML = moviesTable+'</tr></table>';	
	}
	return;
}