function emitTopMenu(currentSection) 
{
    var menu = new Array();

    menu[0] = new MenuLink("/foundation.html", "FOUNDATION");
    menu[1] = new MenuLink("/people.html", "BOARD & EXECUTIVES");
    menu[2] = new MenuLink("/events.html", "EVENTS");
    menu[3] = new MenuLink("/membership.html", "JOIN");
    menu[4] = new MenuLink("/contact.html", "CONTACT");

    drawTopMenu(menu, currentSection);
}

function MenuLink(href, description)
{
	this.href = href;
	this.description = description;
}

function drawTopMenu(menu, currentSection) 
{
    document.write('<table id="Table2" cellspacing="0" cellpadding="0" width="800" border="0">');
    document.write('	<tbody>');
    document.write('		<tr border="0">');
    document.write('			<td align="left" width="150" border="0">');
    document.write('				<a href="/home.html">');
    document.write('					<img height="130" src="/images/mast_logo.gif" width="125" border="0"></a>');
    document.write('			</td>');
    document.write('			<td valign="bottom" align="left" width="500" border="0">');

    for (var i = 0; i < menu.length; i++)
    {
        var className;
        if (String(currentSection).toLowerCase() == String(menu[i].description).toLowerCase())
            className = "headerLinkSelected";
        else
            className = "headerLink";

        var link = '<a href="' + menu[i].href + '" class="' + className + '">' + menu[i].description + '</a>';
        document.write(link);
    }
    
    document.write('			</td>');
    document.write('			<td valign="top" align="right" width="150" border="0">');
    document.write('				<!--<img src="images/rispetto.gif" border="0" width="175" height="63" alt="rispetto reciproco" />-->');
    document.write('			</td>');
    document.write('		</tr>');
    document.write('	</tbody>');
    document.write('</table>');
}

function emitMasthead(currentSection)
{
    document.write('<table id="Table1" cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" border="0">');
    document.write('    <tbody>');
    document.write('        <tr border="0">');
    document.write('            <td valign="top" width="100%" colspan="3" border="0"><img height="5" src="/images/spacer.gif" width="1" border="0"></td>');
    document.write('        </tr>');
    document.write('        <tr border="0">');
    document.write('            <td valign="top" width="10%" border="0">');
    document.write('                &nbsp;');
    document.write('            </td>');
    document.write('            <td valign="top" align="center" width="80%" border="0">');
   	
   	emitTopMenu(currentSection);
	
	document.write('            </td>');
    document.write('            <td width="10%" border="0">');
    document.write('                &nbsp;');
    document.write('            </td>');
    document.write('        </tr>');
    document.write('        <tr border="0">');
    document.write('            <td valign="top" width="100%" colspan="3" border="0"><img height="5" src="/images/spacer.gif" width="1" border="0"></td>');
    document.write('        </tr>');
    document.write('        <tr border="0">');
    document.write('            <td class="cellRed" valign="top" width="100%" colspan="3" border="0"><img height="3" src="/images/spacer.gif" width="1" border="0"></td>');
    document.write('        </tr>');
    document.write('        <tr border="0">');
    document.write('            <td valign="top" width="100%" colspan="3" border="0"><img height="3" src="/images/spacer.gif" width="1" border="0"></td>');
    document.write('        </tr>');
    document.write('        <tr border="0">');
    document.write('            <td class="cellGreen" valign="top" width="100%" colspan="3" border="0"><img height="3" src="/images/spacer.gif" width="1" border="0"></td>');
    document.write('        </tr>');
    document.write('        <tr border="0">');
    document.write('            <td valign="top" width="100%" colspan="3" border="0"><img height="10" src="/images/spacer.gif" width="1" border="0"></td>');
    document.write('        </tr>');
    document.write('    </tbody>');
    document.write('</table>');
}

function emitFoundationSideMenu()
{
    var menu = new Array();
    
    menu[0] = new MenuLink("/mission.html", "Our Mission");
    menu[1] = new MenuLink("/cc_home.html", "Cultural Center");
    menu[2] = new MenuLink("/celebrity_ambassador.html", "Celebrity Ambassador");
    
    for (var i = 0; i < menu.length; i++)
    {
        var className = "sideNav";
        var link = '<a href="' + menu[i].href + '" class="' + className + '">' + menu[i].description + '</a><br />';
        document.write(link);
    }
}