function updateTradeVol(fromVal,toVal,rate,increment,smallClass)
{if(fromVal<toVal)
{if(Math.random()>=rate)
{fromVal=fromVal+Math.round(Math.random()*increment*2);makeRowHTML(3,Math.round(fromVal),smallClass)}
setTimeout('updateTradeVol('+fromVal+','+toVal+','+rate+','+increment+',\''+smallClass+'\');',1000);}}
function makeRowHTML(row,num,smallClass)
{var i;var offset;var numStr=num.toString();var L=numStr.length;if(smallClass.length>0)
{offset=10-L;}
else
{offset=9-L;}
for(i=0;i<L;i++)
{var N=numStr.charAt(i);var whichDivX=i+offset;var whichDivID='n'+row+'_'+whichDivX;if(gDigits[i]!=N)
{try
{document.getElementById(whichDivID).innerHTML='<img src="/images/counter/num'+N+smallClass+'.png" alt="'+gAltTradeVolText+'"/>';}
catch(e){}
gDigits[i]=N;}}}
function makeArrow()
{var p=document.createElement('div');p.setAttribute('id','arrowHold');p.setAttribute('display','none');$('page').appendChild(p);document.getElementById('arrowHold').innerHTML='<img src="/images/todaysHotSystems.png">';moveEl1ToLocEl2('arrowHold','hot_strategies',-502,-50);p.setAttribute('display','block');intermittentflashDivCount(7,'arrowHold',1000,0);}
function intermittentflashDivCount(counter,el,periodms,newstate)
{counter--;if(counter>0)
{if(newstate==0)
{setTimeout("intermittentflashDivCount("+counter+",'"+el+"',"+periodms+",1);",periodms);return;}
var nextstate;if(newstate==1)
{new Effect.Opacity(el,{duration:.3,from:1,to:0});nextstate=2;}
else
{new Effect.Opacity(el,{duration:.3,from:0,to:1});nextstate=1;}
setTimeout("intermittentflashDivCount("+counter+",'"+el+"',"+periodms+","+nextstate+");",periodms);}
else
{new Effect.Opacity(el,{duration:.3,from:1,to:0});}}
function setAbsolute(el)
{var currentY=findPosY(el);$(el).style.position='absolute';$(el).style.top=currentY+'px';}
function warningAcked()
{$('warningAcked').value=1;$('hypoWarnPanes').style.position='relative';new Effect.SlideUp('hypoWarnPanes');setTimeout("new Effect.Appear('part2"+$('instruSelected').value+"');",3000);setTimeout("fadeInDemoButtons();",3000);setTimeout("tearCorner();",7500);}
function tearCorner()
{$('pane2corner').style.position='absolute';$('pane2corner').style.top='-100px';$('pane2corner').style.left='-100px';$('pane2corner').style.display='block';new Effect.Move('pane2corner',{x:-12,y:-12,mode:'absolute'});}
function fadeInDemoButtons()
{var all=document.all?document.all:document.getElementsByTagName('*');var elements=new Array();for(var e=0;e<all.length;e++)
{if(all[e].className=='simButton')
elements[elements.length]=all[e];}
var numel=all.length;for(var i=0;i<elements.length;i++)
{new Effect.Appear(elements[i]);}}
function pane1click(instru)
{$('instruSelected').value=instru;$('pane2toggleState').value=0;new Effect.SlideUp('pane1holder');$('pane2').innerHTML=$('pane2'+instru).innerHTML;$('part2'+instru).innerHTML=$('part2Content').innerHTML;var pInstru=instru.charAt(0).toUpperCase()+instru.slice(1);$('head'+instru).innerHTML='Popular Automated '+pInstru+' Trading Strategies';setTimeout("new Effect.SlideDown('pane2holder');",900);setTimeout("setAbsolute('pane2holder');",2500);setTimeout("new Effect.SlideDown('pane2holder');",900);setTimeout("new Effect.SlideDown('hypoWarnPanes',{ duration: 1.0 });",3100);}
function handlePane2Toggle(newvalue,instru)
{$('pane2toggleState').value=newvalue;var T;if(newvalue==1)
{$('moreButtonHolder').innerHTML='<a href="#" onclick="handlePane2Toggle(0,\''+instru+'\');return false;" class="moreButton">back</a></div>';T=0;}
else
{$('moreButtonHolder').innerHTML='<a href="#" onclick="handlePane2Toggle(1,\''+instru+'\');return false;" class="moreButton">more</a></div>';T=1;}
new Effect.Fade($('toggle'+T+instru));setTimeout("new Effect.Appear($('toggle"+newvalue+instru+"'));",1000);}
