// GLOBALE VARIABLEN
var gstrLastChanges = '10.09.09';
var gstrWochentage  = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var gobjDatum       = new Date();


////
// !Plottet Menüleiste mit angewähltem Menüpunkt
//
// !param   integer     intMenupunkt            angewählter Punkt
//
function doPlotNavibar(intMenupunkt)
{
    var intIndex, strLink1, strLink2;

    var arrMenu = [
        ['Home',            1, 'index'],
        ['Prodatron',       0, 'pdt'],
        ['SymbOS',          2, ''],
        ['Facts & History', 0, 'facts'],
        ['Screenshots',     1, 'shots'],
        ['Applications',    0, 'apps'],
        ['What\'s new?',    0, 'whatsnew'],
        ['Downloads',       1, 'download'],
        ['Previews',        0, 'preview'],
        ['Mailinglist',     0, 'mail'],
        ['Related',         2, ''],
        ['SymStudio',       0, 'studio'],
        ['SYMBiFACE II',    1, 'sf2'],
        ['CPC T-Rex',       0, 'trex'],
        ['Emulators',       0, 'emulator'],
        ['Web Links',       0, 'links'],
    []];

//        ['Test it Online!', 1, 'online'],

    document.write('<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td width=1% valign=top>');
    document.write('<table width=160 border=0 cellspacing=0 cellpadding=0><tr><td bgcolor=#40c0ff><img src=gfx/trpix.gif width=1 height=1></td></tr>');
    for(intIndex = 0; intIndex < (arrMenu.length - 1); intIndex++)
    {
        if(arrMenu[intIndex][2] == '')
        {
            strLink1 = '';
            strLink2 = '';
        }
        else
        {
            if((intIndex == 1) || (intIndex == 9))       // Prodatron/Mailinglist -> new browser-window
                strLink1 = ' target="blank"';
            else
                strLink1 = '';

            strLink1 = '<a style="text-decoration:none" href="' + arrMenu[intIndex][2] + '.htm" onmouseover="self.status=\'' + arrMenu[intIndex][0] + '\'; return true;"' + strLink1 + '>';
            strLink2 = '</font></a>';
        }

        if(intIndex == intMenupunkt)
            document.write('<tr><td align=right bgcolor=#ffffff><b>' + strLink1 + '<font color=#000000 face=arial size=3>' + arrMenu[intIndex][0] + '</font>' + strLink2 + '</b>');
        else
        {
            switch(arrMenu[intIndex][1])
            {
                case 0:
	                document.write('<tr><td align=right bgcolor=#204080>' + strLink1 + '<font color=#ffffff face=arial size=2>' + arrMenu[intIndex][0] + '</font>' + strLink2);
                    break;
                case 1:
                    document.write('<tr><td align=right bgcolor=#204080><b>' + strLink1 + '<font color=#ffff80 face=arial size=2>' + arrMenu[intIndex][0] + '</font>' + strLink2 + '</b>');
                    break;
                case 2:
                    document.write('<tr><td align=right bgcolor=#000000><i><b>' + strLink1 + '<font color=#ff8000 face=arial size=3>' + arrMenu[intIndex][0] + '</font>' + strLink2 + '</b></i>');
                    break;
                case 3:
                    document.write('<tr><td align=right bgcolor=#204080><b>' + strLink1 + '<font color=#ff2020 face=arial size=2>' + arrMenu[intIndex][0] + '</font>' + strLink2 + '</b>');
                    break;
            }
        }
        document.write(' &nbsp;</td></tr><tr><td bgcolor=#40c0ff><img src=gfx/trpix.gif width=1 height=1></td></tr>');
    }
    document.write('</table><br>');

    document.write('<center><!-- MSX Rating Code -->');
    document.write('<a href="http://www.caetano.eng.br/services/msxrating/toplist.php" target="_blank">');
    document.write('<img src="http://www.caetano.eng.br/services/msxrating/msxrating.php?id=105&rnd=' + Math.random() + '" border=0 title="Click here to view all MSX Rating sites!"></a>');
    document.write('<!-- End of MSX Rating Code --><br> <br>');

    document.write('<a href="http://cpc-live.com/topsites/"><img src="http://cpc-live.com/topsites/button.php?u=Prodatron&rnd=' + Math.random() + '" alt="CPC-Topsites" border="0" /></a></center>');

    document.write('<br></td><td width=1% >&nbsp;&nbsp;&nbsp;</td><td width=98% valign=top>');
}


////
// !Erzeugt einen X-stelligen String aus einer Zahl
//
// !param   integer     intZahl                 Zahl
// !param   integer     intStellen              Anzahl Stellen
//
// !returns string                              x-stellige Zahl
//
function fnStellenZahl(intZahl, intStellen)
{
    var strZahl = '#' + (intZahl + 100000000);
    return strZahl.substr(10 - intStellen, intStellen);
}


////
// !Plottet Seiten-Kopf
//
function doPlotPageHeader(strTitel, intAdspotID)
{
    document.write('<html><head><title>SymbOS Z80 multitasking operating system for Amstrad CPC and MSX</title></head>');
    document.write('<body bgcolor=#000000 text=#ffffff link=#ffffff vlink=#ffffff alink=#ff0000 topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>');

    document.write('<script type="text/javascript">\n');
    document.write('_uacct = "UA-1411887-1";\n');
    document.write('urchinTracker();\n');
    document.write('</script>');

    document.write('<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td bgcolor=#40c0ff><img src=gfx/trpix.gif width=1 height=1></td></tr></table>');
    document.write('<img src=gfx/trpix.gif width=1 height=3><br>');
    document.write('<table border=0 width=100% cellspacing=0 cellpadding=0>');
    document.write('<tr><td valign=top rowspan=2><img src=gfx/logos/symbos.gif></td>');
    document.write('<td align=center valign=top><a href="http://petition.eurolinux.org" target="_blank"><img src="gfx/banner/patent_banner.gif" width=468 height=62 border=0 alt="Software-patents will kill all progresses in european software development!!\nThe only winners will be the lawyers!!"></a></td></tr>');
    document.write('<tr><td align=center valign=bottom><a href="http://www.prodatron.net"><img src=gfx/logos/prodatron.gif alt="Prodatron" vspace=2 border=0></a><br><font face=arial size=3 color=#ffffff><b>PRODUCTION (C) 2007 SYMBIOSIS</td></tr></table>');
    document.write('<img src=gfx/trpix.gif width=1 height=2><br>');
    document.write('<table width=100% border=0 cellspacing=0 cellpadding=0>');
    document.write('<tr><td colspan=2 bgcolor=#40c0ff><img src=gfx/trpix.gif width=1 height=1></td></tr>');
    document.write('<tr><td bgcolor=#204080><font face=arial color=#ffff80 size=2>&nbsp; ' + strTitel);
    document.write('</td><td bgcolor=#204080 align=right><font face=arial color=#ffff80 size=2>' + gstrWochentage[gobjDatum.getDay()] + ', ' + fnStellenZahl(gobjDatum.getDate(), 2) + '.' + fnStellenZahl(gobjDatum.getMonth()+1, 2) + '.' + fnStellenZahl(gobjDatum.getFullYear(), 4) + ' &nbsp;</td></tr>');
    document.write('<tr><td colspan=2 bgcolor=#40c0ff><img src=gfx/trpix.gif width=1 height=1></td></tr></table>');
    document.write('<img src=gfx/trpix.gif width=1 height=10><br>');
}


////
// !Plottet Seiten-Fuß
//
function doPlotPageFooter()
{
    document.write('</td></tr></table>');
    document.write('<img src=gfx/trpix.gif width=1 height=10><br>');
    document.write('<table width=100% border=0 cellspacing=0 cellpadding=0>');
    document.write('<tr><td colspan=3 bgcolor=#40c0ff><img src=gfx/trpix.gif width=1 height=1></td></tr>');
    document.write('<tr><td colspan=2 bgcolor=#204080><font face=arial color=#ffff80 size=2>&nbsp; Last Changes: ' + gstrLastChanges);
    document.write('</td><td bgcolor=#204080 align=right><font face=arial color=#ffff80 size=2>A <b>SymbiosiS</b> Production in 2007 &nbsp;</td></tr>');
    document.write('<tr><td colspan=3 bgcolor=#40c0ff><img src=gfx/trpix.gif width=1 height=1></td></tr></table><br>');
}
