			listingPage = false;
			
			/* Prints out a listing */
			function printList( divID, showIDs, photoList, names, minimums, suitabilities )
			{
			
				// main div tag to print to
				var mainDiv = document.getElementById( divID );
				
				mainDiv.innerHTML = "";
				
				// search results tag
				var searchResults = document.createElement( "div" );
				searchResults.id = "search-results";
				
				// main box tag - prints surrounding box
				var mainBox = document.createElement( "div" );
				mainBox.className = "main-box";
				
				// header title for box
				var divTitle = document.createElement( "h1" );
				divTitle.innerHTML = divID;
				
				// for quick jump links
				var titleLink = document.createElement( "a" );
				titleLink.setAttribute( "name", divID );
				mainBox.appendChild( titleLink );
				mainBox.appendChild( divTitle );
				
				// table that holds listing
				var listingTable = document.createElement( "table" );
				listingTable.className = "event_results";
				listingTable.setAttribute( "align", "center" );
				listingTable.setAttribute( "cellpadding", 5 );
				listingTable.setAttribute( "cellspacing", 0 );
				
				// table body
				var tableBody = document.createElement( "tbody" );
				
				// 1st Row - title info
				var tableRow = document.createElement( "tr" );
				tableRow.style.backgroundColor = "#999999";
				
				// 1st Row's cell
				var tableCell = document.createElement( "td" );
				tableCell.setAttribute( "valign", "middle" );
				
				// titles
				var divShowDetails = document.createElement( "div" );
				//divShowDetails.className = "details"
				
				// table to hold titles
				var descripTable = document.createElement( "table" );
				descripTable.setAttribute( "border", "0" );
				descripTable.setAttribute( "cellpadding", "0" );
				descripTable.setAttribute( "cellspacing", "0" );
				var descripBody = document.createElement( "tbody" );
				var descripTR = document.createElement( "tr" );
				
				// re-sort select box
				var descripTD = document.createElement( "td" );
				descripTD.setAttribute( "width", "160" );
				var selectBox = document.createElement( "select" );
				selectBox.onchange = function() { reSort(divID, this.options[this.selectedIndex].value) };
				var defaultOption = document.createElement( "option" );
				defaultOption.value = "";
				defaultOption.innerHTML = "Sort By...";
				selectBox.appendChild( defaultOption );
				var nameOption = document.createElement( "option" );
				nameOption.value = "name";
				nameOption.innerHTML = "Name";
				selectBox.appendChild( nameOption );
				var minOption = document.createElement( "option" );
				minOption.value = "minimum";
				minOption.innerHTML = "Minimum";
				selectBox.appendChild( minOption );
				var suitabilityOption = document.createElement( "option" );
				suitabilityOption.value = "suitability";
				suitabilityOption.innerHTML = "Suitability";
				selectBox.appendChild( suitabilityOption );
				descripTD.appendChild( selectBox );
				descripTR.appendChild( descripTD );
				
				// Name title
				var descripTD = document.createElement( "td" );
				descripTD.setAttribute( "width", "303" );
				descripTD.className = "event_desc";
				descripTD.innerHTML = "Name";
				descripTR.appendChild( descripTD );
				
				// dividing line
				var descripTD = document.createElement( "td" );
				descripTD.setAttribute( "width", "1" );
				descripTD.setAttribute( "valign", "middle" );
				var spacer = document.createElement( "img" );
				spacer.setAttribute( "src", "images/spacerDark.gif" );
				spacer.setAttribute( "width", "1" );
				spacer.setAttribute( "height", "20" );
				descripTD.appendChild( spacer );
				descripTR.appendChild( descripTD );
			
				// Minimum title
				var descripTD = document.createElement( "td" );
				descripTD.setAttribute( "width", "100" );
				descripTD.setAttribute( "align", "center" );
				descripTD.className = "event_desc";
				descripTD.innerHTML = "Minimum";
				descripTR.appendChild( descripTD );
				
				// dividing line
				var descripTD = document.createElement( "td" );
				descripTD.setAttribute( "width", "1" );
				descripTD.setAttribute( "valign", "middle" );
				var spacer = document.createElement( "img" );
				spacer.setAttribute( "src", "images/spacerDark.gif" );
				spacer.setAttribute( "width", "1" );
				spacer.setAttribute( "height", "20" );
				descripTD.appendChild( spacer );
				descripTR.appendChild( descripTD );
				
				// Suitability title
				var descripTD = document.createElement( "td" );
				descripTD.setAttribute( "width", "100" );
				descripTD.setAttribute( "align", "center" );
				descripTD.className = "event_desc";
				descripTD.innerHTML = "Suitability";
				descripTR.appendChild( descripTD );
				
				// add details to table row
				descripBody.appendChild( descripTR );
				descripTable.appendChild( descripBody );
				divShowDetails.appendChild( descripTable );
				tableCell.appendChild( divShowDetails );
				
				// add table row to table
				tableRow.appendChild( tableCell );
				tableBody.appendChild( tableRow );
				
				// for each record, print out the record
				for ( var i = 0; i < photoList.length; i++ )
				{
				
					// create a new row
					var tableRow = document.createElement( "tr" );
					
					// every odd row is darker
					if ( i % 2 == 1 )
						tableRow.style.backgroundColor = "#cccccc";
					
					// cell for record
					var tableCell = document.createElement( "td" );
					tableCell.setAttribute( "vAlign", "middle" );
					tableCell.vAlign = "middle";
				
					// show photo
					var spacerDiv = document.createElement( "div" );
					spacerDiv.setAttribute( "style", "float: left" );
					spacerDiv.style.styleFloat = "left";
					spacerDiv.style.paddingRight = "10px";
					spacerDiv.style.paddingTop = "2px";
					spacerDiv.style.paddingBottom = "2px";
					spacerDiv.style.paddingLeft = "3px";
					var photoLink = document.createElement( "a" );
					photoLink.setAttribute( "href", "listing.html?eventNum=" + showIDs[i] );
					var spacer = document.createElement( "img" );
					spacer.setAttribute( "src", "eventImages/" + photoList[i] );
					spacer.setAttribute( "width", "150" );
					spacer.setAttribute( "height", "55" );
					spacer.setAttribute( "border", "0" );
					spacer.name = showIDs[i];
					spacer.onmouseover = function() { currentLoc=this.name; showNotification( this.name ); };
					spacer.onmouseout = function() { currentLoc=null; testNotification(); };
					photoLink.appendChild( spacer );
					spacerDiv.appendChild( photoLink );
					tableCell.appendChild( spacerDiv );
				
					// show details
					var divShowDetails = document.createElement( "div" );
					divShowDetails.className = "details"
				
					// table to hold details
					var descripTable = document.createElement( "table" );
					descripTable.setAttribute( "border", "0" );
					descripTable.setAttribute( "cellpadding", "0" );
					descripTable.setAttribute( "cellspacing", "0" );
					var descripBody = document.createElement( "tbody" );
					var descripTR = document.createElement( "tr" );
				
					// show name
					var descripTD = document.createElement( "td" );
					descripTD.setAttribute( "width", "300" );
					descripTD.className = "event_desc";
					var showLink = document.createElement( "a" );
					showLink.setAttribute( "href", "listing.html?eventNum=" + showIDs[i] );
					showLink.name = showIDs[i];
					showLink.onmouseover = function() { currentLoc=this.name; showNotification( this.name ) };
					showLink.onmouseout = function() { currentLoc=null; testNotification() };
					showLink.innerHTML = names[i];
					descripTD.appendChild( showLink );
					descripTR.appendChild( descripTD );
				
					// dividing line
					var descripTD = document.createElement( "td" );
					descripTD.setAttribute( "width", "1" );
					descripTD.setAttribute( "valign", "middle" );
					var spacer = document.createElement( "img" );
					spacer.setAttribute( "src", "images/spacerDark.gif" );
					spacer.setAttribute( "width", "1" );
					spacer.setAttribute( "height", "49" );
					descripTD.appendChild( spacer );
					descripTR.appendChild( descripTD );
					
					// show minimum
					var descripTD = document.createElement( "td" );
					descripTD.setAttribute( "width", "100" );
					descripTD.setAttribute( "align", "center" );
					descripTD.className = "event_desc";
					descripTD.innerHTML = minimums[i];
					descripTR.appendChild( descripTD );
				
					// dividing line
					var descripTD = document.createElement( "td" );
					descripTD.setAttribute( "width", "1" );
					descripTD.setAttribute( "valign", "middle" );
					var spacer = document.createElement( "img" );
					spacer.setAttribute( "src", "images/spacerDark.gif" );
					spacer.setAttribute( "width", "1" );
					spacer.setAttribute( "height", "49" );
					descripTD.appendChild( spacer );
					descripTR.appendChild( descripTD );
				
					// show suitability
					var descripTD = document.createElement( "td" );
					descripTD.setAttribute( "width", "100" );
					descripTD.setAttribute( "align", "center" );
					descripTD.className = "event_desc";
					descripTD.innerHTML = suitabilities[i];
					descripTR.appendChild( descripTD );
				
					// add show info to table
					descripBody.appendChild( descripTR );
					descripTable.appendChild( descripBody );
					divShowDetails.appendChild( descripTable );
					tableCell.appendChild( divShowDetails );
				
					// add row to table
					tableRow.appendChild( tableCell );
					tableBody.appendChild( tableRow );
				
				
				} // move to next show
			
				// add shows to table
				listingTable.appendChild( tableBody );
				mainBox.appendChild( listingTable );
				
				// link to jump to top of page
				var topLink = document.createElement( "div" );
				topLink.className = "top_link";
				var topLinkHref = document.createElement( "a" );
				topLinkHref.setAttribute( "href", "#top" );
				topLinkHref.style.fontWeight = "normal";
				topLinkHref.style.fontSize = "10px";
				topLinkHref.innerHTML = "top";
				topLink.appendChild( topLinkHref );
				mainBox.appendChild( topLink );
				
				// add div's to page
				searchResults.appendChild( mainBox );
				mainDiv.appendChild( searchResults );
			
			} /* end printList function */
			
			
			/* loads the page elements */
			function init()
			{
				
				// get the list of musicals
				getShowList( 'Musicals', 'name' );
				
				// get the list of comedies
				getShowList( 'Comedies', 'name' );
				
				// get the list of comedies
				getShowList( 'Dramas', 'name' );
				
				// get the list of comedies
				getShowList( 'Performances', 'name' );
				
				getShowSelect();
				
			} /* end init */
			
			
			/* re-sorts the section */
			function reSort( section, sortOrder )
			{
			
				window.status = "Please wait...";
				
				getShowList( section, sortOrder );
				
				window.status = "Done";
			
			
			} /* end reSort function */
			
			
			// send the data for a form to a cgi script using ajax technique
			function getShowList( section, sortOrder )
			{
		
				// XMLHttpRequest object
				var oXmlHttp = createXMLHttp();

				// open method for XMLHttpRequest object
				oXmlHttp.open( "POST", "script/showList.asp", true );
		
				// Request header for POST data
				oXmlHttp.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" );
		
				// onreadystatechange listener, for response from server
				oXmlHttp.onreadystatechange = function() 
				{	
					// if the response is received
					if ( oXmlHttp.readyState == 4 ) 
					{
						// if the response is 'OK'
						if ( oXmlHttp.status == 200 )
						{
						
							var showIDs = ['1'];
							var photoList = ['test.jpg'];
							var names = [ 'Test Show' ];
							var minimums = [ '10' ];
							var suitabilities = [ 'General' ];
							
							var response = oXmlHttp.responseText;	// response text
							
							if ( response.length > 0 )
							{
								var shows = response.split( '&&' );
								for ( var i = 0; i < shows.length; i++ )
								{
							
									var elements = shows[i].split( '||' );
									showIDs[i] = elements[0];
									photoList[i] = elements[1];
									names[i] = elements[2];
									minimums[i] = elements[3];
									suitabilities[i] = elements[4];
							
								}
							
								printList( section, showIDs, photoList, names, minimums, suitabilities )
							}

						}
						else // the response is not 'OK'
						{
							//alert( "Error getting show info");
						}
					}
				}; // end onreadystatechange listener
		
				// send the data to the server
				oXmlHttp.send( "section=" + section + "&sortOrder=" + sortOrder );
		
			} // end sendRequest function