var BC_TITLE = '';
var BC_TOPMENU = 0;
var BC_LEFTMENU = 0;
var BC_PGHIGH = 0;
var BC_SYMBOL = '';

var BC_QUOTES = 'http://quotes-cust.barchart.com/pl/fcht';
var BC_QUOTE = 'http://quotes-cust.barchart.com/pl/fcht/quote.htx';
var BC_CHART = 'http://sites.barchart.com/pl/fcht/chart.htx';
var BC_CHART3 = 'http://charts2.barchart.com';

var BC_IMG = 'http://sites.barchart.com/pl/fcht/images';

function checkQForm(q) {
  if(q.sym.value == '') {
    alert('Please enter a symbol');
    return false;
  }
  else  return true;
}

function printNavMenu()
{
document.write('<ifr'+'ame src=/JSmenu.aspx width=156 height=235 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No></ ></ifr'+'ame>');
document.write('<br><br>');
}


function BC_PrintHeader() {
  document.write('<scr' + 'ipt language="JavaScript" src="' + BC_IMG + '/com.js"></scr' + 'ipt>');
  document.write('<link rel="stylesheet" type="text/css" href="barchart.css">');
  //document.write('<link rel="stylesheet" type="text/css" href="' + BC_IMG + '/barchart.css">');

  var menus = Array('', 'Markets', 'Futures', 'Funds', 'Signals', 'Sectors', 'Custom', 'Support');
  var links = Array('', "", "page=mktcom&section=indices", "page=funds", "page=sigtop", "page=sectors&base=industry", "page=ccharts", "page=support&section=default");

  var foo = 1;

if(foo == 3) {

  if(BC_LEFTMENU > 100) { BC_TOPMENU = 0; }

  document.write('<table width=100% align=center height=31 border=0 cellpadding=0 cellspacing=0 bgcolor=#ffffff><tr>');
  for (var i = 1; i < menus.length; i++) {
    if ((i == 1) && (BC_TOPMENU == 1))
      document.write('<td class=bcTopHand align=center width=14% nowrap bgcolor=#FFFFFF background="' + BC_IMG + '/ts1top.gif" onClick="window.open(\'?' + links[i] + '\', \'_parent\');"><a href="' + BC_HOSTURL + '?' + links[i] + '" class=bcTop><font color=#191970><b>' + menus[i] + '</b></font><img src="' + BC_IMG + '/t' + i + '.gif" border=0 align=absmiddle onClick="this.blur();"></a></td>');
    else if (i == BC_TOPMENU)
      document.write('<td class=bcTopHand align=center width=14% nowrap bgcolor=#FFFFFF background="' + BC_IMG + '/ts1c.gif" onClick="window.open(\'?' + links[i] + '\', \'_parent\');"><a href="?' + links[i] + '" class=bcTop><font color=#191970><b>' + menus[i] + '</b></font><img src="' + BC_IMG + '/t' + i + '.gif" border=0 align=absmiddle onClick="this.blur();"></a></td>');
    else
      document.write('<td class=bcTopHand align=center valign=bottom width=14% nowrap onClick="window.open(\'?' + links[i] + '\', \'_parent\');"><table width=100% cellpadding=0 cellspacing=0 border=0 height=24 class=bcTopBorder><tr><td onMouseOver="this.bgColor=\'#98fb98\';" onMouseOut="this.bgColor=\'#ffffff\'; return true" align=center nowrap><a href="?' + links[i]  + '" class=bcTop>' + menus[i] + '<img src="' + BC_IMG + '/t' + i + '.gif" border=0 align=absmiddle onClick="this.blur();"></a></td></tr></table></td>');
  }

  var cs = 7 - BC_TOPMENU;

  if (BC_TOPMENU == 1) {
    document.write('<tr><td bgcolor=#FFFFFF class=bcsz1></td><td colspan=' + cs + ' background="' + BC_IMG + '/ts2.gif" style="height: 4px;"></td></tr>');
  }
  else if (BC_TOPMENU == 7) {
    document.write('<tr><td colspan=6 background="' + BC_IMG + '/ts2.gif" class=bcsz1></td><td bgcolor=#FFFFFF><img src="' + BC_IMG + '/tdc.gif" height=4 width=10></td></tr>');
  }
  else if (BC_TOPMENU == 0) {
    document.write('<tr><td style="height:4px;" colspan=7 background="' + BC_IMG + '/ts2.gif"></tr>');
  }
  else {
    if (BC_TOPMENU == 8)
      document.write('<tr><td style="height:4px; width:1px;" colspan=' + cs + ' background="' + BC_IMG + '/ts2.gif"></td></tr>');
    else
      document.write('<tr><td class=bcsz1 colspan=' + (BC_TOPMENU - 1) + ' background="' + BC_IMG + '/ts2.gif"></td><td bgcolor=#FFFFFF><img src="' + BC_IMG + '/tdc.gif" height=4 width=10></td><td class=bcsz1 colspan=' + cs + ' background="' + BC_IMG + '/ts2.gif"></td></tr>');
  }

  document.write('<tr height=5><td></td></tr></table>');

}

  BC_PrintSideMenu();
  

}

function BC_PrintAd(ID)
	{
	  //document.write('hello')
	//   document.write('<Table align=LEFT><tr><td align=LEFT>')
	//document.write('<iframe src=http://admanager.freecharts.com/admin/frmServeBanner.aspx?FarmID=' + ID + '&IFrame=1 width="120" height="60" Marginwidth="0" Marginheight="0" Hspace="0" Vspace="0" Frameborder="0" Scrolling="No"></iframe>')
	//document.write('Ad goes here')
	document.write('<iframe src ="http://www.freecharts.com/AdManagement/aspbanner/aspbanner_inc.asp?BannerZone=8&Refresh=0" width="468" height="60" frameborder="0" marginwidth="0" marginheight="0"scrolling="no"></iframe>')
	  //document.write('<iframe src ="http://www.freecharts.com/AdManagement/aspbanner/aspbanner_inc.asp?BannerZone=8&Refresh=0" width="468" height="60" frameborder="0" marginwidth="0" marginheight="0"scrolling="no"></iframe>')
	document.write('<BR>')
	
	}

function BC_PrintHelpTitle(title) {
  document.write('<table width=100% border=0 cellpadding=3 cellspacing=0>');
  document.write('<tr height=7><td class=bcNLink></td></tr>');
  document.write('<tr><td align=left class=bcTitle>' + title + '</td></tr>');
  document.write('<tr height=7><td class=bcNLink></td></tr></table>');
}

function BC_PrintDisclaimer() {
  document.write('<table width=100% cellpadding=2 cellspacing=2 border=0 align=center>');
  document.write('<tr><td align=center class=bcCp><font color=#191979>');
  document.write('Data and information is provided for informational purposes only, and is not intended for trading purposes. Neither Barchart.com Inc. nor its data provider (ddfplus) shall be liable for any errors or delays in the content, or for any actions taken in reliance thereon. By accessing this web site, a user agrees not to redistribute the information found therein.');
  document.write('</font></td></tr></table>');

  document.write('<table width=100% cellpadding=2 cellspacing=4 border=0>');
  document.write('<tr><td align=center class=bcCp nowrap>Data provided by <a href="http://www.ddfplus.com" target="new" class=bcCp>ddfplus</a> and subject to <a href="?page=ddfplus" class=bcCp>terms of use</a>. Copyright &copy 1995 - 2005 <a href="http://www.barchart.com" target="new" class=bcCp>Barchart.com Inc</a>. <a href="?page=agreement" class=bcCp>User agreement</a> applies.</td></tr></table>');

  document.write('<table width=100% cellpadding=2 cellspacing=2 border=0>');
  document.write('<tr><td colspan=2 align=center class=bcCp nowrap><font color=#191979>');
  document.write('All Equities and Futures data is delayed according to exchange rules.<br>NYSE and AMEX at least 20 minutes. Nasdaq at least 15 minutes.<br>CME and CBOT at least 10 minutes. NYBOT, NYMEX and COMEX at least 30 minutes.');
  document.write('</font></td></tr></table>');
}

function BC_PrintFooter() {
  
  document.write('</td></tr></table>');
  document.write('<br>');
//  BC_PrintDisclaimer(); // Called by the hosting page 


}

function BC_PrintAdTable() {
document.write('<table align=center width=100% style="border-style: double; border-color: #999999"><tr><td align=center bgcolor=#F4F4F4>')
	BC_PrintAd('6');
//document.write('</td><td align=center>')
//	BC_PrintAd('6');
//document.write('</td><td align=center>')
//	BC_PrintAd('6');
//document.write('</td><td align=center>')
//	BC_PrintAd('6');
document.write('</td></tr></table>')
} 


function BC_PrintSideMenu() {
	
  document.write('<table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#ffffff><tr><td valign=top class=bcNTxt width=137>');
  document.write('<table width=156 border=0 cellpadding=2 cellspacing=0 bgcolor=#ffffff><tr><td valign=top class=bcNTxt>');
printNavMenu();
  if (BC_TOPMENU != 2) {
    //BC_DoSubMenuTitle('Equities Quote');
    //document.write('<table width=156 cellpadding=0 cellspacing=0 border=0 class=bcChartBorder bgcolor=#EEF3FF>');
    //document.write('<form name="BC_frmQuick" METHOD="GET" onSubmit="return checkQForm(this);">');
    //document.write('<input type="hidden" name="page" value="quote">');
    //document.write('<tr><td colspan=2 class=bcNTxt>Symbol: <input value="' + BC_SYMBOL + '" type=text name=sym size=4 class=bcTextBox>&nbsp;<input type="submit" value="Go" class=bcGoBut></td></tr>');
    //document.write('<tr><td colspan=2 class=bcCp>&nbsp;<a href="?page=lookup" class=bcNLink>Enter equities</a> &nbsp;<a href="?page=lookup" class=bcNLink>symbol for quote</a></td></tr>');
    //document.write('<tr><td colspan=2 class=bcNTxt height=3></td></tr>');
    //document.write('</form>');
    //document.write('</table><br>');
 
  }

  var links;
  
  var titles = Array('','Markets Overview', 'Overview', 'Funds Overview', 'Signals Overview', 'Sectors Overview', 'Custom Section', 'General Support');
  if (BC_TOPMENU == 1) {
    BC_DoSubMenuTitle(titles[BC_TOPMENU]);

    links = Array('', 'Market Indices|indices', 'Exchange Funds|mktetfx', 'Market Momentum|momentum', '52 Week Highs|high', '52 Week Lows|low', 'Volume Leaders|vleaders', 'Percent Advances|padvance', 'Percent Declines|pdecline', 'Price Advances|cadvance', 'Price Declines|cdecline', 'Price Volume|pricevol', 'Volume Advances|vadvances', 'Highs / Lows|newhilo', 'What\'s Hot|whotupd', 'What\'s Not|whotdnd');
    var links2;
    if (BC_LEFTMENU == 1)
      links2 = Array('Industrials|dow', 'Nasdaq 100|nasdaq100', 'S&P 100|sp100', 'S&P 400|sp400', 'S&P 500|sp500', 'Utilities|dowutil', 'Transports|dowtrans', 'Composite|dowcomp');
    else if (BC_LEFTMENU == 2)
      links2 = Array('ETF Industry|mktetfs', 'ETF Broad Based|mktetfb', 'ETF International|mktetfi');
    else if (BC_LEFTMENU == 4)
      links2 = Array('NYSE|nysehigh', 'NASDAQ|nasdhigh', 'AMEX|amexhigh', 'OTC.BB|otchigh');
    else if (BC_LEFTMENU == 5)
      links2 = Array('NYSE|nyselow', 'NASDAQ|nasdlow', 'AMEX|amexlow', 'OTC.BB|otclow');
    else if (BC_LEFTMENU == 6)
      links2 = Array('NYSE|nysevl', 'NASDAQ|nasdvl', 'AMEX|amexvl', 'Price &lt; $10|smalvl', 'Price &gt; $10|largvl', 'OTC.BB|otcvl');
    else if (BC_LEFTMENU == 7)
      links2 = Array('NYSE|nysepa', 'NASDAQ|nasdpa', 'AMEX|amexpa', '$2 - $5 Range|ext1pa', '$5 - $10 Range|ext2pa', '$10 - $500 Range|ext3pa', 'Vol. < 500k|ext4pa', 'Vol. > 500k|ext5pa', 'OTC.BB|otcpa');
    else if (BC_LEFTMENU == 8)
      links2 = Array('NYSE|nysepd', 'NASDAQ|nasdpd', 'AMEX|amexpd', '$2 - $5 Range|ext1pd', '$5 - $10 Range|ext2pd', '$10 - $500 Range|ext3pd', 'Vol. < 500k|ext4pd', 'Vol. > 500k|ext5pd', 'OTC.BB|otcpd');
    else if (BC_LEFTMENU == 9)
      links2 = Array('NYSE|nyseca', 'NASDAQ|nasdca', 'AMEX|amexca', '$2 - $5 Range|ext1ca', '$5 - $10 Range|ext2ca', '$10 - $500 Range|ext3ca', 'Vol. < 500k|ext4ca', 'Vol. > 500k|ext5ca', 'OTC.BB|otcca');
    else if (BC_LEFTMENU == 10)
      links2 = Array('NYSE|nysecd', 'NASDAQ|nasdcd', 'AMEX|amexcd', '$2 - $5 Range|ext1cd', '$5 - $10 Range|ext2cd', '$10 - $500 Range|ext3cd', 'Vol. < 500k|ext4cd', 'Vol. > 500k|ext5cd', 'OTC.BB|otccd');
    else if (BC_LEFTMENU == 14)
      links2 = Array('Weekly What\'s Hot|whotupw', 'Monthly What\'s Hot|whotupm', 'NYSE Daily|whotupdn', 'NYSE Weekly|whotupwn', 'NYSE Monthly|whotupmn', 'NASDAQ Daily|whotupdq', 'NASDAQ Weekly|whotupwq', 'NASDAQ Monthly|whotupmq', 'AMEX Daily|whotupda', 'AMEX Weekly|whotupwa', 'AMEX Monthly|whotupma', 'OTC.BB Daily|whotupdo', 'OTC.BB Weekly|whotupwo', 'OTC.BB Monthly|whotupmo');
    else if (BC_LEFTMENU == 15)
      links2 = Array('Weekly What\'s Not|whotdnw', 'Monthly What\'s Not|whotdnm', 'NYSE Daily|whotdndn', 'NYSE Weekly|whotdnwn', 'NYSE Monthly|whotdnmn', 'NASDAQ Daily|whotdndq', 'NASDAQ Weekly|whotdnwq', 'NASDAQ Monthly|whotdnmq', 'AMEX Daily|whotdnda', 'AMEX Weekly|whotdnwa', 'AMEX Monthly|whotdnma', 'OTC.BB Daily|whotdndo', 'OTC.BB Weekly|whotdnwo', 'OTC.BB Monthly|whotdnmo');
    else
      links2 = Array();

    document.write('<table width=156 border=0 cellPadding=0 cellSpacing=0>');
    for (var i = 1; i < links.length; i++) {
      if (i == BC_LEFTMENU) {
        var ary = links[i].split('|');

        document.write('<tr bgcolor=#777777 height=22><td width=100% class=bcMnu3>&nbsp;<a href="?page=' + ary[1] + '" class=bcCp><font color=#FFFFFF><b>' + ary[0] + '</b></font></a></td></tr>');
        if (links2[0] != '') {
          document.write('<tr><td align=left bgcolor=#F5FFFA>');
          document.write('<table cellspacing=0 cellpadding=1 border=0 width=100% class=bcChartBorder bgcolor=#f5fffa>');
          for (var j = 0; j < links2.length; j++) {
            ary = links2[j].split('|');
            if (BC_PGHIGH == (j + 1))
              document.write('<tr bgcolor=#f5fffa><td class=bcNTxt><img src="' + BC_IMG + '/dg.gif" name="moj' + j + '">&nbsp;<a href="?page=' + ary[1] + '" class=bcNLink>' + ary[0] + '</a></td></tr>');
            else
              document.write('<tr bgcolor=#f5fffa><td class=bcNTxt><img src="' + BC_IMG + '/d.gif" name="moj' + j + '">&nbsp;<a href="?page=' + ary[1] + '" class=bcNLink onMouseOver="document[\'moj' + j + '\'].src=\'http://sites.barchart.com/pl/bceqt/images/dg.gif\'; return true" onMouseOut="document[\'moj' + j +'\'].src=\'http://sites.barchart.com/pl/bceqt/images/d.gif\'; return true">' + ary[0] + '</a></td></tr>');
          }

          document.write('<tr height=4><td></td></tr>');
          document.write('</table>');
          document.write('</td></tr>');
        }
      }
      else {
        var ary = links[i].split('|');
        document.write('<tr height=22><td onClick="window.open(\'?page=' + ary[1] + '\', \'_parent\');" width=100% class=bcMnu1 bgcolor=#f5fffa onMouseOver="this.className=\'bcMnu2\'; return true" onMouseOut="this.className=\'bcMnu1\'; return true"><b>&rsaquo;</b> <a href="?page=' + ary[1] + '" class=bcNLink>' + ary[0] + '</a></td></tr>');
      }
    }

    document.write('</table>');
    document.write('<br>');
  }
  else if (BC_TOPMENU == 2) {
    var spos = 0;
 
    if (BC_LEFTMENU < 100) {
      BC_DoSubMenuTitle('Futures Quote');
      document.write('<table width=156 border=0 cellpadding=0 cellspacing=0 class=bcMnu1  bgcolor=#eef3ff>');
      document.write('<form method="get" onSubmit="return checkQForm(this);">');
      document.write('<input type="hidden" name="page" value="quote2">');
      document.write('<tr bgcolor=#eef3ff><td bgcolor=#eef3ff colspan=2 class=bcNTxt> Symbol: <input type="text" name="sym" value="" maxlength="2" size="3" class=bcTextBox> <input type="submit" value="Go" class=bcGoBut></td></tr>');
      document.write('<tr><td colspan=2 class=bcNTxt>&nbsp;<a href="?page=futures" class=bcNLink title="Futures Symbol Lookup">Enter commodity</a> &nbsp;<a href="?page=futures" class=bcNLink title="Futures Symbol Lookup">symbol for quote</a></td></tr></form>');
      document.write('<tr><td style="height:2px;" bgcolor=#eef3ff colspan=2></td></tr>');
      document.write('</table><br>');
//vj 01-08-08 Removed
//BC_PrintAd('6');
      BC_DoSubMenuTitle(titles[BC_TOPMENU]);
      spos = 99;

      links = Array('Exchanges|?page=futexch');
      BC_DoSubMenu(spos, links);
      document.write('<br>');

      spos = BC_LEFTMENU - 1;
      BC_DoSubMenuTitle('Futures Markets');
      links = Array('Full List|?page=mktcom', 'Currencies|?page=mktcom&section=currencies', 'Energies|?page=mktcom&section=energies', 'Financials|?page=mktcom&section=financials', 'Grains|?page=mktcom&section=grains', 'Indices|?page=mktcom&section=indices', 'Meats|?page=mktcom&section=meats', 'Metals|?page=mktcom&section=metals', 'Softs|?page=mktcom&section=softs', 'Forex Rates|?page=fxcross');
      BC_DoSubMenu(spos, links);
      document.write('<br>');

      if (BC_PGHIGH > 100)
        spos = BC_PGHIGH - 101;
      else
        spos = BC_PGHIGH - 1;
//vj removed 01/08/08
//   BC_PrintAd('6');
      BC_DoSubMenuTitle('Educational');
      links = Array('Orders|?page=orders', 'Glossary|?page=glossary', 'Futures 101|?page=futs101', 'Options 101|?page=opts101');
      BC_DoSubMenu(spos, links);
      document.write('<br>');
   //BC_PrintAd('6');
    }
    else {
      BC_DoSubMenuTitle('Futures Quotes');
      document.write('<table width=156 cellpadding=0 cellspacing=0 border=0 class=bcChartBorder bgcolor=#eef3ff>');
      document.write('<form name="quick" onSubmit="return setQuickForm(this);">');
      document.write('<tr><td colspan=2 class=bcNTxt>Symbol: <input value="' + BC_SYMBOL + '" type=text name=sym size=4 class=bcTextBox onFocus="document.quick.sym.select();">&nbsp;<input type="submit" value="Go" class=bcGoBut></td></tr>');

      document.write('<tr><td colspan=2 class=bcCp>&nbsp;<a href="?page=lookup" class=bcNLink>Enter equities</a> &nbsp;<a href="?page=lookup" class=bcNLink>symbol for quote</a></td></tr>');
      document.write('<tr><td colspan=2 class=bcNTxt height=3></td></tr>');
      document.write('</form>');
      document.write('</table><br>');
		
		
      
      BC_DoSubMenuTitle('Technicals');

      links = new Array('Chart|?page=chart&sym=' + BC_SYMBOL, 'Quote|?page=quote&sym=' + BC_SYMBOL, 'Technicals|?page=tech&sym=' + BC_SYMBOL, 'Opinion|?page=texpert&sym=' + BC_SYMBOL, 'Snapshot|?page=texsnap&sym=' + BC_SYMBOL, 'Advanced|?page=texadv&sym=' + BC_SYMBOL, 'Performance|?page=perform&sym=' + BC_SYMBOL, 'Projections|?page=procal&sym=' + BC_SYMBOL, 'Profile|?page=profile&sym=' + BC_SYMBOL);

      BC_DoSubMenu(spos, links);
      document.write('<br>');
      BC_DoSubMenuTitle('Price Overview');

      links = Array('Futures Contracts|?page=quote2&sym=' + BC_SYMBOL, 'Options Contracts|?page=optqte&sym=' + BC_SYMBOL + '&mode=d');
      BC_DoSubMenu(0, links);
      document.write('<br>');

      BC_DoSubMenuTitle('Overview');
//      links = Array('Realtime Futures|javascript:openWin(\'http://realtime.barchart.com\');','Advanced Futures|javascript:openWin(\'http://www.barchart.com/futures.html\');', 'Futures Exchanges|?page=futexch');
      links = Array('Futures Exchanges|?page=futexch');

      BC_DoSubMenu(0, links);
      document.write('<br>');
    }
  }
  else if(BC_TOPMENU == 3) {
    var spos = 0;

    if(BC_LEFTMENU < 100) {
      spos = BC_LEFTMENU - 1
//vj 01/08/08 removed      
//BC_PrintAd('6');
      BC_DoSubMenuTitle(titles[BC_TOPMENU]);
      links = Array('New Highs|?page=fundhigh', 'New Lows|?page=fundlow', 'YTD Change|?page=fundytd', 'Price Change|?page=fundc', 'Percent Change|?page=fundp', 'One Month|?page=fundv', 'Three Month|?page=fundw', 'Six Month|?page=fundx', 'Nine Month|?page=fundy', 'Twelve Month|?page=fundz', 'Daily What\'s Hot|?page=whotupdx', 'Weekly What\'s Hot|?page=whotupwx', 'Monthly What\'s Hot|?page=whotupmx', 'Daily What\'s Not|?page=whotdndx', 'Weekly What\'s Not|?page=whotdnwx', 'Monthly What\'s Not|?page=whotdnmx');
     
	
      BC_DoSubMenu(spos, links);
      document.write('<br>');
//vj 01/08/08 removed
//      BC_PrintAd('6');
    }
    else {
      BC_DoSubMenuTitle('Technicals');
      links = new Array('Chart|?page=chart&sym=' + BC_SYMBOL, 'Quote|?page=quote&sym=' + BC_SYMBOL, 'Technicals|?page=tech&sym=' + BC_SYMBOL, 'Opinion|?page=texpert&sym=' + BC_SYMBOL, 'Snapshot|?page=texsnap&sym=' + BC_SYMBOL, 'Advanced|?page=texadv&sym=' + BC_SYMBOL, 'Performance|?page=perform&sym=' + BC_SYMBOL, 'Projections|?page=procal&sym=' + BC_SYMBOL);

      BC_DoSubMenu(spos, links);
    }
    document.write('<br>');
  }
  else if (BC_TOPMENU == 4) {
    BC_DoSubMenuTitle(titles[BC_TOPMENU]);
    links = Array('Top 100 Stocks|?page=sigtop', 'Bottom 100 Stocks|?page=sigbot', 'Top 1% Strength|?page=sigstr', 'Top 1% Direction|?page=sigdir', 'Upgrades|?page=sigupg', 'Downgrades|?page=sigdng');
    BC_DoSubMenu(BC_LEFTMENU - 1 , links);
  }
  else if (BC_TOPMENU == 5) {
    BC_DoSubMenuTitle('Sector Finder');
    document.write('<table width=156 border=0 cellpadding=1 cellspacing=0 class=bcMnu1 bgcolor=#eef3ff>');
    document.write('<form method="get" onSubmit="return checkQForm(this);">');
    document.write('<input type="hidden" name="page" value="sectors">');
    document.write('<tr bgcolor=#eef3ff><td bgcolor=#eef3ff colspan=2 class=bcNTxt> Symbol: <input type="text" name="sym" value="' + BC_SYMBOL + '" maxlength="5" size="3" class=bcTextBox><input type="hidden" name="what" value="sector"> <input type="submit" value="Go" class=bcGoBut></td></tr>');
    document.write('<tr><td bgcolor=#eef3ff colspan=2 class=bcNTxt>&nbsp;Enter symbol to<br>&nbsp;find it\'s sector.</td></tr></form>');
    document.write('</table><br>');

    BC_DoSubMenuTitle(titles[BC_TOPMENU]);
    links = Array('Industry Groups|?page=sectors&base=industry', 'Standard Industry|?page=sectors&base=sic', 'Top 100 Stocks|?page=sectors&sec=top~100~stocks.sec', 'Bottom 100 Stocks|?page=sectors&sec=bottom~100~stocks.sec&sort=99');
    BC_DoSubMenu(BC_LEFTMENU - 1 , links);
    document.write('<br>');

    BC_DoSubMenuTitle('Sectors Change');
    links = Array('YTD Change|?page=secmoves', 'One Month|?page=secmoves&what=one_month', 'Three Month|?page=secmoves&what=three_month', 'Six Month|?page=secmoves&what=six_month', 'Nine Month|?page=secmoves&what=nine_month', 'One Year|?page=secmoves&what=one_year');
    BC_DoSubMenu(BC_PGHIGH - 1, links);
    document.write('<br>');
  }
  else if (BC_TOPMENU == 6) {
    if (BC_PGHIGH < 100) {
      BC_DoSubMenuTitle(titles[BC_TOPMENU]);
      links = Array('Custom Charts|?page=ccharts', 'Custom Quotes|?page=cquotes', 'MultiQuote Portfolio|?page=portfolio&ftime=true');
      BC_DoSubMenu(BC_LEFTMENU, links);
    }
  }
  else if (BC_TOPMENU == 7) {
    BC_DoSubMenuTitle('Support Pages');
    links = Array('Markets|?page=markets', 'Futures|?page=futures', 'Funds|?page=fundss', 'Signals|?page=signals', 'Sectors|?page=sectorss', 'Custom|?page=custom', 'Learning Center|?page=learning');
    BC_DoSubMenu(BC_LEFTMENU - 1, links);
  }
  else {
    if ((BC_LEFTMENU != 0) || (BC_PGHIGH != 0)) {
      var spos = 0;
      if (BC_LEFTMENU > 100)
        spos = BC_LEFTMENU - 101;
      else
        spos = BC_LEFTMENU - 1;

      BC_DoSubMenuTitle('Technicals');

      if(BC_LEFTMENU > 100) { 
        links = new Array('Chart|?page=chart&sym=' + BC_SYMBOL, 'Quote|?page=quote&sym=' + BC_SYMBOL, 'Technicals|?page=tech&sym=' + BC_SYMBOL, 'Opinion|?page=texpert&sym=' + BC_SYMBOL, 'Snapshot|?page=texsnap&sym=' + BC_SYMBOL, 'Advanced|?page=texadv&sym=' + BC_SYMBOL, 'Performance|?page=perform&sym=' + BC_SYMBOL, 'Projections|?page=procal&sym=' + BC_SYMBOL);
      }
      else {
        links = new Array('Chart|?page=chart&sym=' + BC_SYMBOL, 'Quote|?page=quote&sym=' + BC_SYMBOL, 'Technicals|?page=tech&sym=' + BC_SYMBOL, 'Sectors|?page=sectors&sym=' + BC_SYMBOL, 'Opinion|?page=texpert&sym=' + BC_SYMBOL, 'Snapshot|?page=texsnap&sym=' + BC_SYMBOL, 'Advanced|?page=texadv&sym=' + BC_SYMBOL, 'Performance|?page=perform&sym=' + BC_SYMBOL, 'Projections|?page=procal&sym=' + BC_SYMBOL);
      }
      BC_DoSubMenu(spos, links);
      document.write('<br><br>');

      if (BC_PGHIGH > 100)
        spos = BC_PGHIGH - 101;
      else
        spos = BC_PGHIGH - 1;

      if(BC_LEFTMENU < 100) { 
        BC_DoSubMenuTitle('Fundamentals');
        links = Array('Profile|?page=profile&sym=' + BC_SYMBOL, 'Report History|?page=prhist&sym=' + BC_SYMBOL, 'Detailed Report|?page=prdetails&sym=' + BC_SYMBOL);
        BC_DoSubMenu(spos, links);
      }
    }
  }


  document.write('</td></tr></table></td><td valign=top><br>');
  
  BC_PrintAdTable()
}

function BC_DoSubMenuTitle(text) {
  document.write('<br><table width=156 border=0 cellpadding=2 cellspacing=0 bgcolor=#666699 class=bcMnu1>');
  document.write('<tr height=18><td align=left class=bcNTitle><font color=#555555>' + text + ':</font></td></tr>');
  document.write('</table>');
}

function BC_DoSubMenu(pos, ary) {
  document.write('<table width=156 border=0 cellPadding=2 cellSpacing=0>');
  for (var i = 0; i < ary.length; i++) {
    var tmp = ary[i].split('|');
    var foo = tmp[1].substring(0, 4);
    if (i == pos) {
      if (foo != 'http')
        document.write('<tr bgcolor=#777777 height=22><td width=100% class=bcMnu3>&nbsp;<a href="' + tmp[1] + '" class=bcCP><font color=#ffffff><b>' + tmp[0] + '</b></font></a></td></tr>');
      else
        document.write('<tr bgcolor=#777777 height=22><td onClick="window.open(\'' + tmp[1] + '\', \'_parent\');" width=100% class=bcMnu3>&nbsp;<a href="' + tmp[1] + '" class=bcCP><font color=#ffffff><b>' + tmp[0] + '</b></font></a></td></tr>');
    }
    else {
      if (foo != 'http')
        document.write('<tr height=22><td width=100% class=bcMnu1 bgcolor=#f5fffa onMouseOver="this.className=\'bcMnu2\'; return true" onMouseOut="this.className=\'bcMnu1\'; return true"><b>&rsaquo;</b> <a href="' + tmp[1] + '" class=bcNLink>' + tmp[0] + '</a></td></tr>');
      else {
//        alert(tmp[1]);
        document.write('<tr height=22><td onClick="window.open(\'' + tmp[1] + '\', \'_parent\');" width=100% class=bcMnu1 bgcolor=#f5fffa onMouseover="this.className=\'bcMnu2\'; return true" onMouseOut="this.className=\'bcMnu1\'; return true"><b>&rsaquo;</b> <a href="' + tmp[1] + '" class=bcNLink>' + tmp[0] + '</a></td></tr>');
      }
    }
  }
  document.write('</table>');
}



//var BC_HOSTURL = 'http://imca.investmenthelp.org/resources/stocks.aspx'; // Client URL
//var BC_HOSTURL = 'http://freecharts.webflash.net'; // Client URL
var BC_HOSTURL = 'http://www.freecharts.com/Default.aspx'; // Client URL
var BC_BASEURL = 'http://sites.barchart.com/pl/fcht';

var query_string = (new String(document.location.search)).substring(1);
var mydomain = document.domain.split('.');
var page='';sym='';mode='';small='';temp='';
var pairs=query_string.split('&');
var screenSize=screen.width;
if(screenSize==800) { small = 1; }
else                { small = 0; }

for(var i=0;i<pairs.length;i++) {
  var ary=pairs[i].split('=');
  if(ary[0]=='page')
    page=ary[1];
  else if(ary[0]=='sym')
    sym=ary[1];
  else if (ary[0] == 'view')
    page = ary[1];
  else if (ary[0] == 'action')
    page = ary[1];
  else if (ary[0] == 'fake')
    temp = ary[1];
}

//if ((mydomain[1] == 'webflash') || (mydomain[1] == 'barchart')) {
  if (page == 'ccharts') {
    document.write('<FORM NAME="reform">');
    document.write('<INPUT TYPE="HIDDEN" NAME="mys" VALUE="IBM">');
    document.write('</FORM>');
  }

  document.write('<SCR' + 'IPT LANGUAGE="JavaScript" SRC="');
  if (page == 'quote')          document.write('http://quotes-cust.barchart.com/pl/fcht/quote.htx?' + query_string); 
  else if (page == 'profile')   document.write(BC_BASEURL + '/profile.htx?' + query_string); 
  else if (page == 'texpert')   document.write('http://quotes-cust.barchart.com/pl/fcht/texpert.htx?' + query_string); 
  else if (page == 'texadv')    document.write('http://quotes-cust.barchart.com/pl/fcht/texadv.htx?' + query_string); 
  else if (page == 'texsnap')   document.write('http://quotes-cust.barchart.com/pl/fcht/texsnap.htx?' + query_string); 
  else if (page == 'tech')      document.write('http://quotes-cust.barchart.com/pl/fcht/techrept.htx?' + query_string);
  else if (page == 'perform')   document.write('http://quotes-cust.barchart.com/pl/fcht/performance.htx?' + query_string);
  else if (page == 'procal')    document.write('http://charts2.barchart.com/fchtprocal.htx?' + query_string);
  else if (page == 'chart')     document.write('http://charts2.barchart.com/fchtchart.htx?' + query_string);
  else if ((page == 'portfolio') || (page == 'quotescreen') || (page == 'edit') || (page == 'more') || (page == 'opinions')) {
    document.write(BC_BASEURL + '/portfolio.htx?' + query_string);
  }
  else if (page == 'cquotes')   document.write(BC_BASEURL + '/cquotes.htx?' + query_string); 
  else if (page == 'ccharts')   document.write(BC_BASEURL + '/ichart.htx?' + query_string);
  else if (page == 'newhilo')   document.write(BC_BASEURL + '/newhilo.htx?' + query_string);
  else if (page == 'prhist')    document.write(BC_BASEURL + '/prhistory.htx?' + query_string);
  else if (page == 'prdetails') document.write(BC_BASEURL + '/prdetails.htx?' + query_string);
  else if (page == 'lookup')    document.write(BC_BASEURL + '/lookup.htx?' + query_string);
  else if (page == 'momentum')  document.write(BC_BASEURL + '/momentum.htx?' + query_string);
  else if (page == 'mgfs')      document.write(BC_BASEURL + '/mgfs.htx?' + query_string);
  else if (page == 'first')     document.write(BC_BASEURL + '/portfolio.htx?' + query_string);
  else if (page == 'maint')     document.write(BC_BASEURL + '/portfolio.htx?' + query_string);
  else if (page == 'mktcom')    document.write(BC_BASEURL + '/mktcom.htx?' + query_string);
  else if (page == 'quote2')    document.write(BC_BASEURL + '/dfutpage.htx?' + query_string);
  else if (page == 'quote3')    document.write(BC_BASEURL + '/ifutpage.htx?' + query_string);
  else if (page == 'optqte')    document.write(BC_BASEURL + '/optqte.htx?' + query_string);
  else if (page == 'futexch')   document.write(BC_BASEURL + '/futexch.htx?' + query_string);
  else if (page == 'fxcross')   document.write(BC_BASEURL + '/fxcross.htx?' + query_string); 
  else if (page == 'forex')     document.write(BC_BASEURL + '/forex.htx?' + query_string); 
  else if (page == 'sigtop')    document.write(BC_BASEURL + '/sigtop.htx?' + query_string); 
  else if (page == 'sigbot')    document.write(BC_BASEURL + '/sigbot.htx?' + query_string); 
  else if (page == 'sigstr')    document.write(BC_BASEURL + '/sigstr.htx?' + query_string); 
  else if (page == 'sigdir')    document.write(BC_BASEURL + '/sigdir.htx?' + query_string); 
  else if (page == 'sigupg')    document.write(BC_BASEURL + '/sigupg.htx?' + query_string); 
  else if (page == 'sigdng')    document.write(BC_BASEURL + '/sigdng.htx?' + query_string); 
  else if (page == 'indices')   document.write(BC_BASEURL + '/indices.htx?' + query_string);
  else if (page == 'dow')       document.write(BC_BASEURL + '/dow.htx?' + query_string); 
  else if (page == 'dowcomp')   document.write(BC_BASEURL + '/dowcomp.htx?' + query_string); 
  else if (page == 'dowtrans')  document.write(BC_BASEURL + '/dowtrans.htx?' + query_string); 
  else if (page == 'dowutil')   document.write(BC_BASEURL + '/dowutil.htx?' + query_string); 
  else if (page == 'nasdaq100') document.write(BC_BASEURL + '/nasdaq100.htx?' + query_string); 
  else if (page == 'fe50')      document.write(BC_BASEURL + '/fe50.htx?' + query_string); 
  else if (page == 'sp100')     document.write(BC_BASEURL + '/sp100.htx?' + query_string); 
  else if (page == 'sp400')     document.write(BC_BASEURL + '/sp400.htx?' + query_string); 
  else if (page == 'sp500')     document.write(BC_BASEURL + '/sp500.htx?' + query_string); 
  else if (page == 'mktetfx')   document.write(BC_BASEURL + '/mktetfx.htx?' + query_string); 
  else if (page == 'mktetfs')   document.write(BC_BASEURL + '/mktetfs.htx?' + query_string); 
  else if (page == 'mktetfb')   document.write(BC_BASEURL + '/mktetfb.htx?' + query_string); 
  else if (page == 'mktetfi')   document.write(BC_BASEURL + '/mktetfi.htx?' + query_string); 
  else if (page == 'pricevol')  document.write(BC_BASEURL + '/pricevol.htx?' + query_string); 
  else if (page == 'vadvances') document.write(BC_BASEURL + '/vadvances.htx?' + query_string); 
  else if (page == 'high')      document.write(BC_BASEURL + '/high.htx?' + query_string);
  else if (page == 'low')       document.write(BC_BASEURL + '/low.htx?' + query_string); 
  else if (page == 'nysehigh')  document.write(BC_BASEURL + '/nysehigh.htx?' + query_string); 
  else if (page == 'nasdhigh')  document.write(BC_BASEURL + '/nasdhigh.htx?' + query_string); 
  else if (page == 'amexhigh')  document.write(BC_BASEURL + '/amexhigh.htx?' + query_string); 
  else if (page == 'otchigh')   document.write(BC_BASEURL + '/otchigh.htx?' + query_string); 
  else if (page == 'nyselow')   document.write(BC_BASEURL + '/nyselow.htx?' + query_string); 
  else if (page == 'nasdlow')   document.write(BC_BASEURL + '/nasdlow.htx?' + query_string); 
  else if (page == 'amexlow')   document.write(BC_BASEURL + '/amexlow.htx?' + query_string); 
  else if (page == 'otclow')    document.write(BC_BASEURL + '/otclow.htx?' + query_string); 
  else if (page == 'vleaders')  document.write(BC_BASEURL + '/vleaders.htx?' + query_string); 
  else if (page == 'nysevl')    document.write(BC_BASEURL + '/nysevl.htx?' + query_string); 
  else if (page == 'nasdvl')    document.write(BC_BASEURL + '/nasdvl.htx?' + query_string); 
  else if (page == 'amexvl')    document.write(BC_BASEURL + '/amexvl.htx?' + query_string); 
  else if (page == 'smalvl')    document.write(BC_BASEURL + '/smalvl.htx?' + query_string); 
  else if (page == 'largvl')    document.write(BC_BASEURL + '/largvl.htx?' + query_string); 
  else if (page == 'otcvl')     document.write(BC_BASEURL + '/otcvl.htx?' + query_string); 
  else if (page == 'padvance')  document.write(BC_BASEURL + '/padvance.htx?' + query_string); 
  else if (page == 'nysepa')    document.write(BC_BASEURL + '/nysepa.htx?' + query_string); 
  else if (page == 'nasdpa')    document.write(BC_BASEURL + '/nasdpa.htx?' + query_string); 
  else if (page == 'amexpa')    document.write(BC_BASEURL + '/amexpa.htx?' + query_string); 
  else if (page == 'ext1pa')    document.write(BC_BASEURL + '/ext1pa.htx?' + query_string); 
  else if (page == 'ext2pa')    document.write(BC_BASEURL + '/ext2pa.htx?' + query_string); 
  else if (page == 'ext3pa')    document.write(BC_BASEURL + '/ext3pa.htx?' + query_string); 
  else if (page == 'ext4pa')    document.write(BC_BASEURL + '/ext4pa.htx?' + query_string); 
  else if (page == 'ext5pa')    document.write(BC_BASEURL + '/ext5pa.htx?' + query_string); 
  else if (page == 'otcpa')     document.write(BC_BASEURL + '/otcpa.htx?' + query_string); 
  else if (page == 'pdecline')  document.write(BC_BASEURL + '/pdecline.htx?' + query_string); 
  else if (page == 'nysepd')    document.write(BC_BASEURL + '/nysepd.htx?' + query_string); 
  else if (page == 'nasdpd')    document.write(BC_BASEURL + '/nasdpd.htx?' + query_string); 
  else if (page == 'amexpd')    document.write(BC_BASEURL + '/amexpd.htx?' + query_string); 
  else if (page == 'ext1pd')    document.write(BC_BASEURL + '/ext1pd.htx?' + query_string); 
  else if (page == 'ext2pd')    document.write(BC_BASEURL + '/ext2pd.htx?' + query_string); 
  else if (page == 'ext3pd')    document.write(BC_BASEURL + '/ext3pd.htx?' + query_string); 
  else if (page == 'ext4pd')    document.write(BC_BASEURL + '/ext4pd.htx?' + query_string); 
  else if (page == 'ext5pd')    document.write(BC_BASEURL + '/ext5pd.htx?' + query_string); 
  else if (page == 'otcpd')     document.write(BC_BASEURL + '/otcpd.htx?' + query_string); 
  else if (page == 'cadvance')  document.write(BC_BASEURL + '/cadvance.htx?' + query_string); 
  else if (page == 'nyseca')    document.write(BC_BASEURL + '/nyseca.htx?' + query_string); 
  else if (page == 'nasdca')    document.write(BC_BASEURL + '/nasdca.htx?' + query_string); 
  else if (page == 'amexca')    document.write(BC_BASEURL + '/amexca.htx?' + query_string); 
  else if (page == 'ext1ca')    document.write(BC_BASEURL + '/ext1ca.htx?' + query_string); 
  else if (page == 'ext2ca')    document.write(BC_BASEURL + '/ext2ca.htx?' + query_string); 
  else if (page == 'ext3ca')    document.write(BC_BASEURL + '/ext3ca.htx?' + query_string); 
  else if (page == 'ext4ca')    document.write(BC_BASEURL + '/ext4ca.htx?' + query_string); 
  else if (page == 'ext5ca')    document.write(BC_BASEURL + '/ext5ca.htx?' + query_string); 
  else if (page == 'otcca')     document.write(BC_BASEURL + '/otcca.htx?' + query_string); 
  else if (page == 'cdecline')  document.write(BC_BASEURL + '/cdecline.htx?' + query_string); 
  else if (page == 'nysecd')    document.write(BC_BASEURL + '/nysecd.htx?' + query_string); 
  else if (page == 'nasdcd')    document.write(BC_BASEURL + '/nasdcd.htx?' + query_string); 
  else if (page == 'amexcd')    document.write(BC_BASEURL + '/amexcd.htx?' + query_string); 
  else if (page == 'ext1cd')    document.write(BC_BASEURL + '/ext1cd.htx?' + query_string); 
  else if (page == 'ext2cd')    document.write(BC_BASEURL + '/ext2cd.htx?' + query_string); 
  else if (page == 'ext3cd')    document.write(BC_BASEURL + '/ext3cd.htx?' + query_string); 
  else if (page == 'ext4cd')    document.write(BC_BASEURL + '/ext4cd.htx?' + query_string); 
  else if (page == 'ext5cd')    document.write(BC_BASEURL + '/ext5cd.htx?' + query_string); 
  else if (page == 'otccd')     document.write(BC_BASEURL + '/otccd.htx?' + query_string); 
  else if (page == 'whotupd')   document.write(BC_BASEURL + '/whotupd.htx?' + query_string); 
  else if (page == 'whotupw')   document.write(BC_BASEURL + '/whotupw.htx?' + query_string); 
  else if (page == 'whotupm')   document.write(BC_BASEURL + '/whotupm.htx?' + query_string); 
  else if (page == 'whotupdn')  document.write(BC_BASEURL + '/whotupdn.htx?' + query_string); 
  else if (page == 'whotupwn')  document.write(BC_BASEURL + '/whotupwn.htx?' + query_string); 
  else if (page == 'whotupmn')  document.write(BC_BASEURL + '/whotupmn.htx?' + query_string); 
  else if (page == 'whotupdq')  document.write(BC_BASEURL + '/whotupdq.htx?' + query_string); 
  else if (page == 'whotupwq')  document.write(BC_BASEURL + '/whotupwq.htx?' + query_string); 
  else if (page == 'whotupmq')  document.write(BC_BASEURL + '/whotupmq.htx?' + query_string); 
  else if (page == 'whotupda')  document.write(BC_BASEURL + '/whotupda.htx?' + query_string); 
  else if (page == 'whotupwa')  document.write(BC_BASEURL + '/whotupwa.htx?' + query_string); 
  else if (page == 'whotupma')  document.write(BC_BASEURL + '/whotupma.htx?' + query_string); 
  else if (page == 'whotupdo')  document.write(BC_BASEURL + '/whotupdo.htx?' + query_string); 
  else if (page == 'whotupwo')  document.write(BC_BASEURL + '/whotupwo.htx?' + query_string); 
  else if (page == 'whotupmo')  document.write(BC_BASEURL + '/whotupmo.htx?' + query_string); 
  else if (page == 'whotdnd')   document.write(BC_BASEURL + '/whotdnd.htx?' + query_string); 
  else if (page == 'whotdnw')   document.write(BC_BASEURL + '/whotdnw.htx?' + query_string); 
  else if (page == 'whotdnm')   document.write(BC_BASEURL + '/whotdnm.htx?' + query_string); 
  else if (page == 'whotdndn')  document.write(BC_BASEURL + '/whotdndn.htx?' + query_string); 
  else if (page == 'whotdnwn')  document.write(BC_BASEURL + '/whotdnwn.htx?' + query_string); 
  else if (page == 'whotdnmn')  document.write(BC_BASEURL + '/whotdnmn.htx?' + query_string); 
  else if (page == 'whotdndq')  document.write(BC_BASEURL + '/whotdndq.htx?' + query_string); 
  else if (page == 'whotdnwq')  document.write(BC_BASEURL + '/whotdnwq.htx?' + query_string); 
  else if (page == 'whotdnmq')  document.write(BC_BASEURL + '/whotdnmq.htx?' + query_string); 
  else if (page == 'whotdnda')  document.write(BC_BASEURL + '/whotdnda.htx?' + query_string); 
  else if (page == 'whotdnwa')  document.write(BC_BASEURL + '/whotdnwa.htx?' + query_string); 
  else if (page == 'whotdnma')  document.write(BC_BASEURL + '/whotdnma.htx?' + query_string); 
  else if (page == 'whotdndo')  document.write(BC_BASEURL + '/whotdndo.htx?' + query_string); 
  else if (page == 'whotdnwo')  document.write(BC_BASEURL + '/whotdnwo.htx?' + query_string); 
  else if (page == 'whotdnmo')  document.write(BC_BASEURL + '/whotdnmo.htx?' + query_string); 
  else if (page == 'whotupdx')  document.write(BC_BASEURL + '/whotupdx.htx?' + query_string);
  else if (page == 'whotupwx')  document.write(BC_BASEURL + '/whotupwx.htx?' + query_string);
  else if (page == 'whotupmx')  document.write(BC_BASEURL + '/whotupmx.htx?' + query_string);
  else if (page == 'whotdndx')  document.write(BC_BASEURL + '/whotdndx.htx?' + query_string);
  else if (page == 'whotdnwx')  document.write(BC_BASEURL + '/whotdnwx.htx?' + query_string);
  else if (page == 'whotdnmx')  document.write(BC_BASEURL + '/whotdnmx.htx?' + query_string);
  else if (page == 'fundhigh')  document.write(BC_BASEURL + '/fundhigh.htx?' + query_string); 
  else if (page == 'fundlow')   document.write(BC_BASEURL + '/fundlow.htx?' + query_string); 
  else if (page == 'fundytd')   document.write(BC_BASEURL + '/fundytd.htx?' + query_string); 
  else if (page == 'funds')     document.write(BC_BASEURL + '/funds.htx?' + query_string); 
  else if (page == 'fundc')     document.write(BC_BASEURL + '/fundc.htx?' + query_string); 
  else if (page == 'fundp')     document.write(BC_BASEURL + '/fundp.htx?' + query_string); 
  else if (page == 'fundv')     document.write(BC_BASEURL + '/fundv.htx?' + query_string); 
  else if (page == 'fundw')     document.write(BC_BASEURL + '/fundw.htx?' + query_string); 
  else if (page == 'fundx')     document.write(BC_BASEURL + '/fundx.htx?' + query_string);
  else if (page == 'fundy')     document.write(BC_BASEURL + '/fundy.htx?' + query_string);
  else if (page == 'fundz')     document.write(BC_BASEURL + '/fundz.htx?' + query_string);
  else if (page == 'sectors')   document.write(BC_BASEURL + '/sectors.htx?' + query_string);
  else if (page == 'secmoves')  document.write(BC_BASEURL + '/secmoves.htx?' + query_string);
  else if (page == 'secsym')    document.write(BC_BASEURL + '/secsym.htx?' + query_string); 
  else if (page == 'support')   document.write(BC_BASEURL + '/support/default.htx');
  else if (page == 'screen')    document.write(BC_BASEURL + '/support/support.htx?what=screen');
  else if (page == 'learning')  document.write(BC_BASEURL + '/support/learning.htx?' + query_string);
  else if (page == 'orders')    document.write(BC_BASEURL + '/support/orders.htx?' + query_string);
  else if (page == 'glossary')  document.write(BC_BASEURL + '/support/glossary.htx?' + query_string);
  else if (page == 'futs101')   document.write(BC_BASEURL + '/support/futs101.htx?' + query_string);
  else if (page == 'opts101')   document.write(BC_BASEURL + '/support/opts101.htx?' + query_string);
  else if (page == 'faq')       document.write(BC_BASEURL + '/support/faq.htx');
  else if (page == 'custom')    document.write(BC_BASEURL + '/support/custom.htx?' + query_string);
  else if (page == 'futures')   document.write(BC_BASEURL + '/support/futures.htx');
  else if (page == 'signals')   document.write(BC_BASEURL + '/support/signals.htx');
  else if (page == 'sectorss')  document.write(BC_BASEURL + '/support/sectors.htx');
  else if (page == 'fundss')    document.write(BC_BASEURL + '/support/funds.htx');
  else if (page == 'markets')   document.write(BC_BASEURL + '/support/markets.htx');
  else if (page == 'agreement') document.write(BC_BASEURL + '/agreement.htx');
  else if (page == 'ddfplus')   document.write(BC_BASEURL + '/ddfplus.htx');
  else
    document.write(BC_BASEURL + '/default.htx?' + query_string);

  document.write('"></SCR' + 'IPT>\n');
 

//}
//else {
//  document.write("<CENTER><p>&nbsp;<p>YOU ARE NOT AUTHORIZED TO VIEW INFORMATION PROVIDED BY <a href=\"http://www.barchart.com\">Barchart.com</a></CENTER>\n");
//}
