/*---------------------------------------------------------------------------*/

function info_entry( title, name, url )
{
    this.title = title;
    this.name  = name;
    this.url   = url;
}

/*---------------------------------------------------------------------------*/

function display_title( n )
{
    d = document;
    d.write( '<title>' + site_name + " - " + info[n].title + '</title>' );
}

/*---------------------------------------------------------------------------*/

function display_banner( n )
{
    // Assume that the URL for the current page as it appears in the info
    // list is relative and therefore that any forward slashes indicate how
    // many directory levels we must back up.

    dir = '';
    s = info[n].url;
    k = s.indexOf( '/' );
    while ( k != -1 )
    {
	dir = dir + '../';
	s = s.substr( k + 1 );
	k = s.indexOf( '/' );
    }

    // Display banner 

    d = document;
    d.write( '<table width="100%"><tr valign="top">' );
    d.write( '<td class="info" width="70%" align="left">' );
    d.write( '<h1 class="name">Jonathan R. Senning</h1>' );
    d.write( '<b>Associate Professor of Mathematics and Computer Science</b><br />' );
    d.write( '<b>Department Chair</b><br /><br />' );
    d.write( '<a href="http://www.math-cs.gordon.edu/">Department of' );
    d.write( ' Mathematics and Computer Science</a><br />' );
    d.write( '<a href="http://www.gordon.edu/">Gordon College</a><br />' );
    d.write( '255 Grapevine Road<br />Wenham, MA 01984<br />' );
    d.write( '978-867-4376 (voice)<br />978-867-4666 (fax)<br />' );
    d.write( '<em>jonathan.senning@gordon.edu</em>' );
    d.write( '</td>' );
    d.write( '<td class="picture" width="30%" align="right">' );
    d.write( '<img src="' + dir + 'images/jsenning.jpg" align="right" />' );
    d.write( '</td>' );
    d.write( '</tr></table>' );
}

/*---------------------------------------------------------------------------*/

function display_navigation_list( n )
{
    // Assume that the URL for the current page as it appears in the info
    // list is relative and therefore that any forward slashes indicate how
    // many directory levels we must back up.

    dir = '';
    s = info[n].url;
    k = s.indexOf( '/' );
    while ( k != -1 )
    {
	dir = dir + '../';
	s = s.substr( k + 1 );
	k = s.indexOf( '/' );
    }

    // Show the navigation list.  The name of the current page is not
    // displayed as a link.

    d = document;
    d.write( '<ul>' );
    for ( i = 0; i < info.length; i++ )
    {
	d.write( '<li>' );
	if ( i == n )
	{
	    d.write( info[i].name  );
	}
	else
	{
	    d.write( '<a href="' + dir + info[i].url + '">' + info[i].name + '</a>' );
	}
	d.write( '</li>' );
    }
    d.write( '</ul>' );
}

/*---------------------------------------------------------------------------*/

function showPage( url )
{
    messageWindow = window.open( url, '_blank',
    'location=yes,menubar=yes,status=yes,scrollbars=yes,resizable=yes,width=1017,height=735' );
}

/*---------------------------------------------------------------------------*/
