
//----
// Procedure: displayDocumentHead()
//
// Created the code for the whole head of the HTML-document.
// The passed parameters are used by the two called procedures.
// "intLevel" is the number of subdirectories the HTML-document is in
// i.e. the number of ".." that has to be done a chdir() with!
//-------------------
function displayDocumentHead(strCollection, strTitle, strSubTitle, intLevel, strPrevFile, strNextFile)
{
 createCenterTableHead();				// create code for centering table

 displayNavigBar(intLevel, strPrevFile, strNextFile);	// create navigation bar

 displayTitle(strCollection, strTitle, strSubTitle);	// table with title and subtitle

} // end of displayDocumentHead()



//----
// Procedure: createCenterTableHead()
//
// This method is called by displayDocumentHead().
// Creates the code for the centering table and the font for the whole document.
//-------------------
function createCenterTableHead()
{
 document.writeln('<a name="top"></a>');
 document.writeln('<center><table width=615 cellspacing=0 cellpadding=0>');
 document.writeln('<tr><td>\t\t\t\t<!-- begin of centering table -->');
 document.writeln('<font face="Arial, Helvetica" size=2>\t<!-- begin of document font -->');
} // end of createCenterTableHead()



//----
// Procedure: displayNavigBar()
//
// Creates the code for the navigation bar on top of the document.
// The passed parameters are used for the entries "next" and "previous".
// "intLevel" is the number of subdirectories the HTML-document is in
// i.e. the number of ".." that has to be done a chdir() with!
//-------------------
function displayNavigBar(intLevel, strPrevFile, strNextFile)
{
 pathName = document.URL;		// get file's complete URL
 tokens = pathName.split("/");		// split the complete URL
 fileName = tokens[tokens.length-1];	// get name of current file
 direcName = tokens[tokens.length-2];	// get name of current directory

 chdirUpStr = "";
 for (i=0; i < intLevel; i++)		// compute string for chdir() upwards
  chdirUpStr += "../";

 document.writeln('<table width="100%" border=2 cellpadding=3 cellspacing=0 bgcolor="#FFFFE0">');
 document.writeln('<tr><td width="15%" align="center"><font face="Arial, Helvetica" size=2><b>');
 document.writeln('<img src="'+chdirUpStr+'img/ico-up.gif" width=14 height=10 border=0 align="top" vspace=4>');
 if (chdirUpStr.length == 0)
  document.writeln('<a href="welcome.html">upwards</a>');
 else
  document.writeln('<a href="' + chdirUpStr + direcName + '.html">upwards</a>');

 document.writeln('</b><font></td><td width="20%" align="center"><font face="Arial, Helvetica" size=2><b>');
 document.write('<img src="'+chdirUpStr+'img/ico-prev.gif" width=10 height=10 border=0 align="top" vspace=4>&nbsp;');
 if (strPrevFile.length != 0)
  document.write('<a href="' + strPrevFile + '.html">prev</a>');
 else
  document.write('prev');

 document.write('&nbsp;||&nbsp;');
 if (strNextFile.length != 0)
  document.write('<a href="' + strNextFile + '.html">next</a>');
 else
  document.write('next');
 document.writeln('&nbsp;<img src="'+chdirUpStr+'img/ico-next.gif" width=10 height=10 border=0 align="top" vspace=4>');

 document.writeln('</b><font></td><td width="52%" align="center"><font face="Arial, Helvetica" size=2><b>');
 document.writeln('&nbsp;');			// a spacer only!

 document.writeln('</b><font></td><td width="13%" align="center"><font face="Arial, Helvetica" size=2><b>');
 document.writeln('<img src="'+chdirUpStr+'img/ico-html.gif" width=18 height=18 border=0 align="top">');
 document.writeln('<a href="' + chdirUpStr + 'welcome.html">home</a>');

 document.writeln('</b><font></td></tr></table>');
 document.writeln('<hr size=1 noshade>\t\t<!-- end of navigation bar; title starts -->');
 document.writeln('');
} // end of displayNavigBar()



//----
// Procedure: displayTitle()
//
// Creates the code for the document's title and subtitle.
// The passed parameter-strings are embedded in the code.
//-------------------
function displayTitle(strCollection, strTitle, strSubTitle)
{
 document.writeln('<table bgcolor="#EEEEEE" width=550 cellspacing=2 cellpadding=2>');
 document.writeln('<tr><td height=50><font face="Arial, Helvetica" size=5 color="#000000">');
 document.writeln('<i>' + strCollection + ':</i> <b>' + strTitle + '</b>');
 document.writeln('</font></td></tr></table>');
 document.writeln('<table bgcolor="#8C94F7" width="100%" cellspacing=2 cellpadding=2>');
 document.writeln('<tr><td height=30><font face="Arial, Helvetica" size=3 color="#FFFFEE"><b>');
 document.writeln(strSubTitle);
 document.writeln('</b></font></td></tr></table>');
 document.writeln('');
 document.writeln('<p>\t\t\t\t<!-- end of title; document text starts -->');
 document.writeln('');
} // end of displayTitle()



//----
// Procedure: displayDocumentBottom()
//
// Creates the code for the document's bottom.
// (shows copyright information, ends documents font, ends centering table)
//-------------------
function displayDocumentBottom()
{
 document.writeln('<p>&nbsp;<p><hr size=2 noshade>\t<!-- end of text; bottom starts -->');
// document.writeln('<center><font size=1><b>Datenbanken und Informationssysteme:</b> Peter Bittner, Mario Lamberger, Martin Predota, Elmar Teufl</font></center>');
// document.writeln('</font>\t\t\t\t<!-- end of document font -->');
 document.writeln('</td></tr></table></center>\t<!-- end of centering table -->');
} // end of displayDocumentBottom()



//-- "headnbottom.js" ----------------------------------------- EOF --

