  function writeMenuItem(widthScaleFactor, strUrl, strClass, strMenuItem) {
    var str = '';
    
    var fontsize = (strClass == 'returnTo') ? parent.parent.c_defaultReturnToFontSize : parent.parent.c_defaultFontSize;
    fontsize *= widthScaleFactor;

    var urlOpen  = (strUrl) ? '<A href="' + strUrl + '" class="' + strClass + '">' : '';
    var urlClose = (strUrl) ? '</A>' : '';

    str += urlOpen +
             '<FONT style="FONT-SIZE:' + fontsize + 'px;" class="' + strClass + '">' +
               strMenuItem +
             '</FONT>' +
           urlClose;

    return str;
  }


  function writeHeader(widthScaleFactor, title, subtitle, subtitleURL, subtitleURLClass) {
    var titleHeight    = 35;
    var subtitleHeight = 25;
    var str = '';

    var titleFontSize    = c_defaultTitleFontSize    * widthScaleFactor;
    var subtitleFontSize = c_defaultSubtitleFontSize * widthScaleFactor;

    var strSubtitle = '';
    if(subtitle) {
      strSubtitle = (subtitle) ? '<FONT style="FONT-SIZE:' + subtitleFontSize + 'px;">' + subtitle + '</FONT>' : '';
      if(subtitleURL)
        strSubtitle = '<A href="' + subtitleURL + '" class="' + subtitleURLClass + '">' + strSubtitle + '</A>';
    }

    str += '<TABLE border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">\r\n' +
           '  <TR>\r\n' +
           '    <TD><IMG src="Include/Pix/leeg.gif" width="90" height="1"></TD>\r\n' +
           '    <TD width="100%" height="100%">\r\n' +
           '      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">\r\n' +
           '        <TR><TD height="' + titleHeight    + '" align="center" valign="bottom" class="headerTitle"    nowrap><FONT style="FONT-SIZE:' + titleFontSize + 'px;">' + title + '</FONT></TD></TR>\r\n' +
           '        <TR><TD height="' + subtitleHeight + '" align="center" valign="bottom" class="headerSubtitle" nowrap>' + strSubtitle + '</TD></TR>\r\n' +
           '        <TR>\r\n' +
           '          <TD height="100%" align="center" valign="top">\r\n';
    return str;
  }


  function writeFooter(footer) {
    var footerHeight = 30;
    var str = '';
    var strFooter = (footer) ? '<TR><TD align="center" height="' + footerHeight + '">' + footer + '</TD></TR>\r\n' : '';
    str += '          </TD>\r\n' +
           '        </TR>\r\n' +
                    strFooter
           '      </TABLE>\r\n' +
           '    </TD>\r\n' +
           '    <TD><IMG src="Include/Pix/leeg.gif" width="50" height="1"></TD>\r\n' +
           '  </TR>\r\n' +
           '</TABLE>\r\n';
    return str;
  }


  function showCredits() {
    var dom        = document.domain;
    var strURL     = 'http://' + dom + '/Credits/?appName=Malta2002';
    var strWndName = 'Credits';
    var strAttrs   = 'width=250,height=320,status=no,scrollbars=no,toolbar=no,menubar=no,resizable=no';
    var credits = window.open(strURL, strWndName, strAttrs);
    credits.focus();
  }


  function writeStartpage() {
    var str = '';
    if(IEbrowser) {
      str += '<TABLE border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">' +
             '  <TR>' +
             '    <TD><A href="ContentFrame.htm"><IMG src="Include/Pix/Background.jpg" width="100%" height="100%" border="0"></A></TD>' +
             '  </TR>' +
             '</TABLE>';
    }
    else {
      str += '<TABLE border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">' +
             '  <TR>' +
             '    <TD align="center"><A href="ContentFrame.htm"><IMG src="Include/Pix/Background.jpg" border="0"></A></TD>' +
             '  </TR>' +
             '</TABLE>';
    }
    return str;
  }


  function createdBy(widthScaleFactor) {
    var str = '';
    var fontsize = parent.parent.c_defaultCreatedByFontSize * widthScaleFactor;
    str += '<A href="javascript:void(0);" onclick="parent.parent.showCredits();return false;" class="createdBy">' +
           '<FONT style="FONT-SIZE:' + fontsize + 'px;">Created by Richard Colly</FONT>' +
           '</A>';
    return str;
  }
