function DisplayFlash( swfName, width, height )
{
    swfName = "/" + swfName;

    var hasProductInstall = DetectFlashVer(6, 0, 65);
    var hasReqestedVersion = DetectFlashVer(8, 0, 0);
    if ( hasProductInstall && !hasReqestedVersion ) {
        var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
        var MMredirectURL = window.location;
        document.title = document.title.slice(0, 47) + " - Flash Player Installation";
        var MMdoctitle = document.title;
    
        AC_FL_RunContent(
            "src", "playerProductInstall",
            "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
            "width", width,
            "height", height,
            "align", "middle",
            "id", swfName,
            "quality", "high",
            "bgcolor", "#000000",
            "name", swfName,
            "allowScriptAccess","sameDomain",
            "type", "application/x-shockwave-flash",
            "pluginspage", "http://www.adobe.com/go/getflashplayer"
            );
    } else if (hasReqestedVersion) {
      AC_FL_RunContent(
        "src", swfName,
        "width", width,
        "height", height,
        "align", "middle",
        "id", swfName,
        "quality", "high",
        "bgcolor", "#000000",
        "name", swfName,
        "allowScriptAccess","sameDomain",
        "type", "application/x-shockwave-flash",
        "codebase", "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab",
        "pluginspage", "http://www.adobe.com/go/getflashplayer"
        );
    } else 
    {
      var alternateContent = '<p style="color: #999999; text-align: center;">you don\'t have the required flash player version.<br /><a style="color: #CCCCCC; text-align: center;" href="http://www.adobe.com/go/getflash/">get flash.</a></p>';
      document.write(alternateContent);
    }
}

function DisplayNavbar( title, suppressFlash )
{
    var str='';
    str+='<table class="header"><tr class="header">';
    str+='<td class="sitelogo sectionborder">';
    document.write(str);
    
    if( suppressFlash )
    {
        var alternateContent = '<p id="title"><a href="/">jeffwofford.com</a></p>';
        document.write( alternateContent );
    }
    else
    {
    
        // Flash game in header.
        //
        
        // Flash Version check.
        var hasReqestedVersion = DetectFlashVer( 8, 0, 0 );

        if( hasReqestedVersion )
        {
            // if we've detected an acceptable version
            // embed the Flash Content SWF when all tests are passed
            AC_FL_RunContent(
                "src", "/SiteLogo",
                "width", "324",
                "height", "69",
                "align", "middle",
                "id", "SiteLogo",
                "quality", "high",
                "bgcolor", "#050a03",
                "name", "SiteLogo",
                "allowScriptAccess","sameDomain",
                "type", "application/x-shockwave-flash",
                'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
                "pluginspage", "http://www.adobe.com/go/getflashplayer"
            );
        } 
        else 
        {  
            // flash is too old or we can't detect the plugin
            var alternateContent = '<p style="text-align: left; padding: 0.5em;">jeffwofford.com</p>'
                + '<p style="font-size: x-small; color: #999999; padding-right: 0.5em; text-align:right;">'
                + 'you don\'t have the flash player this site wants.<br /><a style="font-size: x-small; color: #CCCCCC; padding-right: 0.5em; text-align:right;" href="http://www.adobe.com/go/getflash/">get flash.</a></p>';
                document.write(alternateContent);  // insert non-flash content
        }
    }
  
    str='';
    str+='<\/td>';
    
    // Buttons
    str+='<td class="nav sectionborder">';
    str+='<table class="navbuttons">';
    str+='<tr>';
    str+='<td><a href="/index.html" class="linkimg linkfaith">words<\/a><\/td>';
    str+='<td><a href="/music.html" class="linkimg linkmusic">music<\/a><\/td>';
    str+='<td><a href="/art.html" class="linkimg linkart">art<\/a><\/td>';
    str+='<td><a href="/games.html" class="linkimg linkgames">games<\/a><\/td>';
    str+='<td><a href="/resume.html" class="linkimg linkwho">who?<\/a><\/td>';
    str+='<\/tr>';
    str+='<\/table>';
    document.write(str);
}

function DisplayTitle( title, iconName )
{
    if( !iconName )
    {
        iconName = title;
    }

    // Title
    var str='';
    str+='<tr>';
    str+='<td colspan="2" class="title sectionborder">';
    str+='<img class="titleicon" src="\/images\/icon_' + iconName + '_disabled.gif" alt="' + iconName + '" \/>';
    str+='<p>: ' + title + '<\/p>';
    str+='<\/td>';
    str+='<\/tr>';
    str+='<\/table><\/td><\/tr>';
    document.write(str);
}

function DisplayLegalese()
{
    var str='';
    str+='<table class="header" style="width: 100%;" ><tr>';
    str+='<td class="legalese sectionborder">';
    str+='<p style="float: right;">Validated: <a href="http://validator.w3.org/check?uri=referer">[xhtml 1.1]</a></p>';     // TODO  <a href="TODO">[css 2.0]</a>
    str+='<p>&copy;Copyright 2002&#8211;2007 Jeff Wofford<\/p>';
    str+='    <\/td>';
    str+='<\/tr><\/table>';
    document.write(str);
}