function op(what) { document.write(what); } function opl(what) { document.writeln(what); } function createIndexSelect() { count=0; while (count>=0 && count"+IdxV[count]); count+=1 } } function createTimesSelect() { count=0; while (count>=0 && count"+TimesV[count]); count+=1 } } function handler(e,form) { if (document.all) e=window.event; if (document.layers) key=e.which; else key=e.keyCode if(key==13) ChartSubmit('chart1'); } function doSearch() { searchUrl="/html/ic/dosearch.html"; winSetup="width=640,height=480,top=16,left=16,resizable=yes,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no"; window.open(searchUrl,"doSearch",winSetup); } function RePlotChart(imgName) { if (document.images) { imgOn=eval(imgName+"on.src"); document[imgName].src=imgOn; } } function CheckPrices1() { var count=0; var chart1value=""; while (count>=0 && count<4) { if (document.chart.chart1type.options[count].selected==true) { chart1value=document.chart.chart1type.options[count].value; count=-1; } else { count+=1; } } if (chart1value!="3") { document.chart.analytic.options[0].selected=true; document.chart.moving.value=""; document.chart.compareToIndex.options[0].selected=true; document.chart.compareToStock.value=""; Compare=""; } } function ChartSubmit(value1) { if (RePlotAll=="1") { SubmitMain("HTML") } else { if (RePlotAll=="2") { SubmitMain("CHARTS") } else { if (value1=="chart1") { SubmitChart1() } else { if (value1=="chart2") { SubmitChart2() } } } } } function CheckPeriod1() { RePlotAll="2"; selOpt="180"; loopLen=document.chart.timescale.options.length; for(f=0;f=0 && count=0 && count<10) { if (document.chart.compareToIndex.options[count].selected==true) { IndexKey=document.chart.compareToIndex.options[count].value; count=-1; } else { count+=1; } } if (IndexKey!="0") { document.chart.chart1type.options[1].selected=true; document.chart.analytic.options[0].selected=true; document.chart.moving.value=""; chart1type="8"; } else { chart1type="3"; Compare=""; } IndexValue=Idx[IndexKey]; if(IndexKey!="0") { if ((Compare=="STOCK")||(Compare=="BOTH")) { Compare="BOTH"; } else { Compare="INDEX"; } AddToURL="&TIDM2="+IndexValue; } else { Compare=""; AddToURL=""; } } function CheckAnalysis1() { var count=0; var analyticvalue=""; while (count>=0 && count=0 && count<10) { if (document.chart.chart2type.options[count].selected==true) { ind2value=document.chart.chart2type.options[count].value; count=-1; } else { count+=1; } } if (ind2value=="2"||ind2value=="13"||ind2value=="21") { document.chart.period2.value=""; } else { if (ind2value=="14") { document.chart.period2.value=14; } else { if (ind2value=="16"||ind2value=="15") { document.chart.period2.value=10; } } } if(ind2value=="0") { document.all.c2place.style.display="none"; c1date=true; SubmitChart1(); } else { document.all.c2place.style.display="block"; c1date=false; SubmitChart1(); SubmitChart2(); } } function SubmitMain(which) { SubmitChart1() SubmitChart2() } function SubmitChart1() { // CHART1on.src="/images/loading_full.gif"; // RePlotChart("CHART1"); graph_moving_timescale=""; graph_moving_timescale=document.chart.moving.value; var count=0; while (count>=0 && count<22) { if (document.chart.chart1type.options[count].selected==true) { graph_type=document.chart.chart1type.options[count].value; count=-1; } else { count+=1; } } var count=0; while (count>=0 && count<23) { if (document.chart.analytic.options[count].selected==true) { analytic_type=document.chart.analytic.options[count].value; count=-1; } else { count+=1; } } stock=PrevStock; if (analytic_type!="0") { graph_type=analytic_type; } // if ( HeatonBands == "1") { // RePlotChart2 = "1"; // } else { RePlotChart2 = "0"; // } // if ( analytic_type == "22" ) { // CHART2on.src = "/images/blank_half.gif"; // RePlotChart("CHART2"); // var NewURLEnd = "&TITLE=&NOXLABELS=0&KEYSONTOP=1&SIZEX=600&SIZEY=350&DOSPLITS=1&BGRGB=FFFFFF&FGRGB=0000FF&EXTENTION=NEWBRIT"; // TSCALE = "&DAYS=360"; // document.chart.timescale.options[5].selected = true; // HeatonBands = "1"; // } else { if(c1date==true) { NewURLEnd="&TITLE=&NOXLABELS=0&KEYSONTOP=1&SIZEX=600&SIZEY=200&DOSPLITS=1&BGRGB=FFFFFF&FGRGB=0000FF&EXTENTION=NEWBRIT"; } else { NewURLEnd="&TITLE=&NOXLABELS=1&KEYSONTOP=1&SIZEX=600&SIZEY=200&DOSPLITS=1&BGRGB=FFFFFF&FGRGB=0000FF&EXTENTION=NEWBRIT"; } // HeatonBands="0"; // } StockCompare=document.chart.compareToStock.value; if (StockCompare!="") { if ((Compare=="INDEX")||(Compare=="BOTH")) { Compare="BOTH"; AddToURL="&TIDM2="+GetIndexValue(); } else { Compare="STOCK"; AddToURL=""; } loop=0; while (loop<=StockCompare.length) { if (StockCompare.indexOf(' ')!=-1) { StockCompare1=StockCompare.substring(0,StockCompare.indexOf(' ')); StockCompare2=StockCompare.substring(StockCompare.indexOf(' ')+1) StockCompare=StockCompare1+StockCompare2; } loop+=1; } count=0; index=0; while (count<=10) { StockCompare=StockCompare.toUpperCase(); if (Compare=="STOCK") { counter=count+2; } else { counter=count+3; } index=StockCompare.indexOf(","); Stock=StockCompare.substring(0,index); if (Stock!="") { AddToURL=AddToURL+"&TIDM"+counter+"="+Stock+".L"; } StockCompare=StockCompare.substring(index+1); count+=1; if (index<=0) { AddToURL=AddToURL+"&TIDM"+counter+"="+StockCompare+".L"; break; } } document.chart.analytic.options[0].selected = true; document.chart.chart1type.options[1].selected = true; } NewURLStart="/cgi-bin/grph_hist.sh?TIDM="; if (Compare!="") { NewURL=NewURLStart+stock+".L"+AddToURL+TSCALE+"&CHART=8"+NewURLEnd; } else { NewURL=NewURLStart+stock+".L"+TSCALE+"&CHART="+graph_type+"&MOVINGAVG="+graph_moving_timescale+NewURLEnd; } //alert(NewURL); CHART1on.src=NewURL; RePlotChart("CHART1"); if (RePlotChart2=="1") { SubmitChart2(); } } function SubmitChart2() { graph_moving_timescale=""; graph_moving_timescale=document.chart.period2.value; var count=0; while (count>=0 && count<22) { if (document.chart.chart2type.options[count].selected==true) { graph_type=document.chart.chart2type.options[count].value; count=-1; } else { count+=1; } } stock=PrevStock; NewURLStart="/cgi-bin/grph_hist.sh?TIDM="; NewURLEnd="&TITLE=&NOXLABELS=0&KEYSONTOP=1&SIZEX=600&SIZEY=300&BGRGB=FFFFFF&FGRGB=0000FF&EXTENTION=NEWBRIT"; var NewURL=NewURLStart+stock+".L&CHART="+graph_type+TSCALE+"&MOVINGAVG="+graph_moving_timescale+NewURLEnd; CHART2on.src=NewURL; RePlotChart("CHART2"); } function ShowAnalyticHelp() { helpUrl="/html/ic/analytics.html?bgcol=000066"; winSetup="width=680,height=690,top=16,left=16,resizable=yes,toolbar=yes,location=no,directories=no,status=no,scrollbars=yes,menubar=yes"; window.open(helpUrl,"analyticshelp",winSetup); } function ShowFAQ() { helpUrl="/html/ic/icfaq.html?bgcol=000066"; winSetup="width=680,height=490,top=16,left=16,resizable=yes,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no"; window.open(helpUrl,"chartFaq",winSetup); } function zoomIn(which) { chopPoint=NewURL.indexOf("&NOXLABELS"); popUrl=NewURL.substring(0,chopPoint); popUrl+="&NOXLABELS=0&KEYSONTOP=1&TITLE=&DOSPLITS=1&SIZEX=700&SIZEY=500"; var winSetup="width=750,height=550,top=0,left=0,resizable=yes,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no"; window.open(popUrl,"CHARTZOOM",winSetup); } function zoomOut(which) { alert("Zooming out of "+which); }