<!-- Begin

// paperinfo.js - handles display of papers tables

// Function - this builds and returns a list of papers.
function papersTable()
{
  // Start with table tags and column headers.  StyleSheet defaults will be used
  replyString = "<TABLE class=\"example table-autosort:0 table-stripeclass:alternate\"><THEAD>" ;
  replyString += "<TR>" ;
  replyString += "<TH class=\"table-sortable:alphanumeric\">Author</TH>" ;
  replyString += "<TH class=\"table-sortable:alphanumeric\">Title</TH>" ;
  replyString += "<TH class=\"table-sortable:alphanumeric\">ISBN</TH>" ;
  replyString += "<TH class=\"table-sortable:alphanumeric\">Session</TH>" ;
  replyString += "<TH class=\"table-sortable:alphanumeric\">Pub. Date</TH>" ;
  replyString += "<TH class=\"filterable\">Category<BR>" ;
  replyString += "<select onchange=\"Table.filter(this,this)\">" ;
      replyString += "<option value=\"\">All</option>" ;
      replyString += "<option value=\"Economics\">Economics</option>" ;
      replyString += "<option value=\"Education\">Education</option>" ;
      replyString += "<option value=\"The Environment and Agriculture\">The Environment and Agriculture</option>" ;
      replyString += "<option value=\"Government\">Government</option>" ;
      replyString += "<option value=\"Health\">Health</option>" ;
      replyString += "<option value=\"Industry and Technology\">Industry and Technology</option>" ;
      replyString += "<option value=\"Social affairs\">Social affairs</option>" ;
      replyString += "<option value=\"Statistics\">Statistics</option>" ;
      replyString += "<option value=\"Transport\">Transport</option>" ;
      replyString += "<option value=\"Unclassified\">Unclassified</option></TH></TR>" ;
  replyString += "</THEAD><TBODY>" ;
//  replyString += "<TH><input name=\"filter\" size=\"8\" onkeyup=\"Table.filter(this,this)\"></TH>" ;

  // Add entries for every date in the calendar
  for (i = 0 ; i < paperTitle.length ; i++ )
  {
    // Add the formatted data to the reply string
    replyString += "<TD>" + paperAuthor[i] + "</TD>" ;
    replyString += "<TD>" + paperTitle[i] + "</TD>" ;
    replyString += "<TD NOWRAP ALIGN='CENTER'>" + paperISBN[i] + "</TD>" ;
    replyString += "<TD ALIGN='CENTER'>" + paperSession[i] + "</TD>" ;
    replyString += "<TD ALIGN='CENTER'>" + paperPubDate[i] + "</TD>" ;

    // Find the category description
    for( j=0 ; j < catCode.length ; j++ )
    {
		if( catCode[j] == paperCategory[i] )
		{
			replyString += "<TD ALIGN='CENTER'>" + catDesc[j] + "</TD>" ;
			break ;
	    }
	}
	// Check for an unxpecified category (should never happen)
	if( j == catCode.length )
	    replyString += "<TD ALIGN='CENTER'><I>Not Specified</I></TD>" ;

    // Finally, close off the row
    replyString += "</TR>" ;
  }

  // Close off the table...
  replyString += "</TBODY></TABLE>" ;

  // ...and return it to the calling page
  return( replyString ) ;
}

// ---------------------------------------------------------------------------------------------

// End -->

