//
// submenu strings, references and indices
//
var sub_str = [
    'Nieuws',                      //  0
    'Mededelingen',
    'PR',
    'Gastenboek<br>invullen',
    'Gastenboek<br>bekijken',
    'Fotoboek',
    'Uitslagen',
    'woensdag<br>25 mei 2005',     //  7
    'donderdag<br>26 mei 2005',
    'vrijdag<br>27 mei 2005',
    'zaterdag<br>28 mei 2005',
    'zondag<br>29 mei 2005',
    'Plattegrond',
    'Toekomstige<br>data',
    'Verenigingen',                // 14
    'Openingstijden',
    'Kermissen',
    'Data 2005',
    'Doelstelling',                // 18
    'Organisatie',
    'Bestuur',
    'Ontstaan',
    'Kalenders',
    'Artiesten',
    'Terugblik',
    'Baolderse Kook',
    'Kiek de Kook',
    'Welkomst comité',
    'Site informatie',             // 28
    'Site map',
    'Site historie',
    '2004',                        // 31
    '2003',
    '2002',
    '2001',
    '2000',
    '1999',
    '1998',
    '1997',
    '1996',
    '1995',
    '1994',
    '1993',
    '1992',
    '1991',
    '1990',
    '1989',
    '1988',
    '1987',
    '1986',
    '1985',
    '1984',
    '1983',
    '1982',
    '1981',
    '1980',
    '1979',
    '1978',
    '1977'
];
var sub_ref = [
    'nieuws.html',            //  0
    'mededelingen.html',
    'pr.html',
    'gastenboek.html',
    'gastenboek1.html',
    'fotoboek.html',
    'uitslagen2004.html',
    '20050525.html',          //  7
    '20050526.html',
    '20050527.html',
    '20050528.html',
    '20050529.html',
    'plattegrond.html',
    'toekomst.html',
    'verenigingen.html',      // 14
    'openingstijden.html',
    'kermis.html',
    'data2005jan.html',
    'doelstelling.html',      // 18
    'organisatie.html',
    'bestuur.html',
    'ontstaan.html',
    'kalenders.html',
    'bands.html',
    'terugblik.html',
    'kook.html',
    'kiekdekook.html',
    'welkom.html',
    'site_informatie.html',   // 28
    'site_map.html',
    'site_historie.html',
    'terugblik2004.html',     // 31
    'terugblik2003.html',
    'terugblik2002.html',
    'terugblik2001.html',
    'terugblik2000.html',
    'terugblik1999.html',
    'terugblik1998.html',
    'terugblik1997.html',
    'terugblik1996.html',
    'terugblik1995.html',
    'terugblik1994.html',
    'terugblik1993.html',
    'terugblik1992.html',
    'terugblik1991.html',
    'terugblik1990.html',
    'terugblik1989.html',
    'terugblik1988.html',
    'terugblik1987.html',
    'terugblik1986.html',
    'terugblik1985.html',
    'terugblik1984.html',
    'terugblik1983.html',
    'terugblik1982.html',
    'terugblik1981.html',
    'terugblik1980.html',
    'terugblik1979.html',
    'terugblik1978.html',
    'terugblik1977.html',
];
var sub_img = [
    'nieuws',                      //  0
    'mededelingen',
    'pr',
    'gastenboek1',
    'gastenboek2',
    'fotoboek',
    'uitslagen',
    'woensdag',                    //  7
    'donderdag',
    'vrijdag',
    'zaterdag',
    'zondag',
    'plattegrond',
    'toekomstige_data',
    'verenigingen',                // 14
    'openingstijden',
    'kermissen',
    'data _005',
    'doelstelling',                // 18
    'organisatie',
    'bestuur',
    'ontstaan',
    'kalenders',
    'artiesten',
    'terugblik',
    'kook',
    'kiekdekook',
    'welkom',
    'site_informatie',             // 28
    'site_map',
    'site_historie',
    '2004',                        // 31
    '2003',
    '2002',
    '2001',
    '2000',
    '1999',
    '1998',
    '1997',
    '1996',
    '1995',
    '1994',
    '1993',
    '1992',
    '1991',
    '1990',
    '1989',
    '1988',
    '1987',
    '1986',
    '1985',
    '1984',
    '1983',
    '1982',
    '1981',
    '1980',
    '1979',
    '1978',
    '1977'
];
var sub_start = [  0,  7, 14, 18, 28, 28, 31 ];
var sub_stop  = [  6, 13, 17, 27, 28, 30, 58 ];

var months = [
    'jan',
    'feb',
    'mrt',
    'apr',
    'mei',
    'jun',
    'jul',
    'aug',
    'sep',
    'okt',
    'nov',
    'dec'
];

//
// output menu code
//
function vf_menu()
{
    init();

    document.write('<table class=main width=100%>');
    document.write('<tr class=main><td class=main1 width=20%>');
    document.write('<a href="index.html"><img src="pictures/vf.gif" no border></a>');
    document.write('</td><td class=main2>');
    document.write('<a href="programma.html" target="_top" onMouseover="lightup(\'pic1\')" onMouseout="turnoff(\'pic1\')">');
    document.write('<img src="buttons/programma.gif" name="pic1" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="informatie.html" target="_top" onMouseover="lightup(\'pic2\')" onMouseout="turnoff(\'pic2\')">');
    document.write('<img src="buttons/informatie.gif" name="pic2" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="stichting.html" target="_top" onMouseover="lightup(\'pic3\')" onMouseout="turnoff(\'pic3\')">');
    document.write('<img src="buttons/stichting.gif" name="pic3" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="links.html" target="_top" onMouseover="lightup(\'pic4\')" onMouseout="turnoff(\'pic4\')">');
    document.write('<img src="buttons/links.gif" name="pic4" border="0"></a>');
    document.write('</td></tr>');
    document.write('</table>');
}
function vf_menufi()
{
    initfi();

    document.write('<table class=main width=100%>');
    document.write('<tr class=main><td class=main1 width=20%>');
    document.write('<a href="../../../index.html"><img src="../../../pictures/vf.gif" no border></a>');
    document.write('</td><td class=main2>');
    document.write('<a href="../../../programma.html" target="_top" onMouseover="lightup(\'pic1\')" onMouseout="turnoff(\'pic1\')">');
    document.write('<img src="../../../buttons/programma.gif" name="pic1" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="../../../informatie.html" target="_top" onMouseover="lightup(\'pic2\')" onMouseout="turnoff(\'pic2\')">');
    document.write('<img src="../../../buttons/informatie.gif" name="pic2" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="../../../stichting.html" target="_top" onMouseover="lightup(\'pic3\')" onMouseout="turnoff(\'pic3\')">');
    document.write('<img src="../../../buttons/stichting.gif" name="pic3" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="../../../links.html" target="_top" onMouseover="lightup(\'pic4\')" onMouseout="turnoff(\'pic4\')">');
    document.write('<img src="../../../buttons/links.gif" name="pic4" border="0"></a>');
    document.write('</td></tr>');
    document.write('</table>');
}
function vf_menuff()
{
    initff();

    document.write('<table class=main width=100%>');
    document.write('<tr class=main><td class=main1 width=20%>');
    document.write('<a href="../../../../index.html"><img src="../../../../pictures/vf.gif" no border></a>');
    document.write('</td><td class=main2>');
    document.write('<a href="../../../../programma.html" target="_top" onMouseover="lightup(\'pic1\')" onMouseout="turnoff(\'pic1\')">');
    document.write('<img src="../../../../buttons/programma.gif" name="pic1" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="../../../../informatie.html" target="_top" onMouseover="lightup(\'pic2\')" onMouseout="turnoff(\'pic2\')">');
    document.write('<img src="../../../../buttons/informatie.gif" name="pic2" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="../../../../stichting.html" target="_top" onMouseover="lightup(\'pic3\')" onMouseout="turnoff(\'pic3\')">');
    document.write('<img src="../../../../buttons/stichting.gif" name="pic3" border="0"></a>');
    document.write('&nbsp;&nbsp;&nbsp;');
    document.write('<a href="../../../../links.html" target="_top" onMouseover="lightup(\'pic4\')" onMouseout="turnoff(\'pic4\')">');
    document.write('<img src="../../../../buttons/links.gif" name="pic4" border="0"></a>');
    document.write('</td></tr>');
    document.write('</table>');
}

//
// output submenu code
//
// valid values for 'menu_id' are 0..6 were 0 is the 'main' submenu, 5 is the
// 'site info' submenu and 1..4 are the same as in vf_menu
// valid values for 'active' are 0..x were x is the maximum number of submenu
// items
//
function vf_submenu(menu_id, active)
{
    document.write('<td class=main1 width=20% valign=top>');
    if ((sub_stop[menu_id] - sub_start[menu_id]) == 0)
    {
        // empty submenu
        document.write('&nbsp;');
    }
    else
    {
        if (menu_id == 6)
        {
            // image menu
            for (cnt=sub_start[menu_id]; cnt<=sub_stop[menu_id]; cnt++)
            {
                if ((cnt - sub_start[menu_id] + 1) == active)
                {
                    document.write('<img src="buttons/', sub_img[cnt], '_b.gif" no border><br>');
                }
                else
                {
                    document.write('<a href="', sub_ref[cnt], '" target="_top"><img src="buttons/', sub_img[cnt], '.gif" no border></a><br>');
                }
            }
        }
        else
        {
            // text menu
            for (cnt=sub_start[menu_id]; cnt<=sub_stop[menu_id]; cnt++)
            {
                if ((cnt - sub_start[menu_id] + 1) == active)
                {
                    document.write('<b>', sub_str[cnt], '</b><p>');
                }
                else
                {
                    document.write('<a href="', sub_ref[cnt], '" target="_top">',
                                   sub_str[cnt], '</a><p>');
                }
            }
        }
    }
    document.write('</td>');
}
function vf_submenufi(menu_id, active)
{
    document.write('<td class=main1 width=20% valign=top>');
    if ((sub_stop[menu_id] - sub_start[menu_id]) == 0)
    {
        // empty submenu
        document.write('&nbsp;');
    }
    else
    {
        if (menu_id == 6)
        {
            // image menu
            for (cnt=sub_start[menu_id]; cnt<=sub_stop[menu_id]; cnt++)
            {
                if ((cnt - sub_start[menu_id] + 1) == active)
                {
                    document.write('<img src="../../../buttons/', sub_img[cnt], '_b.gif" no border><br>');
                }
                else
                {
                    document.write('<a href="../../../', sub_ref[cnt], '" target="_top"><img src="../../../buttons/', sub_img[cnt], '.gif" no border></a><br>');
                }
            }
        }
        else
        {
            // text menu
            for (cnt=sub_start[menu_id]; cnt<=sub_stop[menu_id]; cnt++)
            {
                if ((cnt - sub_start[menu_id] + 1) == active)
                {
                    document.write('<b>', sub_str[cnt], '</b><p>');
                }
                else
                {
                    document.write('<a href="../../../', sub_ref[cnt], '" target="_top">',
                                   sub_str[cnt], '</a><p>');
                }
            }
        }
    }
    document.write('</td>');
}
function vf_submenuff(menu_id, active)
{
    document.write('<td class=main1 width=20% valign=top>');
    if ((sub_stop[menu_id] - sub_start[menu_id]) == 0)
    {
        // empty submenu
        document.write('&nbsp;');
    }
    else
    {
        if (menu_id == 6)
        {
            // image menu
            for (cnt=sub_start[menu_id]; cnt<=sub_stop[menu_id]; cnt++)
            {
                if ((cnt - sub_start[menu_id] + 1) == active)
                {
                    document.write('<img src="../../../../buttons/', sub_img[cnt], '_b.gif" no border><br>');
                }
                else
                {
                    document.write('<a href="../../../../', sub_ref[cnt], '" target="_top"><img src="../../../../buttons/', sub_img[cnt], '.gif" no border></a><br>');
                }
            }
        }
        else
        {
            // text menu
            for (cnt=sub_start[menu_id]; cnt<=sub_stop[menu_id]; cnt++)
            {
                if ((cnt - sub_start[menu_id] + 1) == active)
                {
                    document.write('<b>', sub_str[cnt], '</b><p>');
                }
                else
                {
                    document.write('<a href="../../../../', sub_ref[cnt], '" target="_top">',
                                   sub_str[cnt], '</a><p>');
                }
            }
        }
    }
    document.write('</td>');
}

function vf_footer()
{
    document.write('<hr>');
    document.write('<table class=footer width=100%>');
    document.write('  <tr class=footer>');
    document.write('    <td class=footer1>');
    document.write('      <font size=-1><script>');
    document.write('        var dLM = new Date(Date.parse(document.lastModified));');
    document.write('        var day = new Array("zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag");');
    document.write('        var month = new Array("januari","februari","maart","april","mei","juni",');
    document.write('                              "juli","augustus","september","oktober","november","december");');
    document.write('        var year = dLM.getFullYear();');
    document.write('        var date = dLM.getDate();');
    document.write('        var day = day[dLM.getDay()];');
    document.write('        var month = month[dLM.getMonth()];');
    document.write('        var hours = dLM.getHours();');
    document.write('        var minutes = dLM.getMinutes();');
    document.write('        var seconds = dLM.getSeconds();');
    document.write('        if (date<10) date = "0"+date;');
    document.write('        if (month<10) month = "0"+month;');
    document.write('        if (hours<10) hours = "0"+hours;');
    document.write('        if (minutes<10) minutes = "0"+minutes;');
    document.write('        if (seconds<10) seconds = "0"+seconds;');
    document.write('        document.write("Laatste wijziging op "+day+" "+date+" "+month+" "+year+" om "+hours+":"+minutes+":"+seconds);');
    document.write('      </script></font>');
    document.write('    </td>');
    document.write('    <td class=footer2>');
    document.write('      <font size=-1>Deze <a class=hidden href="site_informatie.html">paginas</a> worden onderhouden door ');
    document.write('      <a href="mailto:rob.prikanowski@xs4all.nl">Rob Prikanowski</a>.</font>');
    document.write('    </td>');
    document.write('  </tr>');
    document.write('</table>');
}
function vf_footerfi()
{
    document.write('<hr>');
    document.write('<table class=footer width=100%>');
    document.write('  <tr class=footer>');
    document.write('    <td class=footer1>');
    document.write('      <font size=-1><script>');
    document.write('        var dLM = new Date(Date.parse(document.lastModified));');
    document.write('        var day = new Array("zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag");');
    document.write('        var month = new Array("januari","februari","maart","april","mei","juni",');
    document.write('                              "juli","augustus","september","oktober","november","december");');
    document.write('        var year = dLM.getFullYear();');
    document.write('        var date = dLM.getDate();');
    document.write('        var day = day[dLM.getDay()];');
    document.write('        var month = month[dLM.getMonth()];');
    document.write('        var hours = dLM.getHours();');
    document.write('        var minutes = dLM.getMinutes();');
    document.write('        var seconds = dLM.getSeconds();');
    document.write('        if (date<10) date = "0"+date;');
    document.write('        if (month<10) month = "0"+month;');
    document.write('        if (hours<10) hours = "0"+hours;');
    document.write('        if (minutes<10) minutes = "0"+minutes;');
    document.write('        if (seconds<10) seconds = "0"+seconds;');
    document.write('        document.write("Laatste wijziging op "+day+" "+date+" "+month+" "+year+" om "+hours+":"+minutes+":"+seconds);');
    document.write('      </script></font>');
    document.write('    </td>');
    document.write('    <td class=footer2>');
    document.write('      <font size=-1>Deze <a class=hidden href="../../../site_informatie.html">paginas</a> worden onderhouden door ');
    document.write('      <a href="mailto:rob.prikanowski@xs4all.nl">Rob Prikanowski</a>.</font>');
    document.write('    </td>');
    document.write('  </tr>');
    document.write('</table>');
}
function vf_footerff()
{
    document.write('<hr>');
    document.write('<table class=footer width=100%>');
    document.write('  <tr class=footer>');
    document.write('    <td class=footer1>');
    document.write('      <font size=-1><script>');
    document.write('        var dLM = new Date(Date.parse(document.lastModified));');
    document.write('        var day = new Array("zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag");');
    document.write('        var month = new Array("januari","februari","maart","april","mei","juni",');
    document.write('                              "juli","augustus","september","oktober","november","december");');
    document.write('        var year = dLM.getFullYear();');
    document.write('        var date = dLM.getDate();');
    document.write('        var day = day[dLM.getDay()];');
    document.write('        var month = month[dLM.getMonth()];');
    document.write('        var hours = dLM.getHours();');
    document.write('        var minutes = dLM.getMinutes();');
    document.write('        var seconds = dLM.getSeconds();');
    document.write('        if (date<10) date = "0"+date;');
    document.write('        if (month<10) month = "0"+month;');
    document.write('        if (hours<10) hours = "0"+hours;');
    document.write('        if (minutes<10) minutes = "0"+minutes;');
    document.write('        if (seconds<10) seconds = "0"+seconds;');
    document.write('        document.write("Laatste wijziging op "+day+" "+date+" "+month+" "+year+" om "+hours+":"+minutes+":"+seconds);');
    document.write('      </script></font>');
    document.write('    </td>');
    document.write('    <td class=footer2>');
    document.write('      <font size=-1>Deze <a class=hidden href="../../../../site_informatie.html">paginas</a> worden onderhouden door ');
    document.write('      <a href="mailto:rob.prikanowski@xs4all.nl">Rob Prikanowski</a>.</font>');
    document.write('    </td>');
    document.write('  </tr>');
    document.write('</table>');
}

function vf_vereniging(vnaam, cnaam, adres, postcode, plaats, tel)
{
    document.write('<tr class=prog>');
    document.write('  <td class=prog1>');
    document.write('    '+vnaam);
    document.write('  </td>');
    document.write('  <td class=prog2>');
    document.write('    '+cnaam);
    document.write('  </td>');
    document.write('  <td class=prog2>');
    if (adres == '')
    {
        document.write('    '+postcode+' '+plaats);
    }
    else
    {
        if ((postcode == '') && (plaats == ''))
        {
            document.write('    '+adres);
        }
        else
        {
            document.write('    '+adres+', '+postcode+' '+plaats);
        }
    }
    document.write('  </td>');
    document.write('  <td class=prog2>');
    document.write('    '+tel);
    document.write('  </td>');
    document.write('</tr>');
}

function vf_winkel(naam, tel, ma, di, vr, za)
{
    document.write('<tr class=prog>');
    document.write('  <td class=prog1>');
    document.write('    '+naam);
    document.write('  </td>');
    document.write('  <td class=prog2>');
    document.write('    '+tel);
    document.write('  </td>');
    document.write('  <td class=prog2>');
    document.write('    '+ma);
    document.write('  </td>');
    document.write('  <td class=prog2>');
    document.write('    '+di);
    document.write('  </td>');
    document.write('  <td class=prog2>');
    document.write('    '+vr);
    document.write('  </td>');
    document.write('  <td class=prog2>');
    document.write('    '+za);
    document.write('  </td>');
    document.write('</tr>');
}

function vf_kermis(plaats, datum)
{
    document.write('<tr class=prog>');
    document.write('  <td class=prog1 width=40%>');
    document.write('    '+datum);
    document.write('  </td>');
    document.write('  <td class=prog2>');
    document.write('    '+plaats);
    document.write('  </td>');
    document.write('</tr>');
}

function vf_month(curr)
{
    document.write('<table width=100%>');
    document.write('  <tr>');
    for (cnt=0; cnt<12; cnt++)
    {
        document.write('    <td align=center>');
        if (curr == cnt)
        {
            document.write('      '+months[cnt]);
        }
        else
        {
            document.write('      <a href="data2005'+months[cnt]+'.html">'+months[cnt]+'</a>');
        }
        document.write('    </td>');
    }
    document.write('</tr>');
    document.write('</table>');
}

function vf_gast(naam, mail, plaats, tijd)
{
    document.write('<hr>');
    if (naam != "")
    {
        if (mail != '')
        {
            document.write('<b>Naam:</b> <a href="mailto:'+mail+'">'+naam+'</a><br>');
        }
        else
        {
            document.write('<b>Naam:</b> '+naam+'<br>');
        }
    }
    if (plaats != "")
    {
        document.write('<b>Woonplaats:</b> '+plaats+'<br>');
    }
    document.write('<b>Verstuurd op:</b> '+tijd+'<p>');
}

function init()
{
    if (document.images)
    {
        pic1on= new Image(120, 25);
        pic1on.src="buttons/programma_b.gif";  
        pic1off= new Image(120, 25);
        pic1off.src="buttons/programma.gif";

        pic2on= new Image(120, 25);
        pic2on.src="buttons/informatie_b.gif";  
        pic2off= new Image(120, 25);
        pic2off.src="buttons/informatie.gif";

        pic3on= new Image(120, 25);
        pic3on.src="buttons/stichting_b.gif";  
        pic3off= new Image(120, 25);
        pic3off.src="buttons/stichting.gif";

        pic4on= new Image(120, 25);
        pic4on.src="buttons/links_b.gif";  
        pic4off= new Image(120, 25);
        pic4off.src="buttons/links.gif";
    }
}
function initfi()
{
    if (document.images)
    {
        pic1on= new Image(120, 25);
        pic1on.src="../../../buttons/programma_b.gif";  
        pic1off= new Image(120, 25);
        pic1off.src="../../../buttons/programma.gif";

        pic2on= new Image(120, 25);
        pic2on.src="../../../buttons/informatie_b.gif";  
        pic2off= new Image(120, 25);
        pic2off.src="../../../buttons/informatie.gif";

        pic3on= new Image(120, 25);
        pic3on.src="../../../buttons/stichting_b.gif";  
        pic3off= new Image(120, 25);
        pic3off.src="../../../buttons/stichting.gif";

        pic4on= new Image(120, 25);
        pic4on.src="../../../buttons/links_b.gif";  
        pic4off= new Image(120, 25);
        pic4off.src="../../../buttons/links.gif";
    }
}
function initff()
{
    if (document.images)
    {
        pic1on= new Image(120, 25);
        pic1on.src="../../../../buttons/programma_b.gif";  
        pic1off= new Image(120, 25);
        pic1off.src="../../../../buttons/programma.gif";

        pic2on= new Image(120, 25);
        pic2on.src="../../../../buttons/informatie_b.gif";  
        pic2off= new Image(120, 25);
        pic2off.src="../../../../buttons/informatie.gif";

        pic3on= new Image(120, 25);
        pic3on.src="../../../../buttons/stichting_b.gif";  
        pic3off= new Image(120, 25);
        pic3off.src="../../../../buttons/stichting.gif";

        pic4on= new Image(120, 25);
        pic4on.src="../../../../buttons/links_b.gif";  
        pic4off= new Image(120, 25);
        pic4off.src="../../../../buttons/links.gif";
    }
}

function lightup(imgName)
{
    if (document.images)
    {
        imgOn=eval(imgName + "on.src");
        document[imgName].src= imgOn;
    }
}

function turnoff(imgName)
{
    if (document.images)
    {
        imgOff=eval(imgName + "off.src");
        document[imgName].src= imgOff;
    }
}

