
/*<script language="javascript"></script>*/

// Document function types--synchronize with EN_DocumentType enumeration.
T_NONE                    = '0';
T_HOME                    = '1';
T_NEWS                    = '2';
T_TOTE                    = '3';
T_ENTRIES                 = '4';
T_ENTRIES_DETAIL          = '5';
T_ENTRIES_TOTE_DETAIL     = '6';
T_RESULTS                 = '7';
T_RESULTS_DETAIL          = '8';
T_RESULTS_TOTE_DETAIL     = '9';
T_DATA                    = 'a';
T_DATA_PAST_PERFORMANCES  = 'b';
T_DATA_SELECTIONS         = 'c';
T_DATA_ANALYSIS           = 'd';
T_DATA_JOCKEYS            = 'e';
T_DATA_CLOSER_LOOK        = 'f';
T_DATA_GRADED_ENTRIES     = 'g';
T_DATA_TRACK_RECORDS      = 'h';
T_DATA_TRAINERS           = 'i';
T_DATA_STANDINGS          = 'j';
T_WATCHES                 = 'k';
T_INTERACT                = 'l';
T_SPORTS                  = 'm';
T_LEADERBOARD             = 'n';
T_LEADERBOARD_TRAINERS    = 'o';
T_LEADERBOARD_JOCKEYS     = 'p';
T_LEADERBOARD_HORSES      = 'q';
T_LEADERBOARD_STALLIONS   = 'r';
T_LEADERBOARD_BEST_BEYERS = 's';
T_SITEMAP                 = 't';
T_LOGIN                   = 'u';

// URLs for the tabs on the horizontal nav bar.
URL_TAB_HOME        = "/";
URL_TAB_PHP         = "/admin/drfwebMembersPage.jsp";
URL_TAB_NEWS        = "/news/content/1.html";
URL_TAB_TOTE        = "http://tote.drf.com/drftote/index.asp";
URL_TAB_ENTRIES     = "/entries/eindex.html";
URL_TAB_RESULTS     = "/results/rindex.html";
URL_TAB_DATA        = "/drfPastPerformance.do";
URL_TAB_WATCHES     = "/CarryoverWatches.do";
URL_TAB_INTERACT    = "http://community.drf.com";
URL_TAB_SPORTS      = "http://drf.statfox.com";
URL_TAB_LEADERBOARD = "/drfLeaderBoard.do?category=trainer";
URL_TAB_SITEMAP     = "/misc/sitemap.html";

// URLs for masthead vertical nav bar.
URL_MASTHEAD_MENU_MEMBERSHIP  = "/misc/free_membership.html";
URL_MASTHEAD_MENU_BOOKSTORE   = "http://store.drf.com/acb/webpage.cfm?DID=7&WebPage_ID=161&af_id=56";
URL_MASTHEAD_MENU_BUYPPS      = "/promotions/buyppsnmore.html";
URL_MASTHEAD_MENU_ACCOUNT     = "http://store.drf.com/drf/custom_template/drf_account_login.cfm";
URL_MASTHEAD_MENU_PERSONALIZE = "/drfTrackPreferences.do";
URL_MASTHEAD_YOUBET  = "/formulator/formulator_ad.html";

// URLs for status bar.
URL_STATUS_LOGIN      = "/logonAction.do";
URL_STATUS_LOGOUT     = "/drfwebLogout.do";
URL_STATUS_NEWSSEARCH = "/news/drfwebNewsArchiveSearch.jsp";

//URL for Formulator Page

URL_MASTHEAD_FORMULATOR = "/formulator/formulator_ad.html";

// Customer ID cookie properties.
COOKIE_CUSTOMER_ID_NAME = "drf_web_customer_id";

// Logged in message.
MSG_LOGGED_IN = "You are currently logged in @DRF.com.";

// Effective width of the generated table.
TABLE_WIDTH = 760;

function generateMastHead(fnType) 
{
    // Get logged in state
    var isLoggedIn = (document.cookie.indexOf(COOKIE_CUSTOMER_ID_NAME) != -1);

    // Generate the masthead
    document.writeln("<table width=\"" + TABLE_WIDTH + "\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");

    sendTopNavBar(fnType, isLoggedIn);
    sendMasthead(fnType, isLoggedIn);

    document.writeln("</table>");
}

function sendTopNavBar(fnType, isLoggedIn) 
{
    // Preload the mouseover images
    MM_preloadImages('/images/topnav_home_02.gif',
        '/images/topnav_news_02.gif',
        '/images/topnav_tote_02.gif',
        '/images/topnav_entries_02.gif',
        '/images/topnav_results_02.gif',
        '/images/topnav_pps_02.gif',
        '/images/topnav_watches_02.gif',
        '/images/topnav_interact_02.gif',
        '/images/topnav_sports_02.gif',
        '/images/topnav_leader_02.gif',
        '/images/topnav_site_02.gif',
        '/images/topbull_account_02.gif',
        '/images/topbull_prefs_02.gif',
        '/images/topbull_buy_02.gif');

    document.writeln("<tr bgcolor=\"#000000\">");
    document.writeln("<td>");
	// 728x90 Ad
	document.writeln("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
    document.writeln("<tr bgcolor=\"#cccccc\">");
    document.write("<td><img src=\"/images/blank.gif\" width=\"759\" height=\"12\"></td>");
	document.write("<td width=\"1\" bgcolor=\"#000000\"><img src=\"/images/blank.gif\" width=\"1\" height=\"12\"></td>");
    document.writeln("</tr>");
	document.writeln("<tr bgcolor=\"#cccccc\">");
    document.write("<td width=\"759\" align=\"center\"><SCR" + "IPT LANGUAGE='JavaScript'>AdVert('DRF','SPORTS','728','90','TOP')<\/SCR" + "IPT></td>");
	document.write("<td align=\"right\" width=\"1\" bgcolor=\"#000000\"><img src=\"/images/blank.gif\" width=\"1\" height=\"90\"></td>");
    document.writeln("</tr>");
	document.writeln("<tr bgcolor=\"#cccccc\">");
    document.write("<td><img src=\"/images/advert759x12.gif\" width=\"759\" height=\"12\"></td>");
	document.write("<td width=\"1\" bgcolor=\"#000000\"><img src=\"/images/blank.gif\" width=\"1\" height=\"12\"></td>");
    document.writeln("</tr>");
	document.writeln("</table>");
	// END 728x90 Ad
    document.writeln("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.writeln("<tr>");
    document.write("<td>");

    if (fnType == T_HOME) {
        document.write("<img src=\"/images/topnav_home_03.gif\" height=\"20\">");
        }
    else {
        if (isLoggedIn == true) {
            document.write("<a href=\"" + URL_TAB_PHP + "\"");
            }
        else {
            document.write("<a href=\"" + URL_TAB_HOME + "\"");
            }
            
        document.write(" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image1816','','/images/white/topnav_home_02.gif',1)\"><img name=\"Image1816\" border=\"0\" src=\"/images/white/topnav_home_01.gif\" width=\"47\" height=\"20\"></a>");

        if (fnType != T_NEWS) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if (fnType == T_NEWS) {
        document.write("<img src=\"/images/topnav_news_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"" + URL_TAB_NEWS + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('new16','','/images/white/topnav_news_02.gif',1)\"><img src=\"/images/white/topnav_news_01.gif\" width=\"48\" height=\"20\" name=\"new16\" border=\"0\"></a>");

        if (fnType != T_TOTE) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if (fnType == T_TOTE) {
        document.write("<img src=\"/images/topnav_tote_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"JavaScript:self.location.href=VerifyUserLogin('" + URL_TAB_TOTE + "');\"");
        document.write(" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('tot16','','/images/white/topnav_tote_02.gif',1)\"><img src=\"/images/white/topnav_tote_01.gif\" width=\"46\" height=\"20\" name=\"tot16\" border=\"0\"></a>");

        if ((fnType != T_ENTRIES) && (fnType != T_ENTRIES_DETAIL)) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if ((fnType == T_ENTRIES) || (fnType == T_ENTRIES_DETAIL)) {
        document.write("<img src=\"/images/topnav_entries_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"" + URL_TAB_ENTRIES + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('ent16','','/images/white/topnav_entries_02.gif',1)\"><img src=\"/images/white/topnav_entries_01.gif\" width=\"61\" height=\"20\" name=\"ent16\" border=\"0\"></a>");

        if ((fnType != T_RESULTS) && (fnType != T_RESULTS_DETAIL)) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if ((fnType == T_RESULTS) || (fnType == T_RESULTS_DETAIL)) {
        document.write("<img src=\"/images/topnav_results_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"" + URL_TAB_RESULTS + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('res16','','/images/white/topnav_results_02.gif',1)\"><img src=\"/images/white/topnav_results_01.gif\" width=\"63\" height=\"20\" name=\"res16\" border=\"0\"></a>");

        if ((fnType != T_DATA) && (fnType != T_DATA_PAST_PERFORMANCES) && (fnType != T_DATA_SELECTIONS) && (fnType != T_DATA_ANALYSIS) && (fnType != T_DATA_JOCKEYS) && (fnType != T_DATA_CLOSER_LOOK) && (fnType != T_DATA_GRADED_ENTRIES) && (fnType != T_DATA_TRACK_RECORDS) && (fnType != T_DATA_TRAINERS) && (fnType != T_DATA_STANDINGS)) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if ((fnType == T_DATA) || (fnType == T_DATA_PAST_PERFORMANCES) || (fnType == T_DATA_SELECTIONS) || (fnType == T_DATA_ANALYSIS) || (fnType == T_DATA_JOCKEYS) || (fnType == T_DATA_CLOSER_LOOK) || (fnType == T_DATA_GRADED_ENTRIES) || (fnType == T_DATA_TRACK_RECORDS) || (fnType == T_DATA_TRAINERS) || (fnType == T_DATA_STANDINGS)) {
        document.write("<img src=\"/images/topnav_pps_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"" + URL_TAB_DATA + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('pps16','','/images/white/topnav_pps_02.gif',1)\"><img src=\"/images/white/topnav_pps_01.gif\" width=\"95\" height=\"20\" name=\"pps16\" border=\"0\"></a>");

        if (fnType != T_WATCHES) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if (fnType == T_WATCHES) {
        document.write("<img src=\"/images/topnav_watches_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"JavaScript:self.location.href=VerifyUserLogin('" + URL_TAB_WATCHES + "');\"");
        document.write(" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('wat14','','/images/white/topnav_watches_02.gif',1)\"><img src=\"/images/white/topnav_watches_01.gif\" width=\"67\" height=\"20\" name=\"wat14\" border=\"0\"></a>");

        if (fnType != T_INTERACT) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if (fnType == T_INTERACT) {
        document.write("<img src=\"/images/topnav_interact_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"JavaScript:self.location.href=VerifyUserLogin('" + URL_TAB_INTERACT + "');\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('int16','','/images/white/topnav_interact_02.gif',1)\"><img src=\"/images/white/topnav_interact_01.gif\" width=\"68\" height=\"20\" name=\"int16\" border=\"0\"></a>");

        if (fnType != T_SPORTS) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if (fnType == T_SPORTS) {
        document.write("<img src=\"/images/topnav_sports_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"" + URL_TAB_SPORTS + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('spo16','','/images/white/topnav_sports_02.gif',1)\"><img src=\"/images/white/topnav_sports_01.gif\" width=\"60\" height=\"20\" name=\"spo16\" border=\"0\"></a>");

        if ((fnType != T_LEADERBOARD) && (fnType != T_LEADERBOARD_TRAINERS) && (fnType != T_LEADERBOARD_JOCKEYS) && (fnType != T_LEADERBOARD_HORSES) && (fnType != T_LEADERBOARD_STALLIONS) && (fnType != T_LEADERBOARD_BEST_BEYERS)) {
            document.write("<img src=\"/images/topnav_divider.gif\" width=\"3\" height=\"20\" border=\"0\">");
            }
        }

    if ((fnType == T_LEADERBOARD) || (fnType == T_LEADERBOARD_TRAINERS) || (fnType == T_LEADERBOARD_JOCKEYS) || (fnType == T_LEADERBOARD_HORSES) || (fnType == T_LEADERBOARD_STALLIONS) || (fnType == T_LEADERBOARD_BEST_BEYERS)) {
        document.write("<img src=\"/images/topnav_leader_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"" + URL_TAB_LEADERBOARD + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('lead16','','/images/white/topnav_leader_02.gif',1)\"><img src=\"/images/white/topnav_leader_01.gif\" width=\"91\" height=\"20\" name=\"lead16\" border=\"0\"></a>");
        }

    document.writeln("</td>");

    document.write("<td align=\"right\">");

    if (fnType == T_SITEMAP) {
        document.write("<img src=\"/images/topnav_site_03.gif\" height=\"20\">");
        }
    else {
        document.write("<a href=\"" + URL_TAB_SITEMAP + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image3616','','/images/white/topnav_site_02.gif',1)\"><img name=\"Image3616\" border=\"0\" src=\"/images/white/topnav_site_01.gif\" width=\"52\" height=\"20\" border=\"0\"></a>");
        }

    document.write("</td>");

    document.writeln("</tr>");
    document.writeln("</table>");

    document.writeln("</td>");
    document.writeln("</tr>");
}

function sendMasthead(fnType, isLoggedIn) 
{
    // Generate masthead proper
    document.writeln("<tr>");
    document.writeln("<td height=\"7\"><img src=\"/images/blank.gif\" width=\"7\" height=\"7\"></td>");
    document.writeln("</tr>");
    document.writeln("<tr>");
    document.writeln("<td>");
    document.writeln("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
    document.writeln("<tr>");
    document.writeln("<td width=\"120\" align=\"left\">");

    // Generate masthead vertical nav bar
    document.writeln("<table width=\"120\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");

    if (isLoggedIn == true) {
        if (fnType != T_TOTE) {
            document.writeln("<tr>");
            document.writeln("<td><a href=\"" + URL_MASTHEAD_MENU_ACCOUNT + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('account','','/images/white/topbull_account_02.gif',1)\"><img src=\"/images/white/topbull_account_01.gif\" width=\"120\" height=\"15\" name=\"account\" border=\"0\"></a></td>");
            document.writeln("</tr>");
            }

        document.writeln("<tr>");
        document.writeln("<td><a href=\"#null\" onClick=\"window.open('" + URL_MASTHEAD_MENU_PERSONALIZE + "','personalize','scrollbars=yes,resizable=yes,width=490,height=550');\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('pref','','/images/white/topbull_prefs_02.gif',1)\"><img src=\"/images/white/topbull_prefs_01.gif\" width=\"120\" height=\"15\" name=\"pref\" border=\"0\"></a></td>");
        document.writeln("</tr>");
        }
    else {
        document.writeln("<tr>");
        document.writeln("<td><a href=\"" + URL_MASTHEAD_MENU_MEMBERSHIP + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('fre','','/images/white/topbull_free_02.gif',1)\"><img src=\"/images/white/topbull_free_01.gif\" width=\"120\" height=\"15\" name=\"fre\" border=\"0\"></a></td>");
        document.writeln("</tr>");
        document.writeln("<tr>");
        document.writeln("<td><a href=\"" + URL_MASTHEAD_MENU_BOOKSTORE + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('boo','','/images/white/topbull_book_02.gif',1)\"><img src=\"/images/white/topbull_book_01.gif\" width=\"120\" height=\"15\" name=\"boo\" border=\"0\"></a></td>");
        document.writeln("</tr>");
        }
    
    if ((fnType != T_DATA_PAST_PERFORMANCES) && (fnType != T_DATA_SELECTIONS) && (fnType != T_DATA_ANALYSIS) && (fnType != T_DATA_JOCKEYS) && (fnType != T_DATA_CLOSER_LOOK) && (fnType != T_DATA_GRADED_ENTRIES) && (fnType != T_DATA_TRACK_RECORDS) && (fnType != T_DATA_TRAINERS) && (fnType != T_DATA_STANDINGS)) {
        document.writeln("<tr>");
        document.writeln("<td><a href=\"" + URL_MASTHEAD_MENU_BUYPPS + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('buy','','/images/white/topbull_buy_02.gif',1)\"><img src=\"/images/white/topbull_buy_01.gif\" width=\"120\" height=\"16\" name=\"buy\" border=\"0\"></a></td>");
        document.writeln("</tr>");
        }

    document.writeln("</table>");
    document.writeln("</td>");

    // Generate masthead images and links references
    if ((fnType != T_TOTE) &&
         (fnType != T_DATA_PAST_PERFORMANCES) &&
         (fnType != T_DATA_SELECTIONS) &&
         (fnType != T_DATA_ANALYSIS) &&
         (fnType != T_DATA_JOCKEYS) &&
         (fnType != T_DATA_CLOSER_LOOK) &&
         (fnType != T_DATA_GRADED_ENTRIES) &&
         (fnType != T_DATA_TRACK_RECORDS) &&
         (fnType != T_DATA_TRAINERS) &&
         (fnType != T_DATA_STANDINGS)) {
         if ((fnType != T_ENTRIES) &&
			 (fnType != T_RESULTS) &&
			 (fnType != T_DATA) &&
			 (fnType != T_ENTRIES_DETAIL) &&
			 (fnType != T_RESULTS_DETAIL))
			{
			document.writeln("<td align=\"center\"><img src=\"/images/2003_masthead_545x50.gif\" border=\"0\" width=\"545\" height=\"50\"><a href=\"" + URL_MASTHEAD_FORMULATOR + "\"><img src=\"/images/wincirc_basic_a.gif\" width=\"95\" height=\"50\" alt=\"Formulator - FREE Handicapping Software - CLICK HERE!\" border=\"0\"></a></td>");
			
			}         
         else
			{
			document.writeln("<td align=\"center\"><img src=\"/images/2003_masthead_545x50.gif\" border=\"0\" width=\"545\" height=\"50\"><a href=\"" + URL_MASTHEAD_YOUBET + "\"><img src=\"/images/wincirc_basic_a.gif\" width=\"95\" height=\"50\" alt=\"Formulator - FREE Handicapping Software - CLICK HERE!\" border=\"0\"></a></td>");
			}
        document.writeln("</tr>");
        document.writeln("</table>");
        document.writeln("</td>");
        document.writeln("</tr>");
        document.writeln("<tr>");
        document.writeln("<td height=\"7\"><img src=\"/images/blank.gif\" width=\"7\" height=\"7\"></td>");
        document.writeln("</tr>");

        // Generate login form
        sendLoginElement(fnType, isLoggedIn);
        }
    else {
        document.writeln("<td align=\"center\"><img src=\"/images/small_masthead_296x32.gif\" width=\"296\" height=\"32\"></td>");

        // Generate today's date
        sendDateElement();

        document.writeln("</tr>");
        document.writeln("</table>");
        document.writeln("</td>");
        document.writeln("</tr>");
        }
}

function sendLoginElement(fnType, isLoggedIn) 
{
    document.writeln("<tr>");
    document.writeln("<td height=\"1\" colspan=\"5\" background=\"/images/black_1x1.gif\"><img src=\"/images/blank.gif\" width=\"759\" height=\"1\"></td>");
    document.writeln("</tr>");
	document.writeln("<tr bgcolor=\"#CCCCCC\">");
    document.writeln("<td>");
    document.writeln("<table height=\"20\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
    document.writeln("<tr valign=\"middle\">");

    // Generate login form
    document.writeln("<td align=\"left\">");
    document.writeln("<table border=\"0\">");

    if (fnType != T_LOGIN) {
        if (isLoggedIn == true) {
            document.writeln("<tr>");
            document.writeln("<td><img src=\"/images/blank.gif\" width=\"5\" height=\"10\"></td>");
			document.writeln("<td><img src=\"/images/blank.gif\" width=\"1\" height=\"10\"></td>");
            document.writeln("<td nowrap><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#111111\" size=\"1\">" + MSG_LOGGED_IN + "</font></td>");
            document.writeln("<td><a href=\"" + URL_STATUS_LOGOUT + "\"><img src=\"/images/white/logout.gif\" width=\"56\" height=\"16\" border=\"0\"></a></td>");
            document.writeln("</tr>");
            }
        else {
            document.writeln("<form name=\"login\" action=\"" + URL_STATUS_LOGIN + "\" method=\"post\">");
            document.writeln("<tr>");
            document.writeln("<td><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#111111\" size=\"1\"><b>Login:</b></font>&nbsp;</td>");
            document.writeln("<td><input class=\"input\" type=\"text\" name=\"p_full_name\" size=\"10\" maxlength=\"16\"></td>");
            document.writeln("<td>&nbsp;&nbsp;<font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#111111\" size=\"1\"><b>Password:</b></font>&nbsp;</td>");
            document.writeln("<td><input class=\"input\" type=\"hidden\" name=\"source\" value=\"header\"></td>");
            document.writeln("<td><input class=\"input\" type=\"password\" name=\"p_password\" size=\"10\" maxlength=\"16\"></td>");
            document.writeln("<td><a href=\"JavaScript:document.login.submit();\"><img src=\"/images/white/go_button.gif\" width=\"50\" height=\"16\" border=\"0\"></a></td>");
            document.writeln("</tr>");
            document.writeln("</form>");
            }
        }
    else {
        document.writeln("<tr>");
        document.writeln("<td><img src=\"/images/blank.gif\" width=\"215\" height=\"10\"></td>");
        document.writeln("</tr>");
        }
    
    document.writeln("</table>");
    document.writeln("</td>");

    // Generate today's date
    sendDateElement();

    // Generate search form
    document.writeln("<td align=\"right\"><a href=\"" + URL_STATUS_NEWSSEARCH + "\"><img src=\"/images/white/news_archives.gif\" align=\"right\" width=\"142\" height=\"16\" border=\"0\"></a><img src=\"/images/blank.gif\" align=\"right\" width=\"5\" height=\"10\"></td>");
	document.writeln("<td align=\"right\" width=\"1\" rowspan=\"3\" background=\"/images/black_1x1.gif\"><img src=\"/images/blank.gif\" width=\"1\" height=\"1\"></td>");
    document.writeln("</tr>");
	document.writeln("<tr>");
    document.writeln("<td height=\"1\" colspan=\"5\" background=\"/images/black_1x1.gif\"><img src=\"/images/blank.gif\" width=\"759\" height=\"1\"></td>");
    document.writeln("</tr>");
    document.writeln("</table>");
    document.writeln("</td>");
    document.writeln("</tr>");
}

function sendDateElement()
{
    document.write("<td nowrap align=\"right\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#111111\" size=\"1\">");
    document.write("<script language=\"JavaScript\">");
    document.write("JavaScript:todayIs()");
    document.write("</script>");
    document.writeln("</font></td>");
}
