var progrev='5.40',maxsyms=70,ddata,standwidthout=830,smallchartwidth=350,mrnd=Math.random,mr=Math.round,ml=Math.log,ma=Math.abs,mf=Math.floor,smchart2,seltime,clprice=[],opprice=[],indexesdef="COMPQX,QQQQ,DJ-30,SP-500,DJ-20,DJ-15,DIA,SPY,RUT-X,IWM,HUI--X,XAU,GLD,XOI,OIH,XLE,SOX--X,SMH,NDX--X,SML--X,DRG--X,RLX--X,RTH,XMI,MID--X,MDY,OEX,CMR--X,XLY,XLB,NBI--X,IBB,XLK,XCI,GSO--X,HMO--X,BANK-X,XLF,XLU,IYR,DXY0,IRX--X,FVX--X,TYX--X,TNX--X,VXN--X,VIX--X,EFA,EEM,EWC,EWG,EWH,EWJ,EWS,EWT,EWW,EWZ",dow30def="AA,AIG,AXP,BA,C,CAT,CSCO,DD,DIS,GE,HD,HON,HPQ,IBM,INTC,JNJ,JPM,KO,MCD,MMM,MO,MRK,MSFT,PFE,PG,T,UTX,VZ,WMT,XOM",qqqdef="AAPL,AMAT,AMGN,AMZN,BRCM,CELG,DELL,EBAY,ERTS,GENZ,GILD,GOOG,IACI,INTC,JDSU,KLAC,LLTC,MRVL,MSFT,MXIM,NTAP,ORCL,PALM,PAYX,QCOM,RIMM,SBUX,SHLD,SPLS,SYMC,XLNX,YHOO",sectorsdef="*AGR,*AIR,*BIO,*BML,*BNK,*BRK,*CAS,*CHM,*CMP,*COL,*CON,*DEF,*DRG,*FRT,*GLD,*HLT,*HOM,*HOS,*INS,*INT,*LDR,*MAC,*MOR,*NWK,*OIL,*OLE,*QQQ,*REF,*RES,*RET,*RLR,*SEM,*SHP,*SLV,*SME,*SOF,*SOL,*STG,*STL,*TIT,*UTL",sectornames="Agriculture,Airline,Biotech,Base Metal,Bank,Brokerage,Casino,Chemical,Computer,Coal,Consumer,Defense/Aerospace,Drug,Freight Carrier,Gold,Healthcare,Homebuilder,Hospital,Insurance,Internet,Leader,Machinery,Mortgage Invest,Network,Oil Driller,Oil/Gas Explorer,Top QQQQ,Oil Refiner,REIT Residtl,Retail,Railroad,Semiconductor,Shipping,Silver,Semiequipment,Software,Solar,Storage,Steel/Iron,Title Insurance,Utility",whtf='<font color="#ffffff">',defg=['','','','','','','','','','','','','','','','','',''], defg2=['','','','','','','','','','','','','','','','','',''],defgstrs=['1da', '2da',  '3da',  '5da', '10da','3da','1mo','2mo','3mo','6mo','ytd','1yr','2yr','3yr','4yr','5yr','10yr','all'],defgtime=['5min','15min','15min','15min','1hr','1hr','1da','1da','1da','2da','1da','1da','1wk','1wk','1mo','1mo','1mo','1mo'],mt=' 15-Min',ht=' Hourly',dt=' Daily',dt2=' Two Day', wt=' Weekly',wt2=' Monthly', defgdesc=['1-Day 5 Min','2-Day'+mt,'3-Day'+mt,'5-Day'+mt,'10-Day'+ht,'3-Day'+mt,'1-Month'+dt,'2-Month'+dt,'3-Month'+dt,'6-Month'+dt2,'YTD'+dt,'1-Year'+dt,'2-Year'+wt,'3-Year'+wt,'4-Year'+wt2,'5-Year'+wt2,'10-Year'+wt2,'All Time'+wt2], gtype=4, gtime=2,defgdesc2=['1d','2d','3d','5d','10d','3d','1m','2m','3m','6m','Yd','1y','2y','3y','4y','5y','10y','All'],conf_names =['Fixed Long','Fixed Breakout','Fixed Short','Fixed Breakdown','User Adj 1','User Adj 2','User Adj 3','User Adj 4','Fixed Barview'],/* pos 2 =0 always */ conf_defaults = ["110011111111100000111110000000","110011111111100010101100000000","110011111111100000000001111100","110011111111100001000001011000","110011111111100000111110000000","110011111111100000111110000000","110011111111100000111110000000","110011111111100000111110000000","110110101110000000000000000011"],preset_conf="000000000011111111000000000111111112222223333333322222233333333", /* non adjustable set this to the new defaults for prescreens */activeconfig=0,tmpz='', tmps='', tmps2='', templist, found, tempnum, indexes=0, indxmult=0, indxintra=1, outstr="", outstr2="", outstr3="", i, j, z, tempstr, winstr, tmpstr, stickchart=0, dayma1on=0, dayma2on=0, reslevelon=1, regchart=0, chartcstr='0,0,0,1,0', shurl="www.stockconsultant.com", shurlc="www.stockconsultant.com/", hurl="http://www.stockconsultant.com",hurls="http://www.stockconsultant.com",portfstr,stkwatchdatain="", current, text="", tempsplit="", smallstr="", dataz="", datestr="", timestr="",day3c,winsize='resizable=1,toolbar=1,location=1,menubar=1,status=1,scrollbars=1,',prewinsize='resizable=1,toolbar=0,location=0,menubar=1,status=1,scrollbars=1,left=30,top=30,screenX=30,screenY=30,',flashwinsize='resizable=1,toolbar=0,location=0,menubar=0,status=0,scrollbars=yes,left=0,top=0,screenX=0,screenY=0,',smallwinstr='location=0,toolbar=0,status=0,width=405,height=420,scrollbars=1,resizable=1,menubar=0',smallsp='<font size="-6"><br></font>',listwin,movaddbut='',mylinksurl='http://www.ameritrade.com)Ameritrade(http://www.comcast.net)Comcast Email(http://www.weather.com)Local Weather(http://www.google.com)Google Search(http://tvlistings2.zap2it.com)Online TV Guide(',dayname = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],daynamesh = ['Su','M','Tu','W','Th','F','Sa'],daynamemed = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],monthname = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],rannum = dumnum, rannum2=mr(mrnd(1)*10000),oper='Outperform',uper='Underperform',rateddescr = ['Neutral','Neutral','Neutral','Very Mild '+oper,'Mild '+oper,'Mild '+oper,oper,oper,'Strong '+oper,'Very Strong '+oper,'Very Strong '+oper,'Neutral','Neutral','Neutral','Very Mild '+uper,'Mild '+uper,'Mild '+uper,uper,uper,'Strong '+uper,'Very Strong '+uper,'Very Strong '+uper],ntl="Neutral", obt="Overbought", ovs="Oversold", nlp=ntl+"Plus", nlm=ntl+"Minus",ebt="Extreme "+obt, evs="Extreme "+ovs, eqodd=' odds equally favor long and short trades.',slfv=' odds slightly favor short trades.', slfvl=' odds slightly favor long trades.', sfv=' odds favor short trades.', sfvl=' odds favor long trades.', sfv2=' odds definitely favor short trades.', sfvl2=' odds definitely favor long trades.',boughtsdescip = [ntl,ntl,ntl,ntl,nlp,nlp,'Near Overbought',obt,obt,ebt,ebt,ntl,ntl,ntl,ntl,nlm,nlm,'Near Oversold',ovs,ovs,evs,evs],boughtdescip = [eqodd,eqodd,eqodd,eqodd,slfv,slfv,slfv,sfv,sfv,sfv2,sfv2,eqodd,eqodd,eqodd,eqodd,slfvl,slfvl,slfvl,sfvl,sfvl,sfvl2,sfvl2],mrly='mild rally', trly='typical rally', srly='strong rally', mpul='mild pullback', tpul='typical pullback', spul='strong pullback', exrly='extreme rally', expul='extreme pullback',rsts=', rally may start to slow.', erps=', expect rally to pause/stop.', psts=', pullback may start to slow.', epps=', expect pullback to pause/stop.',rallypullsdescip = ['flat','flat','flat',mrly,mrly,'rally','rally',trly,srly,exrly,exrly,'flat','flat','flat',mpul,mpul,'pullback','pullback',tpul,spul,expul,expul],rallypulldescip = ['.','.','.','.','.','.','.',rsts,rsts,erps,erps,'.','.','.','.','.','.','.',psts,psts,epps,epps],stalemate='stalemate between bulls and bears', monin=' 1 day moneyflow', flowdescr = [' '+ntl,' bullish',' bearish'],nsf='Not significant', mfsdescip = [nsf,nsf,nsf,nsf,'Mild','Average','Good','Strong','Strong','Extreme','Extreme'],mac='Mild Accum', gac='Good Accum', sac='Strong Accum', eac='Extreme Accum', mdi='Mild Distr', gdi='Good Distr', sdi='Strong Distr', edi='Extreme Distr',mbu='Mild bullish', mbr='Mild bearish', sbu='Strong bullish', sbr='Strong bearish', ebu='Extreme bullish', ebr='Extreme bearish',monthtrendsdescrip = ['Sideways/flat','Sideways/flat','Mild Up','Up','Up','Up','Up','Strong Up','Strong Up','Excessive Up','Excessive Up','Sideways/flat','Sideways/flat','Mild Down','Down','Down','Down','Down','Strong Down','Strong Down','Excessive Down','Excessive Down'],tpbt=', can occur at the top or bottom range of a stock.', stsw=', may start to turn sideways.';var nsts15=', not sustainable, occurs only 15% of the time, expect trend to turn sideways', nsts10=', not sustainable, occurs only 10% of the time, expect trend to turn sideways', nsts5=', not sustainable, occurs only 5% of the time, expect trend to turn sideways',monthtrenddescrip = [tpbt,tpbt,'.','.','.','.','.',stsw,nsts15+' or lower.',nsts10+' or lower.',nsts5+' or lower.',tpbt,tpbt,'.','.','.','.','.',stsw,nsts15+' or higher.',nsts10+' or higher.',nsts5+' or higher.'],cba='CONFIRMED</b> breakout <font color="#0000EE">above ', pba='POSSIBLE</b> breakout <font color="#0000EE">above ', cbb='CONFIRMED</b> breakdown <font color="#EE0000">below ', pbb='POSSIBLE</b> breakdown <font color="#EE0000">below ', nresa=', no resistance in area just above.', nsupb=', no support in area just below.',rallypottxt=["Excellent","Excellent","Excellent","Good","Good","Good","Fair","Fair","Poor","Poor","Poor"],tradequaltxt=["Poor","Poor","Poor","Poor","Poor","Poor","Fair","Good","V. Good","Excellent","Excellent"],trenddescrip = ['Sideways trend.','Downtrend turned sideways,<br>possible bottom.','Unsustainable uptrend,<br>may turn sideways.','Uptrend turned sideways,<br>may continue or pullback.','','','Uptrend with recent pullback.','Sideways trend<br>near lower support.','Mild uptrend.','Sideways trend<br>near upper resistance.','Uptrend.','Unsustainable downtrend,<br>may turn sideways.','Downtrend.'],trendstatnum = [0,10,-10,-5,10,5,5,5,5,-5,10,10,-10],psbl = 'possibly bullish', psbr = 'possibly bearish', trenddescripsum = [ntl,ntl,ntl,ntl,ntl,psbl,psbl,psbl,psbl,psbl,'bullish',ntl,ntl,ntl,ntl,ntl,psbr,psbr,psbr,psbr,psbr,'bearish'],pricesdescrip = ['flat','flat','flat','up','up','up','up','strong up','strong up','excessive up','excessive up','flat','flat','flat','down','down','down','down','strong down','strong down','excessive down','excessive down'],pricesdescripmore = ['.','.','.','.','.','.','.','.',', may pause/stop.',', expect to pause/stop.',', expect to pause/stop.','.','.','.','.','.','.','.','.',', may pause/stop.',', expect to pause/stop.',', expect to pause/stop.'],tr1='0 - 9.9%', tr2='10 - 19.9%', tr3='20 - 29.9%', tr4='30% +', ppr='Poor', fpr='Fair', gpr='Good', epr='Excellent',typrally = [tr1,tr2,tr3,tr4,tr4,tr4,tr4,tr4,tr4,tr4,tr4,tr1,tr1,tr1,tr1,tr1,tr1,tr1,tr1,tr1,tr1,tr1],profitdescip = [ppr,fpr,gpr,epr,epr,epr,epr,epr,epr,epr,epr,ppr,ppr,ppr,ppr,ppr,ppr,ppr,ppr,ppr,ppr,ppr],ares="at resistance", bres="just below resistance", bressup="just below resistance or support", aressup2="just above support or resistance",aressup="at resistance or support", pressup="a possible resistance or support forming",pres="a possible resistance is forming", psup="a possible support is forming", asup="at support", bsup="just above support", jbsup="just below support", jares="just above resistance",rescomdescrip=[aressup,bressup,aressup2,aressup,aressup,bres,jbsup,jares,bres,bres,ares,pressup,pressup,psup,pres,pressup,bsup,bsup,bsup,bsup,bsup,asup,'not at resistance or support'],distr=' 3 day distribution', accum=' 3 day accumulation', chartvdescrip = [0,5,-5,10,-10,0];var chartdescrip = [ntl,ntl,ntl,ntl,ntl,mbu,mbu,mbu,mbu,mbu,sbu,ntl,ntl,ntl,ntl,ntl,mbr,mbr,mbr,mbr,mbr,sbr],flowtype = ['neutral','accum','distrib'],tempstr2,multichart,searchtooldate,num1,num2,num3,tdstr,listcolor,liststr,linedatag,tvol,tpricer, ypricer, nummon=0, montype=[], monpos=[], nochart=1, l="", n="", pricestr="",exchange="",compname="",sectstr="",curvold,avgvold,savedvol,breakoutres=-1,breakdwnres=-1,tempdata,atsupres="",tempchart,savedchangestr,outputwin,prescreenwin,activelist,cursclist,curstocklist, editablestocklist, outputwin2,breakspu,breakspd,curdatadate, globtimerat, indmid='</td></tr><tr><td colspan=3></td><td valign=middle>', endind='</td></tr></table>', secstr="",num,isl=0,isonchartlink=-1,scrolled=0,scrolledt=0,chartid, sc_affil,nextprevstr="", ilnk='src="../img/',ilnk2='../img/',tabend='</tr></table></td></tr></table>',nextprevline,tabstart='<table cellpadding=0 cellspacing=0 bgcolor=#000000><tr><td><table cellpadding=1 cellspacing=1><tr>',resdiv='<div style="width:'+(standwidthout-2)+'px;background:#3871BC;border:1px solid black;">',comdiv='<div style="width:'+(standwidthout-2)+'px;background:#ffffff;border-right:1px solid black;border-left:1px solid black;">',baseloss,tradeamt,editviewhelp='This link will allow one to view or edit a list other than the current working list, or to check if you already have a stock in a list.',restab=resdiv+'<table width=100% cellspacing=0 cellpadding=1><tr><td ',smt='www.smartmoney.com/eqsnaps/index.cfm?story=',mrn='quicktake.morningstar.com/Stock/',rbig='&compidx=aaaaa~0&lf=268435456&ma=0&uf=0&lf2=0&lf3=0&type=4&style=330&size=2&mocktick=1',cboe='www.cboe.com/MktQuote/DelayedQuotes.asp?TICKER=', cbs='cbs.marketwatch.com/tools/quotes/', bizy='biz.yahoo.com/',bigc='bigcharts.marketwatch.com/quickchart/quickchart.asp?show=false&symb=',tquall,tquals,pg,daybstr2='',daybstr='',buttonst='style="background:#C4DF9B;font: normal 13px verdana,arial,helvetica,sans-serif;cursor:pointer;"',stylestr='style="font: normal 13px arial,helvetica,sans-serif;"',stylestrb='style="font: normal 14px arial,helvetica,sans-serif;"',stylestr2='style="font: normal 11px arial,helvetica,sans-serif;"',stylestr3='style="font: normal 12px arial,helvetica,sans-serif;"',stylestr4='style="font: normal 11px arial,helvetica,sans-serif;"',dayinc = [],buttonst2='style="padding:1px;background:#C4DF9B;font: normal 12px verdana,arial,helvetica,sans-serif;cursor:pointer;"',iso2='<a class="sp2"onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:ow(',iso3=' onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:ow(',smover='<a style="cursor:pointer;"onmouseover="isl=1;"onmouseout="isl=0;"',fntv='<font face="verdana"',dsv=' style="position:absolute;top:',showvol,showrb,pfcharts,stcharts,pfnumstocks,stnumstocks,numstocks,invt='www.investopedia.com/articles/technical/',schaf='www.schaeffersresearch.com/streetools/indicators/equity_',nbz='</a> &nbsp; ',nbzs='</a>&nbsp; ',linktabstart1='<div style="position:relative;top:0px;left:3px;border:1px solid #3871BC;">',linktabstart2='<div style="position:relative;top:7px;left:3px;border:1px solid #3871BC;">',mystocks2=['List:|0','Temp|0','Held|0','Watch|0','Leader Stocks|1','Sector|1','Indexes|0','Misc 1|0','Misc 2|0','Misc 3|0','Top 30 QQQQ Stocks|1','Dow Jones 30 Stocks|1','Hot Long Watch|0','Hot Short Watch|0'],gotlzlist=0,sc666lz='',daymaval_a=[],rmaval_a=[],rmadata_a=[],maval_a=[],volval_a=[],voldata_a=[],wlc_sym=[],wlc_recalc=[],volstat_a=[],rmastat_a=[],tonsmstat_a=[],tonvolstat_a=[],gdivnametsm=[],gdivnamepdata=[],gdivnamebsm=[],divsp20='<div style="position:relative;top:0px;left:0px;height:20px;width:'+(standwidthout-2)+'px;background:#ffffff;border-right:1px solid black;border-left:1px solid black;"><!-- --></div>';var win = ['','dynamic.nasdaq.com/dynamic/afterhourma.stm','biz.yahoo.com/opt/stat1.html','www.cnbc.com/id/15837275?q=szz',mrn+'financials.asp?Country=USA&Symbol=szz','realtime.bigcharts.com/chart.asp?symb=szz&time=5dy&freq=15mi&compidx=aaaaa~0&lf=268435456&ma=0&uf=0&lf2=0&lf3=0&type=4&style=330&size=3&mocktick=1','www.stockconsultant.com/forums/netboard.cgi?fid=124&cid=123&fct=gotoforum','money.cnn.com',bizy+'mu/update.html','news.moneycentral.msn.com/ticker/rcnews.asp?Symbol=szz','moneycentral.msn.com/investor/invsub/ownership/ownership.asp?Symbol=szz', /*10*/'www.nasdaq.com/aspxcontent/ExtendedTradingCharts.aspx?page=afterhours&mkttype=PRE&&symbol=szz&selected=slzz','research.scottrade.com/public/stocks/news/news.asp?symbol=szz','finance.yahoo.com/q/h?s=slzz','moneycentral.msn.com/investor/invsub/analyst/recomnd.asp?symbol=szz','research.scottrade.com/public/stocks/fundamentals/fundamentals.asp?symbol=szz&go.x=0&go.y=0&go=Go','www.stockconsultant.com/getupdown.html?szz', /* 16 */'finance.yahoo.com/q/ae?s=slzz','ragingbull.quote.com/mboard/boards.cgi?board=szz','messages.finance.yahoo.com/forumview?extbn=szz','www.siliconinvestor.com/searchresults.aspx?where=Subject&SearchStr=szz', /*20*/'clearstation.etrade.com/cgi-bin/postlist?Topic=slzz','www.nasdaq.com/aspx/nasdaqlastsale.aspx?symbol=szz&selected=slzz','','www.streetinsider.com/stock_lookup_news.php?q=slzz&type=si','','','', '',  '','www.msnbc.msn.com/id/3032222/',     /*30*/'','www.companyboardroom.com/company.asp?ticker=szz&client=cb','finance.yahoo.com/q?s=szz&d=f8','money.cnn.com/markets/morning_call/','finance.yahoo.com/marketupdate/storystocks','money.cnn.com/quote/lookup/index.html',bigc+'slzz&sid=0&o_symb=slzz&freq=6&time=2&type=4&size=3',mrn+'industrysnapshot.asp?Country=USA&Symbol=szz','studio-5.financialcontent.com/streetinsider?Page=SEC&Ticker=szz',invt+'02/121702.asp',     /*40*/'realtime.bigcharts.com/chart.asp?symb=szz&time=1dy&freq=5mi'+rbig,'','moneycentral.msn.com/investor/research/wizards/srwtarget.asp?Symbol=szz','www.stockconsultant.com/bats.html?szz','www.bloomberg.com/markets/stocks/futures.html', /* 45 */'finance.yahoo.com/q/it?s=slzz','www.nasdaq.com/aspxcontent/ExtendedTradingCharts.aspx?page=afterhours&mkttype=after&&symbol=szz&selected=slzz','finance.yahoo.com/q?s=szz&d=e','www.reuters.com/finance/stocks/companyNews?symbol=szz','www.mozilla.com/en-US/firefox/all.html', /* 50 */'quicktake.morningstar.com/StockNet/quarterly.aspx?Country=USA&Symbol=szz','moneycentral.msn.com/investor/invsub/analyst/earnest.asp?Page=EarningsEstimates&Symbol=szz',bigc+'slzz&sid=0&o_symb=slzz&freq=7&time=3&type=4&size=3',bigc+'slzz&sid=0&o_symb=slzz&freq=7&time=18&type=4&size=3','www.briefing.com/Silver/Calendars/EconomicCalendar.htm',   /* 55 */'', 'mam.econoday.com/byweek.asp?cust=mam',bizy+'research/earncal/today.html',bizy+'z/extreme.html','money.cnn.com/quote/snapshot/snapshot.html?symbtype=0&symb=szz', /* 60 */'finance.yahoo.com/mru', /* upgrades */'www.briefing.com/Silver/Calendars/SplitsCalendar.htm','dynamic.nasdaq.com/asp/pmi.asp','money.cnn.com/markets/afterhours/',shurl+'/consultnow/'+multin+'.html',   /* 65 */'finance.yahoo.com/q/ks?s=szz','dynamic.nasdaq.com/dynamic/premarketma.stm','moneycentral.msn.com/investor/invsub/advisor/advisor.asp?Symbol=szz','dynamic.nasdaq.com/dynamic/nasdaq100_indicator_after.stm','finance.yahoo.com/marketupdate/inplay', /* 70 */'online.barrons.com/article/preview.html','www.nasdaq.com/earnings/earningspershare.asp?mode=&page=&symbol=szz&selected=slzz&FormType=&kind=&Leap=&mkttype=&sel=eps&userinput=','',shurl+'/birdcast.cgi?symbol=szz','www.nasdaq.com/asp/quotes_full.asp?mode=&kind=shortint&symbol=szz&FormType=&mkttype=&pathname=&page=short&selected=slzz', /* 75 */'www.shortsqueeze.com/index.php?symbol=szz', /* 76 */'finance.yahoo.com/mrd', /* downgrades */bizy+'ic/fzz/szz.html','www.marketwatch.com/tools/quotes/ratings.asp?symb=szz', 'quote.morningstar.com/insider-trading/Insider-Activity.aspx?t=szz', /* 80 */'www.msnbc.msn.com/id/3033806/','www.financialsense.com/Market/wrapup.htm','www.reuters.com/finance/stocks/estimates?symbol=szz','realtimetraders.com/CorpInfo/StockBuybacks.aspx?Node=B8','finance.yahoo.com/mri', /* 85 */'','www.nasdaq.com/aspxcontent/ExtendedTradingTrades.aspx?mode=frameset&kind=&symbol=szz&FormType=&mkttype=pre&pathname=&page=afterhours&selected=slzz','www.nasdaq.com/aspxcontent/ExtendedTradingTrades.aspx?mode=frameset&kind=&symbol=szz&FormType=&mkttype=after&pathname=&page=afterhours&selected=slzz','news.moneycentral.msn.com/ticker/sigdev.asp?Symbol=szz','finance.yahoo.com/q/is?s=szz', /* 90 */'quicktake.morningstar.com/Stock/quarterly.asp?Country=USA&Symbol=szz&stocktab=finance','moneycentral.msn.com/investor/invsub/analyst/earnest.asp?Page=EarningsGrowthRates&Symbol=szz','finance.yahoo.com/q/co?s=szz',smt+'competition&symbol=szz',schaf+'volpcratio.aspx?ticker_symbol=szz', /* 95 */schaf+'oi_config.aspx?ticker_symbol=szz','finance.yahoo.com/q/h?t=date&s=',schaf+'oipcratio.aspx?ticker_symbol=szz',  /* 98 */'www.optionistics.com/f/inset.pl?vol=0&stk=1&isopt=0&symbol=szz&pc=1&numdays=90',smt+'ratings&symbol=szz','moneycentral.msn.com/investor/invsub/analyst/earnest.asp?Page=EarningsSurprise&Symbol=szz','','moneycentral.msn.com/investor/research/profile.asp?Symbol=szz', /* 103 */'www.marketwatch.com/News/Story/Story.aspx?column=After+Hours&siteid=mktw','www.marketwatch.com/News/Story/Story.aspx?column=Indications&siteid=mktw',  /* 105 */'research.scottrade.com/public/stocks/earnings/earnings.asp?symbol=szz','www.ny.frb.org/research/national_economy/nationalindicators.html','money.cnn.com/news/specials/earnings',  /* 108 */'www.financialsense.com/stormwatch/main.html','',   /* 110 */'finance.yahoo.com/q/is?s=szz&annual','','finance.yahoo.com/q/os?s=szz', /* 113 */invt+'03/010603.asp','www.candlesticker.com/Bullish.asp',  /* 115 */'www.candlesticker.com/Bearish.asp','www.candlesticker.com/Neutral.asp','www.federalreserve.gov/FOMC/BeigeBook/2010/','www.secform4.com/insider/showhistory.php?cik=szz', 'money.cnn.com/data/commodities/', /* 120 */'biz.yahoo.com/rr/?s=szz&d=p%2Frr','','www.thelion.com/bin/forum.cgi?par=&sf=slzz','www.investorvillage.com/findboard.asp?symbol=slzz&pt=m&topicsOnly=1','',  /* 125 */'quotes.nasdaq.com/quote.dll?page=charting&mode=basics&intraday=on&timeframe=3m&charttype=line&splits=off&movingaverage=none&lowerstudy=volume&comparison=off&index=&drilldown=off&symbol=szz','','','www.marketwatch.com/Search/?doctype=-1&scid=0&siteid=mktw&dist=morepulse','finance.yahoo.com/intlindices?e=asia', /* 130 */'finance.yahoo.com/q/hp?s=szz',invt+'03/012203.asp',   /* 132 */invt+'03/020503.asp','www.nasdaq.com/aspx/nlstrades.aspx?symbol=szz&selected=slzz', shurlc+'downsiderecalcsample.html', /* 135 */shurlc+'upsiderecalcsample.html', '','','realtime.bigcharts.com/chart.asp?symb=szz&time=3dy&freq=15mi'+rbig,''];var myIm1=new Image(3,3),myIm2=new Image(6,3),myIm3=new Image(3,3),myIm4=new Image(1,1),myIm5=new Image(1,1),myIm6=new Image(4,4),myIm7=new Image(1,1),myIm8=new Image(4,1);myIm1.src=ilnk2+"blktrans.gif";myIm2.src=ilnk2+"rline.gif";myIm3.src=ilnk2+"gline.gif";myIm4.src=ilnk2+"bluel.gif";myIm5.src=ilnk2+"greyl.gif";myIm6.src=ilnk2+"transbar.gif";myIm7.src=ilnk2+"transgrey.gif";myIm8.src=ilnk2+"lgreyld.gif";var data,cprice,tempcp,typmove,exmove,ldir,templocal,shortprice,coverprice,rescomment,optionable=optionforce,ma50,ma200,boughtidx,monthtrend,reswidth,justinres,justoutres,ldir2,target1_long,target1_short,target2_long,target2_short,profit2_short,profit1_long,profit2_long,lossl,profit1_short,losss,plratiol,plratios,moneyflow,flowdir,numresinwayl,resinwaystrenl,notoptimal,resarray,resprice=[],numres,resistance,resstrength=[],restype=[],prevclose,mfpercent,dwnsidebreak,dwnbrkamount,upsidebreak,upbrkamount,confirmdwnbrk,confirmupbrk,rchange,intertrend,mfpercent3d,moneyflow3d,flowdir3d,advbulldays,bullind,bullindtxt,numresinways,resinwaystrens,numadj,probbull,probbear,conbull,conbear,isnotbearish,isnotbullish,upandnotbearish,downandnotbullish,bullish1daymonflow,bearish1daymonflow,resexp,supbelow=[],resabove=[],supnums,resnums,pchange,psign,ftcolor,ppercent,daystr,monthstr,yearstr,listofstocks="",ctxt,lnstart, pixspan, strs,startprice,endprice,trendnum,breaktxt,restxt,rbar1const,rbar2const,longavg,chartinc=-1,sectorportf,prevselectedlist=0,bcstr='<font color="#0000ee"><I>Confirmation - </I></font>',brcstr='<font color="#ee0000"><I>Confirmation - </I></font>',bpstr='<font color="#0000ee"><I>Probability - </I></font>',brpstr='<font color="#ee0000"><I>Probability - </I></font>',shtstr=', short term (1-6 wks)',bugraph,brgraph,specnum,wrotesignup,curjuldate,sct2={"COMPQX":"NASDAQ,1000,1","DRG--X":"DRG,0,1","DJ-15":"DJUA,0,1","DJ-20":"DJTA,0,1","DJ-30":"DJIA,1,1","RUT-X":"RUT,0,1","SP-500":"SP500,1000,1","SOX--X":"SOX,0,1","IWM":"IWM,1,1","NDX--X":"NDX,1000,1","BANK-X":"IXF,0,1","NF":"NF,0,1","OEX":"OEX,1000,1","XOI":"XOI,0,1","XCI":"XCI,0,1","DXY0":"DXY,0,1","VXN--X":"VXN,0,1","VIX--X":"VIX,0,1","MID--X":"MID,0,1","SML--X":"SML,0,1","HMO--X":"HMO,0,1","TYX--X":"TYX,0,1","TNX--X":"TNX,0,1","XAU":"XAU,0,1","HUI--X":"HUI,0,1","CMR--X":"CMR,0,1","XMI":"XMI,0,1","GSO--X":"GSO,0,1","NBI--X":"NBI,0,1","RLX--X":"RLX,0,1","IRX--X":"IRX,0,1","FVX--X":"FVX,0,1"};function activelistnum(){  if (portf=="1") return(portfactivel);  else return(activelist[0]);}function getdata(sv){   var os,tempsym=insymbol;  if (schart==2) os=secstks; else os=editablestocklist;   if (sectorportf){    tempsym=orgsymbol.split(","); tempsym=tempsym[0];  }  if ((isinlist(tempsym,os)>=0)&&((portf!="1")||(sectorportf))){    os=os.split(",");      var i,f=0,ol=os.length,sortit=mystocks2[activelistnum()].split("|");    if (sortit[1]==1) os.sort();    for(i=0;i<ol;i++)       if (os[i]==tempsym) {f=i; break;}    if (sv=="NEXT") {f++; if (f>=ol) f=0;}    else {f--; if (f<0) f=ol-1;}    sv=os[f]; if (sv=="") sv=tempsym;    consult(sv,0,0,0,0);  } else if ((portf=="1")&&(stotal>numstocks)){      if (sv=="NEXT") selectnext(); else selectprev();  }  }function RemBS(num){  var ts=document.consultinput.symbol.value;  if ((ts.indexOf("\\")>=0)||(ts.indexOf("|")>=0)||(ts.indexOf("\'")>=0)||(ts.indexOf("\"")>=0)){    document.consultinput.symbol.value=ts.replace(/\\/g,"").replace(/|/g,"").replace(/\'/g,"").replace(/\"/g,"");  }  scrolld(num);}function doKey(e) {   var w=0;  if((document.getElementById)&&(!document.all))     w=e.which;  else     if(document.all) //IE      w=(document.layers)?e.which:event.keyCode;    else if(document.layers) //Navigator 4           w=(document.layers)?e.which:event.keyCode;         if (((portf!="1")||(sectorportf))&&((w==93)||(w==125))) getdata("NEXT");   if (((portf!="1")||(sectorportf))&&((w==91)||(w==123))) getdata("PREV");  if ((w==34)||(w==39)){    if (qchart=="1") scrolld(3);    else if ((sample==1)&&(regoutput==1)) self.setTimeout("RemBS(4);",300);    else if (regoutput==1) self.setTimeout("RemBS(5);",300);  }  if ((w==92)||(w==124)){    if (qchart=="1") scrolld(0);    else if ((sample==1)&&(regoutput==1)) self.setTimeout("RemBS(1);",300);      else if (regoutput==1) self.setTimeout("RemBS(2);",300);    else if ((portf=="1")||(searcht=="1")){      if (chartinc<(symlen-1)){        chartinc++;        window.location.href='#chart'+chartinc;      }else {chartinc=0;window.location.href='#chart'+chartinc;}    }  }}var tempx,tempy;function getMouseXY(e){	if (document.all) { // grab the x-y pos.s if browser is IE    tempx = event.clientX + document.body.scrollLeft;    tempy = event.clientY + document.body.scrollTop;  }else{  // grab the x-y pos.s if browser is NS    tempx = e.pageX;    tempy = e.pageY;  }}function right(e){  if (isl==1){    var wa="Just Click on the link, opens a new window!";    if((bN=='Netscape')&&(e.which == 3||e.which == 2)){      window.alert(wa);return false;    } else         if((bN!='Netscape')&&((event.button==2)||(event.button==3))){          window.alert(wa);return false;        }    return true;  }}function updateglobs(num,value,refresh){   var i,ts,ts2=activeconfig;  if (num==0) ts=value;  else ts=activelist[0];  for (i=0;i<conf_names.length;i++){     if((i>=4)&&(i<=7)){       if (conf_names[i]=="") conf_names[i]=" ";       ts2+=","+conf_names[i]+","+conf_defaults[i];    }     else ts2+=", , ";  }  for (i=1;i<activelist.length;i++){    if (i==3) ts+='~'+ts2;     else       if (i!=num) ts+='~'+activelist[i];       else ts+='~'+value;  }  getsetCookie(0,'sc666list',ts);  if (refresh==1) savecookies_refresh();}function scrolld(num){  if (((regoutput==1)||(qchart=="1"))&&(insymbol!="")){    if ((scrolledt==1)||(scrolled==1)){      scrolledt=0; scrolled=0; window.location.href='#ttop';    }    else {       if (num>=3){        if (qchart!="1"){ scrolledt=1; window.location.href='#upsidet';}      }       else { scrolled=1; window.location.href='#lchart';}    }  }}function initdatecookie(num){  deleteCookie('sc666date',1);   totpages=num;    datecookie=datemilli+','+totpages;  setCookieHome('sc666date',datecookie);  datecookie=datecookie.split(",");}var timeleft=0;function checkpages(){   curdate = new Date(); datemilli = curdate.getTime(); datecookie=getsetCookie(1,'sc666date','');  if (checkifpres(datecookie)==0) initdatecookie(1);  else {     datecookie=datecookie.split(",");     if ((datecookie.length<2)||(checkifpres(datecookie[0])==0)) initdatecookie(1);     totpages=datecookie[1];    timeleft=trimnumfxd((86400000-(datemilli-datecookie[0]))/1000.00/60.0/60.0);    if (((datemilli-datecookie[0])>86400000)||((datemilli-datecookie[0])<(-2))) initdatecookie(1);    else if ((totpages<=pagelimit)&&(specnum<0)){            totpages++; datecookie=datecookie[0]+','+totpages;           setCookieHome('sc666date',datecookie);            datecookie=datecookie.split(",");         }  }}function setbarview(num){  var i,ns="";  for (i=0;i<activelist[1].length;i++){    if (i==num) ns+="8";     else ns+=activelist[1].charAt(i);  }  activelist[1]=ns;}function checkifpres(ts){  if ((typeof(ts)!='string')||(typeof(ts)=='undefined')||     (ts==null)||(ts=='null')||(ts=='undefined')) return(0);   return(1); }function callsummary(){  dbak=0; qchart="0";  portf="1"; searcht="0";  if (sample==0) changelist(0,0);   else changelist(4,0); }function callleaderbarv(){  dbak=0; qchart="0";  portf="1";  searcht="0";   setbarview(4);  changelist(4,0); }function callsectorbarv(){  dbak=0; setbarview(5); portf="1"; qchart="0"; searcht="0";   updateglobs(0,activelist[0],0);   portfactivel=5;  getglobalvars();  consult("~"+sectorsdef,0,0,0,0);}function callqc(){  dbak=0; qchart="1";  portf="0"; searcht="0";   if (sample==0) changelist(activelist[0],0);   else changelist(4,0);}function callconsultant(){  dbak=0;   if ((searcht=="1")||(portf=="1")) insymbol="";   qchart="0"; portf="0"; searcht="0";   changelist(activelist[0],1);}function callsearch(){  dbak=0; qchart="0";  portf="0"; searcht="1";   changelist(activelist[0],0); }function editlistwin(num){  var acfg,ts=hurls+'/consultnow/',ts2;  if (num==1){    acfg=getid('cfg').selectedIndex;    if ((acfg<4)||(acfg>7)){      window.alert("Only user output styles 5,6,7, and 8 can be edited.");       return;    }    ts+='configoptions6h.html';   } else if (num==0){    acfg=getid('list').selectedIndex;    ts+='editlist4m.html?num='+acfg;  } else{    if ((num==2)||(num==3))      acfg=getid('list3').selectedIndex;    else       acfg=getid('list6').selectedIndex;    if (acfg==0){       window.alert("Select a stock list to the left then click on View or Edit");      return;    }    if ((num==2)||(num==4)) ts2="v"; else ts2="";        ts+='editlist4m.html?'+ts2+'num='+acfg;  }  window.open(ts,'listwin2','toolbar=0,status=0,width=480,height=450,scrollbars=1,resizable=1,menubar=0,left=40,top=40,screenX=40,screenY=40').focus();}function openrecalcwin(num,nz){  var ts=hurls+'/consultnow/recalc4.html?',datatosend,wlc_data;  if (nz>=0) wlc_data=wlc_recalc[nz].split("~");  if (num==1){    if (nz==-1) datatosend=insymbol+','+cprice+','+target1_long+','+target2_long+','+shortprice+','+upsidebreak+','+upbrkamount+',0';    else datatosend=wlc_data[0]+',0';  }else{    if (nz==-1) datatosend=insymbol+','+cprice+','+target1_short+','+target2_short+','+coverprice+','+dwnsidebreak+','+dwnbrkamount+',1';    else datatosend=wlc_data[1]+',1';    }  ts+=datatosend;  window.open(ts,'recalcwin','toolbar=0,status=0,width=310,height=700,scrollbars=0,resizable=1,menubar=0,left=40,top=40,screenX=40,screenY=40').focus();}function refreshwin(){  window.location.reload(false);}function checklen(ts){  ts=clearillchars(1,ts);  if ((ts.length>7)||(ts.length==0)||(ts==" ")){    document.consultinput.symbol.focus();    window.alert("Error in stock symbol, invalid characters or length!");    return(0);  }   else return(1);}function clearillchars(num,ts){ var rstr="",j,cc,f;  for (j=0;j<ts.length;j++){    cc=ts.charCodeAt(j);    if (num==1){      if ( ((cc>=48)&&(cc<=57))||((cc>=65)&&(cc<=90))            ||((cc>=97)&&(cc<=122))||(cc==42)||(cc==45)||(cc==46))        rstr+=ts.charAt(j);    } else if (num==2){        if ( (cc==33)              ||((cc>=35)&&(cc<=38))              ||((cc>=43)&&(cc<=58))               ||(cc==61)              ||((cc>=63)&&(cc<=93))               ||((cc>=95)&&(cc<=126)) )          rstr+=ts.charAt(j);      } else if (num==3){          if ( ((cc>=45)&&(cc<=57))               ||((cc>=65)&&(cc<=90))                ||((cc>=97)&&(cc<=122))               ||(cc==43)||(cc==32)||(cc==95) )            rstr+=ts.charAt(j);        }  }  return(rstr);}function callforum(){  var dz=getsetCookie(1,'loginck8753',''),uz="",ts,lgd;  if ((checkifpres(dz))&&(dz.length>3)&&(dz.indexOf("~")>=0)){    lgd=dz.split("~");    if (lgd.length==3){      ts=lgd[1].split("@");      if (ts.length==2)        uz="?userz="+escape(ts[0]+lgd[2].charAt(0)+lgd[2].charAt(lgd[2].length-1));    }  }  window.open("http://"+shurlc+"forums/netboard.cgi"+uz,'parentWin',winsize+',left=20,top=20,screenX=20,screenY=20').focus();}function openflash(name){  if (window.confirm("You understand and agree that this movie is for educational purposes only and before any trading one should ask advice from a registered investment advisor. You also completely agree to the disclaimer terms on the page http://www.stockconsultant.com/disclaimerpage.html , Note: If you are using a popup stopper please hold down the bypass key before clicking ok."))    window.open('http://'+shurlc+'help/flash/'+name,'flashwin',flashwinsize).focus();}function trimnum(num){  if (ma(num)<100.0) return(mr(num*100.0)/100);   else     if (ma(num)<1000.0) return(mr(num*10.0)/10);     else return(mr(num)); }function trimnumfxd(num){  if (ma(num)<100) return(mr(num*10.0)/10);  else return(mr(num)); }function volscale(num){  var ms;  if (indexes==1) num*=indxmult;  if (num==0) ms="";  else if (num<1.0E3) ms="k";     else if (num<1.0E6){           ms="mil"; num*=1.0E-3;         }           else{           ms="bil"; num*=1.0E-6;         }   return(trimnum(num)+ms); }function savecookies_refresh(){   var http,un=getsetCookie(1,'username',''),lh=window.location.href,rn=mr(mrnd(1)*1000);  if (lh.indexOf("#")>=0){    lh=lh.split("#");lh=lh[0];  }  if (lh.indexOf('user=')>0){    lh=lh.split('&'); lh=lh[0];  }  if ((sample==0)&&(checkifpres(un))&&(un.length>2)&&(un.indexOf('@')>0)){    cleanCookie(1);    un=un.split(",");    document.body.style.cursor = 'wait';    if (window.XMLHttpRequest) http = new XMLHttpRequest();    else http = new ActiveXObject("Microsoft.XMLHTTP");  /*    if (msbrowser) http = new ActiveXObject("Microsoft.XMLHTTP");    else http = new XMLHttpRequest(); */    http.open("GET","save_cookies.cgi?"+un[0]+"~none", false);    http.send(null);    document.body.style.cursor = 'auto';    if (http.responseText=="1") {http.close; window.location.href=lh+'&'+rn;}    else window.location.href='http://www.stockconsultant.com/login.html?loginerror';  }  else window.location.reload(false);}function strplus(tt){var tz=tt; return(tz.replace(/ /g,"+"));}function FindDay(d,m,y){  if ((m==1)||(m==2)){    m+=10; y--;  } else m-=2;  return (d + mf(2.6*m - 0.2) - 38 + y + mf(y/4) + mf(19/4)) % 7;}var donotremovestocks=0;function consult(tsym,noportf,usegtime,forcesym,savecookies){  getglobalvars();  var dbk=dbak, lwop=0, rn=mr(mrnd(1)*100000),tempsym;  if ((noportf=="1")||(noportf=="2")||(noportf=="3")) lwop=1;   if ((searcht=="1")&&(noportf==3)) dbk=0;  if ((noportf==0)&&(portf==1)&&(forcesym==0)) sfrom=0;   tsym=tsym.toUpperCase().replace(/ /g,"");   if (tsym.charAt(0)=="~") tsym=tsym.substr(1);  if ((portf=="1")&&(tsym=="**NONE")){    if ((portfactivel==5)&&(forcesym==2)) tsym=orgsymbol;    else tsym=editablestocklist;  }  else if ((searcht=="1")&&(tsym=="**NONE")) tsym=totsearchstr;  else {    if (tsym=="**NONE") tsym="";    if ((activelistnum()==5)&&(schart>=1)&&(isinlist(tsym,secstks)>=0)){      if ((schart==1)&&(portf!="1")&&(qchart!="1")) tsym+='_'+insymbol;      else{        if (schart==2) tsym+='_'+insymbol2;        else if (sectorportf){          tempsym=orgsymbol.split(",");          tsym+='_'+tempsym[0];        }        else tsym+='_'+orgsymbol;      }     }else if ((portf=="1")&&(activelistnum()==5)&&(insymbol.charAt(0)=="*"))      activelist[0]=5;  }  var tx=hurls+"/consultnow/"+progname+".cgi?"; // remove rn for a while see if it updates  if ((wop>0)||(lwop>0)) tx+="&wop=1";   if (dbk>0) tx+="&dbak="+dbk;  if ((qchart=="1")&&(noportf!=2)) tx+="&qchart=1";  if (portf=="1") tx+="&pal="+portfactivel;  if ((portf=="1")&&(noportf!=1)){    tx+="&portf=1&srng="+sfrom+","+numstocks+"&charts="+charts;    globremnum+=curremoved;    if ((donotremovestocks==0)&&(globremnum>0)&&((stoo-sfrom-globremnum)>0)) tx+="&removed="+globremnum;  }  if ((searcht=="1")&&(noportf!=3)) tx+="&extot="+extot+"&searcht=1&srng="+sfrom+","+numstocks+"&charts="+charts;  if (usegtime==2){     var t2=getid('time2').selectedIndex;    tx+="&gtime="+t2;    activelist[5]=t2+1;     savecookies=1;   }     if (csite!="") tx+="&csite="+csite;   if (forcesym==2) tx+="&fselect=sscroll";  if (tsym!="") tx+="&symbol="+tsym;  if ((casualu==2)&&((savecookies==1)||(forcetcas==1))) tx+="&tcas=1";  if ((adtrader==1)&&(csite=="")) tx+="&sn="+sernum+"&url="+tradeurl+"&site="+strplus(tradesite);  updateglobs(0,activelist[0],0);  if ((noportf==1)||(noportf==2)||(noportf==3))    window.open(tx,'DetailWindow',winsize+',left=5,top=5,screenX=5,screenY=5').focus();  else {    if (savecookies==1){      var un=getsetCookie(1,'username',''),http;      if ((sample==0)&&(checkifpres(un))&&(un.length>2)&&(un.indexOf('@')>0)){        cleanCookie(1);        un=un.split(",");         document.body.style.cursor = 'wait';        if (window.XMLHttpRequest) http = new XMLHttpRequest();        else http = new ActiveXObject("Microsoft.XMLHTTP");         /*if (msbrowser) http = new ActiveXObject("Microsoft.XMLHTTP");        else http = new XMLHttpRequest();*/        http.open("GET","save_cookies.cgi?"+un[0]+"~none", false);        http.send(null);        document.body.style.cursor = 'auto';        if (http.responseText=="1") {http.close; window.location.href=tx;}        else window.location.href='http://www.stockconsultant.com/login.html?loginerror';             }      else window.location.href=tx;    }    else window.location.href=tx;  }  }function mylinkproc(){  var myl=getid('mylinks'),num=myl.selectedIndex;  if (num==0)     window.alert('Please first select a link from the menu to the left, then click on Open');  else{     num--;    var tm=mylinksurl.split("("); tm=tm[num].split(")");     if ((tm[0].substr(0,7)!="http://")&&(tm[0].substr(0,8)!="https://"))       tm[0]='http://'+tm[0];     if (num>=2) num='ml';     window.open(tm[0],'parentWin'+num,winsize+',left=30,top=30,screenX=30,screenY=30').focus();    myl.selectedIndex=0;    myl.blur();  }}function ow(ptype,name,num){  var ws=win[name], dn=mr(mrnd(1)*100000),fone,insym,insymlow;  if (ptype==-1) insym=insymbol;  else insym=wlc_sym[ptype];  insymlow=insym.toLowerCase();  fone=insymlow.substring(0,1);  if (ws.indexOf("fzz")>=0){    ws=ws.split("fzz"); ws=ws[0]+fone+ws[1];  }  if (ws.indexOf("szz")>=0){    ws=ws.split("szz"); ws=ws[0]+insym+ws[1];  }  if (ws.indexOf("slzz")>=0){    ws=ws.split("slzz"); ws=ws[0]+insymlow+ws[1];  }  if (name==65)    ws+='?'+escape(smchart2+'#'+compname+'#'+exchange);  if (name==97){    jtoc(curjuldate-dayinc[num]);    ws=ws.split("date");     ws=ws[0]+yearglb+'-'+monthglb+'-'+dayglb+ws[1]+insym;  }  if ((name!=16)&&(name!=20)&&(name!=97)&&(name!=104)&&(name!=105)&&(ws.indexOf('#')<=0)||(name==65)){    if (num>0){      if (ws.indexOf('?')>0) ws+='&'+dn;      else ws+='?'+dn;    }  }  window.open('http://'+ws,'parentWin',winsize+',left=20,top=20,screenX=20,screenY=20').focus();}function procmc(strz,comp,exch){  compname=comp;exchange=exch;  if(sct2[strz]){    indexes=1;    var tn=sct2[strz].split(',');    smchart2=tn[0];    indxmult=tn[1];    indxintra=tn[2];  }   else{    smchart2=strz;    indexes=0;  }    ow(-1,65,0);}function isuserlist(){  var al=activelistnum();  if (((al>=1)&&(al<=3))||((al>=7)&&(al<=9))||(al==12)||(al==13)) return(true);   else return(false);}function adjustfreepages(){  if (sample==1){    totpages-=2; if (totpages<1) totpages=1;  }}function prescreen(){   adjustfreepages();  window.open(hurls+'/consultnow/'+prescreenedn+'.cgi','prescreen',prewinsize).focus();}function stockstowatch(){  adjustfreepages();  window.open(hurls+'/consultnow/stockstowatch.htm?'+mr(mrnd(1)*100000),'prescreen',prewinsize).focus();}    l3=[];      for (j=0;j<pg;j++) if (!(l3[j]=dkA[tempz[1].charAt(j)])) l3[j]=tempz[1].charAt(j);      data=l3.join("")function zipit(n,v,t){  var j,k,l3=[],pg=v.length;  for (j=0;j<pg;j++){    for (k=n;k>=2;k--)      if (l3[j]=t[v.substr(j,k)]){        j=j+k-1;        break;      }    if (k==1) l3[j]=v.charAt(j);  }  return(l3.join(""));}function unzipit(v,t){  return(v.multiReplace(t));}function getlistCookie(num){  var v,re;  re=new RegExp("sc666lz=([^;]+)");  if (wop==1) v=re.exec(opener.document.cookie);  else v=re.exec(document.cookie);  gotlzlist=1;   if (v!=null){    sc666lz=(unescape(v[1])).split("+");    v=sc666lz[num];  }else{    sc666lz='+++++++++++++'.split("+");     return("");  }   return(unzipit(v,{"a":",A","b":",B","c":",C","d":",D","e":",E","f":",F","g":",G","h":",H","i":",I","j":",J","k":",K","l":",L","m":",M","n":",N","o":",O","p":",P","q":",Q","r":",R","s":",S","t":",T","u":",U","v":",V","w":",W","x":",X","y":",Y","z":",Z"}));}function getsetCookie(get,name,v){  var t1,t2,tr,ns2,ns,i,j,cs1,cs2,ts,re;  if (get){    if (wop==1) re = opener.document.cookie.match ( '(^|;) ?' + name + '=([^;]*)(;|$)' );    else re = document.cookie.match ( '(^|;) ?' + name + '=([^;]*)(;|$)' );    if (re) v=unescape(re[2]);    else v=null;  }  if (v!=null){    if (name=='zc666links'){       if (get) v=v.replace(/\*/g," ").replace(/\^/g,"=");      else v=v.replace(/ /g,"*").replace(/\/\/\//g,"").replace(/\=/g,"^");    }    else if (name=='sc666list'){      if (get){        t1="~"; t2=",";        v=v.replace(/\*/g,"~").replace(/\+/g," ").replace(/\//g,",");      }else{        t1="*"; t2="/";        v=v.replace(/~/g,"*").replace(/ /g,"+").replace(/,/g,"/");      }      cs1=v.split(t1);       cs2=cs1[3].split(t2);      for (i=2;i<cs2.length;i=i+2)        if (get)          cs2[i]=unzipit(cs2[i],{"a":"0000000000","b":"000000000","c":"00000000","d":"0000000","e":"000000","f":"00000","g":"0000","h":"000","i":"00","k":"1111111111","l":"111111111","m":"11111111","n":"1111111","o":"111111","p":"11111","q":"1111","r":"111","s":"11","t":"101","u":"11011","v":"110","w":"011","x":"1010","y":"10","z":"01"});        else          cs2[i]=zipit(10,cs2[i],{"0000000000":"a","000000000":"b","00000000":"c","0000000":"d","000000":"e","00000":"f","0000":"g","000":"h","00":"i","1111111111":"k","111111111":"l","11111111":"m","1111111":"n","111111":"o","11111":"p","1111":"q","111":"r","11":"s","101":"t","11011":"u","110":"v","011":"w","1010":"x","10":"y","01":"z"});      cs1[3]=cs2.join(t2);      v=cs1.join(t1);    }    else       if ((name=="sc666fullpre")||(name=="sc666savedsearch")){        if (get){          t1="~";          v=v.replace(/\*/g,"~").replace(/\+/g," ").replace(/\//g,",").replace(/\./g,"!");          tr={"A":"0000000000","B":"000000000","C":"00000000","D":"0000000","E":"000000","F":"00000","G":"0000","H":"000","I":"00","J":"!0!!0!","K":"!0!","L":"!0","M":"0!","N":",,","O":",0","P":",1","Q":",2","R":",3","S":",4","T":",5","U":",6","V":",7","W":",8","X":",9","Y":"0,","Z":"1,","j":"2,","k":"3,","l":"4,","m":"5,","n":"6,","o":"7,","p":"8,","q":"9,","r":"00000000000","s":"000000000000","t":"0000000000000"};        }else{          t1="*";          v=v.replace(/~/g,"*").replace(/ /g,"+").replace(/,/g,"/").replace(/!/g,".");          tr={"0000000000":"A","000000000":"B","00000000":"C","0000000":"D","000000":"E","00000":"F","0000":"G","000":"H","00":"I",".0..0.":"J",".0.":"K",".0":"L","0.":"M","//":"N","/0":"O","/1":"P","/2":"Q","/3":"R","/4":"S","/5":"T","/6":"U","/7":"V","/8":"W","/9":"X","0/":"Y","1/":"Z","2/":"j","3/":"k","4/":"l","5/":"m","6/":"n","7/":"o","8/":"p","9/":"q","00000000000":"r","000000000000":"s","0000000000000":"t"};        }        if (name=="sc666fullpre"){          ns2="";          cs1=v.split(t1);           for (i=1;i<cs1.length;i++)            if (cs1[i].indexOf(":")>=0){              cs2=cs1[i].split(":");              if (get)                ns2+=t1+cs2[0]+":"+unzipit(cs2[1],tr);              else                ns2+=t1+cs2[0]+":"+zipit(13,cs2[1],tr);            } else ns2+=t1;           v=ns2;        } else           if (get) v=unzipit(v,tr);           else v=zipit(13,v,tr);      }    if (get) return(v);    else{      ts=name+"="+escape(v)+"; expires=";      if (name=='username') ts+=threedays.toGMTString()+";";      else ts+=never.toGMTString()+";";      if (wop==1) opener.document.cookie=ts;      else document.cookie=ts;    }  } else return("");}function setlistCookie(v,num){  var ts;  sc666lz[num]=v;  var ns=zipit(2,sc666lz.join("+"),{",A":"a",",B":"b",",C":"c",",D":"d",",E":"e",",F":"f",",G":"g",",H":"h",",I":"i",",J":"j",",K":"k",",L":"l",",M":"m",",N":"n",",O":"o",",P":"p",",Q":"q",",R":"r",",S":"s",",T":"t",",U":"u",",V":"v",",W":"w",",X":"x",",Y":"y",",Z":"z"});  ts="sc666lz="+escape(ns)+"; expires="+never.toGMTString()+";";  if (wop==1) opener.document.cookie=ts;  else document.cookie=ts;  sc666lz=ns.split("+");  gotlzlist=1;}function deleteCookie(n,h){  var t="",ts; if (h) t=" path=/;";  ts=n+"= ; expires=Thu, 01-Jan-70 00:00:01 GMT;"+t;  if (wop==1) opener.document.cookie=ts;  else document.cookie=ts;}function setCookieHome(n,v){  var c = new Date(),ts;  c.setTime(c.getTime()+15.552E9);  ts=n+"="+escape(v)+"; expires="+c.toGMTString()+"; path=/;";  if (wop==1) opener.document.cookie=ts;  document.cookie=ts;}function getglobalvars(){  var mlen,csl,esl,clstr='1~0~0~0~0~0~0~',allen=8,al3len=19,al7len=14,mclen=5,newmclen=9,ctstrlen=5,i,z,ts,tsz,ac,redo;  if ( (activelist=getsetCookie(1,'sc666list','').split("~")).length!=allen){    getsetCookie(0,'sc666list',clstr);    activelist=clstr.split("~");  }  if (activelist[0]=='undefined') activelist[0]=1;  if ((ts=activelist[3].split(",")).length!=al3len){    ts='';    activelist[0]=1;  }else{    z=0;     activeconfig=ts[0];    for (i=1;i<ts.length;i=i+2){      if ((z>=4)&&(z<=7)){        conf_names[z]=ts[i];        conf_defaults[z]=ts[i+1];      }      z++;    }  }  if (activelist[0]==0) activelist[0]=1;  if ((sample==1)&&(qchart==1)) activelist[0]=4;  multichart=activelist[6].split(",");  redo=0;  if (multichart.length==newmclen){    activelist[6]+=",10000";    redo=1;  } else if (multichart.length==mclen){    activelist[6]+=",2,10000,10000,3.3,10000";    redo=1;  } else if (multichart.length<newmclen){    activelist[6]="1,3,4,5,13,2,10000,10000,3.3,10000";    redo=1;  }  if (redo==1) multichart=activelist[6].split(",");  baseloss=1.0*multichart[8];  tradeamt=1.0*multichart[9];  if (portf=="1") i=6; else i=7;  mlen=multichart[i].length;  showrb=multichart[i].charAt(mlen-1);  showvol=multichart[i].charAt(mlen-2);  mlen=multichart[6].length;  if (multichart[6].charAt(mlen-3)=='0') pfcharts=1; else pfcharts=0;  pfnumstocks=parseInt(multichart[6].substr(0,mlen-3));  mlen=multichart[7].length;  if (multichart[7].charAt(mlen-3)=='0') stcharts=1; else stcharts=0;  stnumstocks=parseInt(multichart[7].substr(0,mlen-3));  if (portf=="1"){ numstocks=pfnumstocks;charts=pfcharts;}  else if (searcht=="1"){numstocks=stnumstocks;charts=stcharts;}  if ((tsz=activelist[7].split(",")).length==al7len){    for (i=1;i<al7len;i++)      if ((i<=3)||((i>=7)&&(i<=9))||(i==12)||(i==13)) mystocks2[i]=tsz[i];  }  if ((activelist[1]=="0")||(activelist[1]=="1")){    activelist[1]="";    for (i=0;i<=41;i++) activelist[1]+="0";  }  if (username!=""){    activelist[4]=casualu;    updateglobs(4,casualu,0);  }  casualu=activelist[4];  if (sample==1) casualu=0;   if (casualu==2) pagelimit=cas2pagelimit;  if (activelist[5]>0) gtime=activelist[5]-1;  else activelist[5]=gtime+1;  csl=""; esl="";  ac=activelistnum();  if (isuserlist()){     var dataz=getlistCookie(ac);     if ((dataz!="")&&(dataz!=" ")) csl=dataz.split(",");    if (sc666lz.length<10){      sc666lz='+++++++++++++'.split("+");      setlistcookie("",0);    }  }  else if (ac==4) csl=leadersdef.split(",");    else if (ac==5) csl=sectorsdef.split(",");       else if (ac==6) csl=indexesdef.split(",");        else if (ac==10) csl=qqqdef.split(",");          else if (ac==11) csl=dow30def.split(",");  var sortit=mystocks2[ac].split("|");  if (typeof(csl)!="string"){    if (sortit[1]==1) csl.sort();    esl=csl.join(",");  }  curstocklist=csl; editablestocklist=esl;  if ((chartid=activelist[2].split(",")).length!=ctstrlen){    updateglobs(2,chartcstr,0);    chartid=chartcstr.split(",");  }  stickchart=chartid[0];  dayma1on=chartid[1];  dayma2on=chartid[2];  reslevelon=chartid[3];  regchart=chartid[4];  if (dayma1on==1) dayma1on=20;  if (dayma2on==1) dayma2on=50;}function isinlist(s,ds){  if (ds!=""){    var i,dataz=ds.split(",");    for (i=0;i<dataz.length;i++)      if (s==dataz[i]) return(i);  }   return(-1);}function callconsult(stk){  if ((portf=="1")||(searcht=="1")||(stk=="")) consult("**NONE",0,0,0,0);   else consult(stk,0,0,0,0);}function changelist(n,n2){   if (portf==1){     if ((n!=0)&&((getselected(0,0)+getselected(1,0))!="")&&(!window.confirm("Stocks still selected, Continue anyway?"))){      getid('list').selectedIndex=prevselectedlist;      donotremovestocks=0;      return;    }    if (sample==1) {n=4;n2=1;}    portfactivel=n;  }  else{   if (wop==1){     opener.updateglobs(0,n,0);     opener.getglobalvars();   }   else{     updateglobs(0,n,0);     getglobalvars();   }  }  if ((portf!="1")&&(qchart!="1")&&(searcht!="1")&&(n2!=1))    {}  else{    if (wop==1) opener.getglobalvars();    else getglobalvars();    if ((portf!="1")&&(searcht!="1")&&((n==4)||(n==6)||(n==11)||(n==10))){      var lds;      if (n==4) lds=leadersdef.split(",");         else if (n==6) lds=indexesdef.split(",");            else if (n==11) lds=dow30def.split(",");             else if (n==10) lds=qqqdef.split(",");       if (n!=6) lds.sort();      insymbol=lds[0];    }  }  if (casualu==2) forcetcas=1;  if (insymbol!="") callconsult(insymbol);   else callconsult("");}function procselist(){  var n=cvnum(getid("list").selectedIndex);  if (portf=="1"){    getactiveconfig();     donotremovestocks=1;  }  if ((sample==1)&&((portf=="1")||(qchart=="1"))) changelist(4,0);  else changelist(n,0);}function setmylink(num,url,name){  listwin=window.open('','listwin',smallwinstr); listwin.document.open();listwin.document.clear();  listwin.document.write('<HTML><head><TITLE>Set My Link</TITLE><link rel="stylesheet" type="text/css" href="http://www.stockconsultant.com/all4.css"></head><BODY BGCOLOR="#F9F0DF"><form style="margin:0px" name="winform" ACTION="" METHOD="get">'+  '<div style="padding:6px"><br><b>Enter a new URL :</b><br><br>&nbsp;&nbsp;<input class="kbd" type=text size=45 name="newurl" value="'+url+'">'+  '<br><br><b>Enter the website name (20 chars max) :</b><br><br>&nbsp;&nbsp;<input class="kbd" type=text maxlength=20 size=25 name="newname" value="'+name+'">'+  '<br><br><INPUT '+buttonst+' TYPE="button" NAME="button" VALUE="SET" onClick="javascript:opener.changemylinkpost('+num+',this.form.newurl.value,this.form.newname.value);javascript:window.close();"> &nbsp; &nbsp; <INPUT '+buttonst+' TYPE="button" NAME="button" VALUE="CANCEL" onClick="javascript:window.close()"></form></div></BODY></HTML>');  listwin.focus();  listwin.document.close();}function changemylinkpre(){  var myl=getid('mylinks'), num=myl.selectedIndex,i,urlo,url;  if (num==0) window.alert('Please first select a link from the menu to the left, then click on Edit');  else{     num--;    urlo=mylinksurl.split("(");    url=urlo[num].split(")");    setmylink(num,url[0],url[1]);  }  myl.selectedIndex=0;  myl.blur();}function changemylinkpost(num,turl,tlk){  var myl=getid('mylinks'),i,urlo=mylinksurl.split("("),url=urlo[num].split(")"),changed=0;  turl=clearillchars(2,turl);  if (url[0]!=turl){    url[0]=turl;    changed=1;  }  tlk=clearillchars(3,tlk);  if(tlk.length>20) tlk=tlk.substr(0,20);  if (url[1]!=tlk){    url[1]=tlk;    changed=1;  }  if (changed==1){    urlo[num]=url[0]+")"+url[1];    mylinksurl=urlo.join("(");    getsetCookie(0,'zc666links',mylinksurl);    updateglobs(0,activelist[0],1);   }  myl.selectedIndex=0;  myl.blur();}function dodatestuff(l0,l1,num,smsize){  var fdy=0;  if (l0.length>6){    daystr=mr(l0.substr(6,2));    monthstr=mr(l0.substr(4,2));    yearstr=mr(l0.substr(0,4));    if (yearstr>1999) fdy=yearstr-1928;    else fdy=yearstr-1900;  }  else{    daystr=mr(l0.substr(4,2));    monthstr=mr(l0.substr(2,2));    fdy=mr(l0.substr(0,2));    yearstr="20"+fdy;  }  if (smsize==1){    yearstr-=2000;    if (yearstr<10) yearstr='0'+yearstr;    datestr=daynamemed[FindDay(daystr, monthstr, fdy)];  } else     datestr=dayname[FindDay(daystr, monthstr, fdy)];  datestr+=' '+daystr+' '+monthname[monthstr-1]+' '+yearstr;  var strz=l1.split(":"),tz="pm",hz=parseFloat(strz[0]),mz=parseFloat(strz[1])-1;  if (mz<0){    mz+=60; hz--;  }   if (hz<12) tz="am";  else    if (hz>12) hz-=12;  if ((mz>=0)&&(mz<=9)) mz="0"+mz;  if (((hz>=6)&&(hz<12)&&(tz=="pm")) || ((hz>=0)&&(hz<8) && (tz=="am"))         || (daystr=="Saturday") || (daystr=="Sunday"))     timestr="close";  else     timestr=hz+":"+mz+" "+tz+" ET";  if (num==0) return(datestr+', '+timestr);}function getselected(remove,alertnone){  var remlist="",ts;  if (remove==1) ts='removed';  else ts='selected';  for (i=0;i<symlen;i++){    if ((remove==0)&&(selectedstock[i]==1))      remlist+=symbols[i]+',';    if ((remove==1)&&(removedstock[i]==1))      remlist+=symbols[i]+',';        }  if (remlist==""){    if (alertnone==1) window.alert('No stocks '+ts+'.');    return("");  } else     return(remlist.substr(0,remlist.length-1)); }function writeadded(addedlist){  var addarray=addedlist.split(","),i,j,stillselected;  for (i=0;i<addarray.length;i++)    for(j=0;j<symlen;j++)      if (addarray[i]==symbols[j]){        selectstock(j,1,0);        if (charts==1) getid("added"+j).innerHTML="Added";        break;      }  getid('list4').selectedIndex=0;  getid('list5').selectedIndex=0;  stillselected=getselected(0,0);  if (stillselected!=""){      showaddremstocks(0,"showaddstockst","addstockst");     showaddremstocks(0,"showaddstocksb","addstocksb");   }else{    if ((portf=="1")&&(isuserlist())){       getid('moveaddt').selectedIndex=0;       getid('moveaddb').selectedIndex=0;    }    getid('addstockst').innerHTML='<b>[none]</b>';    getid('addstocksb').innerHTML='<b>[none]</b>';  }  checkflash();}var globremnum=0;function removeselected(movestr,tomove){  var remlist,esl,tl,i,j,sortit=mystocks2[activelistnum()].split("|");  editablestocklist=getlistCookie(activelistnum());  tl=editablestocklist.split(",");  if (sortit[1]==1) tl.sort();  if (tomove>=1) remlist=movestr;  else remlist=getselected(0,1);  if (remlist=="") return;  if ((tomove==0)&&(!window.confirm("Remove "+remlist+" from ["+sortit[0]+"] list?"))) return;  remlist=remlist.split(",");  if ((tomove==0)&&(portf==1))    globremnum=remlist.length;  esl="";  for (i=0;i<remlist.length;i++)    for (j=0;j<tl.length;j++){      if (remlist[i]==tl[j]){        tl[j]="";        break;      }    }  i=0;  for (j=0;j<tl.length;j++){    if (tl[j]!="") esl+=tl[j]+',';    else i=j;  }  if (esl!="") esl=esl.substr(0,esl.length-1);  setlistCookie(esl,activelistnum());  editablestocklist=esl;  if (tomove>=1){    if (i<(tl.length-1)) insymbol=tl[i+1];    else if (tl.length>=2) insymbol=tl[0];         else insymbol="";    if (tomove==2){      if (insymbol=="") consult("**NONE",0,0,0,1);       else consult(insymbol,0,0,0,1);      return;    } else return;  }  consult("**NONE",0,0,2,1);}function callsavewindow(num){  var http,un=getsetCookie(1,'username','');  if ((sample==0)&&(checkifpres(un))&&(un.length>2)&&(un.indexOf('@')>0)){    cleanCookie(1);    un=un.split(",");    document.body.style.cursor = 'wait';    if (window.XMLHttpRequest) http = new XMLHttpRequest();    else http = new ActiveXObject("Microsoft.XMLHTTP");     /*if (msbrowser) http = new ActiveXObject("Microsoft.XMLHTTP");    else http = new XMLHttpRequest(); */    http.open("GET","save_cookies.cgi?"+un[0]+"~none", false);    http.send(null);    document.body.style.cursor = 'auto';    if (http.responseText=="1") http.close;    else window.location.href='http://www.stockconsultant.com/login.html?loginerror';  }}function addmoveselected(ptype,pos){  var i,addlistnum,listnum,stklist='',tl='',stklistlen=0,sortit,couldnotadd,couldnotaddlist,tb=new Array('','t','b'),  ln=new Array('','4','5'),addedlist,addedlistnum,ts,ts2,ts3,ts4,ts5,ts6,portsearch,dupnum,duplist,refresh,ta1,ta2,  addlist="",remlist="";  portsearch=((portf=="1")||(searcht=="1"));   if (portsearch){    if ((searcht=="1")||(!isuserlist())) ts="add";    else{      ts=getid('moveadd'+tb[pos]).selectedIndex;      if(ts==0) ts="move";      else ts="add";    }  }else{    if (ptype==2){      var adr=getid('addrem');      if (adr.options[adr.selectedIndex].text=="Add") ts="add";      else ts="move";    } else if (ptype==3) ts="add";  }  if (ts=="add") ts2="added";  else ts2="moved";  if (portsearch){    listnum=cvnum(getid('list'+ln[pos]).selectedIndex);    addlist=getselected(0,0);    remlist=getselected(1,0);    if ((addlist=="")&&(remlist=="")){      window.alert("No stocks selected.");      return;    }     if ((addlist!="")&&(listnum==0)){      window.alert("Stock(s) selected to "+ts+" but no list selected.");      return;    }    if ((addlist=="")&&(listnum!=0)) listnum=0;  }  else{    if (ptype==2)       listnum=cvnum(getid('list2').selectedIndex);    else       listnum=activelist[0];    if (listnum==0) return;    addlist=insymbol;  }  if (!portsearch){    sortit=mystocks2[listnum].split("|");     tl=stklist=getlistCookie(listnum);    if (isinlist(addlist,tl)>=0){      window.alert("Can not "+ts+" "+addlist+", it is already in ["+sortit[0]+"].");      if (ptype==2){        getid('list2').selectedIndex=0;        getid('list2').blur();      }      return;    }  }else if ((addlist!="")&&(listnum!=0)){    sortit=mystocks2[listnum].split("|");     tl=stklist=getlistCookie(listnum);    ta1=tl.split(",");ta1.sort();ta1=ta1.join(",");    ta2=addlist.split(",");ta2.sort();ta2=ta2.join(",");    if (ta1==ta2){      window.alert("Can not "+ts+" "+addlist+", it is already in ["+sortit[0]+"].");      return;    }  }  if (stklist!=""){    stklist=stklist.split(",");    stklistlen=stklist.length;  } else stklistlen=0;  if (addlist!="") addlist=addlist.split(",");  if (tl!="") tl+=",";  addedlist="";addedlistnum=0;  duplist="";dupnum=0;  couldnotaddlist="";couldnotadd=0;  for(i=0;i<addlist.length;i++)    if (isinlist(addlist[i],tl)<0){      if (stklistlen<70){        tl+=addlist[i]+",";                addedlist+=addlist[i]+","; addedlistnum++;        stklistlen++;      }else{        couldnotadd++;        couldnotaddlist+=addlist[i]+",";      }     }    else{      duplist+=addlist[i]+",";      dupnum++;    }  if (addedlistnum>0)    addedlist=addedlist.substr(0,addedlist.length-1);  if (dupnum>0)    duplist=duplist.substr(0,duplist.length-1);   if (couldnotadd>0)    couldnotaddlist=couldnotaddlist.substr(0,couldnotaddlist.length-1);  if (remlist!="") ts3="Removed "+remlist+".";  else ts3="";  if (tl!="") tl=tl.substr(0,tl.length-1);  if ((dupnum>0)&&(ptype!=3)) window.alert("Stock(s) "+duplist+" already in ["+sortit[0]+"] and not "+ts2+".");  if (addedlistnum>0){    refresh=1;    ts3+=" "+ts2+" "+addedlist+" to ["+sortit[0]+"].";    if (couldnotadd>0) ts3+=" Could not "+ts+" "+couldnotaddlist+", reached max of "+maxsyms+" stocks.";      }else{    refresh=0;    if (couldnotadd>0) ts3+=" Could not "+ts+" "+couldnotaddlist+", reached max of "+maxsyms+" stocks in ["+sortit[0]+"].";  }  if (((ts3!="")&&(ptype!=3))||((ptype==3)&&(couldnotadd>0))) window.alert(ts3);  if ((addedlistnum<=0)&&(couldnotadd>0)&&(!portsearch)&&(ptype==2)){    getid('list2').selectedIndex=0;    getid('list2').blur();  }  if ((portf=="1")&&(listnum==portfactivel)){}  else    if ((ts=='move')&&(dupnum>0)&&(window.confirm('Remove stock(s) '+duplist+' that could not be moved?'))){      refresh=1;      if (addedlist!="") addedlist+=','+duplist;      else addedlist=duplist;      addedlistnum+=dupnum;    }  if (remlist!=""){    refresh=1;    if (addedlist!="") addedlist+=','+remlist;    else addedlist=remlist;    addedlistnum+=remlist.split(",").length;    ts="move";  }  if (addedlistnum==0) return;  if (refresh==1){    if (ts=="move"){      removeselected(addedlist,1);      if (portf==1){        globremnum=addedlistnum;        if ((stoo-sfrom-globremnum)==0){          sfrom=0; globremnum=0;        }      }    }    if (listnum>0){      setlistCookie(tl,listnum);      if (listnum==activelistnum()) editablestocklist=tl;     }  }  if ((portsearch)&&(nextnum>0)&&((refresh==1)||(addedlistnum>0))){    if (portf=="1") ts6='list';    else ts6='results';    if (window.confirm('Show next '+nextnum+' in the '+ts6+'?')){      donotremovestocks=1;      sfrom+=numstocks-globremnum;      if (sfrom>=stotal) sfrom-=numstocks;      if (portf=="1") consult("**NONE",0,0,2,refresh);      else if (searcht=="1") consult(totsearchstr,0,0,2,refresh);    }  }  if ((portsearch)&&(ts!="move")&&(addedlistnum>0)){    writeadded(addedlist);    callsavewindow(1);  }  else if (portf=="1") consult("**NONE",0,0,2,refresh);    else if (searcht=="1") consult(totsearchstr,0,0,2,refresh);      else if ((listnum!=activelist[0])&&(ts!="move")&&(addedlistnum>0)){        getid('list2').selectedIndex=0;        getid('list2').blur();        callsavewindow(1);      } else if (insymbol=="") consult("**NONE",0,0,0,refresh);             else consult(insymbol,0,0,0,refresh);      }var nextnum,prevnum;function writesymdet(){  var l3=[],i=0,tmpstr,ts,sl,k,sortit,ts2,j,locnum,np=[],n=0;    if ((portf=="1")||(searcht=="1")){    if (sfrom==0) prevnum=0;     else       if ((sfrom<numstocks)&&(sfrom>0)){        prevnum=sfrom;      }else         prevnum=numstocks;      if (symlen<numstocks) locnum=symlen;    else locnum=numstocks;    nextnum=stotal-stoo;       if (nextnum<0) nextnum=0; // no nextnum    else if (nextnum>numstocks) nextnum=numstocks;    if (sfrom>numstocks)      np[n++]='<a href="javascript:selectfirst()" class=sm3b><b>First</b></a>';    if (prevnum>0)      np[n++]='<a href="javascript:selectprev()" class=sm3b><b>Prev '+prevnum+'</b></a>';    if (nextnum>0){      np[n++]='<a href="javascript:selectnext()" class=sm3b><b>Next '+nextnum+'</b></a>';      if ((stotal-stoo)>numstocks)        np[n++]='<a href="javascript:selectlast()" class=sm3b><b>Last</b></a>';    }      if ((prevnum>0)||(nextnum>0))      nextprevline=np.join("&nbsp; ")+"&nbsp;";    else      nextprevline='';    document.write('<a name="lsearch"></a>'+restab+'height=40 align=left>&nbsp;'+whtf);     writesymdet_portf();  }else{    var optionstr=new Array('','(Optionable)');    l3[i++]=restab+' align=left nowrap>&nbsp;<font face="verdana" color="#ffffff"><b>Results for '+insymbol+'</b></font>';        if (casualu==2){      var pagesleft=pagelimit-totpages;       if (pagesleft<0) pagesleft=0;      if (noresults==0) l3[i++]='<font color="#ffffff"> &nbsp; &nbsp; Pages Left: '+pagesleft+'</font>';     }            if (symdata==1){      if (qchart=="1")        l3[i++]=' &nbsp; <tt><b>'+smover+'href="javascript:consult(\''+insymbol+'\',2,0,0,0)">'+whtf+'(Full details on '+insymbol+')</font></a></b></tt>';              curdatadate=dodatestuff(linedata[0],linedata[1],0,0);      if (curdatadate.indexOf("close")<0)        curdatadate+=" (15-20 min delayed)";       if (notoptimal==1)        l3[i++]=' &nbsp; <tt>'+whtf+'!! < 1 year data, less accurate</font></tt>';      l3[i++]='</td><td nowrap align=right><CODE>'+whtf+compname+'</font></CODE> &nbsp;';      if ((indexes==0)&&(schart!=1))        l3[i++]='<tt><font color="#FFFF00">'+exchange+'</font> &nbsp;';      l3[i++]='</td></tr><tr><td align=left><tt><font color="#FFFF00"> &nbsp; &nbsp; '+curdatadate+' &nbsp; '+daybstr+'</font></tt>';      l3[i++]='</td><td align=right>';      if ((indexes==0)&&(schart!=1))        l3[i++]='<CODE>'+whtf+optionstr[optionable]+'</font></CODE> &nbsp;<tt><font color="#CCFFCC">'+sectstr+'</font> </tt>&nbsp;';    }  }  l3[i++]='</td></tr></table></div>';  l3[i++]=comdiv;  document.write(l3.join("")); l3=[];i=0;    if (symdata==1){    var dyb=getid('daysb'),si=dyb.selectedIndex;    ts=dyb.options[si].text;    if (si>0){      l3[i++]='<div sytle="padding:3px;"><img style="position:relative;top:2px;left:5px;"width=26 height=26 src="../img/alert.gif"><span class=st5 style="position:relative;top:-5px;left:5px;">&nbsp; Data is from '+ts;      if (closeonly==1)        l3[i++]=' &nbsp;&nbsp;<img width=12 height=13 '+ilnk+'tbull.gif">&nbsp;<b><a href="http://www.stockconsultant.com/signup.html" target="_top">Sign up for Intraday Updates</a></b>';      l3[i++]='</span></div>';        }    if ((portf=="1")||(searcht=="1")){      if (portf=="1") ts='Portfolio'; else ts='SearchtTool';      l3[i++]='<table cellspacing=0 cellpadding=7 width=100%><tr><td height=10 nowrap><table cellspacing=0 cellpadding=0 width=100%><tr><td align="left">';      l3[i++]='<span style="font:normal 13px arial;">Set: <a style="font:normal 13px arial;" href="javascript:window.open(\'listoptions.html\',\'listop\',\'toolbar=0,status=0,width=680,height=390,scrollbars=1,resizable=1,menubar=0,left=40,top=40,screenX=40,screenY=40\').focus();">'+ts+' list options</a>,&nbsp; <a style="font:normal 13px arial;" href="javascript:window.open(\'chartoptions.html\',\'chartop\',\'toolbar=0,status=0,width=520,height=420,scrollbars=1,resizable=1,menubar=0,left=40,top=40,screenX=40,screenY=40\').focus();">Chart options</a></span>';      l3[i++]=' &nbsp; &nbsp;<select onchange="turnonoverlays()" id="overlay"><option value="0">Chart Overlay:</option>';      for (j=0;j<6;j++)        if (multichart[j]>0)          l3[i++]='<option value="'+(multichart[j]-1)+'">'+defgdesc2[multichart[j]-1]+'</option>';      l3[i++]='</select></td>';      if ((firefox==1)&&(navigator.userAgent.charAt(navigator.userAgent.indexOf("Firefox")+8)=="3")){}      else        l3[i++]='<td align="middle" nowrap><span style="font:normal 13px arial;color:#0000ee;text-decoration:underline;cursor:pointer;" onclick="ow(-1,50,0)">3-5x faster w/FireFox 3</span></td>';      l3[i++]='<td align="right" nowrap><select id="list3"><option>No list selected</option>';      for (k=1;k<=8;k++){        sortit=mystocks2[cvnum(k)].split("|");         l3[i++]='<option>'+k+': '+sortit[0]+'</option>';      }      l3[i++]='</select>';      ts='onmouseover="isl=1;showvtext(\''+editviewhelp+'\',\'listt1\',100,100,0);"onmouseout="isl=0;hidevtext(0);"style="cursor:pointer;font:normal 13px arial;color:#0000ff;text-decoration:underline;"';      l3[i++]=' <span style="font:normal 13px arial;">&nbsp;<a id="listt1"'+ts+'onclick="editlistwin(2);">View</a>&nbsp;/&nbsp;<a id="listt1"'+ts+'onclick="editlistwin(3);">Edit</a></span></td></tr></table>';      l3[i++]='</td></tr>';      if ((searcht=="1")&&(symlen>0)&&(searchrangestr!=""))        l3[i++]='<tr><td height=40 valign=middle>'+searchrangestr+'</td></tr>';      if ((sample==1)&&(portf=="1"))        l3[i++]='<tr><td height=36 valign=middle> &nbsp;&nbsp;<span class=z4>*** Free Portfolio limited to leader stocks. <b><a href="'+hurl+'/signup.html" target="_top">Sign up</a></b> to access all stocks.</span></td></tr>';      l3[i++]='<tr><td nowrap height=50 valign="middle"><table width=100% cellspacing=0 cellpadding=0><tr><td nowrap>';i++;      l3[i++]='<div id="toplist" style="text-align:right;background:#f1f1f1;border:2px solid #9999aa;padding:2px;font:normal 12px arial,sans-serif,helvetica;">';      if ((searcht!="1")&&(isuserlist())){        l3[i++]='Remove <span style="font:bold 12px arial,sans-serif,helvetica;" id="remstockst"><b>[none]</b>,</span>&nbsp;and/or&nbsp;';        l3[i++]='<select id="moveaddt"><option>Move</option><option>Add</option></select>';      }else        l3[i++]='Add';      l3[i++]=' <span id="addstockst"><b>[none]</b></span> to ';      l3[i++]='<select id="list4"><option>No list selected</option>';      for (k=1;k<=8;k++){        sortit=mystocks2[cvnum(k)].split("|");         l3[i++]='<option>'+k+': '+sortit[0]+'</option>';      }      l3[i++]='</select> &nbsp; <input style="position:relative;top:-1px;background:#C4DF9B;font: bold 11px arial,helvetica,sans-serif;cursor:pointer;padding:0px;" type="button" value="GO!" onClick="javascript:addmoveselected(0,1);"></div>';      l3[i++]='</td><td nowrap align=right width=90%>';      if ((prevnum>0)||(nextnum>0)) l3[i++]=nextprevline;           l3[i++]='</td></tr></table></td></tr></table>';    }  }  document.write(l3.join(""));}function writelist(insymbol,csl,num){  var tmpz='',i,tmps,tmps2,l3=[],n=0,sc;  if ((activelistnum()==5)&&(num==1)) sc=sectornames.split(",");   for (i=0;i<csl.length;i++){    if ((num==1)||(num==3)){      if ((insymbol!=csl[i])||((portf=="1")&&(portfactivel==5)&&(!((schart>=1)&&(seclist<=1)))) ){        tmps=""; tmps2="";      }else{        tmps='<font color=#000000><b><img align=texttop width=10 height=12 '+ilnk+'tbull_g3.gif">'; tmps2='</b></font>';      }      if ((activelistnum()==5)&&(num==1)) tmpz='TITLE="'+sc[i]+' stocks"';      if (((portf=="1")&&(portfactivel==5)&&(csl.length>numstocks)&&(!((schart>=1)&&(seclist<=1))))&&(isinlist(csl[i],symstr)>=0)){        tmps+="<b>"; tmps2="</b>"+tmps2;      }      l3[n++]='<a href="javascript:consult(\''+csl[i]+'\',0,0,0,0)" '+tmpz+' class=sp1>'+tmps+csl[i]+tmps2+'</a>';    }else{      if (isinlist(csl[i],symstr)>=0)         l3[n]='<font color="#0000ff">';      else         l3[n]='<font color=#000000>';      l3[n]+=csl[i]+'</font>';n++;    }    if (i<(csl.length-1)){      l3[n]=' | ';n++;    }  }  if (num==0)    l3[n++]='<br>&nbsp;&nbsp;<a href="javascript:changelist(5,0)"><b>Back To List Sectors</b></a> &nbsp; &nbsp; <tt>** Press [ and ] keyboard keys to select the previous and next sector</tt>';  if ((portf=="1")&&(portfactivel==5)&&(!((schart>=1)&&(seclist<=1))))    l3[n++]='<br><br>Click on sector above to list stocks in that sector. Currently listed sectors are in bold.';  return(l3.join(""));}     function MemberLogout(){  /* getsetCookie(0,'username',","); */  if (wop==0) {    getsetCookie(0,'username',",");    window.location.href=hurl+'/login'+logsuf+'.html';  }   else {    if ((opener==null)||(typeof(opener.insymbol)!="string")){}    else opener.getsetCookie(0,'username',",");    window.location.href=hurl+'/loginsessionexpired.html';  }}var wop_errorcnt=0;function checksession(){  if (wop==1){    if ((opener==null)||(typeof(opener.insymbol)!="string")){      if (wop_errorcnt>1)        window.location.href=hurl+'/loginsessionexpired.html';      else wop_errorcnt++;    } else wop_errorcnt=0;  }else{    var ct=parseInt(new Date().getTime()/60000),session=0;    var un=getsetCookie(1,'username','');    if (checkifpres(un)&&(un.length>2)&&(un.indexOf('@')>0)){      un=un.split(","); session=parseInt(un[1]);    }    if (((ct-session)>600)||(checkifpres(un)&&(un.length<=2))){      getsetCookie(0,'username',",");      window.location.href=hurl+'/login'+logsuf+'.html?expsession';    }  }  if (wop==1) self.setTimeout("checksession();",8000);  else self.setTimeout("checksession();",20000);}function daysbcall(){  if (searcht=="1"){    if (initsearchstr!=getsearchstr(1,0))       getsetCookie(0,'sc666savedsearch',getsearchstr(1,0));     totsearchstr=""; // reset to none try this  }  dbak=getid('daysb').selectedIndex;  if ((portf=="1")||(searcht=="1")||(insymbol=="")) consult("**NONE",0,0,0,0);   else consult(insymbol,0,0,0,0);}function couldgetCookie(name){  var re;  if (wop==1) re = opener.document.cookie.match ( '(^|;) ?' + name + '=([^;]*)(;|$)' );  else re = document.cookie.match ( '(^|;) ?' + name + '=([^;]*)(;|$)' );  if (re) return(1);  else return(null);}var validcookies=',sc666list,sc666lz,sc_affil,username,USER,sc666savedsearch,sc666fullpre,zc666links,loginck8753,sc666date,__csh,'; function cleanCookie(usedoc){ // usedoc=1 document cookie, else loaded cookie from disk  var check=1,name,tc,i;   if (usedoc==1) name=(unescape(document.cookie)).split("; ");  else name=(unescape(newcookie)).split("; ");  for (i=0;i<name.length;i++){    if (name[i].indexOf("=")<0) deleteCookie(name[i],1);    else{      tc=name[i].split("=");      if ((tc.length>=2)&&(validcookies.indexOf(','+tc[0]+',')<0)){        if (check==0) deleteCookie(tc[0],1);        else if (couldgetCookie(tc[0])) deleteCookie(tc[0],1);      }    }  }}function getusercookie(){  var delstuff=0,twologins=0,twousernames=0,i,tc,tmp_affil=getsetCookie(1,'sc_affil',''),cs="",curdate=new Date();  cleanCookie(1);  newcookie=(unescape(newcookie)).split("; ");    for (i=0;i<newcookie.length;i++){    tc=newcookie[i].split("=");    if ((tc.length>=2)){      if (tc[0]=='sc666date'){        if ((casualu!=2)||(clearcook==1)) { if (couldgetCookie(tc[0])) deleteCookie(tc[0],1); }        if (clearcook==1) clearcook=0;      }      else if (validcookies.indexOf(','+tc[0]+',')<0){        if (couldgetCookie(tc[0])) deleteCookie(tc[0],1);       }      else if ((cs.indexOf(":"+tc[0]+":")<0)&&(tc[0]!='sc_affil')&&(tc[0]!='username')){        getsetCookie(0,tc[0],tc[1]);         cs+=":"+tc[0]+":";      }    }  }    getsetCookie(0,'username',username+","+(parseInt(new Date().getTime()/60000)));  if ((checkifpres(tmp_affil))&&(tmp_affil!="")) setCookieHome('sc_affil',tmp_affil);   if ((casualu==2)&&(clearcook==1)){    datemilli = curdate.getTime();    initdatecookie(1);    clearcook=0;  }}function daysb_str(){  var i,ts,ts2="";  for (i=0;i<26;i++){    if (i!=dbak) ts='';    else ts='selected="yes"';     ts2+='<option '+ts+'>';          if (i==0) ts2+='Current';           else if (i==1) ts2+='1 day ago';             else ts2+=i+' days ago';    ts2+='</option>';  }   return(ts2);}var linedatesecv='N',sectvkey=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],    sectnamekey={0:1,1:0,2:2,3:4,4:8,5:14,6:15,7:16,8:18,9:19,10:21,11:23,12:24,13:28,14:29,15:31,16:32,17:36,18:38,19:40};                               function sortsecvdata(a,b){  return((1.0*sectvdata[b])-(1.0*sectvdata[a]));}                function decodesecvdata(){  var i,ts='';  sectvdata=sectvdata.split(',');  if (sectvdata.length<23)    for (i=0;i<20;i++) ts+='N,';  else    for (i=0;i<sectvdata.length;i++)      if ((i<22)&(i>0)){        if (sectvdata[i].charAt(0)=='D')          linedatesecv=sectvdata[i].substr(2).split("=");        else          ts+=sectvdata[i]+',';      }  sectvdata=ts.split(',');  sectvkey.sort(sortsecvdata);}function showsectorv(num){    var i,ts,ts2,ts3,l3=[],n=0,data,s,e,    secnames=sectornames.split(','),secdefs=sectorsdef.split(',');    if (num==1){ s=0;e=10;}    else{ s=10;e=20;}    l3[n++]='<table style="background-color:#ffffff;" width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td>';    for (i=s;i<e;i++){      if (((i+1) % 2)==0) ts='background-color:#eeeeee;'; else ts='';      l3[n++]='<div  style="'+ts+'padding:2px 0px 2px 4px;font:normal 11px Tahoma, arial;color:#0000ff;"><span style="cursor:pointer;" onclick="if (portf==\'1\'){portfactivel=5;consult(\''+secdefs[sectnamekey[sectvkey[i]]]+'\',0,0,0,0);}else{insymbol=\''+secdefs[sectnamekey[sectvkey[i]]]+'\';changelist(5,0);}"><u>'+secnames[sectnamekey[sectvkey[i]]].toUpperCase()+'</u></span>';      data=sectvdata[sectvkey[i]];      if (data=='N')        l3[n++]=' - N/A';      else{        data*=1.0;        ts=' <span style="position:relative;top:0px;"><img  width=11 height=6 src="../img/large';        if (data>=0) ts+='up.gif"><font color="#009900"> ';        else ts+='down.gif"><font color="#ff0000"> ';        l3[n++]=ts+data+'%</font></span>';      }      l3[n++]='</div>';    }    l3[n++]='</td></tr></table>';    if (linedatesecv.length==1) ts="No date";    else{      ts=dodatestuff(linedatesecv[0],linedatesecv[1],0,1);          ts2=ts.split(',');      if (ts.indexOf("close")<0){        ts3=ts2[1].split(' ');        ts=ts3[1]+ts3[2]+' '+ts3[3]+'(delayed)';      } else ts=ts2[1];      ts2=ts2[0].split(' ');      ts=ts2[1]+' '+ts2[2]+', '+ts;    }    getid("secvdate").innerHTML=ts;      if (num==1) getid("sectvpage").innerHTML="&nbsp;pg 1";    else getid("sectvpage").innerHTML="&nbsp;pg 2";    getid("innertable").innerHTML=l3.join("");  }function cvnum(n1){  n1=mf(n1);  if (n1>6) n1+=5;   else     if (n1>3) n1+=3;  return(n1);}function icBrokerWidget(site,unit_w, unit_h) {	document.write('<iframe src ="http://cdn.investingchannel.com/bw_'+unit_w+'x'+unit_h+'.html?s='+site+'" width="'+unit_w+'" height="'+unit_h+'"  marginHeight="0" marginWidth="0" frameBorder="no" scrolling="no" style="margin:0px;padding:0px;border:0px none;overflow:hidden;width:'+unit_w+'px;height:'+unit_h+'px;"></iframe>');}function icBeacon(site) {	document.write("<" + "script type='text/javascript'>_qoptions={qacct:'p-ed9LRhNGf2zt2',labels:'"+site+"'};<" + "/script>");	document.write("<" + "script type='text/javascript' src='http://edge.quantserve.com/quant.js'" + " >");	document.write("<" + "/script>");	document.write("<" + "script src='http://static.crowdscience.com/start.js?id=824d28492f'><" + "/script>");	var currentPg = location.href.split('/');	currentPg.shift();	currentPg.shift();	currentPg.shift();	document.write('<'+'iframe src="http://cdn.investingchannel.com/ga_track.html?s='+site+'&pg='+currentPg.join('/')+'" name="ic_ga_track" width="1" height="1" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" scrolling="no"></iframe>');}function writeheader(){  if (screen.width>810){     winsize+='width=870,height=760';    prewinsize+='width=550,height=750';    flashwinsize+='width=810,height=825';  }  else{    winsize+='width=790,height=550,';    prewinsize+='width=550,height=550';    flashwinsize+='width=790,height=690';  }    var l3=[],n=0,i,tt, mt, ts,tsz,ts2,td2='<td valign=middle nowrap bgcolor="#',tmpstr,tmpstr2,tmpstr3,    tdc=['','','','','4881BC">&nbsp;','4881BC">&nbsp;','4881BC">&nbsp;','','','','4881BC">&nbsp;','4881BC">&nbsp;','',''],    largemenu=((qchart!="1")&&(portf!="1")&&(searcht!="1")&&((csite=="")||(cvalid==0))&&(sample==1)),    td='<td bgcolor="#4881BC" nowrap>&nbsp;<a class=wr target=_top href="',    td3='<td bgcolor="#4881BC" nowrap>&nbsp;<a class=wr2 target=_top href="',    td4='<td bgcolor="#FF8338" nowrap>&nbsp;<a class=wr2 target=_top href="',    tds1=td3,tds2=td3,tds3=td3,tds4=td3,tdend='</td>'+tabend+'</td>',    l='<a class=sm3 href="javascript:changelist(',standwidth,m,bwidth,bleft,bmargin;  daybstr='<select id="daysb" onChange="daysbcall()">'+daysb_str()+'</select>';  if (qchart==1){    tds3=td4;    mt='QuickCharts';  }  else if (portf==1){    tds2=td4;    mt='Portfolio';  }  else if (searcht==1){    tds4=td4;    mt='SearchTool';  }  else{    tds1=td4;    mt='Consultant';  }    /* top most line */  if ((freecom!="")&&(sample==1)&&((csite=="")||(csite=="1AE6ZF")))    l3[n++]='<div style="font:normal 12px verdana,sans serif,arial;width:'+standwidthout+'px;padding:4px;text-align:center;">'+freecom+'</div>';         l3[n++]='<div style="background:#CACACA;width:'+(standwidthout-2)+'px;border-top:1px solid black;border-right:1px solid black;border-left:1px solid black;">';  if (largemenu) ts='rowspan=2'; else ts='';  l3[n++]='<table cellpadding=0 cellspacing=0><tr><td '+ts+' width=100% nowrap>';  if (largemenu)  l3[n++]='<div style="padding:5px;position:relative;left:7px;"><a href="http://www.stockconsultant.com/" target="_top"><img src="/img/sclogo2.gif" width=219 height=40 alt="StockConsultant.com"></a></div>';  l3[n++]='</td><td valign=top><table cellpadding=2 cellspacing=0><tr>';  l3[n++]='<td style="height:15px;border-left:1px solid black;border-bottom:1px solid black;" bgcolor="#4881BC">&nbsp;<a class=wr2 target="_top" href="http://www.stockconsultant.com/">Home</a>&nbsp;</td>';  l3[n++]='<td style="height:15px;border-left:1px solid black;border-bottom:1px solid black;" bgcolor="#4881BC" nowrap>&nbsp;<a class=wr2 target="_blank" href="http://Valid1.net/default.aspx?BDLID=719&redirect_url=http%3A%2F%2Fwww.stockconsultant.com">Special Offers</a>&nbsp;</td>';  l3[n++]='<td style="height:15px;border-left:1px solid black;border-bottom:1px solid black;" bgcolor="#4881BC" nowrap>&nbsp;<a class=wr2 target="_top" href="http://www.stockconsultant.com/freewebcontent.html">Free Website Content</a>&nbsp;</td>';  l3[n++]='</tr></table><td></tr></table></div>';    if (largemenu){    l3[n++]='<div style="background:#CACACA;width:828px;padding:5px 0px 14px 0px;border-right:1px solid black;border-left:1px solid black;text-align:center;">';    l3[n++]='<iframe src="http://www.stockconsultant.com/iv728x90.html?quotepage&quotepage" width=728 height=90 frameborder=0 scrolling=no marginheight=0 marginwidth=0></iframe>';  }    else{    l3[n++]='<div style="font:bold 15px Tahoma,arial,helvetica;color:#0000ff;height:25px;background:#CACACA;width:828px;padding:0px 0px 5px 0px;border-right:1px solid black;border-left:1px solid black;">';    if ((csite!="")&&(cvalid==1))       l3[n++]='&nbsp; '+titlespec+'&nbsp;StockConsultant Pages';     else{      if (sample==1) l3[n++]='&nbsp; Sample'; else l3[n++]='&nbsp; ';      l3[n++]='&nbsp;StockConsultant Member Pages';    }  }  if (sample==0){    l3[n++]='<span style="font:bold 14px Tahoma,arial,helvetica;">';    l3[n++]='  &nbsp; &nbsp; <b>&#8594;</b><a href="javascript:MemberLogout()">Log out</a>';    if (wop==1)      l3[n++]=' &nbsp; &nbsp; <b>&#8594;</b><a href="javascript:window.close()">Close this window</a>';    l3[n++]='</span>';   }  l3[n++]='</div>';  /* menu line */  if (msbrowser) bwidth=standwidthout-2;  else bwidth=standwidthout-1;  l3[n++]='<div style="background:#CACACA;width:'+bwidth+'px;border-left:1px solid black;"><table cellpadding=0 cellspacing=0><tr>';  if (sample==1){    tt='Free';    l3[n++]='<td style="border-bottom:1px solid black;border-top:1px solid black;"align=left><table cellpadding=2 cellspacing=0><tr>'+td3+hurl+'/signup.html"><b>Sign up!</b></a>&nbsp;</td><td style="border-left:1px solid black;border-right:1px solid black;"bgcolor="#4881BC" nowrap>&nbsp;<a class=wr2 target=_top href="'+hurl+'/login.html">Login</a>&nbsp;</td></tr></table></td><td valign=bottom><div style="border-bottom:1px solid black;width:40px;"><!-- --></div></td>';  }  else{    if (casualu==2) tt='Basic ';    else if (casualu==1) tt='Casual ';      else tt='Power ';    tt='Logged in - '+tt;  }  l3[n++]='<td nowrap><table cellpadding=0 cellspacing=0 bgcolor=#000000><tr><td width=4 valign=top><img '+ilnk+'ledgeb19.gif" width=4 height=19></td>';  l3[n++]='<td valign=middle nowrap><code>'+tt+'&nbsp;</code></td><td><table cellpadding=2 cellspacing=1><tr>'+tds1;  l3[n++]='javascript:callconsultant()">Consultant</a>&nbsp;</td>';  if (wop==0){    if ((casualu==0)||(casualu==1)||(sample==1)) l3[n++]=td3+'javascript:prescreen()"onmouseover="isl=1;"onmouseout="isl=0;">PreScreener</a>&nbsp;';    if ((casualu==0)||(sample==1))      l3[n++]='</td>'+tds2+'javascript:callsummary()">Portfolio</a>&nbsp;</td>'+tds3+'javascript:callqc()">QuickCharts</a>&nbsp;</td>'+tds4+'javascript:callsearch()">SearchTool</a>&nbsp;';  }else     l3[n++]='<td bgcolor="#4881BC" nowrap>&nbsp; <font color="#ffffff"><tt> *** Opened from main window, No tool access from here</tt></font> &nbsp;';  l3[n++]=tdend+'<td width=100% valign=bottom height=1><div style="border-bottom:1px solid black;width:100%;"><!-- --></div></td>';  l3[n++]='<td><table cellpadding=0 cellspacing=0 bgcolor=#000000><tr><td>';    l3[n++]='<table cellpadding=2 cellspacing=1><tr><td bgcolor="#4881BC">&nbsp;<a class=wr2 href="../help/help.html" target="_blank">Help</a>&nbsp;</td><td bgcolor="#4881BC">&nbsp;<a class=wr2 onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:callforum();">Forums</a>&nbsp;</td>'+td3+hurl+'/contact.html">Contact/About</a>&nbsp;'+tdend+'</tr></table></div>';  document.write(l3.join(""));  /* Main Start */  l3=[];n=0;  if (!isuserlist()) tdc[activelistnum()]='FF8338">&nbsp;';  if ((portf=="1")||(searcht=="1")||(qchart=="1")) standwidth=standwidthout;  else standwidth=standwidthout-166;   if ((qchart=="1")||(searcht=="1")) standwidth=standwidthout-12;    l3[n++]=comdiv; // &&(portf!="1")  if ((qchart!="1")&&(searcht!="1")) ts='style="padding-top:2px;float:left;width:'+(standwidthout-167)+'px;"'; else ts='';  l3[n++]='<a name="ttop"></a><div '+ts+'><table cellpadding=0 cellspacing=3 width=100%><tr><td nowrap style="line-height:5px;" valign=top> <span class=zoo>'+mt+'</span>';  if (regoutput==1) l3[n++]='<tt> (ver <a'+iso3+'-1,6,0)">'+progrev+'</a>)</tt>';   else l3[n++]='<tt> &nbsp;</tt>';  m='&nbsp;&nbsp;<tt><span id="intraday" style="color:#0000ff;text-decoration:underline;cursor:pointer;"onmouseover="showvtext(\'Intraday updates at 10:10a, 10:30a, 10:50a, 11:10a, 11:30am, 12p, 12:30p,<br>1p, 1:30p, 2p, 2:30p, 2:50p, 3:10p, 3:30p, 3:45p, 4:05p, 4:30p, 5pm ET\',\'intraday\',15,38,0)"onmouseout="hidevtext(0)">Intraday updates</span> starting at 10:10am ET</tt>';  if (searcht=="1"){     l3[n++]=' &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/stocksearchtool.html" target="_blank">SearchTool Help</a><br>'+m;    daybstr2='<select id="daysb2" onChange="daysbcall2()">'+daysb_str()+'</select>';    searchtooldate=dodatestuff(linedata[0],linedata[1],0,0);    if (searchtooldate.indexOf("close")<0) searchtooldate+=" (15-20 min delayed)";    l3[n++]='</td><td valign=middle align=right nowrap> &nbsp; &nbsp; '+daybstr2+'&nbsp; <input style="padding:1px;background:#C4DF9B;font: normal 12px verdana,arial,helvetica,sans-serif;cursor:pointer;" TYPE="button" NAME="button" VALUE="Search!" onclick="searchfor();"> &nbsp; </td><td style="line-height:5px;" align=right nowrap><tt>&nbsp; '+searchtooldate+'&nbsp; </tt><br><a class=dta href="javascript:refreshwin();">Update</a>&nbsp; ';  }  else{    if (sample==0)      tsz='<img align=absmiddle '+ilnk+'sector17_16.gif" width=17 height=16>&nbsp;<a class=mv1 onmouseover="isl=1;" onmouseout="isl=0;" href="javascript:callsectorbarv()"><tt>Sect</tt></a> <b>|</b> <a class=mv1 onmouseover="isl=1;" onmouseout="isl=0;" href="javascript:callleaderbarv()">Leader</a>&nbsp;';    else tsz='';      l3[n++]=' '+m;    if ((qchart!="1")&&(portf!="1")){      l3[n++]='</td><td align=right nowrap>';      // if (sample==1) l3[n++]=tsz;      l3[n++]='&nbsp; <span style="position:relative;top:2px;"><img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/generalbasics.html" target="_blank">Basics & Navi</a></span> &nbsp;';    } else if (portf=="1")        l3[n++]='</td><td align=right nowrap> <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/stockportfoliotooloverview" target="_blank">Portfolio Help</a> &nbsp;';   } l3[n++]='</td></tr>'; if (searcht!="1"){   var sizez=6,topp=5,topw=42;   if (bN=='Netscape') {sizez=8; topp=3;}   if (sample==0){topw=36;topp-=2;}   if ((qchart!="1")&&(portf!="1")){     tmpstr='if (checklen(document.consultinput.symbol.value)) consult(clearillchars(1,document.consultinput.symbol.value),0,0,0,0);';     l3[n++]='<tr><td colspan=2 height='+topw+' valign=middle align=left nowrap><div style="position:relative;top:'+topp+'px;"><table cellpadding=0 cellspacing=0 width=100%><tr><td nowrap>'+fntv+'><form style="margin:0px;padding:0px;" name="consultinput" method="get" action="javascript:'+tmpstr+'">';     l3[n++]='&nbsp;<b> Enter Symbol </b></font>&nbsp;<input '+stylestr+' type="text" size="'+sizez+'" name="symbol" value="'+insymbol+'" onclick="this.value=\'\'"> &nbsp;<input '+buttonst+' type="BUTTON" name="go3" value="Consult" onclick="'+tmpstr+'">';     if (wop==0)       l3[n++]=' &nbsp;&nbsp;&nbsp; <input '+buttonst+' type="BUTTON" name="go4" value="PreScreener" onclick="prescreen()">';     l3[n++]=' &nbsp;&nbsp;<a'+iso3+'-1,36,0);">Lookup Symbol</a></form></td>';     if (sample==1)       l3[n++]='<td nowrap>&nbsp; <iframe src="http://www.stockconsultant.com/iv88x31.html" width=88 height=31 frameborder=0 scrolling=no marginheight=0 marginwidth=0></iframe></td><td width=100%>&nbsp';     else if ((wop==0)&&(casualu==0))       l3[n++]='<td valign=middle nowrap align=right>'+tsz;          l3[n++]='</td></tr></table></div></td></tr>';   }   var padnum=3,k,n1,sortit,sl='<select id="list" onChange="procselist()">';   sl+='<option>No list selected</option>';   for (k=1;k<=8;k++){     n1=cvnum(k);     sl+='<option';     sortit=mystocks2[n1].split("|");      if (activelistnum()==n1) sl+=' selected="yes"';     sl+='>';     sl+=k+': '+sortit[0]+'</option>';   }   sl+='</select>';   var addeditstr='',lastmenuht=30,divsp=1,alignstr="absmiddle",nt,tempsym;   if (isuserlist())      addeditstr='&nbsp;<a onmouseover="isl=1;"onmouseout="isl=0;"style="cursor:pointer;font:bold 12px verdana,arial;color:#0000ff;text-decoration:underline;"onclick="editlistwin(0);">Edit</a>';   if (bN=='Netscape') alignstr="baseline";   if (firefox==1) padnum=0;   l3[n++]='<tr><td style="padding:'+padnum+'px;" colspan=2 width="100%" valign=top><div style="padding:1px;border:1px solid #c1c1c1;background-color:#efefef;">';   l3[n++]='<table cellspacing=3 cellpadding=1><tr><td nowrap><span style="font-weight:bold;font-family:verdana;font-size:11px;">Select</span>&nbsp;'+sl+addeditstr+'&nbsp;</td><td valign=top nowrap>'+tabstart;   if ((wop==0)&& ((casualu!=2)||(sample==1)) )     l3[n++]=td2+'4881BC">&nbsp;<a class=sm3 title="Stocks to watch!" href="javascript:stockstowatch()"onmouseover="isl=1;"onmouseout="isl=0;">Stocks To Watch</a>&nbsp;</td>';   l3[n++]=td2+tdc[5]+l+'5,0)">Sectors</a>&nbsp;</td>'+td2+tdc[6]+l+'6,1)">Indexes</a>&nbsp;</td>'+td2+tdc[4]+l+'4,1)">Leaders</a>&nbsp;</td>'+td2+tdc[11]+l+'11,1)">DJ-30</a>&nbsp;</td>'+td2+tdc[10]+l+'10,1)">QQQQ</a>&nbsp;</td>'+tabend;   if (qchart=="1")     l3[n++]='</td><td nowrap>&nbsp;"\\" key to scroll down/back';   l3[n++]='</div></td></tr></table>';   if (schart==2) listcolor="7F7F7F";   else listcolor="000000";   l3[n++]='<table cellspacing=0 cellpadding=5>';   if (sectorportf){     tempsym=orgsymbol.split(",");     tempsym=tempsym[0];   }else     tempsym=insymbol;   if (((portf!="1")||(sectorportf))&&((isinlist(tempsym,editablestocklist)>=0)||((schart==2)&&(isinlist(tempsym,secstks)>=0))))     nextprevstr='<a href="javascript:getdata(\'PREV\');" Title="Previous Stock"><img align=absmiddle '+ilnk+'left2_16.gif" width=16 height=16></a>&nbsp; <a href="javascript:getdata(\'NEXT\');"Title="Next Stock"><img '+ilnk+'right2_16.gif" align=absmiddle width=16 height=16></a>&nbsp; ';   if (curstocklist.length>=1){     l3[n++]='<tr><td width=100%><tt>';     if (!isuserlist()){       sortit=mystocks2[activelistnum()].split("|");       l3[n++]=fntv+' color="#'+listcolor+'"> &nbsp;&nbsp;<b>'+sortit[0]+':</b></font> &nbsp;';     }     if ((schart==2)&&(!isuserlist()))       l3[n++]=listofstocks=writelist(insymbol2,curstocklist,1);     else{       if ((portf=="1")&&(portfactivel!=5))         l3[n++]=listofstocks=nextprevstr+writelist(tempsym,curstocklist,2);       else         l3[n++]=listofstocks=nextprevstr+writelist(tempsym,curstocklist,1);         }     l3[n++]='</tt></td></tr>';      if ((sample==1)&&((qchart=="1")))       l3[n++]='<tr><td>&nbsp; &nbsp; *** Free '+mt+' limited to leader stocks. <b><a href="'+hurl+'/signup.html" target="_top">Sign up</a></b> to access all stocks.</td></tr>';            if ((schart>=1)&&(seclist<=1)&&(activelistnum()==5)){ // one or none        secstr=sectornames.split(",");       if (schart==2){         listcolor="000000";          num=isinlist(insymbol2,sectorsdef);       }else{         listcolor="7F7F7F";         var secsyms=orgsymbol.split(",");         num=isinlist(secsyms[0],sectorsdef);       }       divsp=6;       l3[n++]='<tr><td><tt>'+fntv+' color="#'+listcolor+'"><b>'+secstr[num]+' Stocks: </b></font> &nbsp;';       var tempstks;       if (portf=="1") tempstks=orgsymbol.split(",");       else tempstks=secstks.split(",");        if ((listcolor=="000000")&&(portf!="1")){         l3[n++]=listofstocks=nextprevstr+writelist(insymbol,tempstks,3);       }else{         if (portf!="1") nt=3; else nt=0;         l3[n++]=writelist(insymbol,tempstks,nt);       }       l3[n++]="</tt></td></tr>";     }      if (activelistnum()==4){       divsp=3;       lastmenuht=20;       l3[n++]='<tr><td><tt>*** The 30 largest stocks from NASDAQ and NYSE';       if (sample==1)         l3[n++]=', no pageview limit on leader stocks.';       l3[n++]='</tt></td></tr>';     }   }else{     l3[n++]='<tr><td height=40 valign=middle>&nbsp; &nbsp; ';     if (portf=="0"){       l3[n++]='<b>No Stocks</b>. To add stocks click on the Edit link above';       if (insymbol!="")         l3[n++]=', or click on Add symbol link below';     }else{       if (portfactivel==0) l3[n++]='Please select a list above';       else l3[n++]='No stocks in list';     }     l3[n++]='.</td></tr>';   }  l3[n++]='</table>';/* end of 5 table */    l3[n++]='<table cellspacing=0 width=100% cellpadding=3><tr>';  td='<td nowrap bgcolor="#4881BC">&nbsp;';  if (activelistnum()>0){    l3[n++]='<td align=left nowrap>';    var addlist=0,addlabel=((insymbol.length>0)&&(portf!="1")),sliststr='',slistp='<select id="addrem">',sl2='';    if ((symdata==1)&&(regoutput==1))      l3[n++]='&nbsp;<a href="#lchart" class=sm3 Title="8 Month Chart"><img style="padding:1px;" '+ilnk+'down2_16.gif" align=absmiddle width=16 height=16></a>&nbsp;';    else{      if (portf=="1") l3[n++]=' &nbsp; <kbd>Press <b>\\</b> key to scroll charts.</kbd>';      else l3[n++]='&nbsp;';    }        l3[n++]='</td>';    if (isuserlist()&&(addlabel)){      l3[n++]='<td align=left nowrap>'+tabstart+td+'<a href="javascript:';      if (isinlist(insymbol,editablestocklist)<0)         l3[n++]='addmoveselected(3,0);" class=sm3 title="Add this symbol">Add ';       else         l3[n++]='removeselected(insymbol,2);" class=sm3 title="Remove this symbol">Rem ';      l3[n++]=insymbol+'</a>&nbsp;</td>'+tabend+'</td>';    }    sl='&nbsp;<select id="list2" onChange="addmoveselected(2,0);"><option>No list selected</option>';    for (k=1;k<=8;k++){      n1=cvnum(k);      sl+='<option>';      sortit=mystocks2[n1].split("|");      sl+=k+': '+sortit[0]+'</option>';    }    sl+='</select>';    if ((addlabel)&&(isinlist(insymbol,editablestocklist)<0)){      addlist=1;      sl2+='<option selected="yes">Add</option>';       sliststr='<kbd>to</kbd>'+sl;    }    if ((portf!="1")&&(activelist[0]>0)&&(insymbol.length>0)&&(isinlist(insymbol,editablestocklist)>=0)||       ((schart==2)&&(isinlist(insymbol,secstks)>=0))){      if (addlist!=1){        if (isuserlist()){          sl2+='<option>Add</option><option selected="yes">Move</option>';          sliststr='<kbd>to</kbd>'+sl;        }        else{          sl2+='<option selected="yes">Add</option>';          sliststr='<kbd>to</kbd>'+sl;        }      }else         if (isuserlist())          sl2+='<option>Move</option>';    }    if (sl2!="") sl2=slistp+sl2+'</select>';    l3[n++]='<td align=left valign=middle nowrap>&nbsp;';    if (addlabel)      l3[n++]='<kbd>Or</kbd>&nbsp;';    l3[n++]=sl2+'&nbsp;'+sliststr+'</td>';  }  l3[n++]='<td height='+lastmenuht+' width=100% align=right nowrap>';  var tml=getsetCookie(1,'zc666links',''),tmul,tms="";  if (checkifpres(tml)==0){    tml=mylinksurl;    getsetCookie(0,'zc666links',tml);  }  tmul=tml.split("(");  ts=tml.split(")");  if ((tmul.length!=6)||(ts.length!=6)){    tml=mylinksurl;    getsetCookie(0,'zc666links',tml);    tmul=tml.split("(");  }  mylinksurl=tml;  l3[n++]='<select id="mylinks"><option>&#8594; My Links</option>';  for(i=0;i<5;i++){    tms=tmul[i].split(")");    l3[n++]='<option>'+(i+1)+'. '+tms[1]+'</option>';  }  l3[n++]='</select><tt> &nbsp;'+smover+'href="javascript:mylinkproc();"title="Open My Link">OPEN</a>';    if (wop==0)    l3[n++]=' / <a onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:changemylinkpre()"title="Edit My Link">EDIT</a>';  l3[n++]='&nbsp;</tt>';  l3[n++]='</td></tr></table></td></tr></table>';    if (sample==1)    l3[n++]='<div style="width:640px;padding:5px;padding-left:8px;margin-bottom:5px;"><iframe src="http://www.stockconsultant.com/iv234x20.html" width=640 height=20 frameborder=0 scrolling=no marginheight=0 marginwidth=0></iframe></div>';  l3[n++]='</div>';  if ((qchart!="1")){ //&&(portf!="1")){    l3[n++]='<div style="float:right;width:162px;padding:5px 2px 3px 0px;">';    l3[n++]='<table style="width:159px;" cellspacing="0" cellpadding="0" border="0">';    l3[n++]='<tr style="padding:1px;background-color:#3871BC;">';    l3[n++]='<td nowrap style="font:bold 12px Tahoma,Arial,Helvetica,sans-serif;color:#ffffff" valign=middle  height="22" width="60%" align=center>&nbsp;Market View</td><td nowrap width="10%" id="sectvpage" style="padding-left:4px;font:normal 12px Tahoma,Arial,Helvetica,sans-serif;color:#ffffff">pg 1</td>';    l3[n++]='<td nowrap style="padding-right:5px;padding-left:10px;" width="30%" align=right valign=middle><span style="height:12px;cursor:pointer;padding-top:3px;" onclick="showsectorv(1)"><img width=10 height=9 src="../img/smleftarrow3.gif"></span>&nbsp;';    l3[n++]='<span style="height:12px;cursor:pointer;padding-top:3px;" onclick="showsectorv(2)"><img width=10 height=9 src="../img/smrightarrow3.gif"></span>';    l3[n++]='</td></tr>';        l3[n++]='<tr><td colspan=3 width="100%" nowrap style="border-right:1px solid #999999;border-left:1px solid #999999;"><div id="innertable"></div></td></tr>';    l3[n++]='<tr><td  id="secvdate" colspan=3 style="border-right:1px solid #999999;border-left:1px solid #999999;border-bottom:1px solid #999999;line-height:1.7em;padding:2px;font:10px Arial, Helvetica, sans-serif;background-color:#ffffff;" valign=middle align=center></td></tr></table>';    l3[n++]='</div><div style="clear:both;"></div>';  }  l3[n++]='</div>';  document.write(l3.join(""));  if ((qchart!="1")){// &&(portf!="1")){    decodesecvdata();    showsectorv(1);  }}else{  l3[n++]='</table></div>';  document.write(l3.join(""));  writeentryforms();}}function writesecheader(str1,str2,alignr){   document.write('<div style="padding-top:10px;border-bottom:1px solid #2861BC;"><table cellspacing=0 cellpadding=0 width=100% nowrap><tr height=19><td bgcolor="#2861bc" align=left nowrap>&nbsp;&nbsp;<span class=z2>'+str1+'</span>&nbsp;</td><td bgcolor="#2861bc" valign=top align=right><img width=6 height=6 '+ilnk+'gry_redge.gif"></td><td width=100% align='+alignr+'>'+str2+'</td></tr></td></tr></table></div>');}function flashborder(){  var id1=getid("toplist"),id2=getid("botlist");  if (flashcycle==0){    id1.style.borderColor = "#0000ff";    id2.style.borderColor = "#0000ff";    flashcycle=1;  }else{    id1.style.borderColor = "#9999aa";    id2.style.borderColor = "#9999aa";    flashcycle=0;  }}var intervalID,isflashing=0,flashcycle=0;function flashit(){  if (isflashing==0){    intervalID = setInterval(flashborder,700);    isflashing=1;  }}function stopflash(){  if (isflashing==1){    clearInterval(intervalID);    isflashing=0;  }  var id1=getid("toplist"),id2=getid("botlist");  id1.style.borderColor = "#9999aa";  id2.style.borderColor = "#9999aa";}function checkflash(){  var flashing=1,adtt=getid("addstockst"),adtb=getid("addstocksb");  if (((searcht=="1")||((portf=="1")&& !isuserlist()))&&(adtt.innerHTML.indexOf("[none")>=0)&&      (adtb.innerHTML.indexOf("[none")>=0))  flashing=0;  else if ((portf=="1")&& isuserlist()&&(getid("remstockst").innerHTML.indexOf("[none")>=0)&&      (getid("remstocksb").innerHTML.indexOf("[none")>=0)&&      (adtt.innerHTML.indexOf("[none")>=0)&&      (adtb.innerHTML.indexOf("[none")>=0)) flashing=0;  if (flashing==1) flashit();  else stopflash();}function writefooter(){  var k,ts,ts2;  if (wrotesignup!=0) return;    var ads,ss,os=[],i,n=0,os2=[],o=0,sepstr='</td></tr><tr><td height=1></td></tr><tr><td>';  document.write(divsp20+comdiv+'<table cellspacing=10 cellpadding=0 width=100%><tr><td>');  if (signupshown==0){    if ((searcht!="1")&&(portf!="1")){      if ((insymbol!="")&&(symdata!=0))        os2[o++]='&nbsp; &nbsp;<a href="#ttop" class=sm3b Title="Back to top"><b>Top</b></a>'+sepstr;      os2[o++]='<table cellspacing=0 cellpadding=3><tr><td width=15 nowrap>&nbsp; </td>';      if ((listofstocks!="")&&(symis!=0))        os2[o++]='<td><tt>'+listofstocks+'</tt><br><br></td></tr><tr><td></td>';      os2[o++]='<td><div style="background:#eaeaea;width:600px;border:1px solid #000099;padding:10px;"><span class="zoo">*** Navigation Control Keys</span><ul><li><face="verdana">Press <b>[</b> and <b>]</b> keyboard keys for the previous and next stock in your list.</font></li><li><face="verdana">Press <font size="+1"><b>\\</b></font> keyboard key to scroll down to the 8 month detailed chart and back up.</font></li><li><face="verdana">Press <b>\' or \"</b> keyboard key to scroll down to the Upside trade section and back up.</font></li></ul></div>';      os2[o++]='</td></tr></table>';    }    }  if (((searcht=="1")||(portf=="1"))&&(symlen>0)){    os[n++]='<table cellspacing=0 cellpadding=0 width=100%><tr><td nowrap valign="top"><table width=100% cellspacing=0 cellpadding=0><tr><td nowrap>';    os[n++]='<div id="botlist" style="text-align:right;background:#f1f1f1;border:2px solid #9999aa;padding:2px;font:normal 12px arial,sans-serif,helvetica;">';    if ((searcht!="1")&&(isuserlist())){      os[n++]='Remove <span id="remstocksb"><b>[none]</b>,</span>&nbsp;and/or&nbsp;';      os[n++]='<select id="moveaddb"><option>Move</option><option>Add</option></select>';    }else      os[n++]='Add';      os[n++]=' <span id="addstocksb"><b>[none]</b></span> to ';    os[n++]='<select id="list5"><option>No list selected</option>';    for (k=1;k<=8;k++){      sortit=mystocks2[cvnum(k)].split("|");       os[n++]='<option>'+k+': '+sortit[0]+'</option>';    }    os[n++]='</select> &nbsp; <input style="position:relative;top:-1px;background:#C4DF9B;font: bold 11px arial,helvetica,sans-serif;cursor:pointer;padding:0px;" type="button" value="GO!" onClick="javascript:addmoveselected(0,2);"></div>';    os[n++]='</td><td align=right width=90% nowrap>';    if (((searcht=="1")||(portf=="1"))&&((prevnum>0)||(nextnum>0)))      os[n++]=nextprevline;     os[n++]='</td></tr></table></td></tr>';    if ((portf=="1")&&(listofstocks!=""))        os[n++]='<tr><td style="padding-top:16px;"><tt>'+listofstocks+'</tt></td></tr>';        os[n++]='<tr><td nowrap valign="middle" align="right"><br>';    os[n++]='<select id="list6"><option>No list selected</option>';    for (k=1;k<=8;k++){      sortit=mystocks2[cvnum(k)].split("|");       os[n++]='<option>'+k+': '+sortit[0]+'</option>';    }    os[n++]='</select>';    ts='onmouseover="isl=1;showvtext(\''+editviewhelp+'\',\'listt2\',100,100,0);"onmouseout="isl=0;hidevtext(0);"style="cursor:pointer;font:normal 12px verdana,arial;color:#0000ff;text-decoration:underline;"';    os[n++]=' &nbsp;<a id="listt2"'+ts+'onclick="editlistwin(4);">View</a>&nbsp;/&nbsp;<a id="listt2"'+ts+'onclick="editlistwin(5);">Edit</a>';    os[n++]='</td></tr><tr><td>Data is 15-20 min delayed.';    if (((searcht=="1")||(portf=="1"))&&(stotal>numstocks))      os[n++]=' &nbsp; <span style="font:bold 13px verdana,arial;color:#0000ff;text-decoration:underline;cursor:pointer;" onclick="chartinc=-1;window.location.href=\'#ttop\'" Title="Back to top">Top</span>';    os[n++]='</td></tr></table>';  }    if ((searcht=="1")&&(symlen>0)){     var i,sl=totsearchstr.split(",");    os[n++]='<br><br><b>Search Stock List ('+maxsyms+' stocks per grouping):</b> ';    if (stotal>200) ss=200;    else ss=stotal;    os[n++]='&nbsp;Top '+ss+' stocks listed.';    os[n++]='<br>&nbsp; <tt>(copy-n-paste up to '+maxsyms+' symbols into one of 8 user lists and set to no sort to keep search order, 20 stocks listed per row)</tt><br>';    os[n++]='<table cellspacing=10 cellpadding=0 width='+(standwidthout-42)+'><tr><td><kbd>&nbsp;&nbsp;';    for(i=0;i<sl.length;i++){      if ((i==19)||(i==39)||(i==59)||(i==89)||(i==109)||(i==129)||(i==159)||(i==179)||(i==199))        os[n++]='<br>';      os[n++]=sl[i];      if ((i==69)||(i==139))         os[n++]='&nbsp;&nbsp;<br><hr width=700 size=2 noshade align=left>&nbsp;&nbsp;';      else         os[n++]=',';    }    os[n-1]=os[n-1].substr(0,os[n-1].length-1);    os[n++]='&nbsp;&nbsp;</kbd></td></tr></table>'+sepstr;  }  if ((sample==1)&&(regoutput==1)&&(signupshown==0)){     var posnum=1;    ads='" target="_blank"><img src="http://www.adtrader.com/ads/adserve.asp?POS='+posnum+'&SN=';    os[n++]=sepstr+'<table cellspacing=5 cellpadding=0><tr><td width=815 align=center><a href="http://www.adtrader.com/ads/adlink.asp?POS='+posnum+'&SN=';    if (adtrader==0)       os[n++]='1350&RN='+rannum2+ads+'1350&RN='+rannum2;    else       os[n++]=sernum+'&RN='+rannum2+ads+sernum+'&PN=-4&Desc=FAT+Utility+4&Exclude=1350&RN='+rannum2;    os[n++]='" width="468" height="60" alt="The Financial Ad Trader"></a></td></tr></table>';  }  os[n++]=sepstr+'<table cellspacing=0 cellpadding=6><tr><td bgcolor="#eaeaea" align=center width="100%"><tt>Before using the StockConsultant, subscribers and users of the free service contained herein or distributed from this site must understand and agree to the terms on the page <a href="'+hurl+'/disclaimerpage.html">'+hurl+'/disclaimerpage.html</a> or leave the site immediately by <a href="http://www.cnn.com" TARGET="_top">clicking here</a>.</tt></td></tr></table></td></tr></table></div>';  os[n++]=resdiv+'<table width=100% cellspacing=0 cellpadding=3><tr><td height=40 valign=middle nowrap><font color="#FFFFFF">&nbsp;<a HREF="'+hurl+'/contact.html#priv"><code><font color="#FFFFFF">Privacy Statement</font></code></a>&nbsp;/&nbsp;<a href="'+hurl+'/disclaimerpage.html"><code><font color="#FFFFFF">Disclaimer</font></code></a></font></td><td valign=middle align=right width=100% nowrap><SAMP><i>Chapman Advisory Group L.L.C., Copyright &copy; 1998-2010</i></SAMP>&nbsp;';  document.write(os2.join("")+os.join("")+' </td></tr></table></div>');  if ((portf=="1")||(searcht=="1")){    if (portf=="1") prevselectedlist=getid('list').selectedIndex;    for (i=0;i<symlen;i++)      getid('selstk'+i).checked=0;    if ((portf=="1")&&(isuserlist()))      for (i=0;i<symlen;i++)        getid('remstk'+i).checked=0;    if (searcht=="1") setpresetnames();    if (symlen>0){       getid('overlay').selectedIndex=0;      getid('list4').selectedIndex=0;      getid('list5').selectedIndex=0;       if ((portf=="1")&&(isuserlist())){        getid('moveaddt').selectedIndex=0;        getid('moveaddb').selectedIndex=0;      }    }    if (searcht=="1"){        var searchtext="Custom search",sf5id=getid('sf5'),scpreid=getid('scpre');      if (sf5id.selectedIndex>0){        searchtext=sf5id.options[sf5id.selectedIndex].text.split(":");        searchtext=searchtext[1];      }      if (scpreid.selectedIndex>0){        searchtext=scpreid.options[scpreid.selectedIndex].text.split(":");        searchtext=searchtext[1];      }      if (searchtext.length>44){        if (searchtext.indexOf("- ")>0){          searchtext=searchtext.split("- ");          searchtext=searchtext[1];          if (searchtext.length>44) searchtext=searchtext.substr(0,44)+'...';        } else          searchtext=searchtext.substr(0,44)+'...';      }      getid("searchtxt").innerHTML=searchtext;    }    getactiveconfig();  }  window.status='DONE LOADING PAGE...';  if (fselect=="sscroll"){    if (searcht=="1") window.location.href="#lsearch";    else if ((portf=="1")&&(sample!=1)) window.location.href="#ttop";  }  else if ((qchart=="1")||(portf=="1")||(searcht!="1")) {     scrolled=0; scrolledt=0;    if ((insymbol!="")&&(sample!=1)&&((csite=="")||(cvalid==0))) window.location.href="#ttop";  }  document.write('<div>');  var countstr=""; if (sample==1){countstr="Free_";}else{countstr="Memb_";}  if (searcht=="1") countstr+="SearchT";  else if (portf=="1") countstr+="PortF";   else if (qchart=="1") countstr+="Qchart";   else countstr+="Consult";  //<![CDATA[   document.write('<scr'+'ipt language="javascript"src="http://www.stockconsultant.com/twatch/jslogger.php?ref='+( document["referrer"]==null?'':escape(document.referrer))+'&pg='+escape(window.location)+'&pagepre='+countstr+'"></scr'+'ipt>');   //]]>  if ((sample)&&(username=='')) icBeacon('stockconsultant');}function writesponsor(){  if ((adtrader==1)&&((csite=="")||(cvalid==0))&&(sample==1))     document.write('<table width="100%" cellspacing=0 cellpadding=15><tr><td><br><a href="'+tradeurl+'" TARGET="_blank">'+tradesite+'</a> - A financial site.</td></tr><tr><td><a href="http://www.adtrader.com" TARGET="_blank">Financial Ad Trader</a> - Free banner advertising services for financial oriented websites. Get FAT!</td></tr></table>');}function writesignuppage(){  var ts;  wrotesignup=1;  if (casualu==2) ts='subexceed&'+timeleft; else ts='exceed';  if (keepinframe==1) window.location.href='http://www.stockconsultant.com/signup.html?'+ts;  else {    if ((navigator.appName!='Netscape')&&(parent.frames[1])) parent.location.href = self.location.href;    window.location.href='http://www.stockconsultant.com/signup.html?'+ts;  }}function writecur_ressup(){  var os='<u>'+cprice+'</u>, '+resexp,tn=-1;   if (justinres>=0) tn=justinres;  else     if (justoutres>=0) tn=justoutres;  if (tn>=0)     os+=', <b>'+trimnum(resprice[tn])+'</b> &#177 '+trimnum(resprice[tn]*reswidth)+', type '+writerestype2(restype[tn])+', strength '+resstrength[tn];  document.write(os);}function writerestype3(num){if (num<=1) return("S"); else if (num<=2) return("D"); else if (num<=3) return("T"); else return("T+"); }function writerestype2(num){if (num<=1) return("single"); else if (num<=2) return("<b>double</b>"); else if (num<=3) return("<b>triple</b>"); else return("<b>triple+</b>"); }function wrind(name1,color){ if (color==1) ctxt="#006600"; else if (color==2) ctxt="#0000B4"; else ctxt="#B40000";  document.write('<table cellspacing=0 cellpadding=3><tr><td colspan=4 height=8> </td></tr><tr><td></td><td nowrap valign=TOP><img width=12 height=13 '+ilnk+'tbull.gif">&nbsp;<font color="'+ctxt+'"><b>'+name1+'</b></font></td><td></td><td valign=top>'); }function writenoresults(){  writesecheader('No Data',' &nbsp; ','left');  document.write('<br><p style="font: bold 12px verdana,arial,helvetica,sans-serif;"> &nbsp; &nbsp; *** StockConsultant data not available for this stock.</p><br><p style="font: normal 12px verdana,arial,helvetica,sans-serif;"> &nbsp; &nbsp; &nbsp; - Consulting data available on NASDAQ, NYSE, and AMEX stocks above $0.10 with at least 100 days of data.</p><br><br>'); }function findgtype(gtime){if (((gtime>2)&&(gtime!=4)&&(gtime!=6)&&(gtime!=7)&&(gtime!=8)&&(gtime!=9)&&(gtime!=12)&&(gtime!=14)&&(gtime!=15)&&(gtime!=16))||(stickchart==1)) return(3); else return(4);}function changebigchart(){  if (isonchartlink>=0){    var frannum=mr(mrnd(1)*100000),gtime=isonchartlink,chartsym=insymbol,gtype=findgtype(gtime);    if(sct2[chartsym]){      var tempnum=sct2[chartsym].split(',');      chartsym=tempnum[0];    }     getid("bchart").style.backgroundImage='url(http://chart.bigcharts.com/custom/alliance/chart.asp?symb='+chartsym+'&time='+defgstrs[gtime]+'&freq='+defgtime[gtime]+'&uf=3&compidx=aaaaa:0&style=500&type='+gtype+'&size=2&country=us&'+frannum+')';    getid("chartname").innerHTML =defgdesc[gtime];    wrotetonbc=0;    writetonbc(1,gtype,0);    if (gtype==3) var barw=2;    else var barw=4;     getid("bcdiv").style.width=barw+'px';  }}function turnonoverlays(){  var ovlid=getid('overlay'),snum=ovlid.selectedIndex,i,j,indxintra;  if (charts==0){    window.alert("No Charts displayed.");    ovlid.selectedIndex=0;    return;  }  isonchartlink=parseInt(ovlid.options[snum].value);  for (i=0;i<symlen;i++)    if (wlc_nochart[i]==0){      if (sct2[wlc_sym[i]]){        indxintra=sct2[wlc_sym[i]].split(',');        indxintra=indxintra[2];           } else indxintra=1;      if (wlc_sym[i].charAt(0)=="*") indxintra=0;      if (indxintra==1){        for (j=5;j>=0;j--)          getid('mc'+i+'_'+j).style.background='#dddddd';        if (snum>0){          lockoverlay[i]=snum;           getid('mc'+i+'_'+(snum-1)).style.background='#ffffff';          changebigchartwlc(i,0);          if(getid('bchartbot'+i).style.display=='block')            getid('bchartbot'+i).style.display='none';        } else {          lockoverlay[i]=0;          getid("bchart"+i).style.display = 'none';          getid('bchartbot'+i).style.display='none';        }      }    }}function clearoverlayhighlight(nz){  var j;  for (j=5;j>=0;j--)    getid('mc'+nz+'_'+j).style.background='#dddddd'; }function displaybotquote(nz,symbol){  var chartsym=symbol,frannum=Math.round(Math.random(1)*100000);  if (getid("bchartbot"+nz).style.display=="block"){    getid("bchartbot"+nz).style.display="none";    if (((portf=="1")||(searcht=="1"))&&((msbrowser==1)&&(volstat_a[nz]==1))    &&(getid("vc"+nz).style.display=="block"))      getid("vc"+nz).style.display="none";    return;  }  if(sct2[chartsym]){    var tempnum=sct2[chartsym].split(',');    chartsym=tempnum[0];  }  getid("bchartbot"+nz).style.backgroundImage='url(http://chart.bigcharts.com/custom/alliance/gifquote/alliance-450x81.img?symb='+chartsym+'&'+frannum+')';  getid("bchartbot"+nz).style.display = "block";  if (((portf=="1")||(searcht=="1"))&&((msbrowser==1)&&(volstat_a[nz]==1)))    getid("vc"+nz).style.display="block";}function turnoffbigchart(nz){  lockoverlay[nz]=0;  clearoverlayhighlight(nz);  getid('bchart'+nz).style.display='none';  if(getid('bchartbot'+nz).style.display=='block'){    getid('bchartbot'+nz).style.display='none';    if(((portf=='1')||(searcht=='1'))&&((msbrowser==1)&&(volstat_a[nz]==1)))      getid('vc'+nz).style.display='none';  } }function changebigchartwlc(nz,num){  if (isonchartlink>=0){    var frannum=mr(mrnd(1)*100000),tempnum,gtime=isonchartlink,chartsym,gtype=findgtype(gtime),indxintra;    if (num==0) chartsym=wlc_sym[nz];    else chartsym=insymbol;    if(sct2[chartsym]){      tempnum=sct2[chartsym].split(',');      chartsym=tempnum[0];      indxintra=tempnum[2];    }else indxintra=1;    if ((indxintra==1)&&(chartsym.substr(0,1)!='*')){      getid("bcharttxt"+nz).innerHTML='<b>'+defgdesc2[isonchartlink]+'</b>&nbsp; -- Click to lock/unlock chart -- &nbsp; <span style="position:relative;top:-1px;font:bold 11px arial,helvetica,sans-serif;color:#0000ee;text-decoration:underline;cursor:pointer;"onClick="displaybotquote('+nz+',\''+chartsym+'\')">Show Quote</span>';      getid("bcharttxtoff"+nz).innerHTML='Close';      if ((portf=="1")||(searcht=="1"))        getid("bcharttxtz"+nz).innerHTML=wlc_syminfo[nz];      getid("bchart"+nz).style.backgroundImage='url(http://chart.bigcharts.com/custom/alliance/chart.asp?symb='+chartsym+'&time='+defgstrs[gtime]+'&freq='+defgtime[gtime]+'&uf=3&compidx=aaaaa:0&style=500&type='+gtype+'&size=2&country=us&'+frannum+')';      getid("bchart"+nz).style.display = "block";    }  }}function tonbc(num,nz){  if (nz>=0)    getid("bcdiv"+nz).style.left=(1+2*num)+'px';  else    getid("bcdiv").style.left=(1+2*num)+'px';}var wrotetonbc=0;function writetonbc(ptype,gtype,nz){  if ((ptype==1)&&(wrotetonbc==1)) return;  if ((ptype==0)&&(wrotetonoverlay[nz]==1)) return;  if (ptype==1) wrotetonbc=1;  else {    wrotetonoverlay[nz]=1;    gtype=findgtype(multichart[lockoverlay[nz]-1]-1);  }  var i,barw=4,l3=[],l3n=0,tn=2;  if ((opera==0)||((opera==1)&&(bV>=9))){    if(gtype==3) barw=2;    for (i=0;i<192;i++){      if (i==191) tn=30;       l3[l3n++]='<div'+z2a+(1+i*2)+'px;top:0px;width:'+tn+'px;height:270px;"onmouseover="tonbc('+i;      if (ptype==1)        l3[l3n++]=',-1)">';      else        l3[l3n++]=','+nz+')">';      l3[l3n++]='</div>';    }    if (ptype==1)      l3[l3n++]='<div id="bcdiv"';    else      l3[l3n++]='<div id="bcdiv'+nz+'"';    l3[l3n++]=z3a+'383px;top:0px;width:'+barw+'px;height:270px;background:#000000;filter:alpha(opacity=15);opacity:0.15;-moz-opacity:0.15;"></div>';    if (ptype==1) getid("bchartin").innerHTML =l3.join("");    else getid("bchartin"+nz).innerHTML =l3.join("");  }}function writebigchart(smchart2,compname,exchange,local,gtime) { /* gtime ignored for local=1 */  var l3=[],l3n=0,gtype=findgtype(gtime),i,dumnum=mr(mrnd(1)*100000),chartloc,ts;  if ((local==0)||(local==2)){    if (local==0)      l3[l3n++]='<font color=#0000ee><b>'+compname+'&nbsp;('+exchange+')</b></font></td></tr><tr><td colspan=4><img src="http://chart.bigcharts.com/custom/alliance/gifquote/alliance-450x81.img?symb='+smchart2+'&'+dumnum+'" width=450 HEIGHT=81></td></tr>';    l3[l3n++]='<tr><td height=15 valign=middle colspan=4 align=center><tt>'+defgdesc[gtime]+' Chart of '+compname+'</tt></td></tr><tr><td colspan=4><img src="http://chart.bigcharts.com/custom/alliance/chart.asp?symb='+smchart2+'&time='+defgstrs[gtime]+'&freq='+defgtime[gtime]+'&uf=3&compidx=aaaaa:0&style=500&type='+gtype+'&size=2&country=us&'+dumnum+'" width=450 HEIGHT=300></td></tr>';  }  else{    chartloc='http://chart.bigcharts.com/custom/alliance/gifquote/alliance-450x81.img?symb='+smchart2+'&'+dumnum;    if ((dbak==1)&&(smchart2==insymbol)) chartloc='http://www.stockconsultant.com/bigcharts/'+smchart2+'.gif';    l3[l3n++]='<tr><td colspan=4><div id="bchartt" style="position:relative;top:0px;left:0px;width:450px;height:81px;background-image:url('+chartloc+');background-repeat:no-repeat;"></div></td></tr>';      if (sample==1)      l3[l3n++]='<tr><td colspan=4 align=left height=33 valign=middle><table cellspacing=0 cellpadding=0><tr><td style="padding-top:4px;" nowrap><font face="verdana">Trade '+insymbol+' now at&nbsp;</font></td><td valign=middle nowrap><iframe src="http://www.stockconsultant.com/iv88x31_tn.html" width=88 height=31 frameborder=0 scrolling=no marginheight=0 marginwidth=0></iframe></td><td width=70% valign=middle align=center nowrap><img width=12 height=13 '+ilnk+'tbull.gif"> <a style="font-family:verdana" target="_blank" href="http://Valid1.net/default.aspx?BDLID=719&redirect_url=http%3A%2F%2Fwww.stockconsultant.com">SC Special Offers</a></td></tr></table></td></tr>';    l3[l3n++]='<tr><td height=22 valign=middle colspan=4><tt>&nbsp;</tt>';    var found=-1;    for (i=0;i<6;i++)      if (multichart[i]>0){         if((multichart[i]-1)==gtime) found=gtime;         l3[l3n++]='<span class=sp3 style="padding:2px;padding-left:3px;"onmouseout="this.className=\'sp3\';isonchartlink=-1;"onmouseover="this.className=\'sp3b\';isonchartlink='+(multichart[i]-1)+';changebigchart();">'+defgdesc2[multichart[i]-1]+'</span><tt> </tt>';      }    if (found<0)      l3[l3n++]='<a class=sp3 style="padding:2px;"onmouseout="this.className=\'sp3\';isonchartlink=-1;"onmouseover="this.className=\'sp3b\';isonchartlink='+gtime+';changebigchart();">'+defgdesc2[gtime]+'</a><tt> </tt>';    l3[l3n++]='<tt> &nbsp; <span id="chartname">'+defgdesc[gtime]+'</span>  selected &nbsp;&nbsp;</tt><a class="sp3"'+iso3+'-1,5,1)" title="click for realtime chart">RT5'+nbz+'<a class="sp3"'+iso3+'-1,139,1)" title="click for realtime chart">RT3'+nbz+'<a class="sp3"'+iso3+'-1,41,1)" title="click for realtime chart">RT1</a></span></td></tr><tr><td colspan=4><div id="bchart" style="position:relative;top:0px;left:0px;width:450px;height:300px;background-image:url(http://chart.bigcharts.com/custom/alliance/chart.asp?symb='+smchart2+'&time='+defgstrs[gtime]+'&freq='+defgtime[gtime]+'&uf=3&compidx=aaaaa:0&style=500&type='+gtype+'&size=2&country=us&'+dumnum+');background-repeat:no-repeat;">';    l3[l3n++]='<div id="bchartin" onmouseover="writetonbc(1,'+gtype+',0)"style="position:absolute;top:15px;left:0px;width:450px;height:270px;"></div>';    l3[l3n++]='</div></td></tr>';  }  if (sample==1) ts=1; else ts=10;  l3[l3n++]='<tr><td colspan=4 height='+ts+'> </td></tr><tr><TD ALIGN="center" colspan=4><tt><font color="#666666">Historical and current end-of-day data provided by <a href="http://www.FTInteractiveData.com/" TARGET="new">FT Interactive Data</a>.</font></tt></td></tr>';  if (gtime<=5)    l3[l3n++]='<tr><td align="center" colspan=4><tt><font color="#666666">Intraday data provided by <a href="http://www.spcomstock.com/" TARGET="new">S&amp;P Comstock</a> and subject to <a href="http://custom.marketwatch.com/custom/docs/spcomstock-terms.asp" TARGET="new">terms of use</a>.</font></tt></td></tr>';  l3[l3n++]='<tr><td colspan=4 height=1> </td></tr><tr><td ALIGN="center" colspan=4><tt><font color="#666666">Copyright &copy; 1998-2001 <a href="http://cbs.marketwatch.com" target=new>MarketWatch.com</a> Inc. <a href="http://custom.marketwatch.com/custom/docs/useragreement.asp" target=new>User agreement</a> applies.</font></tt>';  if ((local==0)||(local==1))    l3[l3n++]='<img src="http://custom.marketwatch.com/custom/alliance/tpix/i/349.gif" height="1" width="1">';  if (local==1)     document.write(l3.join(""));   else     return(l3.join(""));}function linksgraph(){   if (schart!=1){    var bwidth, botpadding=10,add1=0;    if (gtime2>=0) gtime=gtime2;    defg[gtime]='selected="yes"';    gtype=findgtype(gtime);     defg2[activelist[5]-1]='selected="yes"';    var l3=[],n=0,tmpstr,outstr,fc1='<tr><td colspan=2 nowrap><kbd> &nbsp;', fc1b='<tr><td colspan=2 bgcolor="#eaeaea" nowrap><kbd> &nbsp;', fc2='<tr><td height=2 colspan=2 nowrap bgcolor="#ffffff"> </td></tr>',fc2b='<tr><td colspan=2 height=2 bgcolor="#eaeaea"> </td></tr>',fc3='</a></kbd></td></tr>';    if (noresults==0){      if (!msbrowser) add1=1;       l3[n++]='<div style="position:relative;top:8px;left:'+(8+add1)+'px;padding-bottom:7px;"><div style="width:'+(standwidthout-15)+'px;background:#dddddd;"><div style="width:'+(standwidthout-15)+'px;position:relative;top:-3px;left:'+(-3-add1)+'px;background:#eeeeee;border:1px solid #bbbbbb;border-left:1px solid #999999;border-top:1px solid #999999;"><table cellspacing=0 cellpadding=2 width=100%><tr><td nowrap width=10% valign=top><font style="padding-left:3px;font:bold 11px Tahoma, arial;">Overall Summary:</font></td><td align=left valign=top nowrap rowspan=2 width=23%><tt>'+writebarg(bugraph,1,2,1)+'<font color="#0000ee">Bullish</font><br>'+writebarg(-brgraph,1,3,1)+'<font color="#EE0000">Bearish</font></tt></td>';      l3[n++]='<td nowrap valign=top width=10%><font style="font:bold 11px Tahoma, arial;">Trade Quality:&nbsp;</font></td><td align=left rowspan=2 nowrap valign=top width=23%><tt><font color="#0000ee">Upside</font> ';      if ((sample==1)&&(notradedet==1)) l3[n++]='<font color="#0000ee">Members only</font>';      else l3[n++]=writebarg(tquall,1,2,1)+'<font color="#0000ee">'+tradequaltxt[mf(tquall/10)]+'</font>';      l3[n++]='<br><font color="#EE0000">Downside</font> '      if ((sample==1)&&(notradedet==1)) l3[n++]='<font color="#EE0000">Members only</font>';      else {        if (target1_short>0) l3[n++]=writebarg(-tquals,1,3,1)+'<font color="#EE0000">'+tradequaltxt[mf(tquals/10)]+'</font>';        else l3[n++]='<font color="#EE0000">N/A</font>';      }      l3[n++]='</tt></td>';      l3[n++]='<td nowrap valign=top width=10% align=right><font style="font:bold 11px Tahoma, arial;">&nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; Break Alerts:&nbsp;</font></td><td rowspan=2 nowrap align=left valign=top width=24%><tt>';      var didalert=0;      if ((confirmupbrk==1) ||((isnotbearish) && (!bearish1daymonflow) && (justoutres>=0) && (upsidebreak>0.0))||( (justinres>=0) && (upsidebreak>0.0) )){        l3[n++]='<font color="#0000ee">Breakout</font>';        didalert=1;      }      if ((confirmdwnbrk==1)||( (isnotbullish)&&(!bullish1daymonflow) && (justoutres>=0) && (dwnsidebreak>0.0))||((justinres>=0) && (dwnsidebreak>0.0) )){        l3[n++]='<br><font color="#EE0000">Breakdown</font>';        didalert=1;      }      if (didalert==0)         l3[n++]='None';      l3[n++]='</tt></td></tr><tr><td nowrap colspan=6 height=12px valign=middle align=center><tt><br>High trade quality is a combination of good profit, profit/loss ratio and target potential. <a href="#upsidet">Jump to trade section</a></tt></td>';      l3[n++]='</table></div></div></div>';    }    if (msbrowser){      bwidth=smallchartwidth;      botpadding=0;    }else{      bwidth=smallchartwidth+3;      if (sample==1) botpadding=15;    }    l3[n++]='<div style="padding-top:3px;padding-bottom:'+botpadding+'px;"><div style="float:left;width:'+bwidth+'px;">';    document.write(l3.join(""));l3=[];n=0;    writesmallchart();    l3[n++]=linktabstart1+'<table cellspacing=0 cellpadding=1 width=100%><tr><td bgcolor="#0042A5" nowrap><kbd>&nbsp;'+whtf;    l3[n++]='<b>Headlines</b>&nbsp;</font></kbd></td><td nowrap><kbd> &nbsp; '+iso2+'-1,30,1)">NbcM'+nbz+iso2+'-1,7,1)">CnnM'+nbz+iso2+'-1,35,1)">StoryStocks'+nbzs+iso2+'-1,8,1)">MarketUpdate'+nbzs+iso2+'-1,109,1)">(2)'+nbzs+iso2+'-1,82,1)">(3)'+fc3;    l3[n++]=fc1+' &nbsp;'+iso2+'-1,70,0)">InPlay'+nbz+iso2+'-1,61,1)">Upgrades</a> / '+iso2+'-1,77,1)">Down</a> / '+iso2+'-1,85,1)">New'+nbz+iso2+'-1,59,1)">EarnSurp'+nbz+iso2+'-1,81,1)">EarnNews'+nbz+iso2+'-1,108,1)">(2)'+fc3;    l3[n++]=fc2+fc1b+'<tt><b>Calendar:</b></tt>&nbsp;'+iso2+'-1,58,1)">Earnings'+nbz+iso2+'-1,62,1)">Splits'+nbz+iso2+'-1,57,1)">EconomicCal'+nbzs+iso2+'-1,55,1)">(2)'+nbz+iso2+'-1,118,1)">Fed'+nbz+iso2+'-1,107,0)">Charts'+fc3;    l3[n++]=fc1b+' &nbsp;'+iso2+'-1,84,1)">BuyBack'+nbz+iso2+'-1,71,1)">WeekPreview'+nbz+iso2+'-1,120,1)">Commodities'+nbz+iso2+'-1,129,1)">MarketPulse'+fc3;    l3[n++]=fc2b+fc1+'PreMarket: '+iso2+'-1,34,1)">Quote'+nbzs+iso2+'-1,63,1)">Indicator'+nbzs+iso2+'-1,67,1)">MostAct'+nbzs+iso2+'-1,105,1)">BeforeBell'+nbzs+iso2+'-1,130,1)">WorldMarkets'+fc3;    l3[n++]=fc1+iso2+'-1,45,1)"><b>Futures</b>'+nbz+'AfterHours: '+iso2+'-1,64,1)">Quote'+nbz+iso2+'-1,69,1)">Indicator'+nbz+iso2+'-1,1,1)">MostAct'+nbz+iso2+'-1,104,1)">AfterBell'+fc3;    l3[n++]=fc2+'</table></div>';    if (indexes==0){       l3[n++]=linktabstart2+'<table cellspacing=0 cellpadding=1 width=100%><tr><td bgcolor="#0042A5" nowrap><kbd>'+whtf+'&nbsp;<b>'+insymbol+' Data</b>&nbsp;</font></kbd></td><td nowrap><kbd> '+nbz+iso2+'-1,15,1)">Profile'+nbzs+iso2+'-1,60,1)">(2)'+nbz+iso2+'-1,103,1)">Stats'+nbz+iso2+'-1,66,1)">Float'+nbz+'Income: '+iso2+'-1,90,1)">Quarter'+nbzs+iso2+'-1,111,1)">Year'+fc3;      l3[n++]=fc1+' &nbsp;'+iso2+'-1,32,1)">EarningsDate'+nbz+iso2+'-1,75,1)">ShortInterest'+nbzs+iso2+'-1,76,1)">(2)'+nbz+iso2+'-1,89,1)">KeyDevelop'+nbz+iso2+'-1,68,1)">FyiAlrts'+nbz+iso2+'-1,43,1)">PEs'+fc3;      l3[n++]=fc1+' &nbsp;'+iso2+'-1,78,1)">Industry'+nbzs+iso2+'-1,121,1)">IndustryStks'+nbz+iso2+'-1,39,1)">8-K 10-K 10-Q'+nbz+'Earnings: '+iso2+'-1,91,1)">Qtr'+nbzs+iso2+'-1,92,1)">Growth'+fc3;      l3[n++]=fc2+fc1b+'<tt><b>News:</b></tt>&nbsp; '+iso2+'-1,13,1)">YahooNews'+nbz+iso2+'-1,24,1)">StreetInsider'+nbz+iso2+'-1,9,1)">MSN'+nbz+iso2+'-1,49,1)">Reuters'+nbz+iso2+'-1,12,1)">Scott'+fc3;      l3[n++]=fc1b+'<tt><b>Forums:</b></tt>';      l3[n++]='&nbsp; '+iso2+'-1,19,1)">YahooForums'+nbz+iso2+'-1,124,1)">IVillage'+nbz+iso2+'-1,21,1)">ClrStation'+nbz+iso2+'-1,18,1)">RBull'+nbz+iso2+'-1,123,1)">Lion'+nbz+iso2+'-1,20,1)">SI';      l3[n++]=fc3+fc1b+'<tt><b>Analysts:</b></tt>&nbsp; '+iso2+'-1,16,1)">Up/Downgrades'+nbz+iso2+'-1,14,1)">Ratings 1'+nbzs+iso2+'-1,79,1)">(2)'+nbzs+iso2+'-1,100,1)">(3)'+nbz+iso2+'-1,17,1)">Estimates'+nbzs+iso2+'-1,52,1)">(2)'+fc3;      l3[n++]=fc1b+'<tt><b>EPS:</b></tt>&nbsp; '+iso2+'-1,106,1)">Trend 1'+nbzs+iso2+'-1,72,1)">(2)'+nbz+iso2+'-1,51,1)">Quarter'+nbz+iso2+'-1,4,1)">Year'+nbz+iso2+'-1,83,1)">Consensus'+nbz+iso2+'-1,101,1)">Surprise'+fc3;      l3[n++]=fc2b+fc2+fc1+'<tt><b>RealTime:</b></tt>&nbsp; '+iso2+'-1,5,1)">Chart 5d'+nbzs+iso2+'-1,139,1)">3d'+nbzs+iso2+'-1,41,1)">1d'+nbz+iso2+'-1,22,0)">Quote 1'+nbzs+iso2+'-1,44,1)">(2)'+nbz+iso2+'-1,134,0)">NLS'+fc3;      l3[n++]=fc1+'<tt><b>PreM/AH Quotes:</b></tt>&nbsp; '+iso2+'-1,87,0)">PreMarket'+nbzs+iso2+'-1,11,0)">PMC'+nbz+iso2+'-1,88,0)">AfterHours'+nbzs+iso2+'-1,47,0)">AHC'+nbz+iso2+'-1,126,1)">Chart'+fc3+fc1+'<tt><b>Option Quotes:</b></tt>&nbsp; ';      if (optionable==1) l3[n++]=iso2+'-1,113,1)">ByMonth'+nbz+iso2+'-1,99,1)">P/C Vol'+nbzs+iso2+'-1,95,1)">(2)'+nbz+iso2+'-1,98,1)">Ratio'+nbz+iso2+'-1,96,1)">OI Config'+nbz+iso2+'-1,2,1)">MA'+fc3;      else l3[n++]='-- No options available for this stock --</kbd></td></tr>';       l3[n++]=fc2+fc1b+'<tt><b>Competitors:</b></tt>&nbsp; '+iso2+'-1,38,1)">Analysis 1'+nbz+iso2+'-1,93,1)">(2)'+nbz+iso2+'-1,94,1)">(3)'+nbz+'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '+iso2+'-1,131,1)">Historical Quotes'+fc3;      l3[n++]=fc1b+'<tt><b>Holdings:</b></tt>&nbsp; '+iso2+'-1,10,1)">Institutions 1'+nbz+iso2+'-1,3,1)">(2)'+nbz+iso2+'-1,119,1)">Insider Buy/Sell 1'+nbz+iso2+'-1,46,1)">(2)'+nbz+iso2+'-1,80,1)">(3)'+fc3;      l3[n++]=fc2b+'</table></div><div style="height:2px;"></div>';    }    l3[n++]='</div><div style="position:relative;left:6px;float:right;width:468px;">';    document.write(l3.join(""));    if (indxintra==1){       l3=[];n=0;      seltime='<OPTION '+defg[0]+'>1-day</OPTION><OPTION '+defg[1]+'>2 days</OPTION><OPTION '+defg[2]+'>3 days</OPTION><OPTION '+defg[3]+'>5 days</OPTION><OPTION '+defg[4]+'>10 days</OPTION><OPTION '+defg[5]+'>---------</OPTION><OPTION '+defg[6]+'>1-month</OPTION><OPTION '+defg[7]+'>2 months</OPTION><OPTION '+defg[8]+'>3 months</OPTION><OPTION '+defg[9]+'>6 months</OPTION><OPTION '+defg[10]+'>YTD</OPTION><OPTION '+defg[11]+'>1-year</OPTION><OPTION '+defg[12]+'>2 years</OPTION><OPTION '+defg[13]+'>3 years</OPTION><OPTION '+defg[14]+'>4 years</OPTION><OPTION '+defg[15]+'>5 years</OPTION><OPTION '+defg[16]+'>10 years</OPTION><OPTION '+defg[17]+'>All Data</OPTION>';      l3[n++]='<table width=458 cellspacing="0" cellpadding="0"><tr><td valign=middle height=35>';      if ((casualu!=2)||(sample==1))        l3[n++]='<font '+stylestrb+'><img width=12 height=13 '+ilnk+'tbull.gif"><b><a '+iso3+'-1,65,0)">'+insymbol+' MultiChart</a></b>&#8482</font>';      l3[n++]='<kbd> &nbsp;&nbsp;<a href="javascript:ctoggle(0,1)">Show ';      if (stickchart==0) l3[n++]='Bar';      else l3[n++]='Candle';      l3[n++]='Charts</a>&nbsp;&nbsp;Fix top chart as &nbsp;</kbd><select id="time2" onChange="consult(document.consultinput.symbol.value,0,2,0,0)"><OPTION '+defg2[0]+'>1-day</OPTION><OPTION '+defg2[1]+'>2 days</OPTION><OPTION '+defg2[2]+'>3 days</OPTION><OPTION '+defg2[3]+'>5 days</OPTION><OPTION '+defg2[4]+'>10 days</OPTION><OPTION '+defg2[5]+'>---------</OPTION><OPTION '+defg2[6]+'>1-month</OPTION><OPTION '+defg2[7]+'>2 months</OPTION><OPTION '+defg2[8]+'>3 months</OPTION><OPTION '+defg2[9]+'>6 months</OPTION><OPTION '+defg2[10]+'>YTD</OPTION><OPTION '+defg2[11]+'>1-year</OPTION><OPTION '+defg2[12]+'>2 years</OPTION><OPTION '+defg2[13]+'>3 years</OPTION><OPTION '+defg2[14]+'>4 years</OPTION><OPTION '+defg2[15]+'>5 years</OPTION><OPTION '+defg2[16]+'>10 years</OPTION><OPTION '+defg2[17]+'>All Data</OPTION></select>';      if (bN=='Netscape') var sizez=8; else var sizez=6;      l3[n++]='</td></tr><tr><td height=1> </td></tr></table>';      l3[n++]='<div style="position:relative;left:4px;"><table width="450" cellspacing="0" cellpadding="0"><tr><td colspan=4><img '+ilnk+'double-rules.gif" height=2 width=450>';      l3[n++]='</td></tr>';      document.write(l3.join(""));      writebigchart(smchart2,compname,exchange,1,gtime);      document.write('</td></tr></table></div>');     }    else       document.write('<br><br><br><br><br><br><center><b>No Intraday Chart Available</b></center><br><br>');    document.write('</div><div style="clear:both;"></div></div>');     if ((sample==0)||((sample==1)&&(allowindexcharts==1))){      var frannum=Math.round(Math.random(1)*100000),ts='';      document.write('<div style="text-align:center;padding-top:12px;padding-bottom:20px;width:'+(standwidthout-10)+'px;"><a href="http://www.redinews.com" title="redinews free index chart"><img width=550 height=80 src="http://www.stockconsultant.com/consultnow/zdata'+(dbak+1)+'/rediimg.png" border=0 alt="redinews index chart bar"></a></div>');    }  }}function hideObject() {  getid("smallchart1").style.display = "none";  getid("smallchart2").style.display = "block";}function showObject() {  getid("smallchart2").style.display = "none";  getid("smallchart1").style.display = "block";}function hideObject2() {  if (locklargec==0){    getid("L1").style.display = "none";    getid("L2").style.display = "none";    getid("L3").style.display = "block";    getid("L4").style.display = "block";  }}function showObject2() {  if (locklargec==0){    getid("L3").style.display = "none";    getid("L4").style.display = "none";    getid("L1").style.display = "block";    getid("L2").style.display = "block";  }}var locklargec=0;function lockout(){  if (locklargec==0){    hideObject2();    locklargec=1;  }else{    locklargec=0;    showObject2();  }}var lockcalerts=0;function lockoutchartalerts(){  if (lockcalerts==0){    hidechartalerts2();    lockcalerts=1;  }else{    lockcalerts=0;    showchartalerts2();  }}function showchartalerts2() {  if (lockcalerts==0){    getid("cab2").style.display="none";    getid("cab1").style.display="block";  }}function hidechartalerts2() {  if (lockcalerts==0){    getid("cab1").style.display="none";    getid("cab2").style.display="block";  }}var lockcalerts2=0;function lockoutchartalerts2(){  if (lockcalerts2==0){    hidechartalerts22();    lockcalerts2=1;  }else{    lockcalerts2=0;    showchartalerts22();  }}function showchartalerts22() {  if (lockcalerts2==0){    getid("L6").style.display="none";    getid("L5").style.display="block";  }}function hidechartalerts22() {  if (lockcalerts2==0){    getid("L5").style.display="none";    getid("L6").style.display="block";  }}function writechartalerts(){  var i,i2,z,l3=[],l3n=0,tempnum,avgz,num2,x=0,y=10;  l3[l3n++]='<div style="padding-top:8px;padding-bottom:10px;"><div style="background:#F9F0DF;border-width:1px;border-color:#0000ee;border-style:solid;z-index:6;position:relative;top:'+y+'px;left:'+x+'px;width:395px;height:130px;"><div'+dsv+'112px;left:95px;"><tt>Days Back</tt></div>';  l3[l3n++]='<div'+dsv+'15px;left:10px;background:#bfbfbf;width:1px;height:82px;"><!-- --></div><div'+dsv+'15px;left:10px;background:#bfbfbf;width:212px;height:1px;"><!-- --></div><div'+dsv+'15px;left:218px;background:#bfbfbf;width:1px;height:82px;"><!-- --></div><div'+dsv+'97px;left:10px;background:#bfbfbf;width:212px;height:1px;"><!-- --></div>';  l3[l3n++]='<div'+dsv+'36px;left:10px;background:#bfbfbf;width:212px;height:1px;"><!-- --></div><div'+dsv+'56px;left:10px;background:#bfbfbf;width:212px;height:1px;"><!-- --></div><div'+dsv+'76px;left:10px;background:#bfbfbf;width:212px;height:1px;"><!-- --></div><div'+dsv+'15px;left:174px;background:#bfbfbf;width:1px;height:82px;"><!-- --></div><div'+dsv+'15px;left:134px;background:#bfbfbf;width:1px;height:82px;"><!-- --></div><div'+dsv+'15px;left:94px;background:#bfbfbf;width:1px;height:82px;"><!-- --></div>';  l3[l3n++]='<div'+dsv+'8px;left:226px;"><tt>Strong Bullish</tt></div><div'+dsv+'29px;left:226px;"><tt>Mild Bullish</tt></div><div'+dsv+'49px;left:226px;"><tt>Neutral</tt></div><div'+dsv+'69px;left:226px;"><tt>Mild Bearish</tt></div><div'+dsv+'89px;left:226px;"><tt>Strong Bearish</tt></div>';  l3[l3n++]='<div'+dsv+'99px;left:214px;"><tt>0</tt></div><div'+dsv+'99px;left:172px;"><tt>5</tt></div><div'+dsv+'99px;left:130px;"><tt>10</tt></div><div'+dsv+'99px;left:90px;"><tt>15</tt></div><div'+dsv+'99px;left:10px;"><tt>25</tt></div>';  if (day3c.length==61){    i2=day3c.length-1;    l3[l3n++]='<div'+dsv+'48px;left:280px;"><a style="font:bold 12px arial,helvetica,sans-serif;color:#0000ff;TEXT-DECORATION:underline;" onmouseover="javascript:hidechartalerts2()"onmouseout="javascript:showchartalerts2()"onClick="lockoutchartalerts()" href="javascript:lockoutchartalerts()" title="Click to Lock/unlock 2 day Avg">\>\>Show 2 Day Avg</a></div>';    for (z=0;z<2;z++){       if (z==0)        l3[l3n++]='<div id="cab1"style="display:block"><div'+dsv+'0px;left:20px;"><tt>3 Day Chart Alert (over last 25 days)</tt></div>';      else        l3[l3n++]='<div id="cab2"style="display:none"><div'+dsv+'0px;left:55px;"><tt>3 Day Chart Alert (2 day avg)</tt></div>';      for(i=i2;i>34;i--){        if (z==0)           tempnum=mf(20.0*day3c[i]);        else          tempnum=mf(20.0*(1.0*day3c[i]+1.0*day3c[i-1])*0.5);        if ((tempnum>0.01)&&(tempnum<41.0))          l3[l3n++]='<div'+dsv+(56-tempnum)+'px;left:'+(211-(60-i)*8)+'px;background:#3333ff;width:6px;height:'+tempnum+'px;"><!-- --></div>';        else if ((tempnum<-0.01)&&(tempnum>-41.0))          l3[l3n++]='<div'+dsv+'57px;left:'+(211-(60-i)*8)+'px;background:#cc0000;width:6px;height:'+(-tempnum)+'px;"><!-- --></div>';        else          l3[l3n++]='<div'+dsv+'52px;left:'+(211-(60-i)*8)+'px;background:#bfbfbf;width:6px;height:9px;"><!-- --></div>';      }      l3[l3n++]='</div>';    }  }  l3[l3n++]='</div></div>';  document.write(l3.join(""));}function writesmallchart(){if (nochart==0) {  var l3=[],l3n=0,temphigh=-999,templow=999,intermedstep,i,i2,i4,pricespan=ypricer[1]*4.0, tempnum,yprice=ddata[6].split(","),n=yprice.length, midnum=mf(n/4);  l3[l3n++]='<div style="position:relative;z-index:3;top:5px;left:203px;width:65px;height:14px;"><a style="font: bold 12px arial,helvetica,sans-serif;color:#0000ff" onmouseover="javascript:hideObject()" onmouseout="javascript:showObject()" href="javascript:hideObject()">\>\>ZOOM IN</a></div>';  l3[l3n++]='<div id="smallchart1" style="position:relative;top:-10px;left:20px;width:279px;height:166px;"><div'+dsv+'20px;left:0px;background:#3333ff;width:1px;height:137px;"><!-- --></div><div'+dsv+'20px;left:250px;background:#3333ff;width:1px;height:137px;"><!-- --></div><div'+dsv+'1px;left:0px;">&nbsp;<tt>'+insymbol+' - 1 year &nbsp; &nbsp; <I>CAG &copy;99-10</I></tt></div>';  for (i=0;i<7;i++){    tempnum=mf(i*0.166667*136.0);    l3[l3n++]='<div'+z1a+'0px;top:'+(156-tempnum)+'px;background:#3333ff;width:254px;height:1px;"><!-- --></div><div'+dsv+(150-tempnum)+'px;left:257px;"><em>'+trimnum(ypricer[0]+i*0.166667*pricespan)+'</em></div>';  }  i2=n-82; if (i2<0) i2=0;  for (i=0;i<n;i++) {    yprice[i]=mf(yprice[i]);    if (yprice[i]>=0){       if (i>i2) { if (yprice[i]>temphigh) temphigh=yprice[i]; if (yprice[i]<templow) templow=yprice[i]; }      tempnum=mr(yprice[i]*1.36);      l3[l3n++]='<div'+z2a+(i+1)+'px;top:'+(156-tempnum)+'px;background:#00a000;width:1px;height:'+tempnum+'px;"><!-- --></div>';    }    else {      l3[l3n++]='<div'+z0a+(i+1)+'px;top:20px;background:#bfbfbf;width:1px;height:147px;"><!-- --></div><div'+dsv+'155px;left:'+(i+4)+'px;"><tt>'+monthname[-yprice[i]-1].charAt(0)+'</tt></div>';       if (i>0) { tempnum=mr(yprice[i-1]*1.36);                 l3[l3n++]='<div'+z2a+(i+1)+'px;top:'+(156-tempnum)+'px;background:#00a000;width:1px;height:'+tempnum+'px;"><!-- --></div>';      }    }  }  l3[l3n++]='</div>';   temphigh=1.00*(temphigh); templow=1.00*(templow);  temphigh+=2;templow-=2;  var templowindx=templow; if((temphigh-templow)>0.0) intermedstep=136.0/(temphigh-templow); else intermedstep=136.0;  temphigh=temphigh*pricespan/100.0+ypricer[0]; templow=templow*pricespan/100.0+ypricer[0];  pricespan=temphigh-templow;  l3[l3n++]='<div id="smallchart2" style="display:none;position:relative;top:-10px;left:20px;width:279px;height:166px;"><div'+dsv+'20px;left:0px;background:#3333ff;width:1px;height:137px;"><!-- --></div><div'+dsv+'20px;left:250px;background:#3333ff;width:1px;height:137px;"><!-- --></div><div'+dsv+'1px;left:0px;">&nbsp;<tt>'+insymbol+' - 4 month  &nbsp; &nbsp; <i>CAG &copy;99-10</i></tt></div>';  for (i=0;i<7;i++) {    tempnum=mf(i*0.166667*136.0);    l3[l3n++]='<div'+z1a+'0px;top:'+(156-tempnum)+'px;background:#3333ff;width:254px;height:1px;"><!-- --></div><div'+dsv+(150-tempnum)+'px;left:257px;"><em>'+trimnum(templow+i*0.166667*pricespan)+'</em></div>';  }   i2=n-82+1; if (i2<0) i2=0; midnum=mf((n-i2)/2);  for (i=i2;i<n;i++){      if (yprice[i]>=0) {         tempnum=mr((1.00*(yprice[i])-templowindx)*intermedstep);        l3[l3n++]='<div'+z2a+((i-i2)*3+1)+'px;top:'+(156-tempnum)+'px;background:#00a000;width:3px;height:'+tempnum+'px;"><!-- --></div>';       }      else {        l3[l3n++]='<div'+z0a+((i-i2)*3+1)+'px;top:20px;background:#bfbfbf;width:3px;height:147px;"><!-- --></div><div'+dsv+'155px;left:'+((i-i2)*3+6)+'px;"><tt>'+monthname[-yprice[i]-1].charAt(0)+'</tt></div>';        if (i>i2) { tempnum=mr((1.00*(yprice[i-1])-templowindx)*intermedstep);          l3[l3n++]='<div'+z2a+((i-i2)*3+1)+'px;top:'+(156-tempnum)+'px;background:#00a000;width:3px;height:'+tempnum+'px;"><!-- --></div>';         }       }  }  l3[l3n++]='</div>'; document.write(l3.join(""));} else document.write('<div style="z-index:1;position:relative;top:0px;left:10px;width:265px;height:166px;"><br><br><br><center><b>No 1 Year Chart Available</b></center><br><br><br></div>');}function jul_date(l0){  var GGG,S,DD,MM,YY;  DD=mr(l0.substr(6,2));  MM=mr(l0.substr(4,2));  YY=mr(l0.substr(0,4));  if (YY <= 1585) GGG = 0; else GGG=1;  if ((MM - 9)<0) S=-1; else S=1;  return(-1 * mf(7 * (mf((MM + 9) / 12) + YY) / 4) + mf(275 * MM / 9) + DD + (GGG * -1 * mf((mf(mf(YY + S * mf(ma(MM - 9)/ 7))/ 100) + 1) * 3 / 4)) + 1721027 + 2 * GGG + 367 * YY);}function newsday(num2){  jtoc(curjuldate-dayinc[num2]);  return('News on '+daynamesh[FindDay(dayglb,monthglb,yearglb-1928)]+'&nbsp;'+monthglb+'/'+dayglb) ;}var globoldestday, gdivname,gdivname2,pdataright0,tondata1,tondata2;function ton(num2,num3,lfv){  if (((locklargec==1)&&(num3>=globoldestday))||(locklargec==0)){   var tmp,df,j1, j2, j3,orgm, j4, j5,intgr,frac,gregjd,d,m,y,jd,daynamesh=['Su','M','Tu','W','Th','F','Sa'];     jd=curjuldate-dayinc[num2];   intgr   = mf(jd);   frac    = jd - intgr;   gregjd  = 2299160.5;   if( jd >= gregjd ){     tmp = mf( ( (intgr - 1867216.0) - 0.25 ) / 36524.25 );     j1 = intgr + 1 + tmp - mf(0.25*tmp);   }else j1 = intgr;   df = frac + 0.5;   if( df >= 1.0 ) {     df -= 1.0;     ++j1;   }   j2 = j1 + 1524.0;   j3 = mf( 6680.0 + ( (j2 - 2439870.0) - 122.1 )/365.25 );   j4 = mf(j3*365.25);   j5 = mf( (j2 - j4)/30.6001 );   d = mf(j2 - j4 - mf(j5*30.6001));   m = mf(j5 - 1.0);   if( m > 12 ) m -= 12;   y = mf(j3 - 4715.0);   if( m > 2 ) --y;   if( y <= 0 ) --y;       orgm=m;   y=y-1928;   if ((m==1)||(m==2)){     m+=10; y--;   } else m-=2;   y=daynamesh[(d + mf(2.6*m - 0.2) - 38 + y + mf(y/4) + mf(19/4)) % 7];   if (closev[num2]>=openv[num2])      tondata1='&#8593;';   else      tondata1='&#8595;';   if ((day3c.length==61)&&(((num2<=60)&&(lockcalerts2==0))||((num2<=59)&&(lockcalerts2==1)))){     if (lockcalerts2==0)        tondata2=calert1[num2];     else        tondata2=calert2[num2];   }else     tondata2='';   if (num2>38){     gdivname2.style.left=(lfv+3)+'px';     pdataright0=0;   }   else if (pdataright0==0){     gdivname2.style.left='624px';     pdataright0=1;   }   gdivname.style.left=lfv+'px';   gdivname2.innerHTML='&nbsp;'+y+'&nbsp;'+orgm+'/'+d+'&nbsp;o:'+openv[num2]+'&nbsp;c:'+closev[num2]+'&nbsp;<span class=tadj>'+tondata1+'</span>&nbsp;'+tondata2; }}function roundup5(num){   var tempnum;  if ((num>=1000.0)||(num<=10.0)) tempnum=num;  else tempnum=mr(num*10.0)/10;   return(tempnum);}function rounddown5(num){   var tempnum;  if ((num>=1000.0)||(num<=10.0)) tempnum=num;  else tempnum=mf(num*10.0)/10;  return(tempnum);}function roundclosest5(num){  var tempnum;  if ((num>=1000.0)||(num<=10.0)) tempnum=num;  else tempnum=mr(num*10.0)/10;  return(tempnum);}function zxcPos(zxcobj){ var zxclft=zxcobj.offsetLeft,zxctop=zxcobj.offsetTop,zxcpar; while(zxcobj.offsetParent!=null){   zxcpar=zxcobj.offsetParent;   zxclft+=zxcpar.offsetLeft;   zxctop+=zxcpar.offsetTop;   zxcobj=zxcpar; } return [zxclft,zxctop];}function writetonsm(nz){  if (tonsmstat_a[nz]==0) return;  tonsmstat_a[nz]=0;    wlcdaysum[nz][0]=0;  var i,j=40,l4=[],n4=0,z9=0;  for(i=615;i>=15;i=i-4){    if (z9<=lastz9[nz]){      if (i==611){i-=4;j=4;}        l4[n4++]='<div onmouseover="tonsm('+nz+','+i+','+z9+');" class=abstt style="left:'+(i-1)+'px;width:'+j+'px;"><!-- --></div>';      if ((tonvolstat_a[nz]==1)&&(z9>0))         wlcdaysum[nz][z9]+=wlcdaysum[nz][z9-1];      z9++;    }  }  getid("nc"+nz).innerHTML=l4.join("");}function writevoltonsm(nz){  if (tonvolstat_a[nz]==0) return;  tonvolstat_a[nz]=0;  wlcdaysum[nz][0]=0;  var i,j=40,l5=[],n5=0,z9=0;  for(i=615;i>=15;i=i-4){    if (z9<=lastz9[nz]){      if (i==611){i-=4;j=4;}      l5[n5++]='<div onmouseover="tonsm('+nz+','+i+','+z9+');" class=abstb style="left:'+(i-1)+'px;width:'+j+'px;"><!-- --></div>';      if ((tonsmstat_a[nz]==1)&&(z9>0))         wlcdaysum[nz][z9]+=wlcdaysum[nz][z9-1];      z9++;    }  }   getid("wc"+nz).innerHTML=l5.join("");}var tempc1,tempc2,tempc3,tempc4,calert1=[],calert2=[],closev=[],openv=[],    z5a=' style="z-index:5;position:absolute;left:',z0a=' style="z-index:0;position:absolute;left:',    z4a=' style="z-index:4;position:absolute;left:',z3a=' style="z-index:3;position:absolute;left:',    z1a=' style="z-index:1;position:absolute;left:',z2a=' style="z-index:2;position:absolute;left:',    largechead='<div'+z4a+'10px;top:30px;background:#3333ff;width:1px;height:305px;"><!-- --></div><div'+z4a+'620px;top:30px;background:#3333ff;width:1px;height:306px;"><!-- --></div><div'+z4a+'10px;top:335px;background:#3333ff;width:610px;height:1px;"><!-- --></div><div'+z1a+'613px;top:13px;background:#eaeaea;width:6px;height:297px;"><!-- --></div><span style="z-index:7;position:absolute;left:12px;top:11px;"><kbd><b>',    dayma1=[],dayma2=[],ctype2 =['','00a000','cc0000'];function writerma(nz,sk){  if (rmastat_a[nz]==0) return;  if (sk==1) rmastat_a[nz]=0;  var i,j,temp,l2=[],n2=0,rmaupper,rmaupper2,rmalower,rmalower2,rmadata=rmadata_a[nz].split(","),rmaval=rmaval_a[nz].split(","),  l3=[],n3=0,l4=[],n4=0,l5=[],n5=0,tmpconst,rmalen=rmaval.length,ml=Math.log,mf=Math.floor,  rmaperc=rmadata[3]*0.67,rmaperc2=rmadata[4]*0.84,daymaval,daymalen,dayma1div,dayma2div;  l3[n3++]='<div'+z3a+'15px;top:32px;font:normal 11px arial,sans-serif,helvetica;color:#999999;">RallyBands&#8482</div>';    if (sk>=2) j=1; else j=0;  for (i=0;i<rmalen;i=i+sk){    temp=rmaval[i].split("~");    drawrma(temp[0],temp[1]*0.01,rmadata[2],rmadata[1],rmadata[0],rmaperc,rmaperc2,j);    l3[n3++]=rmaglb;    if ((i==(rmalen-2))&&(sk==2)) i--;      }  if (rmalen>0){    if (sk==1){      getid("lcf"+nz).innerHTML=l3.join("");      getid("lcf"+nz).style.display='block';    }else{      getid("lc"+nz).innerHTML=l3.join("");      getid("lc"+nz).style.display='block';    }  }      daymaval="";  if (daymaval_a[nz]!="") daymaval=daymaval_a[nz].split(",");  daymalen=daymaval.length;    if (daymalen>0){     l4[n4++]='<div style="position:absolute;left:100px;top:32px;font:normal 11px arial,sans-serif,helvetica;color:#999999;">MAvgs: ';    if (dayma1on>1){      dayma1div=1/dayma1on;      l4[n4++]='<font color="#3333ff">'+dayma1on+'ma</font>,&nbsp;';    }    if (dayma2on>1){      dayma2div=1/dayma2on;      l4[n4++]='<font color="#ff9f3f">'+dayma2on+'ma</font>';    }    l4[n4++]='</div>';  }  for (i=0;i<daymalen;i=i+sk){    temp=daymaval[i].split("~");    if (temp[1]>=0)      l4[n4++]='<div class=dayma1 style="left:'+temp[0]+'px;top:'+mr(temp[1]*dayma1div)+'px;"><!-- --></div>';    if (temp[2]>=0)      l4[n4++]='<div class=dayma2 style="left:'+temp[0]+'px;top:'+mr(temp[2]*dayma2div)+'px;"><!-- --></div>';    if ((i==(daymalen-2))&&(sk==2)) i--;  }  if (daymalen>0){    getid("dc"+nz).innerHTML=l4.join("");    getid("dc"+nz).style.display='block';  }}var vgglobs='<div'+z4a+'10px;top:0px;background:#3333ff;width:1px;height:100px;"><!-- --></div><div'+z4a+'620px;top:0px;background:#3333ff;width:1px;height:100px;"><!-- --></div><div'+z1a+'613px;top:0px;background:#eaeaea;width:6px;height:100px;"><!-- --></div><span'+z2a+'11px;top:2px;font:normal 11px arial,sans-serif,helvetica;color:#aaaaaa;"> &nbsp; SmartVolume&#8482</span>';function volgrids(nz,v0,v1,v2){  var i,l3=[],n3=0,ts;  l3[n3++]=vgglobs;  l3[n3++]='<div id="ttv'+nz+'"'+z4a+'615px;top:1px;width:3px;height:103px;background:#d5d5d5"><!-- --></div>';  for (i=0;i<v0;i++){    if ((i!=0)&&(i!=(v0-1))) ts="bfbfbf";    else ts="3333ff";    l3[n3++]='<div'+dsv+(100-i*20)+'px;left:10px;z-index:3;background:#'+ts+';width:618px;height:1px;"><!-- --></div><span'+dsv+(93-20*i)+'px;left:630px;z-index:4;"><tt>'+volscale(v1*i)+'</tt></span>';  }  if (v0!=1){    i=(100-mr(v2/(v1*5.0)*100.0));    l3[n3++]='<div'+dsv+i+'px;left:10px;z-index:3;background:#3333ff;width:627px;height:1px;"><!-- --></div><div'+dsv+i+'px;left:628px;z-index:3;background:#bfbfbf;width:55px;height:1px;"><!-- --></div><span'+dsv+(i-7)+'px;left:685px;z-index:3;font:normal 12px arial,sans-serif,helvetica;color:#0000ee;">TypV = '+volscale(parseFloat(v2))+'</span>';  }  return(l3.join(""));}var dayglb,monthglb,yearglb;function jtoc(jd) {    var tmp,df,j1, j2, j3, j4, j5,intgr,frac,gregjd;    intgr   = mf(jd);    frac    = jd - intgr;    gregjd  = 2299160.5;    if( jd >= gregjd ){      tmp = mf( ( (intgr - 1867216.0) - 0.25 ) / 36524.25 );      j1 = intgr + 1 + tmp - mf(0.25*tmp);    } else      j1 = intgr;    df = frac + 0.5;    if( df >= 1.0 ) {      df -= 1.0;      ++j1;    }    j2 = j1 + 1524.0;    j3 = mf( 6680.0 + ( (j2 - 2439870.0) - 122.1 )/365.25 );    j4 = mf(j3*365.25);    j5 = mf( (j2 - j4)/30.6001 );        dayglb = mf(j2 - j4 - mf(j5*30.6001));    monthglb = mf(j5 - 1.0);    if( monthglb > 12 ) monthglb -= 12;    yearglb = mf(j3 - 4715.0);    if( monthglb > 2 ) --yearglb;    if( yearglb <= 0 ) --yearglb;    }      function getid(name){  return(document.getElementById(name));}function writevol(nz,iend){  if (volstat_a[nz]==0) return;    volstat_a[nz]=0;    var l3=[],n3=0,i,tempstr,ts,mr=Math.round,temp,voldata=voldata_a[nz].split("~"),    volval=volval_a[nz].split(","),vollen=volval.length,        vcid=getid("vc"+nz),voldid=getid("vold"+nz);    indxmult=voldata[3];    indexes=voldata[4];        l3[n3++]='<div id="wc'+nz+'"onmouseover="writevoltonsm('+nz+');"style="z-index:5;position:absolute;top:0px;left:0px;width:625px;height:107px;"><!-- --></div>';    l3[n3++]=volgrids(nz,voldata[0],voldata[1],voldata[2]);    if ((iend!=1)&&(showvol!=1))      getid("typv"+nz).style.display='none';    for (i=0;i<vollen;i++){      temp=volval[i].split("~");         l3[n3++]='<div class=vol'+temp[2]+' style="left:'+temp[0]+'px;top:'+(100-temp[1])+'px;height:'+temp[1]+'px;"><!-- --></div>';    }    l3[n3++]=voldata[5];    getid("showvol"+nz).style.display='none';      voldid.innerHTML=voldata[6];    if (msbrowser==1){      if(getid('bchartbot'+nz).style.display=='block')        ts='block';      else         ts='none';      l3[n3++]='<div id="bchartbot'+nz+'" style="background:#ffffff;border:1px solid #000000;display:none;z-index:8;position:absolute;top:0px;left:10px;width:450px;height:81px;background-repeat:no-repeat;"></div>';      vcid.innerHTML=l3.join("");      if (ts=='block')        displaybotquote(nz,wlc_sym[nz]);    }else      vcid.innerHTML=l3.join("");                gdivnamebsm[nz]=getid("ttv"+nz);        vcid.style.display='block';    voldid.style.display='block';    gdivnamebsm[nz].style.display='block';    volon[nz]=1;}function tonsm(nz,lfv,z9){  if (volon[nz]==1) gdivnamebsm[nz].style.left=lfv+'px';  gdivnametsm[nz].style.left=lfv+'px';  var temp=pdata[nz][z9].split(","),ts,tmp,df,j1,orgm, j2, j3, j4, j5,intgr,frac,gregjd,d,m,y,jd,daynamesh=['Su','M','Tu','W','Th','F','Sa'];  if (temp[0]<=temp[1]) ts='&#8593;';  else ts='&#8595;';  jd=wlcjuldate[nz]-wlcdaysum[nz][z9];  intgr   = mf(jd);  frac    = jd - intgr;  gregjd  = 2299160.5;  if( jd >= gregjd ){    tmp = mf( ( (intgr - 1867216.0) - 0.25 ) / 36524.25 );    j1 = intgr + 1 + tmp - mf(0.25*tmp);  }else j1 = intgr;  df = frac + 0.5;  if( df >= 1.0 ) {    df -= 1.0;    ++j1;  }  j2 = j1 + 1524.0;  j3 = mf( 6680.0 + ( (j2 - 2439870.0) - 122.1 )/365.25 );  j4 = mf(j3*365.25);  j5 = mf( (j2 - j4)/30.6001 );  d = mf(j2 - j4 - mf(j5*30.6001));  m = mf(j5 - 1.0);  if( m > 12 ) m -= 12;  y = mf(j3 - 4715.0);  if( m > 2 ) --y;  if( y <= 0 ) --y;      orgm=m;  y=y-1928;  if ((m==1)||(m==2)){    m+=10; y--;  } else m-=2;  y=daynamesh[(d + mf(2.6*m - 0.2) - 38 + y + mf(y/4) + mf(19/4)) % 7];  if (z9>34){    gdivnamepdata[nz].style.left=(lfv+2)+'px';    if (pdataright[nz]==1) gdivnamepdata[nz].style.top='314px';    pdataright[nz]=0;  }else if (pdataright[nz]==0){    gdivnamepdata[nz].style.left='624px';    gdivnamepdata[nz].style.top='318px';    pdataright[nz]=1;  }    gdivnamepdata[nz].innerHTML='&nbsp;'+y+'&nbsp;'+orgm+'/'+d+',&nbsp;o:'+temp[0]+'&nbsp;c:'+temp[1]+'&nbsp;<span class=tadj>'+ts+'</span>';}        function initsetchartvars(){  var scaleu, scaleb;    tempc1=endprice;  tempc2=startprice;  if (tempc2<=0.0) tempc2=startprice;   if (target1_long>tempc1) tempc1=target1_long;   if (breakoutdwndata(1)>tempc1) tempc1=breakoutdwndata(1);  if ((target1_short>0.0)&&(target1_short<tempc2)) tempc2=target1_short;  if ((breakoutdwndata(2)>0.0)&&(breakoutdwndata(2)<tempc2)) tempc2=breakoutdwndata(2);  if (cprice>20.0) scaleu=1.2;  else if (cprice>10.0)    scaleu=1.2-(cprice-20.0)/20.0*0.1;  else if (cprice>5.0)    scaleu=1.25-(cprice-10.0)/10.0*0.2;  else if (cprice>1.0)    scaleu=1.35-(cprice-5.0)/5.0*0.1875;  else scaleu=1.5;  if (tempc1>(endprice*scaleu)) endprice*=scaleu;    else if (tempc1>endprice){endprice=tempc1*1.030928}  if (cprice>20.0) scaleb=0.8;  else if (cprice>10.0)    scaleb=0.8+(cprice-20.0)/20.0*0.1;  else if (cprice>5.0)    scaleb=0.75+(cprice-10.0)/10.0*0.2;  else if (cprice>1.0)    scaleb=0.65+(cprice-5.0)/5.0*0.1875;  else scaleb=0.5;      if (tempc2<(startprice*scaleb)) startprice*=scaleb;    else if (tempc2<startprice){startprice=tempc2*0.970874;}     startprice=rounddown5(startprice);  endprice=roundup5(endprice);  tpricer[1]=(endprice-startprice)/10.0;  if (regchart==0) {     if (startprice>0) lnstart=ml(startprice);    else lnstart=0.0;    if (endprice>startprice) pixspan=280.0/(ml(endprice)-lnstart);    else pixspan=0;     }else{    lnstart=startprice;    if (endprice>startprice) pixspan=280.0/(endprice-lnstart);     else pixspan=0;  }  }function writepricedivs(){  var i,ts,tn,top,numarray=[0,1,2,3,4,5,6,7,8,9,10,0.27,0.55,1.45],l3=[],n3=0;  for(i=0;i<14;i++){    ts="3333ff";    if (i==0){       top=310;      tn=startprice;    }else{      if (i==10) tn=endprice;      else tn=roundclosest5(tpricer[1]*numarray[i]+startprice);      if (regchart==0){        if (i!=10) ts="bfbfbf";        top=310-mr((ml(tn)-lnstart)*pixspan);       }else        if (i<11){          if (i<10) ts="bfbfbf";          top=310-mr((tn-lnstart)*pixspan);        }else break;    }    l3[n3++]='<div'+z3a+'10px;top:'+top+'px;background:#'+ts+';width:618px;height:1px;"><!-- --></div><div class=em'+dsv+(top-6)+'px;left:630px;z-index:3;">'+trimnum(tn)+'</div>';  }  return(l3.join(""));}function writerestar(nz){  var rl,fc,i,l3=[],n3=0,top,j,k,typ;  if (reslevelon>0)    for(i=0;i<numres;i++)          if ((resprice[i]>startprice)&&(resprice[i]<endprice)){        rl="";          if (i!=justinres){          if (resprice[i]>cprice) typ=1;          else typ=2;        }else{          j=resexp.indexOf("resistance");          k=resexp.indexOf("support");          if ((j>0)&&(k<=0)) typ=1;          else if ((j<=0)&&(k>0)) typ=2;          else typ=0;        }        if (typ==1){rl='ffc5c5';fc='ee0000';} //ffaee1        else if (typ==2){rl='c5c5ff';fc='0000ff';} //10dcff        else {rl='d6d6d6';fc='888888';}        if (rl!=""){          if (regchart==0) top=309-mf((ml(resprice[i])-lnstart)*pixspan);          else top=309-mf((resprice[i]-lnstart)*pixspan);                      l3[n3++]='<div'+z4a+'18px;top:'+top+'px;background:#'+rl+';width:595px;height:3px;"><!-- --></div><div'+z2a+'620px;top:'+(top+1)+'px;background:#c8c8c8;width:92px;height:1px;"><!-- --></div><div class=em'+z3a+'713px;top:'+(top-5)+'px;color:#'+fc+';">'+trimnum(resprice[i])+','+writerestype3(restype[i])+','+resstrength[i]+'</div>';        }      }  l3[n3++]=writema(ma50,'ma50',167,765,nz);  l3[n3++]=writema(ma200,'ma200',200,791,nz);  l3[n3++]=writetarget(target1_long,679,1,'T1',nz);  l3[n3++]=writetarget(target2_long,694,1,'T2',nz);  l3[n3++]=writetarget(target1_short,679,2,'S1',nz);  l3[n3++]=writetarget(target2_short,694,2,'S2',nz);  if (breakoutdwndata(1)>0.0) l3[n3++]=writetarget(upsidebreak+upbrkamount,660,1,'BO',nz);   if (breakoutdwndata(2)>0.0) l3[n3++]=writetarget(dwnsidebreak-dwnbrkamount,660,2,'BD',nz);  return(l3.join(""));}function writetarget(targ,xpos,str1,str2,nz){  var targn,top,tbstr,tn,pchange='',ts;  if (str1==1) str1='0000ee';  else if (str1==2) str1='cc0000';  if ((targ>=startprice)&&(targ<=endprice)) targn=targ;  else if (targ<startprice) targn=startprice;     else targn=endprice;  if (regchart==0) top=309-mf((ml(targn)-lnstart)*pixspan);  else top=309-mf((targn-lnstart)*pixspan);  if (targ<0) targ=0;    if (targn==startprice) top-=3;    if (cprice>0){    pchange=ma(trimnumfxd(mr( ((targ-cprice)/cprice)*10000.0)/100.0));    if (str1=='0000ee'){      if (targ>cprice){        pchange=', +'+pchange+'%';        ts=z4a;      }      else{        pchange=', 0% Past';        ts=z3a;      }    }else{      if (targ<cprice){        pchange=', +'+pchange+'%';        ts=z4a;      }      else{        pchange=', 0% Past';        ts=z3a;      }    }    tbstr='<div'+ts+xpos+'px;top:'+(top+1)+'px;background:#'+str1+';width:8px;height:1px;"><!-- --></div>';    tn='<div id="'+str2+nz+'"'+ts+(xpos+5)+'px;top:'+(top-4)+'px;font:normal 9px arial,sans-serif;color:#'+str1+';text-decoration:underline;cursor:pointer;"onmouseover="showvtext(\''+trimnum(targ)+pchange+'\',\''+str2+nz+'\',15,24,0)"onmouseout="hidevtext(0)">';    if (targn==targ) return('<div'+z2a+'620px;top:'+(top+1)+'px;background:#c8c8c8;width:'+(xpos-620)+'px;height:1px;"><!-- --></div>'+tbstr+tn+str2+'</div>');     else if (targn==startprice) return(tbstr+'<img'+z4a+(xpos+1)+'px;top:'+(top-11)+'px;"'+ilnk+'dwnarrow.gif"width=5 height=11>'+tn+str2+'</div>');       else return(tbstr+'<img'+z4a+(xpos+1)+'px;top:'+(top+2)+'px;"'+ilnk+'uparrow.gif"width=5 height=11>'+tn+str2+'</div>');  }else     return("");}function writema(mavg,mavgtxt,lwid,posl,nz){  if ((mavg<endprice)&&(mavg>startprice)){    var top;    if (regchart==0) top=310-mf((ml(mavg)-lnstart)*pixspan);    else top=310-mf((mavg-lnstart)*pixspan);    return('<div'+z2a+'620px;top:'+top+'px;background:#c8c8c8;width:'+lwid+'px;height:1px;"><!-- --></div><div id="'+mavgtxt+nz+'"'+z5a+posl+'px;font:normal 10px arial,sans-serif;color:#0000ee;text-decoration:underline;cursor:pointer;top:'+(top-10)+'px;"onmouseover="showvtext('+mavg+',\''+mavgtxt+nz+'\',25,24,0)"onmouseout="hidevtext(0)">'+mavgtxt+'</div>');  }  return("");}var rmaglb;function drawrma(i2,rv,longavg,lns,pixspan,rc,rc2,color){  var ru,ru2,rl,rl2,ts='',tc,tn,tn2,tn3,ts2;  if (regchart==0) ru=310-mf((ml(rv)-lns)*pixspan);  else ru=310-mf((rv-lns)*pixspan);  if (color==1) ts='rma1'; else ts='rma2';  rmaglb='<div class='+ts+' style="left:'+i2+'px;top:'+ru+'px;"><!-- --></div>';    if ((rv<=longavg)&&(longavg>0)){    if (rv<(longavg*0.5)) tc=1.5;        else tc=1.1+0.8*(1.0-rv/longavg);    }    else if ((rv<=(longavg*1.5))&&(longavg>0)) tc=1.0+0.2*(1.5-rv/longavg);         else tc=1.0;  tn2=rc*tc; tn3=rc2*tc;   if (regchart==0){    ru=mf((ml(rv*(1.0+tn2))-lns)*pixspan);    ru2=mf((ml(rv*(1.0+tn3))-lns)*pixspan);    rl=mf((ml(rv*(1.0-tn2))-lns)*pixspan);    rl2=mf((ml(rv*(1.0-tn3))-lns)*pixspan);  }else{    ru=mf((rv*(1.0+tn2)-lns)*pixspan);    ru2=mf((rv*(1.0+tn3)-lns)*pixspan);    rl=mf((rv*(1.0-tn2)-lns)*pixspan);    rl2=mf((rv*(1.0-tn3)-lns)*pixspan);  }  tn='class=rma style="top:';  if ((ru<=280)&&(ru2<=280)) rmaglb+='<div '+tn+(310-ru2)+'px;left:'+i2+'px;height:'+(ru2-ru)+'px;"><!-- --></div>';  else if (ru<=280) rmaglb+='<div '+tn+'30px;left:'+i2+'px;height:'+(280-ru)+'px;"><!-- --></div>';  if ((rl>=0)&&(rl2>=0)) rmaglb+='<div '+tn+(310-rl)+'px;left:'+i2+'px;height:'+(rl-rl2)+'px;"><!-- --></div>';  else if (rl>=0) rmaglb+='<div '+tn+(310-rl)+'px;left:'+i2+'px;height:'+rl+'px;"><!-- --></div>'; }var cbsadjust;function writelargechart(){if (nochart==0){  document.write('</div>'+comdiv);  cbsadjust=jul_date('20020801');  curjuldate=jul_date(linedatag[0]);  var ml=Math.log,mr=Math.round,mf=Math.floor,endwidth,l3=[],l3n=0,tshad,bshad,lshad,open,  avgz,top,i2,i3,tn,tn2,tn3,tp1,tp2,pass,i2pass1=15,oldestday=-1,  lowest=9999999.0,highest=-9999999.0,lochigh=cprice+2.25*typmove,loclow=cprice-2.25*typmove,ilnk='src="../img/';  startprice=tpricer[0]; endprice=startprice+tpricer[1]*10.0;  var ts,ts2,endporg=endprice, pixorg=tpricer[1]*10.0/280.0, top1, top2, top3, top4,  dsv2=' style="position:absolute;left:',  tdttf='<td><tt>&nbsp;<font color=blue>';  pdataright0=0;  l3[l3n++]='<table cellspacing=0 cellpadding=8 width=100%><tr><td nowrap><a name="lchart"></a>';  l3[l3n++]='<div style="border:1px solid #3871BC;padding:2px;"><table cellspacing=0 cellpadding=0><tr>';  l3[l3n++]=tdttf+'NewsChart&#8482</font> - Click on a chart bar for that days stock news.</tt></td>';  l3[l3n++]=tdttf+' &nbsp; &nbsp; RallyBands&#8482</font> - Typical and extreme rally/pullback bands.</tt></td></tr>';  l3[l3n++]='<tr>'+tdttf+'SmartVolume&#8482</font> - Removes volume peaks making it easier to read.</tt></td>';  l3[l3n++]=tdttf+' &nbsp; &nbsp; DualVolume&#8482</font> - Splits up volume making it easier to view buying and selling.</tt></td></tr>';  l3[l3n++]='<td colspan=2><tt>&nbsp;<font color=blue>ChartOverlay&#8482</font> - Mouse over to show (or click to lock/unlock) a chart overlay (1d, 3d, 5d, 1y, etc...) below.</tt></td></tr>';  l3[l3n++]='</table></div></td><td nowrap valign=middle><a id="bt1"onmouseover="showvtext(\'Back to top\',\'bt1\',-15,-30,2)"onmouseout="hidevtext(1)"href="#ttop" class=sm3b><b>Top</b></a></td></tr></table>';     ts='px;background:#3333ff;width:1px;height:';  tn='<!-- --></div><div';  l3[l3n++]='<div style="position:relative;top:-5px;left:0px;height:635px;"><div'+z4a+'10px;top:30'+ts+'585px;">'+tn;  l3[l3n++]=' id="bchart0" style="background:#ffffff;border:1px solid #000000;display:none;z-index:7;position:absolute;top:9px;left:10px;width:450px;height:300px;background-repeat:no-repeat;">';  l3[l3n++]='<div id="bchartin0" onmouseover="writetonbc(0,0,0)"style="position:absolute;top:15px;left:0px;width:450px;height:270px;"></div>';  l3[l3n++]='<div id="bcharttxt0" class=tt style="position:absolute;top:2px;left:120px;"></div>';  l3[l3n++]='<div id="bcharttxtoff0" onclick="turnoffbigchart(0);"style="position:absolute;top:283px;left:405px;font:bold 11px arial,helvetica,sans-serif;color:#0000ee;text-decoration:underline;cursor:pointer;"></div>';  l3[l3n++]='<div id="bcharttxtz0" class=tt style="position:absolute;top:19px;left:2px;"></div>';  l3[l3n++]='</div>';     l3[l3n++]='<div id="bchartbot0" style="border:1px solid #000000;display:none;z-index:7;position:absolute;top:335px;left:10px;width:450px;height:81px;background-repeat:no-repeat;">'+tn;  l3[l3n++]=z4a+'620px;top:30'+ts+'280px;">'+tn+z3a+'620px;top:310'+ts+'25px;">'+tn;  l3[l3n++]=z4a+'620px;top:335'+ts+'280px;">'+tn+z1a+'613px;top:13px;background:#eaeaea;width:6px;height:603px;"><!-- --></div>';  if ((sample==1)&&(notradedet==1)){}  else l3[l3n++]='<div'+z3a+'670px;top:9px;"class=em><a class=sp1 onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:openrecalcwin(1,-1)">Up ReCalc</a> &nbsp; <a class=sp1 onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:openrecalcwin(2,-1)">Down ReCalc</a></div>';  l3[l3n++]='<span'+z3a+'12px;top:12px;"><kbd><b> '+insymbol+' </b>, 8 Month Detailed Chart &nbsp; &nbsp; </kbd><tt><I>Chapman Advisory Group &copy;99-10</I></tt></span><span'+z3a+'350px;top:12px;text-align:right;width:268px;"><span style="height:15px;background:#eaeaea;"><tt>&nbsp;'+dodatestuff(linedatag[0],linedatag[1],0,1)+' </tt></span></span>';   l3[l3n++]='<div id="bt2"'+z4a+'700px;top:332px;font:bold 12px arial,helvetica,sans-serif;color:#0000ff;text-decoration:underline;cursor:pointer;" onmouseover="showvtext(\'Click to Lock/unlock&nbsp;\',\'bt2\',-15,-30,2);hideObject2()" onmouseout="hidevtext(1);showObject2()" onClick="lockout()">\>\>ZOOM IN</div>';      var rmaperc=rbar1const*0.67,rmaperc2=rbar2const*0.84,rma=[],rmacnt,rmaon,  pixz,lnz,i,j,oldestz9=-1,  x1,x2,x3,x4,x4,x5,x6,x7,tprice=ddata[5].split(","),zzz=tprice.length,  mnum,voltxtadd=0,volextfound=0,volchar=['a','b','c','d'],  volextstr='',volcor,z9,dayma1cnt=1,dayma1div,dayma2cnt=1,dayma2div;  startprice*=0.970874; endprice*=1.030928;  if (loclow<=0.0) loclow=startprice;          for(pass=1;pass<=2;pass++){  if (pass==2){    startprice=lowest*0.970874;    endprice=highest*1.030928;  }  initsetchartvars();   if (pass==1) l3[l3n++]='<div id="L1">';  else l3[l3n++]='<div id="L3" style="display:none">';    l3[l3n++]=writepricedivs();    l3[l3n++]='</div>';    if ((indexes==1)&&(indxmult==0)) var iend=1;   else var iend=6;     tn='px;height:1px;background:#';  for (i=0;i<iend;i++){    if ((i!=0)&&(i!=(iend-1))) ts="bfbfbf";    else ts="3333ff";    l3[l3n++]='<div'+z3a+'10'+tn+ts+';width:618px;top:'+(435-i*20)+'px;"><!-- --></div><div'+z4a+'630px;top:'+(428-20*i)+'px;"class=tt>'+volscale(tvol*i)+'</div>';   }  for (i=0;i<5;i++){    if (i<4){      if ((i!=0)&&(i!=3)) ts="bfbfbf";       else ts="3333ff";      l3[l3n++]='<div'+z3a+'10'+tn+ts+';top:'+(550-i*15)+'px;width:618px;"><!-- --></div><div'+z3a+'10'+tn+ts+';top:'+(500-i*15)+'px;width:618px;"><!-- --></div>';    }    if (i<5){      if ((i!=0)&&(i!=4)) ts="bfbfbf";       else ts="3333ff";      l3[l3n++]='<div'+z2a+'10'+tn+ts+';top:'+(615-i*15)+'px;width:630px;"><!-- --></div>';    }  }  if (iend!=1){    tn2=mr(savedvol/(tvol*5.0)*100.0);    l3[l3n++]='<div'+z3a+'10'+tn+'3333ff;top:'+(435-tn2)+'px;width:627px;"><!-- --></div><div'+z3a+'628'+tn+'bfbfbf;top:'+(435-tn2)+'px;width:48px;"><!-- --></div><div'+z3a+'676px;top:'+(427-tn2)+'px;color:#0000ee;"class=kbd>TypV = '+volscale(savedvol)+'</div>';  }        l3[l3n++]='<div'+dsv2+'630px;top:543px;"class=tt>0</div><div'+dsv2+'630px;top:493px;"class=tt>0</div>';  var ltyp=['Strong Bullish','Mild Bullish','Neutral','Mild Bearish','Strong Bearish'];  for (j=0;j<5;j++)    l3[l3n++]='<div'+dsv2+'642px;top:'+(548+j*15)+'px;"class=tt>'+ltyp[j]+'</div>';  if ((pass==1)&&(day3c.length==61)){      l3[l3n++]='<div id="bt3"'+dsv2+'700px;top:577px;font:bold 12px arial,helvetica,sans-serif;color:#0000ff;text-decoration:underline;cursor:pointer;"onmouseover="showvtext(\'Click to Lock/unlock&nbsp;\',\'bt3\',-15,-30,2);hidechartalerts22()"onmouseout="hidevtext(1);showchartalerts22()"onClick="lockoutchartalerts2()">\>\>2 Day Avg</div>';    l3[l3n++]='<div id="L5"><div'+z2a+'175px;top:557px;"class=tt> &nbsp; 3 Day Chart Alert (over last 60 days)</div>';    for (j=0;j<2;j++){       i2=0;      tempc4=615;      if (j==1)        l3[l3n++]='</div><div id="L6"style="display:none;"><div'+z2a+'220px;top:557px;"class=tt> &nbsp; 3 Day Chart Alert (2 day avg)</div>';      for(i=60;i>=j;i--){        if (j==0) tn=mf(15.0*day3c[i]);           else tn=mf(15.0*(1.0*day3c[i]+1.0*day3c[i-1])*0.5);        ts='<div'+z3a+tempc4+'px;width:3px;height:';        if ((tn>0.01)&&(tn<31.0))          l3[l3n++]=ts+tn+'px;top:'+(586-tn)+'px;background:#3333ff;"><!-- --></div>';        else if ((tn<-0.01)&&(tn>-31.0))          l3[l3n++]=ts+(-tn)+'px;top:585px;background:#cc0000;"><!-- --></div>';        else          l3[l3n++]=ts+'9px;top:582px;background:#bfbfbf;"><!-- --></div>';                if (tn>21.5) ts='sbull';           else if (tn>8.0) ts='mbull';             else if (tn>-8.5) ts='neut';               else if (tn>-21.5) ts='mbear';                 else ts='sbear';            if (j==0) calert1[i2]=ts;        else calert2[i2]=ts;        if (i==60) tempc4-=4;         tempc4-=4;         i2++;      }    }    l3[l3n++]='</div>';  }  i2=15;  if (pass==1){    for (i=0;i<zzz;i=i+8) {      x5=i+5; x7=i+7; z9=149-i/8;      if (tprice[x5]>0){        if(oldestz9<0) oldestz9=z9;        x6=i+6;          if (i==1192) i2+=4;         if (tprice[x7]==0) dayinc[z9]=1;         else{           if (tprice[x7]<=12){            mnum=tprice[x7]-1;            dayinc[z9]=1;          }else{            dayinc[z9]=mf(tprice[x7]/20)+1;            mnum=tprice[x7]-((dayinc[z9]-1)*20+1);          }          if (mnum>=0)            l3[l3n++]='<div'+z1a+(i2+3)+'px;top:30px;background:#bfbfbf;width:1px;height:595px;"><!-- --></div><div'+z3a+(i/2+20)+'px;top:435px;"class=tt>'+monthname[mnum]+'</div>';        }         if ((indexes==1)&&(indxmult==0)) tprice[i]=50;        if (tprice[x6]==1) volcor=455;         else volcor=505;        ts='<div'+z4a+i2+'px;background:#'+ctype2[tprice[x6]]+';width:3px;height:';        if (tprice[i]<0){          if (((i-8)>=0)&&(tprice[i-8]<0)){            if (i!=1192) voltxtadd=2;            else voltxtadd=0;            if (((i-16)>=0)&&(tprice[i-16]<0)){              if (i!=1192) voltxtadd=4; else              voltxtadd=1;              if (((i-24)>=0)&&(tprice[i-24]<0)){                if (i!=1192) voltxtadd=6;                else voltxtadd=3;               }            }            }else voltxtadd=0;          l3[l3n++]='<div'+dsv2+(i2-1+voltxtadd)+'px;top:332px;z-index:6;"class=tt>'+volchar[volextfound]+'</div>';          for (j=0;j<3;j++)            l3[l3n++]=ts+'4px;top:'+(345+j*6)+'px;"><!-- --></div>';          l3[l3n++]=ts+'72px;top:363px;"><!-- --></div>';          l3[l3n++]=ts+'45px;top:'+volcor+'px;"><!-- --></div>';          volextstr+=volchar[volextfound]+'='+volscale(-1*1.00*(tprice[i]))+' &nbsp;  ';          volextfound++;        }else{          l3[l3n++]=ts+tprice[i]+'px;top:'+(435-tprice[i])+'px;"><!-- --></div>';          l3[l3n++]=ts+(mr(tprice[i]*0.45))+'px;top:'+(volcor+45-(mr(tprice[i]*0.45)))+'px;"><!-- --></div>';        }            l3[l3n++]='<div'+z5a+(i2-1)+'px;top:30px;width:4px;height:280px;"onmouseover="ton('+z9+','+i+','+i2+')"><!-- --></div><div'+z5a+(i2-1)+'px;top:335px;width:4px;height:285px;"onmouseover="ton('+z9+','+i+','+i2+')"><!-- --></div>';        if ((pass==1)&&(z9==0))          l3[l3n++]='<div id="ttb"'+z2a+i2+'px;top:25px;width:3px;height:595px;background:#d5d5d5"><!-- --></div><div id="ttc" onmouseover="ton(0,1192,615);"style="z-index:3;position:absolute;left:'+(i2+2)+'px;top:314px;height:15px;background:#F9F0DF;border:1px solid #0000ee;font:normal 11px arial,sans-serif,helvetica;"></div>';        if ((z9==0)||(z9==1)){          if (z9==1) endwidth=4;           else endwidth=40;                    l3[l3n++]='<div'+z5a+(i2+4-1)+'px;top:30px;width:'+endwidth+'px;height:280px;display:block;"onmouseover="ton('+z9+','+(i+20+20*z9)+','+i2+')"><!-- --></div><div'+z5a+(i2+4-1)+'px;top:335px;width:'+endwidth+'px;height:285px;display:block;"onmouseover="ton('+z9+','+(i+20+20*z9)+','+i2+')"><!-- --></div>';        }      }      i2+=4;     }    document.write(l3.join(""));l3=[];l3n=0;  }  if (pass==1) l3[l3n++]='<div id="L2">';   else l3[l3n++]='<div id="L4" style="display:none">';    l3[l3n++]=writerestar(pass);          if (dayma1on>1){ dayma1div=1/dayma1on;dayma1[0]=0; }  if (dayma2on>1){ dayma2div=1/dayma2on;dayma2[0]=0; }  pixz=pixspan;  lnz=lnstart;   i2=15; i3=0;  rmacnt=1;rmaon=21;rma[0]=0.0;    if (pass==1){     var jd=[];jd2=[];j=0;     for (i=1192;i>=712;i=i-8){       x1=i+1; x2=i+2; x3=i+3; x4=i+4;       jd[j]=endporg+(-tprice[x1]-tprice[x4]-tprice[x3]-tprice[x2])*pixorg;       jd2[j]=endporg-tprice[x1]*pixorg;       if (jd[j]<lowest) lowest=jd[j];       if (jd2[j]>highest) highest=jd2[j];       if ((lowest<loclow)||(highest>lochigh)){         oldestday=i;          break;       }       j++;     }     if (oldestday<0) oldestday=712;      else{       oldestday+=8;       if (oldestday>1112) oldestday=1112;       lowest=9999999.0,highest=-9999999.0;       j=0;       for (i=1192;i>=oldestday;i=i-8){         if (jd[j]<lowest) lowest=jd[j];         if (jd2[j]>highest) highest=jd2[j];         j++;       }     }     globoldestday=oldestday;  }else    i2=i2pass1;  for (i=0;i<zzz;i=i+8)   if ((pass==1)||((pass==2)&&(i>=oldestday))){     x1=i+1; x2=i+2; x3=i+3; x4=i+4; x5=i+5; x7=i+7; z9=149-i/8;     if ((i==oldestday)&&(pass==1)) i2pass1=i2;     if (tprice[x5]>0){        x6=i+6;       if (i==1192) i2=i2+4;       tp1=-tprice[x1]-tprice[x4]; tp2=tp1-tprice[x3];       if (regchart==0){           top1=(ml(endporg-tprice[x1]*pixorg)-lnz)*pixz;          top2=(ml(endporg+tp1*pixorg)-lnz)*pixz;          top3=(ml(endporg+tp2*pixorg)-lnz)*pixz;          top4=(ml(endporg+(tp2-tprice[x2])*pixorg)-lnz)*pixz;       }else{          top1=(endporg-tprice[x1]*pixorg-lnz)*pixz;          top2=(endporg+tp1*pixorg-lnz)*pixz;          top3=(endporg+tp2*pixorg-lnz)*pixz;          top4=(endporg+(tp2-tprice[x2])*pixorg-lnz)*pixz;       }       tshad=mr(top1-top2);if (tshad<0) tshad=0;        tbod=mr(top2-top3); if (tbod<=0) tbod=1;       lshad=mr(top3-top4); if (lshad<0) lshad=0;                   if (z9<=4){         openv[z9]=trimnum(opprice[z9]);         closev[z9]=trimnum(clprice[z9]);       }else{         if (tprice[x5]==2){tn=tp1;tn2=tp2;}         else {tn=tp2;tn2=tp1;}         openv[z9]=trimnum(endporg+tn*pixorg);         closev[z9]=trimnum(endporg+tn2*pixorg);       }              l3[l3n++]='<div class=bsm id="'+pass+'news'+z9+'"onmouseover="isl=1;showvtext(newsday('+z9+'),\''+pass+'news'+z9+'\',-15,-30,0);"onmouseout="isl=0;hidevtext(0);"onclick="ow(-1,97,'+z9+')"style="left:'+i2+'px;top:'+(310-mr(top1))+'px;">';       if (stickchart==0){         if (tshad>0)           l3[l3n++]='<div class=shad style="height:'+tshad+'px;"><!-- --></div>';         if (tbod!=1) ts=tprice[x5]; else ts=0;                 l3[l3n++]='<div class=b'+ts+' style="height:'+tbod+'px;"><!-- --></div>';         if (lshad>0)           l3[l3n++]='<div class=shad style="height:'+lshad+'px;"><!-- --></div>';       }else{          if(tprice[x5]==1){           tn=tshad;           tn2=mr(top2-top4); if (tn2<0) tn2=0;                   }         else{           tn=mr(top1-top3); if (tn<0) tn=0;           tn2=lshad;         }         if (tn>0)           l3[l3n++]='<div style="width:1px;height:'+tn+'px;background:#'+ctype2[tprice[x6]]+'"><!-- --></div>';         l3[l3n++]='<div class=b'+tprice[x6]+' style="height:1px;"><!-- --></div>';         if (tn2>0)           l3[l3n++]='<div style="width:1px;height:'+tn2+'px;background:#'+ctype2[tprice[x6]]+'"><!-- --></div>';       }       l3[l3n++]='</div>';                  if(tprice[x5]==1) rma[rmacnt]=rma[rmacnt-1]-tp1;       else rma[rmacnt]=rma[rmacnt-1]-tp2;       if (rmacnt>=rmaon){         drawrma(i2,endporg-(rma[rmacnt]-rma[rmacnt-rmaon])*0.047619*pixorg,longavg,lnstart,pixspan,rmaperc,rmaperc2,0);         l3[l3n++]=rmaglb;       }              rmacnt++;                if ((dayma1on>1)||(dayma2on>1)){         if(tprice[x5]==1) tn=310-mr(top2); else tn=310-mr(top3);         if (dayma1on>1){           dayma1[dayma1cnt]=dayma1[dayma1cnt-1]+tn;           if (dayma1cnt>=dayma1on)             l3[l3n++]='<div'+z4a+i2+'px;top:'+mr((dayma1[dayma1cnt]-dayma1[dayma1cnt-dayma1on])*dayma1div)+'px;background:#3333ff;width:4px;height:1px;"><!-- --></div>';           dayma1cnt++;          }         if (dayma2on>1){           dayma2[dayma2cnt]=dayma2[dayma2cnt-1]+tn;           if (dayma2cnt>=dayma2on)             l3[l3n++]='<div'+z4a+i2+'px;top:'+mr((dayma2[dayma2cnt]-dayma2[dayma2cnt-dayma2on])*dayma2div)+'px;background:#ff9f3f;width:4px;height:1px;"><!-- --></div>';           dayma2cnt++;         }       }       }    i2+=4;  }    l3[l3n++]='</div>'; /* L2 or L4 */    if (pass==1){    l3[l3n++]='<div'+z2a+'11px;top:311px;width:609px;height:24px;background:#dddddd;"><!-- --></div><div'+z2a+'16px;top:315px;font:normal 12px arial,sans-serif,helvetica;">'+volextstr+'</div>';          if ((indxintra==1)&&(insymbol.substr(0,1)!='*')){      l3[l3n++]='<div '+z2a+'415px;top:313px;width:200px;">';      ts='this.style.background=\'#dddddd\';isonchartlink=-1;getid(\'bchart0\').style.display=\'none\';if(getid(\'bchartbot0\').style.display==\'block\')getid(\'bchartbot0\').style.display=\'none\';';      for (i=0;i<6;i++)        if (multichart[i]>0){                ts2='this.style.background=\'white\';isonchartlink='+(multichart[i]-1)+';changebigchartwlc(0,1);';           l3[l3n++]='<div id="mc0_'+i+'" style="float:right;padding-top:4px;padding-bottom:2px;padding-left:2px;padding-right:2px;font:bold 11px verdana,arial;background:#dddddd;color:#0000ee;text-decoration:underline;cursor:pointer;"';          l3[l3n++]='onmouseout="if (lockoverlay[0]==0){'+ts+'}"onmouseover="if (lockoverlay[0]==0){'+ts2+'}"';          l3[l3n++]='onclick="if(lockoverlay[0]=='+(i+1)+'){lockoverlay[0]=0;'+ts+'}else{clearoverlayhighlight(0);lockoverlay[0]='+(i+1)+';wrotetonoverlay[0]=0;'+ts2+'};">'+defgdesc2[multichart[i]-1]+'</div>';        }      l3[l3n++]='<div style="clear:both;"></div></div>';    }  }    document.write(l3.join(""));l3=[];l3n=0;}  /* end pass */  dayinc[0]=0;  for(i=1;i<=oldestz9;i++) dayinc[i]+=dayinc[i-1];    gdivname=getid("ttb");  gdivname2=getid("ttc");  ton(0,1192,615);    tn2='<div'+z2a+'11px;height:4px;width:609px;background:#dddddd;top:';  l3[l3n++]='<div'+z2a+'11px;top:450px;height:5px;width:618px;background:#dddddd;"><!-- --></div>';  l3[l3n++]='<div'+z2a+'626px;top:450px;background:#dddddd;height:14px;"class=tt> &nbsp; DualVolume&#8482 &nbsp; </div>';  l3[l3n++]='<div'+z2a+'718px;top:447px;">'+writechartoptions()+'</div>';  l3[l3n++]='<div'+z2a+'11px;top:337px;color:#aaaaaa;"class=tt> &nbsp; SmartVolume&#8482</div>';  l3[l3n++]='<div'+z3a+'11px;top:30px;color:#aaaaaa;"class=tt> &nbsp;NewsChart&#8482 &nbsp; &nbsp; RallyBands&#8482</div>';  l3[l3n++]='<div'+z2a+'631px;top:471px;color:#009900;"class=tt>Up Vol</div>';  l3[l3n++]='<div'+z2a+'631px;top:521px;color:#cc0000;"class=tt>Down Vol</div>'+tn2+'501px;"><!-- --></div>'+tn2+'551px;"><!-- --></div>';    l3[l3n++]='</div>';  l3[l3n++]='<table cellspacing=0 cellpadding=6><tr><td width=50% nowrap valign=top>';  document.write(l3.join(""));l3=[];l3n=0;  if ((qchart=="1")||(schart==1)) writesmallchart();  tn='<tr><td nowrap><tt>&nbsp;<font color=';tn3='</b></font> - ';tn2='</tt></td></tr>';  l3[l3n++]='</td><td width=25% valign=top nowrap>';  if ((qchart!="1")&&(schart!=1)){    l3[l3n++]='<div style="position:relative;width:240px;">';     ts='';  }  else     ts='position:relative;top:10px;';  l3[l3n++]='<div style="float:left;border:1px solid #000099;padding:5px;width:110px;'+ts+'"><tt><b>Key:</b></tt><br><table cellspacing=0 cellpadding=3>';  l3[l3n++]=tn+'blue><b>T1'+tn3+'Long Target 1'+tn2;  l3[l3n++]=tn+'blue><b>T2:'+tn3+'Long Target 2'+tn2;  l3[l3n++]=tn+'blue><b>BO:'+tn3+'Breakout'+tn2;  l3[l3n++]=tn+'red><b>S1'+tn3+'Short Target 1'+tn2;  l3[l3n++]=tn+'red><b>S2:'+tn3+'Short Target 2'+tn2;  l3[l3n++]=tn+'red><b>BD:'+tn3+'Breakdown'+tn2+'</table></div>';  if ((qchart!="1")&&(schart!=1))    l3[l3n++]='<div style="float:right;width:110px;padding:3px;text-align:center;">'+writechartoptions()+'</div><div style="clear:both;"></div></div>';  strs='</tt></td></tr><tr><td nowrap><tt><b><font color=blue>';  tn2=':</font></b> <u>';    l3[l3n++]='</td><td width=25% valign=top nowrap><div style="padding-right:60px;">';  if ((qchart=="1")||(schart==1))     l3[l3n++]='<div style="padding:3px;">'+writechartoptions()+'</div>';  l3[l3n++]='<table border=1 bordercolor="#cccccc" cellspacing=0 cellpadding=4><tr><td nowrap><tt><font color=blue><b>Price'+tn2+cprice+'</u>, '+resexp;   tn=-1;  if (justinres>=0) tn=justinres;  else if (justoutres>=0) tn=justoutres;  if (tn>=0){l3[l3n++]=' at '+trimnum(resprice[tn])+'.';}  l3[l3n++]=strs+'1 Day'+tn2+rchange+'</u>, ';  if (rchange>0) tn=rchange; else tn=-rchange+11;  l3[l3n++]=pricesdescrip[tn]+savedchangestr;  l3[l3n++]=strs+'Direction'+tn2+ldir2+'</u>, ';  if  (ldir2<0) tn=-ldir2+11; else tn=ldir2;  l3[l3n++]=rallypullsdescip[tn]+'.';    l3[l3n++]=strs+'Typical rally/pullback'+tn2+typmove+'</u> pts &nbsp; <font color=blue><b>Extreme'+tn2+exmove+'</u> pts'+strs+'Overbought/sold'+tn2+boughtidx+'</u>, ';  if (boughtidx<0) tn=-boughtidx+11; else tn=boughtidx;  l3[l3n++]=boughtsdescip[tn];   l3[l3n++]='.'+strs+'Month Trend'+tn2+monthtrend+'</u>, ';  if (monthtrend>=0) tn=monthtrend; else tn=-monthtrend+11;  l3[l3n++]=monthtrendsdescrip[tn];  l3[l3n++]=' trend.</tt></td></tr></table>';  document.write(l3.join(""));  document.write('</div></td></tr></table>');   document.write('</div>'+comdiv); } else document.write(smallsp+smallsp+'<table cellspacing=0 cellpadding=0 width=100%><tr><td align=center width=100% COLSPAN=3><br><br><center><b>No 8 Month Chart Available</b></center><br><br><br></td></tr></table>');}document.write('<div id="vtext" style="border:1px solid #000000;background:#F9F0DF;display:none;z-index:7;position:absolute;top:0px;left:0px;padding:1px;"><!-- --></div>');var vtextwinID;function showvtext(num,id,ofsx,ofsy,delay){  var temp=getid("vtext"),temp2=getid(id);  temp.style.left=(zxcPos(temp2)[0]-ofsx)+"px";  temp.style.top=(zxcPos(temp2)[1]-ofsy)+"px";  temp.innerHTML='<kbd>'+num+'</kbd>';  temp.style.display="block";   if (delay>0) vtextwinID=self.setTimeout("hidevtext(0);",delay*1000);  }function hidevtext(delayon){  getid("vtext").style.display="none";  if (delayon==1) window.clearTimeout(vtextwinID);}function showaddremstocks(remove,spanid,eleid){  var ts="",tsks,id=getid(eleid);  tsks=getselected(remove,0);  if (tsks!="") tsks=tsks.split(",");  if (tsks.length>=1) ts=tsks[0].substr(0,1).toUpperCase()+tsks[0].substr(1);  if (tsks.length>=2) ts+=", "+tsks[1].substr(0,1).toUpperCase()+tsks[1].substr(1);  if (tsks.length>2){    ts+=',...';    ts='<span class=kbd style="color:#0000FF;text-decoration:underline;cursor:pointer;" id="'+spanid+'" onmouseover="showvtext(\''+tsks.join(", ")+'\',\''+spanid+'\',15,30,0)"onmouseout="hidevtext(0)">'+ts+'</span>';  }else    ts='<span class=kbd style="color:#0000FF;">'+ts+'</span>';  if (tsks.length>=1)    id.innerHTML='<b>'+ts+'</b>';  else{    if (remove==1) ts='[none],';    else ts='[none]';    id.innerHTML='<kbd><b>'+ts+'</b></kbd>';  }  checkflash();}function selectstock(num,fromlink,remove){  var i,i2,ts,idsel=getid('selstk'+num),idrem=getid('remstk'+num);    if (remove==0){    i=idsel.checked;    if ((portf=="1")&&(isuserlist()))      if (idrem.checked==1){        idrem.checked=0;        removedstock[num]=0;      }  }  else{    i=idrem.checked;    if ((portf=="1")&&(isuserlist())){       if (idsel.checked==1){         idsel.checked=0;         selectedstock[num]=0;       }    }   }  if (charts==1) getid("added"+num).innerHTML="";  if (fromlink==1)    if (i==1){      i=0;      if (remove==0) idsel.checked=0;      else idrem.checked=0;          }    else{      i=1;      if (remove==0) idsel.checked=1;      else idrem.checked=1;    }  if (i==1){    if ((remove==0)&&(selectedstock[num]==0))      selectedstock[num]=1;    if ((remove==1)&&(removedstock[num]==0))      removedstock[num]=1;    if ((removedstock[num]==1)||(selectedstock[num]==1))      if (charts==1) getid("cback"+num).style.background="#f1f1f1";      else getid("tr"+num).style.background="#eaeaea";  }else{    if ((remove==0)&&(selectedstock[num]==1))      selectedstock[num]=0;    if ((remove==1)&&(removedstock[num]==1))      removedstock[num]=0;    if ((removedstock[num]==0)&&(selectedstock[num]==0))      if (charts==1) getid("cback"+num).style.background="#ffffff";      else getid("tr"+num).style.background="#ffffff";  }  if ((portf=="1")&&(isuserlist())){    showaddremstocks(1,"showremstockst","remstockst");    showaddremstocks(0,"showaddstockst","addstockst");    showaddremstocks(1,"showremstocksb","remstocksb");    showaddremstocks(0,"showaddstocksb","addstocksb");  }else{    showaddremstocks(0,"showaddstockst","addstockst");     showaddremstocks(0,"showaddstocksb","addstocksb");   }  checkflash();}var firstwlc=1,lockoverlay=[],selectedstock=[],wrotetonoverlay=[],removedstock=[],pdataright=[],pdata=[],i,j,lastz9=[],wlcjuldate=[],wlcdaysum=[],volon=[],wlc_syminfo=[],wlc_nochart=[],wlc_arrayinx=0,wlc_array=[],wlc_iend=[],wlc_options=[];for (i=0;i<20;i++){  pdata[i]=[];  wlcdaysum[i]=[];  selectedstock[i]=0;  removedstock[i]=0;  volon[i]=0;  lockoverlay[i]=0;  wrotetonoverlay[i]=0;  wlc_options[i]=0;  wlc_nochart[i]=1;}function wlc(nz,data){var n3=0,tempnum,ts3,l3=[];ts3='<span id=added'+nz+z3a+'620px;top:0px;font:bold 12px arial,sans-serif,helvetica;color:#0000ff;"></span><span'+z3a+'680px;top:0px;text-align:right;width:145px;"><span style="background:#d5d5d5;padding:1px;"><kbd><input style="position:relative;top:1px;"type="checkbox" onclick="selectstock('+nz+',0,0)" value="" id="selstk'+nz+'"> <a style="position:relative;top:-2px;"class=sp2 href="javascript:selectstock('+nz+',1,0)">Select</a>&nbsp;';if ((portf=="1")&&(isuserlist()))  ts3+='<input style="position:relative;top:1px;"type="checkbox" onclick="selectstock('+nz+',0,1)" value="" id="remstk'+nz+'"> <a style="position:relative;top:-2px;"class=sp2 href="javascript:selectstock('+nz+',1,1)">Remove</a>&nbsp;';ts3+='</kbd></span></span>';if ((nochart==0)&&(data==1)){  wlc_nochart[nz]=0;  if (sct2[insymbol]){    indxintra=sct2[insymbol].split(',');    indxintra=indxintra[2];  } else indxintra=1;  if (insymbol.charAt(0)=="*") indxintra=0;  wlcjuldate[nz]=jul_date(linedatag[0]);  var ml=Math.log,mr=Math.round,mf=Math.floor,ts,ts2,  l4=[],n4=0,l5=[],n5=0,l6=[],n6=0,l7=[],n7=0,l8=[],n8=0,tshad,bshad,lshad,  top,i2,i3,tn,tn2,tempnum,dayma1cnt=1,dayma2cnt=1,dayma1div,dayma2div;  startprice=tpricer[0]; endprice=startprice+tpricer[1]*10.0;  var pg,iend,tempstr,endporg=endprice,  pixorg=tpricer[1]*10.0/280.0,top1,top2,top3,top4,daysum=0;   volstat_a[nz]=1;rmastat_a[nz]=1;tonsmstat_a[nz]=1;tonvolstat_a[nz]=1;  dayma1[0]=0;dayma2[0]=0;    if ((indexes==1)&&(indxmult==0)) iend=1;   else iend=6;    if (searcht=="1") pg=3; else pg=1;    l3[n3++]=divsp20+'<a name="chart'+nz+'"></a><div id="cback'+nz+'" style="position:relative;top:0px;left:0px;height:348px;width:'+(standwidthout-2)+'px;background:#ffffff;border-right:1px solid black;border-left:1px solid black;">'+largechead;      if (indxintra==1) ts=sectstr; else ts='';  ts2=compname;  if ((ts.length+ts2.length)>56){    ts=ts.substr(0,26);    ts2=ts2.substr(0,30);  }  ts+= ',&nbsp;';  l3[n3++]=(sfrom+(nz % numstocks)+1)+'. </b></kbd><span id="btx'+nz+'"style="position:relative;top:-1px;font:bold 12px arial,sans-serif,helvetica;color:#0000ff;text-decoration:underline;cursor:pointer;"onmouseover="isl=1;showvtext(\'Open detailed Consultant tool window\',\'btx'+nz+'\',-30,20,2);"onmouseout="isl=0;hidevtext(1);"onclick="javascript:consult(\''+insymbol+'\','+pg+',0,0,0,0 );">'+insymbol+'</span><kbd> &nbsp; '+ts2+',&nbsp;'+ts+exchange+'</kbd></span><span'+z3a+'350px;top:12px;text-align:right;width:268px;"><span style="background:#eaeaea;"><tt>&nbsp; '+dodatestuff(linedatag[0],linedatag[1],0,1)+' </tt></span></span>';  l3[n3++]=ts3;  wlc_syminfo[nz]=ts2+',&nbsp;'+ts+exchange;  l3[n3++]='<div id="pdatadiv'+nz+'"'+z3a+'624px;top:318px;height:15px;background:#F9F0DF;border:1px solid #0000ee;display:none;font:normal 11px arial,sans-serif,helvetica;"onmouseover="tonsm('+nz+',615,0)"></div>';  l3[n3++]='<div id="lcf'+nz+'"'+z0a+'0px;top:0px;width:620px;height:311px;display:none;"><!-- --></div>';  l3[n3++]='<div id="lc'+nz+'"'+z0a+'0px;top:0px;width:620px;height:311px;display:none;"><!-- --></div>';  l3[n3++]='<div id="showvol'+nz+'"style="z-index:6;position:absolute;top:335;left:670px;font:bold 11px arial,sans-serif,helvetica;color:#0000ee;text-decoration:underline;cursor:pointer;"onclick="writevol('+nz+','+iend+');writevoltonsm('+nz+');">Show Vol</div>';  l3[n3++]='<div id="nc'+nz+'" style="z-index:6;position:absolute;top:30px;left:0px;width:625px;height:281px;"onmouseover="writerma('+nz+',1);writetonsm('+nz+');"><!-- --></div>';    l3[n3++]='<div id="bchart'+nz+'"style="background:#ffffff;border:1px solid #000000;display:none;z-index:8;position:absolute;top:9px;left:10px;width:450px;height:300px;background-repeat:no-repeat;">';  l3[n3++]='<div id="bchartin'+nz+'" onmouseover="writetonbc(0,0,'+nz+')"style="position:absolute;top:15px;left:0px;width:450px;height:270px;"></div>';  l3[n3++]='<div id="bcharttxt'+nz+'" class=tt style="position:absolute;top:2px;left:120px;"></div>';  l3[n3++]='<div id="bcharttxtoff'+nz+'" onclick="turnoffbigchart('+nz+');" class=tt style="position:absolute;top:283px;left:403px;font:bold 11px arial,helvetica,sans-serif;color:#0000ee;text-decoration:underline;cursor:pointer;"></div>';  l3[n3++]='<div id="bcharttxtz'+nz+'" class=tt style="position:absolute;top:19px;left:2px;"></div>';  l3[n3++]='</div>';    if (msbrowser==0)    l3[n3++]='<div id="bchartbot'+nz+'" style="background:#ffffff;border:1px solid #000000;display:none;z-index:8;position:absolute;top:335px;left:10px;width:450px;height:81px;background-repeat:no-repeat;"></div>';      l3[n3++]='<div id="dc'+nz+'"'+z5a+'0px;top:0px;width:620px;height:311px;display:none;"><!-- --></div>';        voldata_a[nz]=iend+"~"+tvol+"~"+savedvol+"~"+indxmult+"~"+indexes+"~";    var rma=[],rmacnt,rmaon,pixz,lnz,i,  x1,x2,x3,x4,x4,x5,x6,x7,tprice=ddata[5].split(","),zzz=tprice.length,mnum,voltxtadd=0,volextfound=0,  volchar=['a','b','c','d'],volextstr='',z9,tp1,tp2,tonwidth=4;  startprice*=0.970874; endprice*=1.030928;  initsetchartvars();      rmadata_a[nz]=pixspan+","+lnstart+","+longavg+","+rbar1const+","+rbar2const;    l3[n3++]=writepricedivs();  l3[n3++]=writerestar(nz);  pixz=pixspan;lnz=lnstart; i2=15; i3=0;  rmacnt=1;rmaon=21; rma[0]=0.0;    lastz9[nz]=-1;  for (i=0;i<zzz;i=i+8){    x1=i+1; x2=i+2; x3=i+3; x4=i+4; x5=i+5; x7=i+7; z9=149-i/8;    if (tprice[x5]>0){      if (lastz9[nz]<0) lastz9[nz]=z9;      x6=i+6;      if (i==1192) i2+=4;           if (tprice[x7]!=0){           if (tprice[x7]<=12){            mnum=tprice[x7]-1;            wlcdaysum[nz][z9]=1;          }          else{            wlcdaysum[nz][z9]=mf(tprice[x7]*0.05)+1;            mnum=tprice[x7]-((wlcdaysum[nz][z9]-1)*20+1);          }          if (mnum>=0){            l3[n3++]='<div'+z1a+(i2+3)+'px;top:30px;background:#bfbfbf;width:1px;height:318px;"><!-- --></div><span'+z3a+(i/2+20)+'px;top:334px;"><tt>'+monthname[mnum]+'</tt></span>';            l4[n4++]='<div'+z1a+(i2+3)+'px;top:0px;background:#bfbfbf;width:1px;height:107px;"><!-- --></div>';          }      }else        wlcdaysum[nz][z9]=1;            if ((indexes==1) && (indxmult==0)) tprice[i]=50;      if (tprice[i]>=0)        l5[n5++]=i2+"~"+tprice[i]+"~"+tprice[x6];      else{        if (((i-8)>=0)&&(tprice[i-8]<0)){          if (i!=1192) voltxtadd=2;           else voltxtadd=0;            if (((i-16)>=0)&&(tprice[i-16]<0)){             if (i!=1192) voltxtadd=4;             else voltxtadd=1;            if (((i-24)>=0)&&(tprice[i-24]<0)){              if (i!=1192) voltxtadd=6;               else voltxtadd=3;             }           }        }else           voltxtadd=0;        ts='</div><div'+z4a+i2+'px;width:3px;background:#'+ctype2[tprice[x6]]+';height:';        l4[n4++]='<div'+dsv+'-1px;left:'+(i2-1+voltxtadd)+'px;z-index:6;font:normal 11px arial,sans-serif,helvetica;">'+volchar[volextfound]+ts+'3px;top:11px;"><!-- -->'+ts+'4px;top:16px;"><!-- -->'+ts+'4px;top:22px;"><!-- -->'+ts+'72px;top:28px;"><!-- --></div>';        volextstr+=volchar[volextfound]+'='+volscale(-1*1.00*(tprice[i]))+' &nbsp;  ';        volextfound++;      }      tp1=-tprice[x1]-tprice[x4]; tp2=tp1-tprice[x3];      if (regchart==0){         top1=(ml(endporg-tprice[x1]*pixorg)-lnz)*pixz;        top2=(ml(endporg+tp1*pixorg)-lnz)*pixz;        top3=(ml(endporg+tp2*pixorg)-lnz)*pixz;        top4=(ml(endporg+(tp2-tprice[x2])*pixorg)-lnz)*pixz;      }else{        top1=(endporg-tprice[x1]*pixorg-lnz)*pixz;        top2=(endporg+tp1*pixorg-lnz)*pixz;        top3=(endporg+tp2*pixorg-lnz)*pixz;        top4=(endporg+(tp2-tprice[x2])*pixorg-lnz)*pixz;      }      tshad=mr(top1-top2);if (tshad<0) tshad=0;       tbod=mr(top2-top3); if (tbod<=0) tbod=1;      lshad=mr(top3-top4); if (lshad<0) lshad=0;          if (z9<=4)         pdata[nz][z9]=trimnum(opprice[z9])+','+trimnum(clprice[z9]);      else{         if (tprice[x5]==2){tn=tp1;tn2=tp2;}         else {tn=tp2;tn2=tp1;}         pdata[nz][z9]=trimnum(endporg+tn*pixorg)+','+trimnum(endporg+tn2*pixorg);      }      l3[n3++]='<div class=bs style="left:'+i2+'px;top:'+(310-mr(top1))+'px;">';      if (stickchart==0){        if (tshad>0)          l3[n3++]='<div class=shad style="height:'+tshad+'px;"><!-- --></div>';        if (tbod!=1) ts=tprice[x5]; else ts=0;                l3[n3++]='<div class=b'+ts+' style="height:'+tbod+'px;"><!-- --></div>';        if (lshad>0)          l3[n3++]='<div class=shad style="height:'+lshad+'px;"><!-- --></div>';      }else{          if(tprice[x5]==1){           tn=tshad;           tn2=mr(top2-top4); if (tn2<0) tn2=0;                   }          else{           tn=mr(top1-top3); if (tn<0) tn=0;           tn2=lshad;         }         if (tn>0)           l3[n3++]='<div style="width:1px;height:'+tn+'px;background:#'+ctype2[tprice[x6]]+'"><!-- --></div>';         l3[n3++]='<div class=b'+tprice[x6]+' style="height:1px;"><!-- --></div>';         if (tn2>0)           l3[n3++]='<div style="width:1px;height:'+tn2+'px;background:#'+ctype2[tprice[x6]]+'"><!-- --></div>';      }      l3[n3++]='</div>';        if(tprice[x5]==1) rma[rmacnt]=rma[rmacnt-1]-tp1;       else rma[rmacnt]=rma[rmacnt-1]-tp2;          if (rmacnt>=rmaon)        l6[n6++]=i2+"~"+mf(100.0*(endporg-(rma[rmacnt]-rma[rmacnt-rmaon])*0.047619*pixorg));      rmacnt++;      if ((dayma1on>1)||(dayma2on>1)){        tn2=i2;        if(tprice[x5]==1) tn=310-mr(top2); else tn=310-mr(top3);        if (dayma1on>1){          dayma1[dayma1cnt]=dayma1[dayma1cnt-1]+tn;          if (dayma1cnt>=dayma1on){            tn2+='~'+(dayma1[dayma1cnt]-dayma1[dayma1cnt-dayma1on]);          }else tn2+='~-1';          dayma1cnt++;          }else tn2+='~-1';         if (dayma2on>1){           dayma2[dayma2cnt]=dayma2[dayma2cnt-1]+tn;           if (dayma2cnt>=dayma2on){             tn2+='~'+(dayma2[dayma2cnt]-dayma2[dayma2cnt-dayma2on]);           }else tn2+='~-1';           dayma2cnt++;         }else tn2+='~-1';         l8[n8++]=tn2;       }       if (z9==0)         l3[n3++]='<div id="ttb'+nz+'"'+z2a+i2+'px;top:25px;width:3px;height:285px;background:#d5d5d5;"><!-- --></div>';    }    i2+=4;  }    rmaval_a[nz]=l6.join(",");  daymaval_a[nz]=l8.join(",");  volval_a[nz]=l5.join(",");  voldata_a[nz]+=l4.join("")+"~"+volextstr;  wlc_sym[nz]=insymbol;  wlc_options[nz]=optionable;  wlc_recalc[nz]=insymbol+','+cprice+','+target1_long+','+target2_long+','+shortprice+','+upsidebreak+','+upbrkamount;  wlc_recalc[nz]+='~'+insymbol+','+cprice+','+target1_short+','+target2_short+','+coverprice+','+dwnsidebreak+','+dwnbrkamount;  if ((iend!=1)&&(showvol!=1))    l3[n3++]='<div id="typv'+nz+'"'+z2a+'330px;top:317px;font:normal 12px arial,sans-serif,helvetica;color:#000000;">TypV = '+volscale(savedvol)+'</div>';  if (indxintra==1){    ts='this.style.background=\'#dddddd\';isonchartlink=-1;getid(\'bchart'+nz+'\').style.display=\'none\';if(getid(\'bchartbot'+nz+'\').style.display==\'block\'){getid(\'bchartbot'+nz+'\').style.display=\'none\';if(((portf==\'1\')||(searcht==\'1\'))&&((msbrowser==1)&&(volstat_a['+nz+']==1)))getid(\'vc'+nz+'\').style.display=\'none\';}';      for (i=0;i<6;i++)      if (multichart[i]>0){          ts2='this.style.background=\'white\';isonchartlink='+(multichart[i]-1)+';changebigchartwlc('+nz+',0);';          l7[n7++]='<div id="mc'+nz+'_'+i+'" style="float:right;padding-top:4px;padding-bottom:2px;padding-left:2px;padding-right:2px;font:bold 11px verdana,arial;background:#dddddd;color:#0000ee;text-decoration:underline;cursor:pointer;"';          l7[n7++]='onmouseout="if(lockoverlay['+nz+']==0){'+ts+'}"onmouseover="if(lockoverlay['+nz+']==0){'+ts2+'}"';          l7[n7++]='onclick="if(lockoverlay['+nz+']=='+(i+1)+'){lockoverlay['+nz+']=0;'+ts+'}else{clearoverlayhighlight('+nz+');lockoverlay['+nz+']='+(i+1)+';wrotetonoverlay['+nz+']=0;'+ts2+'};">'+defgdesc2[multichart[i]-1]+'</div>';        }  }  l3[n3++]='<div'+z1a+'11px;top:311px;background:#dddddd;width:609px;height:24px;"><!-- --></div><div id="vold'+nz+'"'+z2a+'16px;top:317px;color:#000000;font: normal 10px verdana,arial,helvetica,sans-serif;"><!-- --></div><div '+z2a+'415px;top:313px;width:200px;">'+l7.join("")+'<div style="clear:both;"></div></div>';   l3[n3++]='</div>';  l3[n3++]='<div id="vc'+nz+'" style="position:relative;top:0px;left:0px;display:none;background:#ffffff;height:107px;width:'+(standwidthout-2)+'px;border-right:1px solid black;border-left:1px solid black;">';  if (msbrowser==1)    l3[n3++]='<div id="bchartbot'+nz+'" style="background:#ffffff;border:1px solid #000000;display:none;z-index:8;position:absolute;top:0px;left:10px;width:450px;height:81px;background-repeat:no-repeat;"></div>';  l3[n3++]='</div>';    wlcdaysum[nz][0]=0;  wlc_array[wlc_arrayinx]=l3.join("");  wlc_arrayinx++;  wlc_iend[nz]=iend;  }else{  var smchart2,gtimeloc=4,gtypeloc;  if (sct2[insymbol]){     tempnum=sct2[insymbol].split(',');    smchart2=tempnum[0];  }  else smchart2=insymbol;    wlc_sym[nz]=smchart2;      gtypeloc=findgtype(gtimeloc);  var frannum=Math.round(Math.random(1)*100000);  l3[n3++]=divsp20+comdiv+'<div id="cback'+nz+'" style="height:420px;position:relative;top:0px;left:0px;background:#ffffff;">';  l3[n3++]=ts3;  l3[n3++]='<div'+z3a+'12px;top:12px;"><kbd><b>'+(sfrom+(nz % 20)+1)+'. '+insymbol+', &nbsp; </b><font="verdana" style="color:#0000ee;"> No Stock Consultant chart available</font></div>';  l3[n3++]='<div style="position:relative;top:30px;left:12px;width:450px;height:81px;background-image:url(http://chart.bigcharts.com/custom/alliance/gifquote/alliance-450x81.img?symb='+smchart2+'&'+frannum+');background-repeat:no-repeat;"><!-- --></div>';  l3[n3++]='<div style="background:#cccccc;position:relative;top:30px;left:12px;width:450px;height:300px;background-image:url(http://chart.bigcharts.com/custom/alliance/chart.asp?symb='+smchart2+'&time='+defgstrs[gtimeloc]+'&freq='+defgtime[gtimeloc]+'&uf=3&compidx=aaaaa:0&style=500&type='+gtypeloc+'&size=2&country=us&'+frannum+');background-repeat:no-repeat;"><!-- --></div>';  l3[n3++]='</div></div>';  wlc_array[wlc_arrayinx]=l3.join("");  wlc_arrayinx++;} }function ctoggle(num,setit){  if (setit==1) { if (chartid[num]==0) chartid[num]=1; else chartid[num]=0; }  chartcstr=chartid[0]+','+chartid[1]+','+chartid[2]+','+chartid[3]+','+chartid[4];  updateglobs(2,chartcstr,1);}function writechartoptions(){  return('<a class=sp2 href="javascript:window.open(\'chartoptions.html\',\'chartop\',\'toolbar=0,status=0,width=520,height=420,scrollbars=1,resizable=1,menubar=0,left=40,top=40,screenX=40,screenY=40\').focus();">Set Chart Options</a>');}function detailedchart(){  if (qchart!="1")    writesecheader('Detailed Chart',' &nbsp;  &nbsp;  &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/stockchart.html" target="_blank">Chart Help</a> &nbsp; &nbsp; &nbsp;  &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a'+iso3+'-1,40,0)">Tutorial On Candlestick Charts</a>&nbsp;<a'+iso3+'-1,114,0)">pt2</a>&nbsp;<a'+iso3+'-1,132,0)">pt3</a>&nbsp;<a'+iso3+'-1,133,0)">pt4</a> &nbsp; &nbsp; &nbsp; &nbsp; <b>Candles:</b> <a'+iso3+'-1,115,0)">Bullish</a> &nbsp;<a'+iso3+'-1,116,0)">Bearish</a> &nbsp;<a'+iso3+'-1,117,0)">Reversal</a>','left');  if (nochart==1)     document.write('<br><br><center><b>No 8 month chart available</b></center><br><br>');  else     writelargechart();}function writeressum(bullishtest){  if (bullishtest==1){    if (resexp==asup) document.write(bcstr+asup+indmid);  }else    if (resexp==ares) document.write(brcstr+ares+indmid); }function writepricesum(bullishtest){  var pch='1 Day Price change ',l3=[],n=0;  if (bullishtest==1){     if (rchange<=(-9)) l3[n++]=bpstr+pch+'extreme down, may pause/reverse'+indmid;    else      if (rchange<=(-8)) l3[n++]=bpstr+pch+'strong down, may pause'+indmid;  }else{     if (rchange>=9) l3[n++]=brpstr+pch+'extreme up, may pause/reverse'+indmid;     else       if (rchange>=8) l3[n++]=brpstr+pch+'strong up, may pause'+indmid;  }  document.write(l3.join(""));}function writeressup(){  wrind('RESISTANCE/SUPPORT',1);  writecur_ressup();  document.write('</td></tr><tr><td></td><td align=left valign=top> &nbsp; &nbsp; &nbsp; &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/stockresistanceandsupport.html" target="_blank">Res/Sup Help</a></td><td></td><td>Resistance Above : '+resabove[0]+'</td></tr><tr><td></td><td align=left valign=top><tt> &nbsp; &nbsp; &nbsp; &nbsp; </tt></td><td></td><td valign=middle>Support Below : '+supbelow[0]+indmid);}function write3daymf(testtype){  if(testtype==1){     if ((flowdir3d==2) && (boughtidx<=(-7)) && (moneyflow3d>=9)) document.write(bcstr+mfsdescip[moneyflow3d]+distr+', but when the stock is oversold this is considered bullish.'+indmid);  }else{     if ((flowdir3d==1) && (boughtidx>=7) && (moneyflow3d>=9)) document.write(brcstr+mfsdescip[moneyflow3d]+accum+', but when the stock is overbought this is considered bearish.'+indmid);  } }function write1monthtrend(summary,testtype){  if (monthtrend<0)     outstr2=-monthtrend+11;   else     outstr2=monthtrend;  if (summary==1){    var ts=monthtrendsdescrip[outstr2]+' trend <i>(1 month)</i>'+monthtrenddescrip[outstr2]+indmid;    if(testtype==1){      if (monthtrend<=(-7)) document.write(bpstr+ts);     }else      if (monthtrend>=7) document.write(brpstr+ts);   }else{    wrind('1 MONTH TREND',1);    document.write(writebarg(monthtrend,1,0)+monthtrendsdescrip[outstr2]+' trend'+monthtrenddescrip[outstr2]);  } }function writebullishchart(summary,testtype){  var n=0,l3=[],ts;  if (summary==1){    ts=chartdescrip[tempchart]+' 3 day chart pattern';    if(testtype==1){      if (chartdescrip[tempchart].indexOf("bullish")!= -1){        if (chartdescrip[tempchart].indexOf("Mild")!= -1)          l3[n++]=bpstr;        else           l3[n++]=bcstr;         l3[n++]=ts;        if ((flowdir3d==1)&&(moneyflow3d>=4)&&(!((boughtidx>=7)&&(moneyflow3d>=9))))           l3[n++]='<i> with '+mfsdescip[moneyflow3d]+accum+'</i>';        l3[n++]='.'+indmid;      }     }else{      if (chartdescrip[tempchart].indexOf("bearish")!= -1){        if (chartdescrip[tempchart].indexOf("Mild")!= -1)          l3[n++]=brpstr;        else          l3[n++]=brcstr;        l3[n++]=ts;        if ((flowdir3d==2)&&(moneyflow3d>=4)&&(!((boughtidx<=(-7))&&(moneyflow3d>=9))))          l3[n++]='<i> with '+mfsdescip[moneyflow3d]+distr+'</i>';        l3[n++]='.'+indmid;      }      }  }else{      wrind('3 DAY CHART ALERT',1);      l3[n++]=writebarg(chartvdescrip[advbulldays],1,0)+chartdescrip[tempchart]+' 3 day chart pattern.'+indmid;    if (indexes==0){        var tmpmonflow3d=moneyflow3d;      if (flowdir3d==2)        tmpmonflow3d=-tmpmonflow3d;       l3[n++]=writebarg(tmpmonflow3d,flowdir3d,0);      if (flowdir3d==0){        l3[n++]=mfsdescip[moneyflow3d]+' neutral 3 day accumulation/distribution';         if (moneyflow3d>=4)           l3[n++]=', '+stalemate;         if (moneyflow3d>=9)          l3[n++]=', could mark a possible price reversal';      }else         if (flowdir3d==1)          l3[n++]=mfsdescip[moneyflow3d]+accum;         else           if (flowdir3d==2)             l3[n++]=mfsdescip[moneyflow3d]+distr;       if (moneyflow3d>=5)         l3[n++]=', occurs '+mfpercent3d+'% of the time.';    }  }   document.write(l3.join(""));}function writepricepos(){  wrind('1 DAY PRICE CHANGE',1);   if (rchange>0)    outstr2=rchange;   else    outstr2=-rchange+11;  document.write(writebarg(rchange,1,0)+pricesdescrip[outstr2]+savedchangestr+' from yesterday\'s close'+pricesdescripmore[outstr2]);}function writerallypull2(testtype,sum){  var ts,n=0,l3=[];  if (ldir2<0) outstr2=-ldir2+11;  else outstr2=ldir2;  if(sum==1){    ts='Short term '+rallypullsdescip[outstr2]+rallypulldescip[outstr2]+indmid;    if ((ldir2<=(-7))&&(testtype==1)) l3[n++]=bpstr+ts;    else       if ((ldir2>=7)&&(testtype==2)) l3[n++]=brpstr+ts;  }else{    wrind('SHORT TERM DIRECTION',1);    l3[n++]=writebarg(ldir2,1,0)+rallypullsdescip[outstr2]+rallypulldescip[outstr2];  }  document.write(l3.join(""));} function write1daymf(summary,testtype){  var ts,n=0,l3=[];  if (summary==1){    if(testtype==1){      ts=bcstr+mfsdescip[moneyflow]+flowdescr[flowdir]+monin;      if ((flowdir==1)&&(moneyflow>=4)&&(!((ldir2>=7)&&(moneyflow>=9))))         l3[n++]=ts+indmid;      else         if (((flowdir==2)||(flowdir==0))&&(ldir2<=(-7))&&(moneyflow>=9))          l3[n++]=ts+', on an strong-extreme pullback is considered bullish.'+indmid;    }else{      ts=brcstr+mfsdescip[moneyflow]+flowdescr[flowdir]+monin;      if ((flowdir==2)&&(moneyflow>=4)&&(!((ldir2<=(-7))&&(moneyflow>=9))))        l3[n++]=ts+indmid;      else if (((flowdir==1)||(flowdir==0))&&(ldir2>=7)&&(moneyflow>=9))        l3[n++]=ts+', on an strong-extreme rally is considered bearish.'+indmid;    }   }else{    wrind('MONEYFLOW',1);     var tmpmonflow=moneyflow;    if (flowdir==2)      tmpmonflow=-tmpmonflow;    l3[n++]=writebarg(tmpmonflow,flowdir,0)+mfsdescip[moneyflow]+flowdescr[flowdir]+monin;     if (globtimerat<1.0){      tempstr=curdatadate.split(",");      l3[n++]=' by '+tempstr[1];    }     l3[n++]=',';    ts='occurs '+mfpercent+'% of the time.';    if ((flowdir==0)&&(moneyflow>=4)){      l3[n++]='<br>'+stalemate;      if (moneyflow>=5)        l3[n++]=', '+ts;     }else      if (moneyflow>=5)        l3[n++]='<br>'+ts;  }  document.write(l3.join(""));}function writerallystuff(){  wrind('RALLIES/PULLBACKS',1);   document.write('Typical: <b>'+(mr(typmove/cprice*100.0*10.0)/10.0)+'%</b> ('+typmove+' pts) stock price move occurs 25% of the time.</td></tr><tr><td></td><td align=center valign=top><tt>** Current price area</tt></td><td></td><td>Extreme: <b>'+(mr(exmove/cprice*100.0*10.0)/10.0)+'%</b> ('+exmove+' pts) stock price move occurs 5% of the time.'); }function writeresistancemap(){  var ts='';  document.write('<br>&nbsp; <a href="#ttop" class=sm3b Title="Back to top"><b>Top</b></a>');  if ((listofstocks!="")&&(symis!=0))    document.write(smallsp+smallsp+'<table cellspacing=0 cellpadding=0><tr><td width=15>&nbsp; </td><td><tt>'+listofstocks+'</tt></td></tr></table>');  document.write(smallsp);  writesecheader('Resistance & Support Areas','<table cellspacing=0 cellpading=0><tr><td align=left nowrap>&nbsp;Over the past 8 months. &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/stockresistanceandsupport.html" target="_blank">Resistance & Support Help</a></td><td align=right width=80%> &nbsp; </td></tr></table>','left');    if (sample==1){     document.write('<div><div style="float:left;width:'+(standwidthout-307-3)+'px;">'); ts='<br>';  }      document.write('<div style="padding:5px;"><table cellpadding=2 cellspacing=0><tr><td nowrap valign=top>&nbsp;<IMG align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp; <b>Type:</b></td><td>Number of times a stock has stopped at a resistance/support area,'+ts+'the more times the stronger the area.</td></tr><tr><td nowrap valign=top align=right><b>Strength:</b></td><td>Amount of volume occuring at resistance/support areas,'+ts+'the higher the more significant the area.</td></tr></table></div>');  wrind('CURRENT PRICE',1);  writecur_ressup();  document.write(endind);   wrind('RESISTANCE ABOVE',3);  var l3=[],l3n=0;  for (i=0;i<resnums;i++)    l3[l3n++]='<font color="#B40000">'+resabove[i]+'</font>'+indmid;  if (resnums==0)    l3[l3n++]='<font color="#B40000">None.</font>'+indmid;  l3[l3n++]=endind;  document.write(l3.join(""));  l3=[];l3n=0;  wrind('SUPPORT BELOW',2);  for (i=0;i<supnums;i++)    l3[l3n++]='<font color="#0000B4">'+supbelow[i]+'</font>'+indmid;  if (supnums==0)    l3[l3n++]='<font color="#0000B4">None.</font>'+indmid;  l3[l3n++]=endind;  document.write(l3.join(""));    if (sample==1){    document.write('</div><div style="padding-top:8px;padding-right:3px;float:right;width:305px;height:250px;">');    icBrokerWidget('stockconsultant', 300, 260);    document.write('</div><div style="clear:both;"></div></div>');  }}function writeintertrend(sum,testtype){  var writetrend="",ts;  if (trendnum>=0){    if (trenddescrip[intertrend].indexOf("<br>")!= -1){      writetrend=trenddescrip[intertrend].split("<br>");       writetrend=writetrend[0]+" "+writetrend[1];    }    else      writetrend=trenddescrip[intertrend];  }  if(sum==1){    if (trendnum>=0){      ts='Intermediate trend '+trenddescripsum[trendnum]+', '+ writetrend+indmid;      if (testtype==1){        if (trenddescripsum[trendnum].indexOf("bullish")!= -1)          document.write(bpstr+ts);      }      else{        if (trenddescripsum[trendnum].indexOf("bearish")!= -1)          document.write(brpstr+ts);      }    }  }else{    wrind('INTERMEDIATE TREND',1);    if (trendnum>=0)      document.write(writebarg(trendstatnum[intertrend],1,0)+trenddescripsum[trendnum]+',</td></tr><tr><td></td><td align=center valign=top><tt>** Past 4 months</tt></td><td></td><td>'+writetrend);    else      document.write('Trend not recognized.');  }}function writesummary(){  writesecheader('Overall Summary','<table cellspacing=0 cellpading=0><tr><td align=left nowrap>&nbsp;A summary of bullish and bearish indicators. &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/overallsummary.html" target="_blank">Summary Help</a></td><td align=right width=80%> &nbsp; </td></tr></table>','left');  document.write('<table cellpadding=5 cellspacing=0 width=100%><tr><td> &nbsp; <IMG align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp;<KBD>Should only be used as a general guide. Please look at the indicators for more detailed understanding.</KBD></td></tr></table>');  wrind('BULLISH',2);  writeintertrend(1,1);  writepricesum(1);  writebought(1,1);  writerallypull2(1,1);  writebullishchart(1,1);  write3daymf(1);   write1daymf(1,1);  write1monthtrend(1,1);  writebreakoutdownres(1,1);  writeressum(1);  if ((conbull==0)&(probbull==0))    document.write('None'+indmid);  document.write(endind);  wrind('BEARISH',3);  writeintertrend(1,2);  writepricesum(2);  writebought(2,1);   writerallypull2(2,1);  writebullishchart(1,2);  write3daymf(2);   write1daymf(1,2);     write1monthtrend(1,2);  writebreakoutdownres(1,2);  writeressum(2);  if ((conbear==0)&(probbear==0))    document.write('None'+indmid);   document.write(endind);  wrind('SUMMARY',1);  writeoverallind();  document.write(endind);  writerallystuff();  document.write(endind);}function writeposition(){  document.write(smallsp);  if (sample==1)     document.write('<div><div style="float:left;width:'+(standwidthout-168)+'px;">');    writesecheader('Position Indicators','<table cellspacing=0 cellpading=0><tr><td align=left nowrap>&nbsp;Indicators for positioning trade entry and exits. &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/positionindicators.html" target="_blank">Position Help</a></td><td align=right width=80%><a'+iso3+'-1,26,0)"> &nbsp; </td></tr></table>','left');  writepricepos(); document.write(endind);  writerallypull2(0,0); document.write(endind);  writebought(0,0); document.write(endind);  write1monthtrend(0,0); document.write(endind);  writeintertrend(0,0); document.write(endind);  writeressup(); document.write(endind);}function writetiming(){  document.write(smallsp);  writesecheader('Timing Indicators','<table cellspacing=0 cellpading=0><tr><td align=left nowrap>&nbsp;Indicators for timing trade entry and exits. &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/generalbasics.html" target="_blank">Timing Help</a></td><td align=right width=80%><a'+iso3+'-1,27,0)"> &nbsp; </td></tr></table>','left');  document.write('<table cellpadding=5 cellspacing=0 width=100%><tr><td> &nbsp; <IMG align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp;<KBD>3 Day Chart Alert analyzes over 120 three day candlestick patterns!</KBD></td></tr></table>');  writebullishchart(0,0); document.write(endind);  if (indexes==0){    write1daymf(0,0); document.write(endind);  }   writebreakoutdownres(2,0); document.write(endind);   if (sample==1)    document.write('</div><div style="float:right;padding-top:10px;width:164px;height:600px;"><iframe src="../iv160x600.html?quotepage&quotepage" width=160 height=600 frameborder=0 scrolling=no marginheight=0 marginheight=0></iframe></div><div style="clear:both;"></div></div>');}function upsidedownside(){  document.write('<a name="upsidet">'+smallsp);  writesecheader('</a>Upside Trade','<table cellspacing=0 cellpading=0><tr><td align=left nowrap>&nbsp;Trade indicators for long trades. &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/stockupsidetradebreakout.html" target="_blank">Upside Trade & Breakout Help</a></td><td align=right width=80%> &nbsp; </td></tr></table>','left');  writeupsidetradeinfo(); document.write(endind+smallsp);  writesecheader('Downside Trade','<table cellspacing=0 cellpading=0><tr><td align=left nowrap>&nbsp;Trade indicators for short trades. &nbsp; <img align=absmiddle '+ilnk+'qicon.gif" width=20 height=20> <a href="../help/stockdownsidetradebreakdown.html" target="_blank">Downside Trade & Breakdown Help</a></td><td align=right width=80%> &nbsp; </td></tr></table>','left');  writedownsidetradeinfo();  document.write(endind);}function writebreakouttype(resnum,numtype){  if (numtype==0){    breaktxt="breakout";    restxt="resistance";  }else{    breaktxt="breakdown";    restxt="support";  }  if (restype[resnum]>1)    outstr2='Type: <b>True</b> '+breaktxt+' from ';  else    outstr2='Type: <b>Continuation</b> '+breaktxt+' from ';  document.write(outstr2+writerestype2(restype[resnum])+' '+restxt+'. ');}function writebreakoutdowntargetinfo(target){  var profit,loss,stop,plratio,types;  if (target>cprice){    types="Stop";    loss=lossl;    stop=shortprice;    profit=(target-cprice)/cprice*100.0;  }else{    types="Cover";    loss=losss;    stop=coverprice;    profit=(cprice-target)/cprice*100.0;  }  var plr=trimnumfxd(profit/loss);  outstr2=indmid+'Target: <b>'+trimnum(target)+', '+trimnumfxd(profit)+'%</b> &nbsp;&nbsp;'+types+': '+stop+', &nbsp;&nbsp;Loss: '+loss+'%, &nbsp;&nbsp;Profit/Loss ratio: '+plr+' : 1 - ';  outstr2+='<b>';   if(plr<1.8) outstr2+='Poor';     else if (plr<2.2) outstr2+='Fair';       else if (plr<3.1) outstr2+='Good';        else outstr2+='Excellent';  document.write(outstr2+'</b>');}function breakoutdwndata(btype){  if (btype==1){    if ((confirmupbrk==1)||(((isnotbearish)&&(!bearish1daymonflow)&&(justoutres>=0)         &&(upsidebreak>0.0)))||(((justinres>=0)&&(upsidebreak>0.0))))       return(upsidebreak+upbrkamount);     else       return(-1.0);  }else{    if ((confirmdwnbrk==1)||(((isnotbullish)&&(!bullish1daymonflow)&&(justoutres>=0)         &&(dwnsidebreak>0.0)))||(((justinres>=0)&&(dwnsidebreak>0.0))))      return(dwnsidebreak-dwnbrkamount);    else      return(-1.0);  }}function writebreakout(special,alsocolor){  var none=0;  if ((special==1)||(alsocolor==1))    wrind('BREAKOUT',2);  else    wrind('BREAKOUT',1);      if (confirmupbrk==1){    if (special==0){      document.write('<b>'+cba+upsidebreak+'</font>'+nresa+indmid);      writebreakouttype(breakoutres,0);    }else      document.write('<b>Confirmed.</b>');    writebreakoutdowntargetinfo(upsidebreak+upbrkamount);  }else    if ((isnotbearish)&&(!bearish1daymonflow)&&(justoutres>=0)&&(upsidebreak>0.0)){      if (special==0){        document.write('<b>'+pba+upsidebreak+'</font>'+nresa+indmid);        writebreakouttype(breakoutres,0);      }else        document.write('<b>Possible.</b>');      writebreakoutdowntargetinfo(upsidebreak+upbrkamount);    }else      if ((justinres>=0)&&(upsidebreak>0.0)){        if (special==0){          document.write('<b>WATCH</b> for possible breakout <font color="#0000EE">above '+upsidebreak+'</font>'+nresa+indmid);           writebreakouttype(breakoutres,0);        }else          document.write('<b>Watch.</b>');        writebreakoutdowntargetinfo(upsidebreak+upbrkamount);      }else{        document.write('None.');        breakspu--;        none=1;      }  if (none==0){    document.write(indmid+'<img align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp;<kbd>Breakouts are an exception to the normal indicators which can at the same time indicate bearishness.</kbd>');    document.write(indmid+'<img align=absmiddle '+ilnk+'vicon.gif" width=20 height=20> <a class=mv1 onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:openflash(\'breakouts.htm\')">Breakout stock patterns</a>');  }}var wrotechartalerts=0;function writebreakdown(special,alsocolor){  var ts=indmid+'Target: <b>N/A</b>',none=0;  if ((special==1)||(alsocolor==1))    wrind('BREAKDOWN',3);  else    wrind('BREAKDOWN',1);         if (confirmdwnbrk==1){    if (special==0){      document.write('<b>'+cbb+dwnsidebreak+'</font>'+nsupb+indmid);      writebreakouttype(breakdwnres,1);    }else      document.write('<b>Confirmed.</b>');    if ((dwnsidebreak-dwnbrkamount)>0.0)      writebreakoutdowntargetinfo(dwnsidebreak-dwnbrkamount);    else      document.write(ts);  }else     if ((isnotbullish)&&(!bullish1daymonflow)&&(justoutres>=0)&&(dwnsidebreak>0.0)){      if (special==0){        document.write('<b>'+pbb+dwnsidebreak+'</font>'+nsupb+indmid);        writebreakouttype(breakdwnres,1);      }else        document.write('<b>Possible.</b>');      if ((dwnsidebreak-dwnbrkamount)>0.0)        writebreakoutdowntargetinfo(dwnsidebreak-dwnbrkamount);      else        document.write(ts);    }else      if ((justinres>=0)&&(dwnsidebreak>0.0)){        if (special==0){          document.write('<b>WATCH</b> for possible breakdown <font color="#EE0000">below '+dwnsidebreak+'</font>'+nsupb+indmid);          writebreakouttype(breakdwnres,1);        }else          document.write('<b>Watch.</b>');         if((dwnsidebreak-dwnbrkamount)>0.0)          writebreakoutdowntargetinfo(dwnsidebreak-dwnbrkamount);        else          document.write(ts);      }else{        document.write('None.');        breakspd--;        none=1;      }  if (none==0)    document.write(indmid+'<img align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp;<kbd>Breakdowns are an exception to the normal indicators which can at the same time indicate bullishness.</kbd>');        if (wrotechartalerts==0){    document.write(indmid);    writechartalerts();    wrotechartalerts=1;    document.write(smallsp);  }}function writebreakoutdownres(summary,bullishtest){  if (summary==1){    var ts;    if (bullishtest==1){      ts=upsidebreak+'</font>'+nresa+indmid;      if (confirmupbrk==1)        document.write(bcstr+'<b>'+cba+ts);      else if ((isnotbearish)&&(!bearish1daymonflow)&&(justoutres>=0)&&(upsidebreak>0.0))        document.write(bpstr+'<b>'+pba+ts);    }else{      ts=dwnsidebreak+'</font>'+nsupb+indmid;      if (confirmdwnbrk==1)        document.write(brcstr+'<b>'+cbb+ts);       else if ((isnotbullish)&&(!bullish1daymonflow)&&(justoutres>=0)&&(dwnsidebreak>0.0))        document.write(brpstr+'<b>'+pbb+ts);     }  }else{    writebreakout(0,0); document.write(endind);    writebreakdown(0,0); document.write(endind);  } }function writeupsidetradeinfo(){  var n=0,l3=[],ts,ts2='</a>',ts3='',ts4=' &nbsp; &nbsp; &nbsp; &nbsp; ( Stock Price: <u>'+cprice+'</u> )';  if ((sample==1)&&(notradedet==1)){    document.write('<div style="position:relative;top:7px;left:4px;"><table cellpadding=5 cellspacing=0 width=100%><tr><td>&nbsp;<font face="verdana"><b>Members only section &nbsp; <a href="http://www.stockconsultant.com/signup.html" target="_top">Sign up for access</a></b></font></td></tr><tr><td height=5> </td></tr></table></div>');    ts='<a'+iso3+'-1,136,0)">';      }else    ts='<a onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:openrecalcwin(1,-1)">';  document.write('<div style="position:relative;top:7px;left:4px;"><table cellpadding=5 cellspacing=0 width=100%><tr><td><img width=12 height=13 '+ilnk+'tbull.gif">&nbsp;<font face="verdana"><b>'+ts+'<font color="#0000ee">Upside ReCalc'+ts2+'&#8482</font></b></font>&nbsp;: <KBD>Adjust the upside trade & breakout parameters.</KBD>'+ts3+ts4+'</td></tr><tr><td height=5> </td></tr></table></div>');  if ((sample==1)&&(notradedet==1)){    l3[n++]='<table cellspacing=0 cellpadding=3>';    l3[n++]='<tr><td style="padding:10px;"><div style="border:2px solid #bbbbbb;"><img  src="../img/upsidetradesample.gif" width=726 height=336></div></td></tr></table>';    document.write(l3.join(""));  }else{  wrind('TRADE QUALITY',2);  document.write(writebarg(tquall,1,2,0)+'<font color="#0000ee">'+tradequaltxt[mf(tquall/10)]+'</font>'+indmid+'<img align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp;<KBD>High trade quality is a combination of good profit, profit/loss ratio and target potential.</KBD>'+endind);  wrind('TARGET 1',2);  n=0;l3=[];  l3[n++]='Price: <b>'+target1_long+'</b> &nbsp;&nbsp; Profit: <b>'+profit1_long+'%</b> , <font color="#0000EE">';  if (profit1_long==0)    l3[n++]='<tt>There has been a strong rally and the current stock price has exceeded Target 1.</tt>';  else    l3[n++]='<i>for a typical rally.</i>';  l3[n++]='</font>'+indmid+'Stop Limit/Trailing Stop Limit: <b>'+shortprice+'</b> &nbsp; &nbsp; Loss: <b>'+lossl+'%</b>'+indmid+'Profit/Loss Ratio: '+plratiol+' : 1 - '+writeplratio(plratiol);  l3[n++]=endind;    document.write(l3.join(""));  n=0;l3=[];  wrind('TARGET 1 POTENTIAL',2);  l3[n++]='<b>'+rallypottxt[10-resinwaystrenl]+'</b>, there are '+numresinwayl+' ';  l3[n++]='resistance areas on the way to Target 1.';  ts='<img align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp;<kbd>';  if (resinwaystrenl<5)    l3[n++]=indmid+ts+'Strong resistance areas may reduce the potential to reach long Targets 1 & 2.</kbd>';  else     l3[n++]=indmid+ts+'Stocks may quickly rise to Targets when there are not many resistance areas blocking the way.</kbd>';  l3[n++]=endind;    document.write(l3.join(""));  if (numresinwayl>0){    n=0;l3=[];    wrind('TARGET 1 RESISTANCE',2);    var temptopres=target1_long-target1_long*reswidth, tempnum=0;    for(i=0;i<numres;i++)      if ((i==justinres)&&(rescomment==10))        l3[n++]='Current price at resistance: '+atsupres+indmid;       else         if ((resprice[i]>cprice)&&(i!=justinres)&&(resprice[i]<temptopres)){          l3[n++]=resabove[tempnum]+indmid;          tempnum++;        }    l3[n++]='+'+profit1_long+'% at <b>'+target1_long+'</b> is <b>Target 1</b>'+endind;    document.write(l3.join(""));  }  n=0;l3=[];    wrind('TARGET 2',2);  l3[n++]='Price: <b>'+target2_long+'</b> &nbsp;&nbsp; Profit: <b>'+profit2_long+'%</b> , ';  if ((lossl>0)&&(profit2_long>0)){    tempnum=trimnumfxd(profit2_long/lossl);    l3[n++]='&nbsp; Profit/Loss Ratio: '+tempnum+' : 1 - '+writeplratio(tempnum);  }  if(profit2_long==0)     l3[n++]='<font color="#0000ee"><tt>There has been an <b>Extreme</b> rally and the current stock price has also exceeded Target 2.</tt></font>';  else     l3[n++]='&nbsp; &nbsp; <font color="#0000ee"><i>for an extreme rally.</i></font>';  l3[n++]=endind;  document.write(l3.join(""));  writebreakout(0,1);  }}function writedownsidetradeinfo(){  var n=0,l3=[],ts,ts2='</a>',ts3='',ts4=' &nbsp; &nbsp; &nbsp; &nbsp; ( Stock Price: <u>'+cprice+'</u> )';  if ((sample==1)&&(notradedet==1)){    document.write('<div style="position:relative;top:7px;left:4px;"><table cellpadding=5 cellspacing=0 width=100%><tr><td>&nbsp;<font face="verdana"><b>Members only section &nbsp; <a href="http://www.stockconsultant.com/signup.html" target="_top">Sign up for access</a></b></font></td></tr><tr><td height=5> </td></tr></table></div>');    ts='<a'+iso3+'-1,135,0)">';      }else    ts='<a onmouseover="isl=1;"onmouseout="isl=0;"href="javascript:openrecalcwin(2,-1)">';  document.write('<div style="position:relative;top:7px;left:4px;"><table cellpadding=5 cellspacing=0 width=100%><tr><td><img width=12 height=13 '+ilnk+'tbull.gif">&nbsp;<font face="verdana"><b>'+ts+'<font color="#0000ee">Downside ReCalc'+ts2+'&#8482</font></b></font>&nbsp;: <KBD>Adjust the downside trade & breakdown parameters.</KBD>'+ts3+ts4+'</td></tr><tr><td height=5> </td></tr></table></div>');  if ((sample==1)&&(notradedet==1)){    l3[n++]='<table cellspacing=0 cellpadding=3>';    l3[n++]='<tr><td style="padding:10px;"><div style="border:2px solid #bbbbbb;"><img  src="../img/downsidetradesample.gif" width=716 height=351></div></td></tr></table>';    document.write(l3.join(""));  }else{  wrind('TRADE QUALITY',3);  if (target1_short>0)    document.write(writebarg(-tquals,1,3,0)+'<font color="#EE0000">'+tradequaltxt[mf(tquals/10)]+'</font>'+endind);  else    document.write('<b>N/A</b>'+endind);  wrind('TARGET 1',3);  if (target1_short>0){    l3[n++]='Price: <b>'+target1_short+'</b> &nbsp;&nbsp; Profit: <b>'+profit1_short+'%</b> , <font color="#EE0000">';    if (profit1_short==0)      l3[n++]='<tt>There has been a strong pullback and the current stock price has exceeded Target 1.</tt>';    else      l3[n++]='<i>for a typical pullback.</i>';    l3[n++]='</font>'+indmid+'Cover Limit/Trailing Cover Limit: <b>'+coverprice+'</b> &nbsp; &nbsp; Loss: <b>'+losss+'%</b>'+indmid+'Profit/Loss Ratio: '+plratios+' : 1 - '+writeplratio(plratios);   }else    l3[n++]='Price: <b>N/A</b> &nbsp; &nbsp; Profit: <b>N/A %</b>'+indmid+'Cover Limit/Trailing Cover Limit: <b>N/A</b> &nbsp; &nbsp; Loss: <b>N/A %</b>'+indmid+'Profit/Loss Ratio: N/A : 1 - N/A';  l3[n++]=endind;  document.write(l3.join(""));  n=0;l3=[];  wrind('TARGET 1 POTENTIAL',3);  if (target1_short>0){    l3[n++]='<b>'+rallypottxt[10-resinwaystrens]+'</b>, there are '+numresinways+' ';    l3[n++]='support areas on the way to Target 1.';    ts='<img align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp;<kbd>';    if (resinwaystrens<5)      l3[n++]=indmid+ts+'Strong support areas may reduce the potential to reach short Targets 1 & 2.</kbd>';    else      l3[n++]=indmid+ts+'Stocks may quickly fall to Targets when there are not many support areas blocking the way.</kbd>';    l3[n++]=endind;    document.write(l3.join(""));    }else    document.write('<b>N/A</b>'+endind);  if (numresinways>0){    wrind('TARGET 1 SUPPORT',3);    n=0;l3=[];    var tempbotres=target1_short+target1_short*reswidth, tempnum=0;    for(i=numres-1;i>=0;i--)      if ((i==justinres)&&(rescomment==(-10)))         l3[n++]='Current price at support: '+atsupres+indmid;       else         if ((resprice[i]<cprice)&&(i!=justinres)&&(resprice[i]>tempbotres)){          l3[n++]=supbelow[tempnum]+indmid;          tempnum++;        }    if (target1_short>0)      l3[n++]='-'+profit1_short+'% at <b>'+target1_short+'</b> is <b>Target 1</b>';    else       l3[n++]='- N/A % at N/A is <b>Target 1</b>';    l3[n++]=endind;    document.write(l3.join(""));  }  wrind('TARGET 2',3);   if (target2_short>0){    n=0;l3=[];    l3[n++]='Price: <b>'+target2_short+'</b> &nbsp;&nbsp; Profit: <b>'+profit2_short+'%</b> , ';    if ((losss>0)&&(profit2_short>0)){      tempnum=trimnumfxd(profit2_short/losss);      l3[n++]='&nbsp; Profit/Loss Ratio: '+tempnum+' : 1 - '+writeplratio(tempnum);    }    if(profit2_short==0)      l3[n++]='<font color="#EE0000"><tt>There has been an <b>Extreme</b> pullback and the current stock price has also exceeded Target 2.</tt></font>';    else      l3[n++]='&nbsp; &nbsp; <font color="#EE0000"><i>for an extreme pullback.</i></font>';    l3[n++]=endind;    document.write(l3.join(""));    }  else    document.write('Price: <b>N/A</b> &nbsp; &nbsp; Profit:  <b>N/A</b> % , <I> <font color="#0000EE"> for an extreme pullback.</font></I>'+endind);  writebreakdown(0,1);   }}function writeoverallind(){  var n=0,l3=[],fb='<font color="#0000ee">',fr='<font color="#ee0000">',outstr2;  l3[n++]='<div style="position:relative;top:3px;"><table bgcolor="#999999" cellpadding=0 cellspacing=1><tr><td><table bgcolor="#ffffff" cellpadding=0 cellspacing=3>';  if (bullindtxt<0)     outstr2=-bullindtxt+11;  else    outstr2=bullindtxt;  if ((conbull==0)&&(probbull==0)){     l3[n++]='<tr><td nowrap rowspan=2 valign=top>'+fb+'No bullish indicators.</font></td><td width=30 nowrap>&nbsp;</td>';    l3[n++]='<td nowrap>'+writebarg(bullindtxt,1,0)+'</td></tr><tr><td></td><td nowrap>'+rateddescr[outstr2]+shtstr+'</td></tr>';  }else{    if (probbull>0)       l3[n++]='<tr><td nowrap>'+fb+'<b>'+probbull+'</b> bullish probability indicators.</font>';    else      l3[n++]='<tr><td nowrap>'+fb+'&nbsp;----</font>';    l3[n++]='</td><td width=30 nowrap>&nbsp;</td><td nowrap>'+writebarg(bullindtxt,1,0)+'</td></tr>';    if (conbull>0)      l3[n++]='<tr><td nowrap>'+fb+'<b>'+conbull+'</b> bullish confirmation indicators.</font>';    else      l3[n++]='<tr><td nowrap>'+fb+'&nbsp;----</font>';    l3[n++]='</td><td width=30 nowrap>&nbsp;</td><td nowrap>'+rateddescr[outstr2]+shtstr+'</td></tr>';  }  l3[n++]='<tr><td nowrap height=5 colspan=3> </td></tr>';  if ((conbear==0)&&(probbear==0)){    l3[n++]='<tr><td nowrap rowspan=2 valign=top>'+fr+'No bearish indicators.</font></td><td> </td>';    l3[n++]='<td nowrap>'+writebarg(bugraph,1,2)+fb+'Bullish</font></td></tr><tr><td></td><td nowrap>'+writebarg(-brgraph,1,3)+fr+'Bearish</font></td></tr>';  }else{    if (probbear>0)      l3[n++]='<tr><td nowrap>'+fr+'<b>'+probbear+'</b> bearish probability indicators.</font>';    else      l3[n++]='<tr><td nowrap>'+fr+'&nbsp;----</font>';    l3[n++]='</td><td> </td><td nowrap>'+writebarg(bugraph,1,2)+fb+'Bullish</font></td></tr>';    if (conbear>0)      l3[n++]='<tr><td nowrap>'+fr+'<b>'+conbear+'</b> bearish confirmation indicators.</font>';    else      l3[n++]='<tr><td nowrap>'+fr+'&nbsp;----</font>';    l3[n++]='</td><td> </td><td nowrap>'+writebarg(-brgraph,1,3)+fr+'Bearish</font></td></tr>';  }  l3[n++]='</table></td></tr></table></div>'+indmid;  document.write(l3.join(""));}function writeplratio(plratiol){  var outstr2='<b>';   if(plratiol<2.0) outstr2+='Poor';    else if (plratiol<2.5) outstr2+='Fair';      else if (plratiol<3.8) outstr2+='Good';        else outstr2+='Excellent';  return(outstr2+'</b>');}function writebought(testtype,sum){  if (boughtidx<0)    outstr2=-boughtidx+11;  else    outstr2=boughtidx;  var ts=boughtsdescip[outstr2]+', '+boughtdescip[outstr2];  if(sum==1){     if ((boughtidx<=(-7))&&(testtype==1)) document.write(bpstr+ts+indmid);    else      if ((boughtidx>=7)&&(testtype==2)) document.write(brpstr+ts+indmid);   }else{    wrind('OVERBOUGHT/SOLD',1);    document.write(writebarg(boughtidx,1,0)+ts);  } }function writebarg(num,spec,docr,small){     var fcolor="666666",barjpg,hight,widthnum;    if (small)       hight=9;    else      hight=11;    if ((docr==2)||(docr==3))       widthnum=num/10;    else       widthnum=num;     if (num>0){      fcolor="0000ee";      barjpg=ilnk+'bluebar2.gif';    }else      if (num<0){        fcolor="ee0000";        barjpg=ilnk+'redbar2.gif';        widthnum=-widthnum;      }else{        fcolor="666666";        barjpg=ilnk+'neutbar2.gif';        widthnum=0.5;      }      if (spec==0){        fcolor="666666";        barjpg=ilnk+'neutbar2.gif';      }      if (small){        if(widthnum<=3)          widthnum=widthnum*4;        else          if (widthnum<=7)            widthnum=12+(widthnum-3)*8;          else            widthnum=44+(widthnum-7)*12;      }else{        if(widthnum<=3)          widthnum=widthnum*8;        else          if (widthnum<=7)            widthnum=24+(widthnum-3)*16;          else            widthnum=88+(widthnum-7)*24;      }    var outstr3='<font color="#'+fcolor+'"><img style="position:relative;top:1px;height:'+hight+'px;width:'+widthnum+'px;"'+barjpg+'"> ';    if (docr==0) outstr3+=num+',&nbsp;';       else if (docr==2) outstr3+=num+'%,&nbsp;';        else if (docr==3) outstr3+=-num+'%,&nbsp;';          else if (docr==1) outstr3+=num+'<br>';            else outstr3+=num;    outstr3+='</font>';    return(outstr3);}var gkA={"A":",1,","B":"0,","C":",2,","D":"1,1","E":"1,","F":"2,","G":"0,1","H":"3,1","I":"2,1","J":"4,1","K":"5,1","L":"8,1","M":"40,","N":"7,1","O":"2,2","P":"6,1","Q":"9,1","R":",0,","S":"1,2","T":"5,","U":"4,","V":"7,","W":"3,2","X":"9,","Y":",1","Z":"8,","a":"4,2","b":"5,2","c":"3,","d":"6,2","e":"7,2","f":"8,2","g":"9,2","h":"6,","i":",3,","j":",4,","k":"3,3","l":"30,","m":"60,","n":"3,4","o":"32,","p":",5,","q":",6,","r":"35,","s":"36,","t":"5,4","u":"3,5","v":"39,","w":"37,","x":"8,4","y":"4,3","z":"44,","\(":"8,5","\)":",7,","\|":"6,4","\]":"6,5","\[":"6,6","\_":"7,6","\+":",8,","\~":",2","\@":",40","\{":"9,6","\}":",9,"},    gk0={'a':'0,','b':'1,','c':'2,','d':'3,','e':'4,','f':'5,','g':'6,','h':'7,','i':'8,','j':'9,','k':'10,','l':'11,','m':'12,','n':'13,','o':'14,','p':'15,','q':'16,','r':'17,','s':'18,','t':'19,','A':'56,','B':'57,','C':'58,','D':'59,','E':'60,','F':'61,','G':'62,','H':'63,','I':'64,','J':'65,','u':'20,','v':'21,','w':'22,','x':'23,','K':'24,','L':'25,','M':'26,','N':'27,','O':'28,','P':'29,','Q':'30,','U':'31,','V':'32,','W':'33,','X':'34,','Y':'35,','Z':'36,','\\@':'37,','\\~':'38,','\\`':'39,','\\(':'41,','\\)':'42,','\\_':'43,','\\+':'44,','\\|':'45,','\\]':'46,','\\[':'47,','{':'48,','}':'49,','\\?':'52,','\\/':'53,','y':'66,','z':'67,','R':'68,','S':'69,','T':'70,'},    dkA={"A":"2y","B":"1y","C":"-1","D":"y2","E":"y-","F":"0!","G":"0y","H":"y1","I":"0.","J":"10","K":"1.","L":"3.","M":".0","N":"2!","O":"00","P":"1!","Q":"6.","R":"!0","S":"7.","T":"8.","U":"5.","V":"!1","W":"5y","X":"8!","Y":"4!","Z":"7!","a":"6!","b":"9!","c":"3!","d":"8y","e":"!-","f":"!2","g":"#2","h":"3y","i":"6y","j":"y3","k":"#3","l":"9y","m":"7y","n":"4y","o":"30","p":"!3","q":".8","r":".2","s":"50","t":".9","u":"y4","v":"7z","w":"6z","x":"4z","\@":"55","\~":"9z","\`":"8z","\(":"!5","\)":"2z","\_":"3z","\+":"51","\|":"1z","\]":"75","\[":"70","\{":"z1","\}":"0z","\?":"z5","\/":"z8"},    symbols=symstr.split(',');    String.prototype.multiReplace = function ( hash ) {	var str = this, key;	for ( key in hash ) {		str = str.replace( new RegExp( key, 'g' ), hash[ key ] );	}	return str;}; function sd(na){   var intermed,i,i2,gk,l3,data="",templocal,tempz,pg,j,gk,dk,datarev="",graphrev=""; breakspu=2; breakspd=2;  /* chart decompress */  nochart=1;  if ((portf=="1")||(searcht=="1")) insymbol=symbols[na];  if ((charts==1)&&(symc[na]!="")){    if (symc[na].charAt(0)=="A"){      /* current 2 rev chars: "" and "A" old version obsoletes 30 days from release date */      graphrev=symc[na].charAt(0);          tempz=symc[na].split("?"); /* seperates date from chart data */      linedatag=tempz[0].substr(1).split("=");      pg=tempz[1].length;      l3=[];      for (j=0;j<pg;j++) if (!(l3[j]=gkA[tempz[1].charAt(j)])) l3[j]=tempz[1].charAt(j);    }else      ddata=symc[na].multiReplace(gk0).split("!");    if (ddata.length==8){      if (graphrev=="") linedatag=ddata[0].split("=");  /* "" is old initial rev */      tvol=1.00*(ddata[1]);      tpricer=ddata[2].split(",");      tpricer[0]=1.00*(tpricer[0]);      tpricer[1]=1.00*(tpricer[1]);      ypricer=ddata[7].split(",");      ypricer[0]=1.00*(ypricer[0]);      ypricer[1]=1.00*(ypricer[1]);      nochart=0;    }  }  tempz=syms[na].split(",");  if (tempz.length>1){    datarev=tempz[0].charAt(0);    if (datarev=="A"){      tempz[0]=tempz[0].substr(1);      pg=tempz[1].length;      l3=[];      for (j=0;j<pg;j++) if (!(l3[j]=dkA[tempz[1].charAt(j)])) l3[j]=tempz[1].charAt(j);      data=l3.join("").split("!");    }else      data=tempz[1].split("!");  } else return(0);linedata=tempz[0].split("=");cprice=1.00*(data[1]); if (cprice>0) tempcp=1/cprice*100.0; else tempcp=0.0;typmove=1.00*(data[2]); exmove=1.00*(data[3]); ldir=mf(data[4]);templocal=data[5].split('z'); shortprice=1.00*(templocal[0]);  templocal=templocal[1].split('y'); coverprice=1.00*(templocal[0]); rescomment=mf(templocal[1]);if (templocal.length>2){ if (optionforce==0) optionable=mf(templocal[2]); ma50=1.00*(templocal[3]); ma200=1.00*(templocal[4]);} else { ma50=0.0; ma200=0.0;}boughtidx=mf(data[6]); monthtrend=mf(data[7]); reswidth=1.00*(data[8]);templocal=data[9].split('y'); justinres=mf(templocal[0]); justoutres=mf(templocal[1]);ldir2=mf(data[10]); target1_long=1.00*(data[11]); target1_short=1.00*(data[12]); target2_long=1.00*(data[15]); target2_short=1.00*(data[29]);if (cprice>0) { profit2_short=trimnumfxd((cprice-target2_short)*tempcp); profit1_long=trimnumfxd((target1_long-cprice)*tempcp); profit2_long=trimnumfxd((target2_long-cprice)*tempcp); lossl=trimnumfxd((cprice-shortprice)*tempcp); profit1_short=trimnumfxd((cprice-target1_short)*tempcp); losss=trimnumfxd((coverprice-cprice)*tempcp); } else { profit2_short=0.0; profit2_long=0.0; profit1_long=0.0; lossl=0.0; profit1_short=0.0; losss=0.0; }if (profit1_long<0) profit1_long=0.0; if (profit2_long<0) profit2_long=0.0; if (lossl>0) plratiol=trimnumfxd(profit1_long/lossl); else plratiol=0;  if (profit1_short<0) profit1_short=0.0; if (profit2_short<0) profit2_short=0.0; if (losss>0) plratios=trimnumfxd(profit1_short/losss); else plratios=0;moneyflow=mf(data[13]); flowdir=mf(data[14]); numresinwayl=mf(data[16]);resinwaystrenl=mf(data[17]); notoptimal=mf(data[18]); resarray=data[19].split('#'); numres=resarray.length-1; prevclose=1.00*(data[20]); mfpercent=data[21]; dwnsidebreak=1.00*(data[22]); dwnbrkamount=1.00*(data[23]);upsidebreak=1.00*(data[24]); upbrkamount=1.00*(data[25]); confirmdwnbrk=mf(data[26]); confirmupbrk=mf(data[27]); rchange=mf(data[28]);  intertrend=mf(data[30]); mfpercent3d=mf(data[31]); moneyflow3d=mf(data[32]);  flowdir3d=mf(data[33]); advbulldays=mf(data[34]); bullind=mf(data[37]);  templocal=data[35].split("y"); globtimerat=1.00*(templocal[0]); tquall=mf(templocal[1]);tquals=mf(templocal[2]);i2=0;for (i=3;i<13;i=i+2){opprice[i2]=1.00*(templocal[i]);clprice[i2]=1.00*(templocal[i+1]);i2++;}day3c=data[36].split("y");numresinways=mf(data[38]); resinwaystrens=mf(data[39]); if (advbulldays<0) advbulldays=5; if (rescomment==(-10)) numresinways++; if (rescomment==10) numresinwayl++; for(i=0;i<numres;i++){tempdata=resarray[i].split('z'); resprice[i]=1.00*(tempdata[0]); resistance=tempdata[1].split('y'); resstrength[i]=mf(resistance[0]);  restype[i]=mf(resistance[1]); }if (datarev=="A"){  compname=tempz[2];exchange=tempz[3];sectstr=tempz[4];  curvold=1.00*(data[40])*0.1; avgvold=1.00*(data[41])*0.1; savedvol=avgvold;  rbar1const=1.00*(data[42]); rbar2const=1.00*(data[43]); longavg=1.00*(data[44]);}else{  compname=data[40];exchange=data[41]; sectstr=data[42];   curvold=1.00*(data[43])*0.1; avgvold=1.00*(data[44])*0.1; savedvol=avgvold;  rbar1const=1.00*(data[45]); rbar2const=1.00*(data[46]); longavg=1.00*(data[47]);}isnotbearish=((advbulldays!=2) && (advbulldays!=4) && (advbulldays!=5)); isnotbullish=((advbulldays!=1) && (advbulldays!=3) && (advbulldays!=5));upandnotbearish=((ldir2>=3)&& isnotbearish); downandnotbullish=((ldir2<=(-3))&& isnotbullish);bullish1daymonflow=((flowdir==1) && (moneyflow>=4)); bearish1daymonflow=((flowdir==2) && (moneyflow>=4)); if (rescomment>=0) resexp=rescomdescrip[rescomment]; else resexp=rescomdescrip[-rescomment+11]; if ((portf=="1")||(searcht=="1")) {if (sct2[insymbol]) { indexes=1; templocal=sct2[insymbol].split(','); indxmult=templocal[1]; } else indexes=0; }if (confirmupbrk==1) breakoutres=-1; else if (justinres>=0)  breakoutres=justinres; else if (justoutres>=0)  breakoutres=justoutres;if (confirmdwnbrk==1) breakdwnres=-1; else if (justinres>=0)  breakdwnres=justinres; else if (justoutres>=0)  breakdwnres=justoutres;supnums=0; resnums=0;supbelow[0]="None."; supbelow[1]=supbelow[0]; resabove[0]=supbelow[0]; resabove[1]=supbelow[0];if (justinres>=0) atsupres=' <b>'+trimnum(resprice[justinres])+'</b> &#177 '+trimnum(resprice[justinres]*reswidth)+', type '+writerestype2(restype[justinres])+', strength '+resstrength[justinres];for(i=numres-1;i>=0;i--){   if (breakoutres<0) if (resprice[i]<upsidebreak) breakoutres=i;  if ((resprice[i]<cprice) && (i!=justinres)) {     supbelow[supnums]='-'+trimnumfxd((cprice-resprice[i])*tempcp)+'% at <b>'+trimnum(resprice[i])+'</b> &#177 '+trimnum(resprice[i]*reswidth)+', type '+writerestype2(restype[i])+', strength '+resstrength[i];    supnums++;  }}for(i=0;i<numres;i++){   if (breakdwnres<0) if (resprice[i]>dwnsidebreak) breakdwnres=i;  if ((resprice[i]>cprice) && (i!=justinres)) {      resabove[resnums]='+'+trimnumfxd((resprice[i]-cprice)*tempcp)+'% at <b>'+trimnum(resprice[i])+'</b> &#177 '+trimnum(resprice[i]*reswidth)+', type '+writerestype2(restype[i])+', strength '+resstrength[i];    resnums++;  }} if (chartvdescrip[advbulldays]>=0) tempchart=chartvdescrip[advbulldays]; else tempchart=-chartvdescrip[advbulldays]+11;  pchange=mr((cprice-prevclose)*100.0)/100.0; psign="+"; ftcolor="#0000ee";   if (pchange<0){ psign=""; ftcolor="#ee0000";} ppercent=trimnumfxd(mr( (pchange/prevclose)*10000.0)/100.0);     savedchangestr=' ('+psign+pchange+' pts, '+psign+ppercent+'%)'; if ((intertrend>=0) && (intertrend<=12)){ if (trendstatnum[intertrend]>=0) trendnum=trendstatnum[intertrend]; else trendnum=-trendstatnum[intertrend]+11; } else trendnum=-1; /* calculate prob and cons */ probbull=0; probbear=0; conbull=0; conbear=0; if (rchange<=(-8)) probbull++; else if (rchange>=8) probbear++; if (monthtrend<=(-7)) probbull++; else if (monthtrend>=7)  probbear++; if (chartdescrip[tempchart].indexOf("bullish")!= -1) {     if (chartdescrip[tempchart].indexOf("Mild")!= -1) probbull++; else conbull++;} else if (chartdescrip[tempchart].indexOf("bearish")!= -1) {         if (chartdescrip[tempchart].indexOf("Mild")!= -1) probbear++; else conbear++;} if (ldir2<=(-7)) probbull++; else if (ldir2>=7) probbear++; if (trendnum>=0) {if (trenddescripsum[trendnum].indexOf("bullish")!= -1) probbull++; else if (trenddescripsum[trendnum].indexOf("bearish")!= -1) probbear++; } if (confirmupbrk==1) conbull++; else if ((isnotbearish) && (!bearish1daymonflow) && (justoutres>=0) && (upsidebreak>0.0)) probbull++;  if (confirmdwnbrk==1) conbear++; else if ((isnotbullish)&&(!bullish1daymonflow) && (justoutres>=0) && (dwnsidebreak>0.0)) probbear++; if (boughtidx<=(-7)) probbull++; else if (boughtidx>=7) probbear++; if (resexp==asup) conbull++; else if (resexp==ares) conbear++; if ((flowdir3d==2) && (boughtidx<=(-7)) && (moneyflow3d>=9)) conbull++;  else if ((flowdir3d==1) && (boughtidx>=7) && (moneyflow3d>=9)) conbear++;  if ( ((flowdir==1) && (moneyflow>=4) && (!((ldir2>=7) && (moneyflow>=9)))) ||      (((flowdir==2) || (flowdir==0))  && (ldir2<=(-7)) && (moneyflow>=9))) conbull++; if ( ((flowdir==2) && (moneyflow>=4) && (!((ldir2<=(-7)) && (moneyflow>=9)))) ||      (((flowdir==1) || (flowdir==0)) && (ldir2>=7) && (moneyflow>=9))) conbear++; bullindtxt=(bullind-50)/5;  bugraph=bullind; brgraph=100-bullind; return(1);}function writepricevol(){  var ts='',ts2='',ts3='&nbsp;';  if (sample==1) {ts='<br><span style="line-height:1.5em;">';ts2='</span>';ts3='<br>';}  writesecheader('Price & Volume','<table width=100% cellspacing=0 cellpadding=0><tr><td align=left>&nbsp;&nbsp;&nbsp;&nbsp;<a'+iso3+'-1,74,0)"><img width=12 height=13 '+ilnk+'tbull.gif">Email this page to a friend</a></td><td align=right>[Scale: 0 - Neutral, 10 - Extreme]&nbsp;</td></tr></table>','right');  if (sample==1)     document.write('<div><div style="float:left;width:'+(standwidthout-307-3)+'px;">');  wrind('PRICE',1);  var n=0,l3=[],volchange=0.0,pchange=mr((cprice-prevclose)*100.0)/100.0, psign="+", ftcolor="#0000EE",ppercent=trimnumfxd(mr((pchange/prevclose)*10000.0)/100.0);   if (pchange<0){    psign="";    ftcolor="#EE0000";  }  if (rchange>0)    tempstr=rchange;  else    tempstr=-rchange+11;  document.write('<u>'+cprice+'</u>, <font color="'+ftcolor+'">'+psign+pchange+'</font> pts (<font color="'+ftcolor+'">'+psign+ppercent+'%</font>),'+ts3+'<span style="line-height:1.5em;">'+curdatadate+indmid+writebarg(rchange,1,0)+pricesdescrip[tempstr]+' from yesterday\'s close'+pricesdescripmore[tempstr]+'</span>'+indmid+'<span style="line-height:1.5em;">Daily typical price range from yesterday\'s close :  &#177 '+trimnum(cprice*reswidth)+' pts, &#177 '+trimnumfxd(cprice*reswidth/cprice*100.0)+'%<br> &nbsp;&nbsp; <b>1.5x:</b> &#177 '+trimnum(1.5*cprice*reswidth)+' pts, &#177 '+trimnumfxd(1.5*cprice*reswidth/cprice*100.0)+'%<br> &nbsp;&nbsp; <b>2x:</b> &nbsp;&nbsp; &#177 '+trimnum(2.0*cprice*reswidth)+' pts, &#177 '+trimnumfxd(2.0*cprice*reswidth/cprice*100.0)+'%');  document.write('<br><img align=absmiddle width=17 height=18 '+ilnk+'note17_18.gif">&nbsp;86% of the time a stock\'s intraday price remains within the 2x range.</span>'+endind);  pricestr=cprice+', <font color="'+ftcolor+'">'+psign+pchange+' pts ('+psign+ppercent+'%)</font>';  wrind('VOLUME',1);  psign="";  ftcolor="#EE0000";   if ((indexes==1)&&(indxmult==0))    l3[n++]='No Volume';  else{    l3[n++]='<u>'+volscale(curvold)+'</u> shares, ';    ftcolor="#ee0000";    if (globtimerat<1.0){      tempstr=curdatadate.split(",");      if ((avgvold*globtimerat)>0.0)        volchange=trimnum((curvold-(avgvold*globtimerat))/(avgvold*globtimerat)*100.0);      if (volchange>=0.0){        psign="+";        ftcolor="#0000ee";      }      l3[n++]='<u><font color="'+ftcolor+'">'+psign+trimnumfxd(volchange)+'%</font></u> compared to '+ts+'typical volume of <u>'+volscale(avgvold*globtimerat)+'</u> by '+tempstr[1]+'.'+ts2;    }else{      if (avgvold>0.0)        volchange=trimnum((curvold-avgvold)/avgvold*100.0);      if (volchange>=0.0){        psign="+";        ftcolor="#0000EE";      }      l3[n++]='<u><font color="'+ftcolor+'">'+psign+trimnumfxd(volchange)+'%</font></u> compared to '+ts+'typical daily volume over the past 6 months.'+ts2;    }    l3[n++]=indmid;    if (volchange>70.0)      l3[n++]='<b>High Volume alert!</b><br>';    l3[n++]='Typical daily volume is <u>'+volscale(avgvold)+'</u> shares over the past 6 months.';  }  l3[n++]=endind+smallsp;  document.write(l3.join(""));  if (sample==1)    document.write('</div><div style="padding-top:5px;padding-right:3px;float:right;width:305px;height:250px;"><iframe src="http://www.stockconsultant.com/iv300x250.html?quotepage&quotepage" width=300 height=250 frameborder=0 scrolling=no marginheight=0 marginwidth=0></iframe></div><div style="clear:both;"></div></div>');}function writepage(){  wrotesignup=0;  if (document.layers){     document.captureEvents(Event.KEYPRESS);    document.captureEvents(Event.MOUSEMOVE);  }  document.onkeypress = doKey;  document.onmousedown=right;  document.onmouseup=right;  document.onmousemove = getMouseXY;  if (document.layers){    window.captureEvents(Event.MOUSEUP);    window.captureEvents(Event.MOUSEDOWN);  }  window.onmousedown=right;   window.onmouseup=right;  window.onmousemove = getMouseXY;      if (searcht=="1"){    linedata=tmpdatestr.split("-");    numofsforms=31;  }  if ((qchart!="1")&&(portf!="1")&&(searcht!="1")) regoutput=1;  else regoutput=0;  if ((symis==1)&&(symlen==1)&&(portf!="1")&&(searcht!="1")){    if (sct2[insymbol]){      indexes=1;       tempnum=sct2[insymbol].split(',');      smchart2=tempnum[0];      indxmult=tempnum[1];      indxintra=tempnum[2];    }else{      smchart2=insymbol;      indexes=0;    }     if (symdata==1) sd(0);   }  if (username!="") getusercookie();  // reassign sample  var isuser=getsetCookie(1,'username','');  sample=!((checkifpres(isuser))&&(isuser.length>2)&&(isuser.indexOf('@')>0));  if ((sample==0)&&(username=="")){    isuser=isuser.split(",");    getsetCookie(0,'username',isuser[0]+","+(parseInt(new Date().getTime()/60000)));  }  if (affil=="nasdaq") setCookieHome('sc_affil','nasdaq');   sc_affil=getsetCookie(1,'sc_affil','');  getglobalvars();      sectorportf=((portf=="1")&&(schart==1)&&(seclist<=1)&&(portfactivel==5));  writeheader();    if ((symis==1)&&(symlen>=1)) {    specnum=isinlist(insymbol,leadersdef+unlimitstks);    if (((sample==1)||((casualu==2)&&(tcas==0)))&&(symdata==1)&&(regoutput==1)) checkpages();      if ((((sample==1)||(casualu==2))&&(symdata==1)&&(totpages<=pagelimit))||((sample!=1)&&(casualu!=2))||(symdata==0)||(specnum>=0)){      writesymdet();      if (symdata==0) stockinlist=isinlist(insymbol,editablestocklist);      if ((noresults==1)||(symdata==1)||(qchart=="1")||(stockinlist>=0)){         if (regoutput==1) linksgraph();        if ((portf=="1")||(searcht=="1")){ /* nothing */ }        else if (symdata==1){           if ((schart==1)||(qchart=="1")) detailedchart();            if (qchart!="1") { writepricevol();writesummary();writeposition();writetiming();}          if ((schart!=1)&&(qchart!="1")) detailedchart();           if (qchart!="1"){ writesponsor(); writeresistancemap(); upsidedownside(); }          }else{           if ((noresults==0)&&(symdata!=0)) detailedchart();          if (qchart!="1") writesponsor();          else linksgraph();          if (noresults==1) writenoresults();        }       }    }else{      document.write(restab+' height=40 align=left>&nbsp;'+whtf+fntv+'><b>Results for '+insymbol+'</b></font></font></td></tr></table></div>');      writesignuppage();     }   }else{    var sometxt="",tmpstr;    if ((fselect=="sscroll")&&(searcht=="1")) sometxt=" <b>-- No Search Results Found!</b>";    if ((dbak>0)&&(searcht=="1")&&(sometxt=="")){      sometxt="<b> -- Click on Search! to run search for ";      if (dbak==1) sometxt+='1 day ago</b>';        else sometxt+=dbak+' days ago</b>';      }    if (sometxt!="") sometxt='<span class=z4>'+sometxt+'</span>';    if ((portf=="1")||(searcht=="1")){       document.write(restab+' height=40 align=left>&nbsp;'+whtf);      writesymdet_portf();    }else{      document.write(restab+' height=40 align=left>&nbsp;<font face="verdana" color="#ffffff"><b>Results</b></font>');/*      if ((qchart!="1")&&(casualu!=2))        document.write(' &nbsp;<font color="#ffffff"><b>&rarr;</b><a class=sm3 title="Stocks to watch!" href="javascript:stockstowatch()"onmouseover="isl=1;"onmouseout="isl=0;">Stocks To Watch</a></font>');*/    }    document.write('</td></tr></table></div>'+comdiv);    if (symis==0){      if ((portf=="1")||(searcht=="1")){        var ts;        if (portf=="1") ts='Portfolio'; else ts='SearchtTool';        document.write('&nbsp; <span style="font:normal 13px arial;">Set: <a style="font:normal 13px arial;" href="javascript:window.open(\'listoptions.html\',\'listop\',\'toolbar=0,status=0,width=680,height=390,scrollbars=1,resizable=1,menubar=0,left=40,top=40,screenX=40,screenY=40\').focus();">'+ts+' list options</a>, &nbsp; <a style="font:normal 13px arial" href="javascript:window.open(\'chartoptions.html\',\'chartop\',\'toolbar=0,status=0,width=520,height=420,scrollbars=1,resizable=1,menubar=0,left=40,top=40,screenX=40,screenY=40\').focus();">Chart options</a></span><br>');      }      document.write('<br><table><tr><td nowrap valign=top> &nbsp; &nbsp; <span class=zoo>Output Window</span> '+sometxt+'</td>');      if (((sample==0)||((sample==1)&&(allowindexcharts==1)))&&(sometxt=="")){        var frannum=Math.round(Math.random(1)*100000);        document.write('<td nowrap width=580  align=right><a href="http://www.redinews.com" title="redinews free index chart"><img width=550 height=80 src="http://www.stockconsultant.com/consultnow/zdata'+(dbak+1)+'/rediimg.png" border=0 alt="redinews index chart bar"></a></td>');      }      document.write('</tr></table>');        if ((sometxt=="")&&(alertnote!="")){        var i,alerts=alertnote.split("~");        document.write('<table cellpadding=30 cellspacing=0><tr><td><span style="font:normal 15px verdana,sans serif,arial;"><b>Announcements</b><ul style="line-height:2em;">');        for(i=0;i<alerts.length;i++)          document.write('<li>'+alerts[i]);        document.write('</ul></span></td></tr></table>');      }    }else       document.write('<br>&nbsp; &nbsp; <b>Invalid symbol entered....</b>');      document.write('<br><br>');    writesponsor();  }  if ((portf=="1")||(searcht=="1")) writeinfo(symlen);  else document.write('</div>');  writefooter();  if ((sample==0)&&(window.location.search!="")) checksession();}doneloading=1;
