<!-- Begin
// display_gigs.js - provides functions to display gigs
// Copyright 2005-2009 SimpleWebDesign.co.uk jofarrow.co.uk

// Define some constants...


//---------------------------------------------------------------------------------------------
// displaygigs - this builds and returns a table of gigs
function displaygigs()
{
  // Open the table that the news items will go into
  replyString = "<TABLE ALIGN='CENTER'>" ;

  // Write a row for each record we want to display
  for( i = 0 ; i < gigDate.length ; i++ )
  {
	// If it's an empty row we've finished
	//if( gigDate[i] == "" )
	//  break ;

    // If the date has passed, we're not interested
	var CurrentDate = ( Date.parse( Date() ) )*1 - 86400000 ;
	var EventDate = ( Date.parse( gigDate[i] ) )*1 ;
	if( EventDate < CurrentDate )
      continue ;

	// Display the image if there is one
	replyString += "<TR>"
	replyString += "<TD align='RIGHT'>" + gigDateText[i] + "</TD><TD>&nbsp;</TD>" ;
	replyString += "<TD align='LEFT'>   <B>" + gigVenue[i] ;
	if( gigNotes[i] != "" )
	  replyString += "<br>" + gigNotes[i] ;
//	  replyString += " (" + gigNotes[i] + ")" ;
	replyString += "</B></TD>" ;
	replyString += "<TR>"
	}

  // Now close off the table and return
	replyString += "</TABLE>" ;
  return( replyString ) ;
}

// End -->

