//  Jayakar - SPAR Capital   
//  Write out the nav (bottom) Menu with Active Button grayed out
//  Function and variables already loaded in the HEAD with SPAR0headIncl.js
//  SPAR4bottomMenu.js 

// Top Menu on Banner - - - - - - - - - 

// Generic function to show 911 flag in an absolute position on page
// USAGE: <script>show911("340","20");</s cript>  WHERE 340 (or %) is the LEFT Position and 20 is the TOP Position
function show911(leftPos, topPos) {
    document.write('<span style="position: absolute; left: '+leftPos+'; top: '+topPos+'"> ');
    document.write('<img border="0" src="images/flag_waving.gif" alt="USA 9/11 - We Will Never Forget!\n');
    document.write('We Remember Our Fallen Heroes\nFrom Adversity Comes Strength & Unity!" width="100" height="55" ');
    document.write('ONMOUSEOVER="window.status=\'U S A   9 / 1 1       W e   W i l l   N e v e r   F o r g e t  ! !\';return true;" ');
    document.write('ONMOUSEOUT="window.status=\'\';return true;"></span> ');
}

// show911("45%","20");

// Top Menu
var ThisPageActiveIdx = 0;      // 0 ==> This page is NOT Active

/*
function writeTopMenu (navIdx,topLinkText) {
	navIdx = navIdx * 1;
	ThisPageActiveIdx = CheckActivePage(A_Link[navIdx]);   // 0 is FALSE; 1 is TRUE[This page IS Active]

	document.write(A_Link_HREF);
	// current page gets # for itself
	if (ThisPageActiveIdx == 0) document.write(A_Link[navIdx]); else document.write("#");
	document.write(tTDCLASS_sect[ThisPageActiveIdx]);
	document.write(TITLE2);
	document.write(ATitle[navIdx]);
	document.write(ONM_OVERt_sect[ThisPageActiveIdx]);
	document.write(ONM_WinStat[navIdx]);
	document.write(ONM_OVER_return);
	document.write(ONM_OUTt_sect[ThisPageActiveIdx]);
	document.write(ONM_OUT_return);
	if (navIdx == 0) document.write(ChgHmPgFont[ThisPageActiveIdx]);
	document.write(topLinkText);
	document.write(A_Link_EndTD+A_Link_EndA);

} 	//  END of function

document.write('<div style="position: absolute; left: 13; top: 52; z-index: 9"> ');
document.write('<table CELLSPACING="4" CELLPADDING="0" VALIGN="TOP" ALIGN="LEFT" SUMMARY="TopMenu"><tr> ');
writeTopMenu(0,"&nbsp;Home&nbsp;");
writeTopMenu(3,"&nbsp;Start H/F&nbsp;");
writeTopMenu(2,"&nbsp;FAQs&nbsp;");
writeTopMenu(4,"&nbsp;OffShore&nbsp;");
document.write('</tr></table></div><div style="position: absolute; float: right; top: 52; z-index: 9"> ');
document.write('<table CELLSPACING="4" CELLPADDING="0" VALIGN="TOP" ALIGN="RIGHT" SUMMARY="TopMenu2"><tr>');
writeTopMenu(6,"&nbsp;Login&nbsp;");
writeTopMenu(8,"&nbsp;Contact&nbsp;");
writeTopMenu(9,"&nbsp;Help !&nbsp;");
document.write('<td></td></tr></table></div> ');
*/


// S T A R T   Processing nav menu - - - - - - - - - - - - - - - - -
// Write out background & top two buttons first 
document.write('<TABLE SUMMARY="MAST Bottom nav" BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">');
document.write('<TR><TD><DIV ALIGN="CENTER" STYLE="background-image: url(\'images/100$LtGrnBills.gif\')"> ');
document.write('<SPAN STYLE="background-color: #EFEFEF; font-size: 8pt;">[ <A HREF="#" ');
document.write('ONCLICK="history.go(-1)" TITLE="Go BACK to the PREVIOUS Page" ');
document.write('ONMOUSEOVER="window.status=\'Go BACK to the PREVIOUS web page!\';return true;" ');
document.write('ONMOUSEOUT="window.status=\'\';return true;">BACK</A>]</SPAN> ');
document.write('&nbsp;&nbsp;&nbsp;&nbsp;<SPAN STYLE="background-color: #EFEFEF; font-size: 8pt;">[<A HREF="#PageTop" ');
document.write('TITLE="Go Back UP to the TOP of THIS Page" ');
document.write('ONMOUSEOVER="window.status=\'Go Back UP to the TOP of THIS web page!\';return true;" ');
document.write('ONMOUSEOUT="window.status=\'\';return true;">TOP</A>]</SPAN><BR> ');


// Loop for all links (bottom nav); Check Active Page, write HTML doc w/navIdx var. arrays
var ThisPageActiveIdx = 0;      // 0 ==> This page is NOT Active
var navIdx = 0;
for (navIdx = 0; navIdx <= M_MenuItems; navIdx++) {
	ThisPageActiveIdx = CheckActivePage(A_Link[navIdx]);   // 0 is FALSE; 1 is TRUE[This page IS Active]

	// line break for 1st and 2nd lines
	if ((navIdx == 0) || (navIdx == 5)) document.write('<BR>'); else document.write('&nbsp;&nbsp;');
	document.write(A_Link_HREF);
	// current page gets # for itself
	if (ThisPageActiveIdx == 0) document.write(A_Link[navIdx]); else document.write("#");
	document.write(bCLASS_sect[ThisPageActiveIdx]);
	document.write(TITLE2);
	document.write(ATitle[navIdx]);
	document.write(ONM_OVERb_sect[ThisPageActiveIdx]);
	document.write(ONM_WinStat[navIdx]);
	document.write(ONM_OVER_return);
	document.write(ONM_OUTb_sect[ThisPageActiveIdx]);
	document.write(ONM_OUT_return);
	document.write(bOpenBracket);
	document.write(Link_text[navIdx]);
	document.write(bCloseBracket);
	document.write(A_Link_EndSPAN);
	document.write(A_Link_EndA);
}


// Write out the CopyRight Statement with date, etc.
document.write('<BR><P class="MASTtinyassist">E-mail ');
mailMast('HFInfo','eMail MASTPartners WebMaster','WebMaster','BM Web/Tech: ');
document.write(' &nbsp; <A HREF="Legal.html#Usage" TITLE="Terms of Use" ONMOUSEOVER="window.status=\'Terms of Use!\';return true;" ');
document.write('ONMOUSEOUT="window.status=\'\';return true;">Terms of Use</A> ');
document.write(' &nbsp;&nbsp;&nbsp; &nbsp; <A HREF="Legal.html" TITLE="Legal Notice and Disclaimer" ');
document.write('ONMOUSEOVER="window.status=\'Legal Notice and Disclaimer!\';return true;" ');
document.write('ONMOUSEOUT="window.status=\'\';return true;">Legal Notice</A>. &nbsp;&nbsp; ');
document.write('&nbsp;&nbsp;&nbsp;&nbsp;Best viewed with: Firefox3+/IE6+/1024x768+<BR>');
document.write('MASTPartners.com &copy; 1999-' + MASTcYear + ' &nbsp; All Rights Reserved. &nbsp; Do NOT Copy or Reproduce!');
document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last updated: ');
document.write(MASTcMonth + ' ' + MASTcYear + '</DIV></TD></TR></TABLE>');


// Generic function to open new popup MAST window
function popMASTWin(MASTURL,MASTWidth,MASTHeight,winName,MASTScroll,otherVar1) {
// USAGE: <A HREF=javascript: popMASTWin('privatedir\p_disc1.html','450','450','pDisc1','no','');">   Use 9999 for max screen availability
if (MASTWidth == "9999") MASTWidth = screen.availWidth - 50; 
if (MASTHeight == "9999") MASTHeight = screen.availHeight - 50;
    newWindow = window.open(MASTURL,winName,'dependent,toolbar=no,menubar=no,resizable=no,scrollbars='+MASTScroll+',status=no,location=no,width='+MASTWidth+',height='+MASTHeight);
// Set Global Page number variable, if necessary
    if (otherVar1 == "") MASTsetupPg = 0; else MASTsetupPg = (otherVar1 *1);
}


// Functon to Refresh left nav chart 
function refreshMASTChart() 
{
	chartImage = new Image();
	chartImage.src = "http://charts.stockgroup.com/charts/SGChartDB.asp?chartwidth=160&BKcolor=FFFFFF&GraphColor=FFFFFF&lang=&gc=&Indices=&IndicesName=&dowjoneschecked=1&spchecked=1&prefix=afbicn";
	document.images.MASTChart.src = chartImage.src;
	weatherImage = new Image();
	weatherImage.src = "http://www.weatherforyou.net/fcgi-bin/hw3/hw3.cgi?config=png&forecast=hourly&alt=hwihourly&place=Greenwich&state=ct&country=us&hwvbg=transparent&hwvtc=navy&metric=0&hwvdisplay=Greenwich,+CT+[~NYC]";
	document.images.MASTGwchWeather.src = weatherImage.src;
}


//  END of SCRIPT