var gReverseX;var gReverseY;var gSubmitPressed=0;var ATDemoWindow;var qUtilWin=new Object();var q_util_win_count=0;var OPMSWin;var win;var Informer;document.observe('q:loaded',function(){Q.set({image_path:"/images/q"});Informer=new Q.Informer();if(typeof(informerMessages)!="undefined")
{for(var i=0;i<informerMessages.length;i++)
{q_inform(informerMessages[i].type,informerMessages[i].message,informerMessages[i].duration);}}});function initpage()
{$('namesearch').value='';Tooltip.init();preloadImages();dragndropInit();if(is_reg_user){chatInit();}
putEventStackInTicker(gEventStack);setTimeout('changeTicker();',2000);setTimeout('getDelta(\''+gDeltaClass+'\');',gDeltaIntervalms);checkURLstack();}
function initPageCheckURLstack()
{checkURLstack();}
function initpagetemplate()
{try
{$('namesearch').value='';}
catch(err){}
Tooltip.init();dragndropInit();checkURLstack();if(is_reg_user){chatInit();}
setTimeout('getDelta(\''+gDeltaClass+'\');',gDeltaIntervalms);}
function initsimplepage(useDragDrop)
{if(gInitBehaviorFlag==='0')
{useDragDrop=0;}
else if(gInitBehaviorFlag==='ajaxCheckinOnly')
{checkURLstack();return;}
else if(gInitBehaviorFlag==='none')
{return;}
Tooltip.init();if(useDragDrop){dragndropInit();}
if(is_reg_user){chatInit();}
checkURLstack();setTimeout('getDelta(\''+gDeltaClass+'\');',gDeltaIntervalms);}
function initSystemPage(useSimplePage)
{initpagetemplate();}
function jIsInList()
{var argv=jIsInList.arguments;var argc=argv.length;var ret=0;for(var i=1;i<argc;i++)
{if(argv[0]===argv[i])
{ret=1;last;}}
return(ret);}
function removeFromWatchList(divtodrop)
{var sid=divtodrop.substring(6);Effect.DropOut(divtodrop);gWatchList.splice(gWatchList.indexOf(sid),1);var url=gRespondingApp+'?want=removefromwatchlist&sid='+sid;pendURL.push(url);if(gWatchList.length==0)
{var obj=document.getElementById('watchlistcontainer');obj.innerHTML='Drag any system on page<BR>to here.';obj.className='emptyContainer';}}
function menutoggle(childDiv)
{var parentDiv=childDiv.parentNode;if(parentDiv.className==='menu show')
{parentDiv.className='menu hide';}
else if(parentDiv.className==='menu hide')
{parentDiv.className='menu show';}}
function handleMouseDown(dragID)
{gMouseDownDate=new Date();if(dragID)
{if(typeof(gDraggables[dragID])==='object')
{gDraggables[dragID].destroy();}
gDraggables[dragID]=new Draggable(dragID,{revert:true,scroll:window});}}
function handleMouseUpForum(boardid,msgid)
{var end=new Date();var msSinceMouseDown=end.getTime()-gMouseDownDate.getTime();if(msSinceMouseDown<=500)
{window.location='/cgi-perl/board.mpl?want=listmsgs&boardid='+boardid+'&message='+msgid+'&fromelse=1#msgdirect'+msgid;}}
function handleMouseUpURL(url)
{var end=new Date();var msSinceMouseDown=end.getTime()-gMouseDownDate.getTime();if(msSinceMouseDown<=500)
{window.location=url;}
setTimeout("gMouseDownDate=undefined",500);}
function handleMouseUp(sid,divToChange,param)
{var end=new Date();var msSinceMouseDown=end.getTime()-gMouseDownDate.getTime();if((sid==gLastXClick)&&(msSinceMouseDown<5000))
{return;}
try{var msSinceLastDrop=end.getTime()-gLastDroppedOnChart.getTime();if(msSinceLastDrop<1500)
{return;}}
catch(err)
{}
if(msSinceMouseDown<=500)
{if(isDefined(divToChange))
{var el=document.getElementById(divToChange);var posx=findPosX(el);var posy=findPosY(el);var snake=document.getElementById('waiticon');var WW=getStyle(divToChange,'width');var HH=getStyle(divToChange,'height');WW=parseInt(WW.substr(0,WW.length-2));HH=parseInt(HH.substr(0,HH.length-2));var xoffset=posx+Math.round(WW/2);var yoffset=posy+Math.round(HH/2);if(el.className=='leftnavsys')
{xoffset=posx-19;yoffset=posy-2;}
snake.style.position="absolute";if((yoffset==0)||(isNaN(yoffset))){yoffset='0';}
if((xoffset==0)||(isNaN(xoffset))){xoffset='0';}
snake.style.top=yoffset+'px';snake.style.left=xoffset+'px';setTimeout('show(true,\'waiticon\'); document.getElementById(\'waiticon\').style.display = \'block\';',400);new Effect.Opacity(divToChange,{duration:.7,from:1,to:.2});var d=0;if(divToChange.length>6)
{if(divToChange.slice(0,6)=='revsys')
{d=1;window.location='/cgi-perl/c2systems.mpl?systemid='+sid+'&review='+param;}}
if(!d){window.location='/cgi-perl/system'+sid;}}}}
function getStyle(el,styleProp)
{var x=document.getElementById(el);if(x.currentStyle)
var y=x.currentStyle[styleProp];else if(window.getComputedStyle)
var y=document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);return y;}
function hiliteReview(sid,on)
{if(on==1)
{document.getElementById('revsysname'+sid).style.textDecoration='underline';document.getElementById('revsys'+sid).style.borderColor='#F87500';}
else
{document.getElementById('revsysname'+sid).style.textDecoration='none';document.getElementById('revsys'+sid).style.borderColor='#FFFFFF';}}
function isDefined(variable)
{return(!(!(document.getElementById(variable))))}
function handleMouseUpMySys(sid)
{var end=new Date();var msSinceMouseDown=end.getTime()-gMouseDownDate.getTime();if((sid==gLastXClick)&&(msSinceMouseDown<5000))
{return;}
if(msSinceMouseDown<=500)
{loadSystem(sid);}}
function divtoggle(menudiv,divname)
{var url;var parentDiv=menudiv.parentNode;if(document.getElementById(divname).style.display==='none')
{parentDiv.className='menu show';show(true,divname);document.getElementById(divname).style.display="block";url=gRespondingApp+'?want=reporttoggle&div='+divname+'&collapsed=0';}
else
{parentDiv.className='menu hide';show(false,divname);document.getElementById(divname).style.display="none";url=gRespondingApp+'?want=reporttoggle&div='+divname+'&collapsed=1';}
pendURL.push(url);}
function checkPendingKeypress()
{if(gUnprocKeypress)
{var end=new Date();var msSinceKeyPress=end.getTime()-gLastKeyPressDate.getTime();if(msSinceKeyPress>400)
{if($('namesearch').value.length>2)
{var url=gRespondingApp+'?want=dynamicsearch&searcher='+gPersonID+'&searchtext='+encodeURIComponent($('namesearch').value);if(typeof(sysidinit)!="undefined")
{url+='&ignoresys='+sysidinit;}
show(false,'searchbutton');document.getElementById('searchbutton').style.display="none";show(true,'searchactive');document.getElementById('searchactive').style.display="inline";pendURL.push(url);gUnprocKeypress=0;}
else{gUnprocKeypress=0;document.getElementById('searchresults').innerHTML='';}}
else
{setTimeout('checkPendingKeypress();',10);}}}
function handleAdvancedSearch()
{window.location='/cgi-perl/system/grid.mpl?gridId=default&filter=1&column=systemName&relation=like&value='+$('namesearch').value;return false;}
function clearSearchResults()
{gUnprocKeypress=0;document.getElementById('searchresults').innerHTML='';$('namesearch').value='';}
function handleSearchSubmit()
{if($('namesearch').value.length>2)
{show(false,'searchbutton');document.getElementById('searchbutton').style.display="none";show(true,'searchactive');document.getElementById('searchactive').style.display="inline";window.location='/cgi-perl/system/grid.mpl?gridId=default&filter=1&column=systemName&relation=like&value='+$('namesearch').value;}
return false;}
function show(sw,obj){if(sw&&(ie4||ie5))document.all[obj].style.display='inline';if(!sw&&(ie4||ie5))document.all[obj].style.display='none';if(sw&&ns4)document.layers[obj].display='inline';if(!sw&&ns4)document.layers[obj].display='none';}
function createRequestObject(url)
{var req;if(window.XMLHttpRequest){req=new XMLHttpRequest();}else if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP");}else{}
return req;}
function checkURLstack()
{if(pendURL.length>0)
{if(gWaitingForURL==0)
{var URL=pendURL[0];var R=Math.random();URL=URL+'&RANDOMSTR='+R;gWaitingForURL=1;http=createRequestObject();http.open('get',URL);http.onreadystatechange=handleResponse;http.send(null);}}
else
{setTimeout('checkURLstack();',500);}}
function handleResponse()
{var good=0;if(http.readyState==4)
{if(http.status==200)
{var response=http.responseText;if(response)
{var gotback=response.split("=9x8y");gWaitingForURL=0;pendURL.shift();var arLen=gotback.length;for(var i=0,len=arLen;i<len;++i)
{parseChunk(gotback[i]);}}}
else
{gWaitingForURL=0;}
checkURLstack();}}
function checkURLstackParallel()
{if(messageStack.length)
{var URL=messageStack.shift();var httpIndex=messageStackHTTPs.length;messageStackHTTPs[httpIndex]=createRequestObject();messageStackHTTPs[httpIndex].open('get',URL);messageStackHTTPs[httpIndex].onreadystatechange=handleResponse;messageStackHTTPs[httpIndex].send(null);}
for(var url in messageStackHTTPs)
{if(handleResponseParallel(messageStackHTTPs[url]))
{delete messageStackHTTPs[url];}}
setTimeout('checkURLstackParallel();',500);}
function handleResponseParallel(httpObj)
{var good=0;if(httpObj.readyState==4)
{if(httpObj.status==200)
{var response=httpObj.responseText;if(response)
{var gotback=response.split("=9x8y");var arLen=gotback.length;for(var i=0,len=arLen;i<len;++i)
{parseChunk(gotback[i]);}}
return(1);}}
return(0);}
function parseChunk(chunk)
{var segment=chunk.split("=TERM_");if(segment[0]=='updatediv')
{try{document.getElementById(segment[1]).innerHTML=segment[2];}
catch(err)
{if(segment[1]=='tip')
{segment[1]='topPageTip';try{document.getElementById(segment[1]).innerHTML=segment[2];}
catch(err)
{if(window.console){window.console.log("Trapped error in updatediv, error is="+err+", first tried tip, then topPageTip; changing to="+segment[2]);}}}
else if(window.console){window.console.log("Trapped error in updatediv, error is="+err+", divid to change="+segment[1]+" and changing to="+segment[2]);}}
if(segment[2].match(/sortable|resizable|editable/i)){TableKit.load()};}
else if(segment[0]=='condupdatediv')
{if(eval(segment[3]))
{try{document.getElementById(segment[1]).innerHTML=segment[2];}
catch(err)
{if(window.console){window.console.log("Trapped error in updatediv, error is="+err+", divid to change="+segment[1]+" and changing to="+segment[2]);}}
if(segment[2].match(/sortable|resizable|editable/i)){TableKit.load()};}}
else if(segment[0]=='classupdt')
{arg1=segment.shift();gChangeHash=new Array();while(segment.length>0)
{var c=segment.shift();var v=segment.shift();gChangeHash[c]=v;}
changeMultipleEls();}
else if(segment[0]=='preloadimages')
{preloadImages(segment[1]);}
else if(segment[0]=='setopacity')
{try
{$(segment[1]).setOpacity(segment[2]);}
catch(err){if(window.console){window.console.log("Trapped error in setopacity, error is="+err+", divid to change="+segment[1]+" and changing to opac="+segment[2]);}}}
else if(segment[0]=='gotolocation')
{window.location=segment[1];}
else if(segment[0]=='eval')
{eval(segment[1]);}}
function pageWidth(){return window.innerWidth!=null?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body!=null?document.body.clientWidth:null;}
function pageHeight(){return window.innerHeight!=null?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:null;}
function glowdiv(divname)
{try
{new Effect.Highlight(divname);}
catch(err){}}
function fadediv(divname)
{try
{new Effect.Fade(divname);}
catch(err){}}
function handleSearchKeyUp()
{gLastKeyPressDate=new Date();if(gUnprocKeypress==0)
{gUnprocKeypress=1;setTimeout('checkPendingKeypress();',10);}}
function glow(prefix,whichnum,howmany)
{for(var i=1;i<=howmany;i++)
{var el=prefix+i;document.getElementById(el).style.borderColor='#ffffff';document.getElementById(el).style.borderWidth='5px';if(i!==whichnum)
{new Effect.Opacity(el,{duration:.5,from:.1,to:.3});}}
document.getElementById(prefix+whichnum).style.borderColor='#CC6600';document.getElementById(prefix+whichnum).style.borderWidth='5px;';new Effect.Highlight(prefix+whichnum);new Effect.Opacity(prefix+whichnum,{duration:.1,from:.3,to:1});document.getElementById('brokerrightholder').innerHTML='';}
function getMouseXYsystem(e)
{if(IE){tempX=event.clientX+document.body.scrollLeft
tempY=event.clientY+document.body.scrollTop}else{tempX=e.pageX
tempY=e.pageY}
if(tempX<0){tempX=0}
if(tempY<0){tempY=0}
var Mdivx=findPosX(document.getElementById('chartdiv'));var Mdivy=findPosY(document.getElementById('chartdiv'));if((tempX>=Mdivx)&&(tempX<=Mdivx+gChartWidth)&&(tempY>=Mdivy)&&(tempY<=Mdivy+gChartHeight))
{var relX=tempX-Mdivx;var relY=tempY-Mdivy;}
return true;}
function getMouseXY(e){if(IE){tempX=event.clientX+document.body.scrollLeft
tempY=event.clientY+document.body.scrollTop}else{tempX=e.pageX
tempY=e.pageY}
if(tempX<0){tempX=0}
if(tempY<0){tempY=0}
if((gOnSubsections==1)||(gOnMainSection==1))
{var divx=findPosX(document.getElementById(gPriorityDiv));var divy=findPosY(document.getElementById(gPriorityDiv));var WIDTH=parseInt(document.getElementById(gPriorityDiv).style.width);var HEIGHT=parseInt(document.getElementById(gPriorityDiv).style.height);if((gOnMainSection==0)&&((tempX<divx)||(tempY<divy)||(tempX>divx+WIDTH)||(tempY>divy+HEIGHT+40)))
{var inMainBox=clickedInsideDiv('welcomeholder',tempX,tempY);restoreDefaultPositions(inMainBox);}}
return true;}
function clickedInsideDiv(divname,mouseX,mouseY)
{var Mdivx=findPosX(document.getElementById(divname));var Mdivy=findPosY(document.getElementById(divname));var MWIDTH=getStyle(divname,'width');MWIDTH=parseInt(MWIDTH.substr(0,MWIDTH.length-2));var MHEIGHT=getStyle(divname,'height');MHEIGHT=parseInt(MHEIGHT.substr(0,MHEIGHT.length-2));if((mouseX>=Mdivx)&&(mouseX<=Mdivx+MWIDTH)&&(mouseY>=Mdivy)&&(mouseY<=Mdivy+MHEIGHT))
{return(1);}
else
{return(0);}}
function findPosX(obj)
{var curleft=0;if(obj.offsetParent)
while(1)
{curleft+=obj.offsetLeft;if(!obj.offsetParent)
break;obj=obj.offsetParent;}
else if(obj.x)
curleft+=obj.x;return curleft;}
function findPosY(obj)
{var curtop=0;if(obj.offsetParent)
while(1)
{curtop+=obj.offsetTop;if(!obj.offsetParent)
break;obj=obj.offsetParent;}
else if(obj.y)
curtop+=obj.y;return curtop;}
function doTooltip(e,msg){if(typeof Tooltip=="undefined"||!Tooltip.ready)return;Tooltip.show(e,msg);}
function hideTip(){if(typeof Tooltip=="undefined"||!Tooltip.ready)return;Tooltip.hide();}
function prepTooltip(e,sid,sname)
{var txt='<img border="0" src="/images/charts/thumbnail'+sid+'.png" width="380" height="225">';doTooltip(e,txt);}
function toolImage(e,i)
{var txt;if(i==1){txt='<img src="/images/securityCode.png">';}
doTooltip(e,txt);}
function selectSystemDisplay(selecttype)
{var url=gRespondingApp+'?want=dashselecttype&type='+selecttype+'&v='+gV;pendURL.push(url);hidepopupcmd();}
function rotatepulse(itype,instru,days)
{var url=gRespondingApp+'?want=rotatepulse&itype='+itype+'&days='+days+'&instru='+instru;pendURL.push(url);}
function showpopupcmd(sid,el,woffset,hoffset,trade,details,itm,autotrade,unsub,notes)
{if(gPopUpSid!=sid)
{var popup=document.getElementById('c2popupframe');var cont='<div class="popcommands"><BR>';if(trade){cont=cont+'<a href="#" onclick="dispatchTrade('+sid+')" class="btnB"><span><span><span>Trade</span></span></span></a><BR><BR>';}
if(details){cont=cont+'<a href="#" onclick="dispatchDetails('+sid+',\'chart'+sid+'\')" class="btnB"><span><span><span>Details</span></span></span></a><BR><BR>';}
if(itm){cont=cont+'<a href="#" onclick="dispatchITM('+sid+')" class="btnB"><span><span><span>ITM</span></span></span></a><BR><BR>';}
if(autotrade){cont=cont+'<a href="#" onclick="dispatchAutotrade('+sid+')" class="btnB"><span><span><span>AutoTrade</span></span></span></a><BR><BR>';}
if(unsub){cont=cont+'<a href="#" onclick="dispatchUnsub('+sid+')" class="btnB" id="unsublink'+sid+'"}><span><span><span>Unsubscribe</span></span></span></a><BR><BR>';}
if(notes){cont=cont+'<a href="#" onclick="dispatchMyNotes('+sid+')" class="btnB"><span><span><span>My Notes</span></span></span></a><BR><BR>';}
cont=cont+'</div>';popup.innerHTML=cont;var divx=findPosX(document.getElementById(el));var divy=findPosY(document.getElementById(el));var xoffset=divx+woffset;var yoffset=divy+hoffset;popup.style.position="absolute";popup.style.top=yoffset+'px';popup.style.left=xoffset+'px';show(true,'c2popupframe');document.getElementById('c2popupframe').style.display='block';gPopUpSid=sid;}}
function toggleHideShowDiv(divname)
{var el=document.getElementById(divname);var returnFinalVal;if(el.style.display=='block')
{el.style.display='none';returnFinalVal=0;}
else
{el.style.display='block';returnFinalVal=1;var needSessInform=-1;if(divname=='closedBasicpage')
{needSessInform=0;}
else if(divname=='closedAdvancedpage')
{needSessInform=1;}
if(needSessInform>=0)
{var key='unfold'+gSystemID;var R=Math.random();var url=gRespondingApp+'?want=setSessionValue&key='+key+'&val='+needSessInform+'&R='+R;pendURL.push(url);}}
return(returnFinalVal);}
function toggleHideShowDivAndLabel(divname,labeldiv,onhtml,offhtml)
{var el=document.getElementById(divname);if(el.style.display=='block')
{el.style.display='none';document.getElementById(labeldiv).innerHTML=offhtml;}
else
{el.style.display='block';document.getElementById(labeldiv).innerHTML=onhtml;}}
function dispatchUnsub(sid)
{show(false,'c2popupframe');document.getElementById('c2popupframe').style.display='none';var R=Math.random();var url='/cgi-perl/c2systems.mpl?want=unsubscribe&return=dashboard&systemid='+sid+'&R='+R;pendURL.push(url);}
function dispatchMyNotes(sid)
{show(false,'c2popupframe');document.getElementById('c2popupframe').style.display='none';window.location='/cgi-perl/my_analyst.mpl?want=add&systemid='+sid;}
function dispatchTrade(sid)
{show(false,'c2popupframe');document.getElementById('c2popupframe').style.display='none';window.location='/cgi-perl/orderentry.mpl?want=trade&systemid='+sid;}
function fadeAndSnakeDiv(divToChange)
{var el=document.getElementById(divToChange);var posx=findPosX(el);var posy=findPosY(el);var snake=document.getElementById('waiticon');var WW=getStyle(divToChange,'width');var HH=getStyle(divToChange,'height');WW=parseInt(WW.substr(0,WW.length-2));HH=parseInt(HH.substr(0,HH.length-2));var xoffset=posx+Math.round(WW/2);var yoffset=posy+Math.round(HH/2);if((!isNaN(xoffset))&&(!isNaN(yoffset)))
{snake.style.position="absolute";snake.style.top=yoffset+'px';snake.style.left=xoffset+'px';}
setTimeout('show(true,\'waiticon\'); document.getElementById(\'waiticon\').style.display = \'block\';',400);new Effect.Opacity(divToChange,{duration:.7,from:1,to:.2});}
function dispatchDetails(sid,divToChange)
{show(false,'c2popupframe');document.getElementById('c2popupframe').style.display='none';fadeAndSnakeDiv(divToChange);window.location='/cgi-perl/system'+sid;}
function dispatchITM(sid)
{NewWindow=window.open('./msgajax.mpl?want=establish&systemid='+sid,'ITM'+sid,'width=800,height=320,resizable=yes,scrollbars=yes');}
function dispatchAutotrade(sid)
{show(false,'c2popupframe');document.getElementById('c2popupframe').style.display='none';window.location='/cgi-perl/autotrade.mpl?particsysid='+sid;}
function hidepopupcmd()
{try{if(gPopUpSid)
{show(false,'c2popupframe');document.getElementById('c2popupframe').style.display='none';gPopUpSid=0;}}
catch(err)
{}}
function hideforumpopup()
{show(false,'forumpopup');document.getElementById('forumpopup').style.display='none';}
function dispatchPost(boardid)
{hideforumpopup();if(boardid==0)
{window.location='/cgi-perl/board.mpl?want=list&setfilter=1';}
else
{window.location='/cgi-perl/board.mpl?want=post&boardid='+boardid;}}
function preloadImages()
{preloadNext0=new Image();preloadNext0.src='/images/bwforward0.gif';preloadNext1=new Image();preloadNext1.src='/images/bwforward1.gif';}
function putEventStackInTicker(es)
{document.getElementById('tickerframe').innerHTML='<div id="innertickerwrap">'+buildEventStackHTML(es)+'</div>';}
function buildEventStackHTML(es)
{var htm='';var numVisible=0;var addNewIfVisibleLessThan=6;if(gAdWaitStart)
{var end=new Date();var msAdPaused=end.getTime()-gAdWaitStart.getTime();if(msAdPaused<5000)
{return('');}
else
{gAdWaitStart=0;}}
var needToStartWait=0;if(es.length)
{var peekAhead=es[0];if(peekAhead=='adformat1')
{needToStartWait=1;}}
while((es.length)&&(numVisible<addNewIfVisibleLessThan))
{numVisible=numVisible+1;var t=es.shift();var iname=es.shift();var sid=es.shift();var systemname=es.shift();var tipname=es.shift();if(t=='adformat1')
{htm=htm+'<div class="tickerUnitAd1" id="'+iname+'"><table><tr><td><div class="tickerAdChart" id="tickch'+sid+'"><a href="#" onmousedown="gDragTicker=1;handleMouseDown(\'tickch'+sid+'\');" onmouseup="gFreezeTicker=0;gDragTicker=0;handleMouseUp('+sid+',\''+iname+'\');"><img src="dashcharts.mpl?sid='+sid+'&notext=1&width=70&height=37"></a></div></td><td><div class="tickerAdText">'+systemname+'</div></td></tr></table></div><div style="clear:both;"></div></div>';}
else if(t=='sysview')
{htm=htm+'<div class="tickerUnit" id="'+iname+'"><div class="tickName"><span onmouseover="doTooltip(event,\''+tipname+'\')" onmouseout="hideTip()">'+systemname+'</span></div><BR><div class="tickChart" id="tickch'+sid+'"><a href="#" onmousedown="gFreezeTicker=1;handleMouseDown(\'tickch'+sid+'\');" onmouseup="gFreezeTicker=0;handleMouseUp('+sid+',\''+iname+'\');"><img src="dashcharts.mpl?sid='+sid+'&notext=1&width=70&height=37"></a></div></div>';}
else if(t=='login')
{htm=htm+'<div class="tickerUnit" id="'+iname+'"><div class="tickLogin">'+sid+' logs in at '+systemname+'</div></div>';}
else if(t=='sigpost')
{htm=htm+'<div class="tickerUnit" id="'+iname+'"><div class="'+tipname+'"> New signal:<BR>'+sid+' at '+systemname+'</div></div>';}
else if(t=='autotrade')
{htm=htm+'<div class="tickerUnit" id="'+iname+'"><div class="'+tipname+'"> AutoTrader '+sid+'</div></div>';}
gVisibleEventStack.push(t);gVisibleEventStack.push(iname);gVisibleEventStack.push(sid);gVisibleEventStack.push(systemname);gVisibleEventStack.push(tipname);}
if((needToStartWait)&&(gAdWaitStart==0))
{gAdWaitStart=new Date();}
return(htm);}
function changeTicker()
{if((gEventStack.length>0)&&(gFreezeTicker==0))
{var tdrop=gVisibleEventStack.shift();var inamedrop=gVisibleEventStack.shift();var siddrop=gVisibleEventStack.shift();var systemnamedrop=gVisibleEventStack.shift();var tipnamedrop=gVisibleEventStack.shift();Effect.SwitchOff(inamedrop);var t=gEventStack.shift();var iname=gEventStack.shift();var sid=gEventStack.shift();var systemname=gEventStack.shift();var tipname=gEventStack.shift();gVisibleEventStack.push(t);gVisibleEventStack.push(iname);gVisibleEventStack.push(sid);gVisibleEventStack.push(systemname);gVisibleEventStack.push(tipname);var htm=buildEventStackHTML(gVisibleEventStack);var myRegExp=new RegExp("'","g");var cleanhtm=htm.replace(myRegExp,"\\'");setTimeout('document.getElementById(\'tickerframe\').innerHTML=\'<div id="innertickerwrap">'+cleanhtm+'</div>\'',1000);}
setTimeout('changeTicker();',2000);}
function getNewTickerData()
{if((gEventStack.length<50)&&(gFreezeTicker==0))
{var url=gRespondingApp+'?want=moreticker&v='+gV;pendURL.push(url);}
setTimeout('getNewTickerData();',7000);}
function schedGetDelta(inHowManyMs,deltaClass)
{setTimeout('getDelta(\''+deltaClass+'\');',inHowManyMs);}
function getDelta(deltaClass)
{var needTicker=0;if((gEventStack.length<50)&&(gFreezeTicker==0))
{needTicker=1;}
var url=gRespondingApp+'?want=getdelta&getTicker='+needTicker+'&v='+gV+'&dinterval='+gDeltaIntervalms+'&dclass='+deltaClass;pendURL.push(url);}
function tipCheckIn()
{var R=Math.random();var url='/cgi-perl/c2tip.mpl?want=tipcheckin&R='+R;pendURL.push(url);}
function moveEl1ToLocEl2(id1,id2,offsetx,offsety)
{var el2=document.getElementById(id2);var posx2=findPosX(el2);var posy2=findPosY(el2);var el1=document.getElementById(id1);el1.style.position="absolute";var T=parseInt(posy2)+parseInt(offsety);var L=parseInt(posx2)+parseInt(offsetx);if(offsety!==undefined){el1.style.top=T+'px';}
if(offsetx!==undefined){el1.style.left=L+'px';}}
function moveEl1ToAbsolute(id1,T,L,B,R)
{var el1=document.getElementById(id1);el1.style.position="absolute";if(T!==undefined){el1.style.top=T+'px';}
if(L!==undefined){el1.style.left=L+'px';}
if(B!==undefined){el1.style.bottom=z+'px';}
if(R!==undefined){el1.style.right=R+'px';}}
function moveEl1ToRightCol(id1)
{var el1=document.getElementById(id1);el1.style.position="absolute";el1.style.top='0px';el1.style.right='0px';}
function moveEl1ToRelative(id1,T,L,B,R)
{var el1=document.getElementById(id1);el1.style.position="relative";if(T!==undefined){el1.style.top=T+'px';}
if(L!==undefined){el1.style.left=L+'px';}
if(B!==undefined){el1.style.bottom=z+'px';}
if(R!==undefined){el1.style.right=R+'px';}}
function requestATaudit(divname,sigid)
{var url='/cgi-perl/orderentry.mpl?want=atpop&sigid='+sigid+'&anchorname='+encodeURIComponent(divname)+'&R='+Math.random();pendURL.push(url);}
function loadhelp(classname,contentname,el)
{var posx=findPosX(el);var posy=findPosY(el);dynamicContent(classname,contentname,'absolute',posy+25,posx-5,'undef','undef');}
function dynamicContent(classname,contentname,divAnchorName,offsetX,offsetY,B,R)
{if(divAnchorName)
var rkey=Math.random();var url=CGI+'/page.mpl?want=dynamicContent&anchorname='+encodeURIComponent(divAnchorName)+'&classname='+encodeURIComponent(classname)+'&contentname='+encodeURIComponent(contentname)+'&offsetx='+offsetX+'&offsety='+offsetY+'&B='+B+'&R='+R+'&rkey='+rkey;pendURL.push(url);}
function handlePostButton()
{moveEl1ToLocEl2('forumpopup','forumLabel',335,29);show(true,'forumpopup');document.getElementById('forumpopup').style.display='block';return false;}
function dchat(cid,sess)
{var url=gRespondingApp+'?want=dchat&v='+gV+'&cid='+cid;pendURL.push(url);}
function chatterMore()
{var url=gRespondingApp+'?want=morechat&v='+gV;pendURL.push(url);}
function checkEnterKeyChat(myfield,e)
{var keycode;if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;else return true;if(keycode==13)
{var chat=document.forms['chatform'].newchat.value;submitChat(chat);return false;}
else
return true;}
function submitChat(chattext)
{var urienc=encodeURIComponent(chattext);var url=gRespondingApp+'?want=addchat&v='+gV+'&text='+urienc;pendURL.push(url);document.forms['chatform'].newchat.value='';}
function handleShowPopUpSubmenu(submenuid,buttonid)
{moveEl1ToLocEl2(submenuid,buttonid,0,19);toggleHideShowDiv(submenuid);}
function innerAddWatchList(sid,sess)
{var url=gRespondingApp+'?want=addtowatchlist&sid='+sid+'&noTop='+gNoWatchListTop;pendURL.push(url);if(jIsInList(sid,gWatchList))
{}
else
{setTimeout('glowdiv(\'wltileframe'+sid+'\');',800);gWatchList.push(sid);}}
function redrawClosedPop(callapp,sid,skip)
{var url=callapp+'?want=reqMoreClosed&systemid='+sid+'&skip='+skip+'&v='+gV;pendURL.push(url);}
function handleRequestReviewForm(callapp,sid)
{var url=callapp+'?want=reqReviewForm&sid='+sid+'&v='+gV;pendURL.push(url);}
function showClosed(callapp,sid)
{popupshow(true);var url=callapp+'?want=reqClosedTrades&systemid='+sid;pendURL.push(url);}
function redrawTradeListInPlace(sid,setplan,isAjax)
{new Effect.Opacity('closedTradeHolder',{duration:.7,from:1,to:.2});var url='/cgi-perl/c2systems.mpl?want=redrawTradesList&systemid='+sid+'&setplan='+setplan+'&isAjax='+isAjax;pendURL.push(url);}
function toggleShowSymbols(sid)
{new Effect.Opacity('closedTradeHolder',{duration:.7,from:1,to:.2});var url='/cgi-perl/c2systems.mpl?want=togglesymbols&systemid='+sid;pendURL.push(url);}
function closedTradeLimit(sid,param,isAjax)
{new Effect.Opacity('closedTradeHolder',{duration:.7,from:1,to:.2});var url='/cgi-perl/c2systems.mpl?want=moreClosedTradesInset&systemid='+sid+'&paramtype=limit&paramval='+param;if(isAjax===1)
{url=url+'&isAjax=1';}
pendURL.push(url);}
function closedTradeOffset(sid,param,isAjax)
{new Effect.Opacity('closedTradeHolder',{duration:.7,from:1,to:.2});var url='/cgi-perl/c2systems.mpl?want=moreClosedTradesInset&systemid='+sid+'&paramtype=offset&paramval='+param;if(isAjax===1)
{url=url+'&isAjax=1';}
pendURL.push(url);}
function closedTradeReset(sid,isAjax)
{new Effect.Opacity('closedTradeHolder',{duration:.7,from:1,to:.2});var url='/cgi-perl/c2systems.mpl?want=moreClosedTradesInset&systemid='+sid+'&paramtype=reset';if(isAjax===1)
{url=url+'&isAjax=1';}
pendURL.push(url);}
function changePosSort(sid,param,enc)
{if(enc=='D')
{new Effect.Opacity('posHold'+sid,{duration:.7,from:1,to:.2});}
else
{new Effect.Opacity('positionsholder',{duration:.7,from:1,to:.2});}
var R=Math.random();var url='/cgi-perl/c2systems.mpl?want=changePosSort&systemid='+sid+'&param='+param+'&enc='+enc+'&R='+R;pendURL.push(url);}
function reqNewOpenPos(sid,enc,id)
{new Effect.Opacity(id,{duration:.7,from:1,to:.2});var R=Math.random();var url='/cgi-perl/c2systems.mpl?want=reqOpenPos&systemid='+sid+'&enc='+enc+'&R='+R;pendURL.push(url);}
function onEndCrop(coords,dimensions){if(Math.abs(coords.x2-coords.x1)<15)
{return false;}
var R=Math.random();var imgURL;if(gCurrentChartType=='swarm')
{imgURL='/cgi-perl/yfchart.mpl?charttype='+gCurrentChartType+'&sid='+gSystemID+'&rand='+R+'&cmd=zoom&width='+gChartWidth+'&height='+gChartHeight+'&zoomx1='+coords.x1+'&zoomx2='+coords.x2+'&zoomy1='+coords.y1+'&zoomy2='+coords.y2+'" width="'+gChartWidth+'" height="'+gChartHeight;}
else
{imgURL='/cgi-perl/syscharts.mpl?charttype='+gCurrentChartType+'&sid='+gSystemID+'&rand='+R+'&cmd=zoom&width='+gChartWidth+'&height='+gChartHeight+'&zoomx1='+coords.x1+'&zoomx2='+coords.x2+'&zoomy1='+coords.y1+'&zoomy2='+coords.y2+'" width="'+gChartWidth+'" height="'+gChartHeight;}
if(gCurrentChartType=='swarm')
{pendURL.push(imgURL);}
else
{document.getElementById('chartdiv').innerHTML='<img id="chartImage" src="'+imgURL+'">';}
try{document.getElementById('zoomTurnOff').innerHTML='<span id="innerzoom"><a href="#" onclick="handleChartUnzoom();return false;">Unzoom</a></span>';}
catch(err)
{document.getElementById('zoomContent').innerHTML='<span id="innerzoom"><a href="#" onclick="handleChartUnzoom();return false;">Unzoom</a></span>';}
stopcrop();setTimeout('glowdiv(\'innerzoom\');',600);setTimeout('glowdiv(\'innerzoom\');',1600);}
function handleChartUnzoom()
{var R=Math.random();var imgURL;if(gCurrentChartType=='swarm')
{imgURL='/cgi-perl/yfchart.mpl?uz=1&charttype='+gCurrentChartType+'&sid='+gSystemID+'&rand='+R+'&width='+gChartWidth+'&height='+gChartHeight;}
else
{imgURL='/cgi-perl/syscharts.mpl?uz=1&charttype='+gCurrentChartType+'&sid='+gSystemID+'&rand='+R+'&width='+gChartWidth+'&height='+gChartHeight;}
if(gCurrentChartType=='swarm')
{pendURL.push(imgURL);document.getElementById('zoomTurnOff').innerHTML='';if($('clickComment').style.visibility=='hidden')
{stopcrop();}
ZOOMING_CHART=0;}
else
{document.getElementById('chartdiv').innerHTML='<img id="chartImage" src="'+imgURL+'" width="'+gChartWidth+'" height="'+gChartHeight+'">';document.getElementById('zoomContent').innerHTML='Drag mouse in chart to zoom';stopcrop();}}
function handleRemoveSysLine(callapp,sess,showingid,removeid)
{var R=Math.random();new Effect.Opacity('chartcontainer',{duration:.7,from:1,to:.2});var url=callapp+'?cmd=removesystem&systemid='+showingid+'&removesys='+removeid+'&charttype='+gCurrentChartType+'&rand='+R+packagePortfolio();pendURL.push(url);}
function handleChartSelect(callapp,charttype,sid,portfolioDisplay)
{if(charttype=='Monte Carlo')
{setTimeout("drawMonteCarlo();",1000);}
else
{if((charttype=='Monte Carlo')||(charttype=='Personalized'))
{moveEl1ToLocEl2('loadingdiv','chartdiv',142,100);if(charttype=='Monte Carlo'){document.getElementById('loadingtext').innerHTML='Running Monte Carlo simulation...';}
else
{document.getElementById('loadingtext').innerHTML='Building custom chart based on your<BR>personalized preferences<BR>(commission rates, starting equity, costs, etc.)...';}
show(true,'loadingdiv');document.getElementById('loadingdiv').style.display="inline";}
var R=Math.random();var urienc=encodeURIComponent(charttype);gCurrentChartType=charttype;var url=callapp+'?want=newcharttype&systemid='+sid+'&charttype='+urienc+'&rand='+R;pendURL.push(url);if(charttype=='Monte Carlo')
{document.getElementById('zoomContent').innerHTML='';document.getElementById('removeContent').innerHTML='';new Effect.Opacity('chartcontainer',{duration:.7,from:1,to:.2});var url=SITE_BASE+'/cgi-perl/syscharts.mpl?charttype='+urienc+'&sid='+gSystemID+'&rand='+R+'&width='+gChartWidth+'&height='+gChartHeight+'&rand='+R+'&forcecache=1';pendURL.push(url);}
else
{var addend='';if(portfolioDisplay!=undefined)
{addend='&portfolioDisplay='+portfolioDisplay+packagePortfolio();}
var url=SITE_BASE+'/cgi-perl/syscharts.mpl?charttype='+urienc+'&sid='+gSystemID+'&rand='+R+'&width='+gChartWidth+'&height='+gChartHeight+'&forcecache=1'+addend;pendURL.push(url);document.getElementById('zoomContent').innerHTML='Drag mouse in chart to zoom';}}}
function forcePortfolio(callapp,sess,sid)
{if(gPortfolioDisplay==0){togglePortfolio(callapp,sess,sid);}}
function togglePortfolio(callapp,sess,sid)
{if(gPortfolioDisplay==0)
{var url=callapp+'?want=buildPortfolioDiv&sysid='+sid+'&currentShow=0&autorebalance=1';pendURL.push(url);handleChartSelect(callapp,gCurrentChartType,sid,1);}
else
{Effect.BlindUp('portfolio');gPortfolioDisplay=0;var url=callapp+'?want=reportPortStatus&sysid='+sid+'&currentShow=1';pendURL.push(url);handleChartSelect(SITE_BASE+'/cgi-perl/c2systems.mpl',gCurrentChartType,sid,0);}}
function handleRemoveForward(callapp,sess,sid)
{var url=callapp+'?want=removedelta&delta=-1&sysid='+sid;pendURL.push(url);}
function handleRemoveBackward(callapp,sess,sid)
{var url=callapp+'?want=removedelta&delta=1&sysid='+sid;pendURL.push(url);}
function handlePortKeyDown(sn)
{setTimeout('recalcPort('+sn+')',50);}
function recalcPort(sn)
{var total=0;var number_of_elements=document.forms['portfolioForm'].elements.length;for(var i=0;i<number_of_elements;i++)
{if(document.forms['portfolioForm'].elements[i].name.substring(0,10)=='portWeight')
{total=total+parseInt(document.forms['portfolioForm'].elements[i].value);}}
updatePortfolioButton(total,sn);}
function updatePortfolioButton(total,sn)
{if(total==100)
{document.forms['portfolioForm'].portButton.disabled=false;document.getElementById('portConstraint').innerHTML='';}
else
{document.forms['portfolioForm'].portButton.disabled=true;document.getElementById('portConstraint').innerHTML='Sum of portfolio should equal 100% (<a href="#" onclick="portAuto('+sn+');return false;">Auto-calculate</a>)';}}
function portAuto(startAfter)
{var total=0;var number_of_elements=document.forms['portfolioForm'].elements.length;var count=0;var lockamount=0
for(var i=0;i<number_of_elements;i++)
{if(document.forms['portfolioForm'].elements[i].name.substring(0,10)=='portWeight')
{total=total+parseInt(document.forms['portfolioForm'].elements[i].value);count=count+1;if(count==startAfter)
{lockamount=parseInt(document.forms['portfolioForm'].elements[i].value);}}}
var remain=100-total;var splitBy;if(startAfter!=0)
{splitBy=count-1;}
else
{splitBy=count;}
if(splitBy<=0){startAfter=0;splitBy=count;}
var split=Math.round(remain/splitBy);var recount=0;for(var i=0;i<number_of_elements;i++)
{if(document.forms['portfolioForm'].elements[i].name.substring(0,10)=='portWeight')
{recount=recount+1;if(recount!=startAfter)
{document.forms['portfolioForm'].elements[i].value=parseInt(document.forms['portfolioForm'].elements[i].value)+split;total=total+split;}
if(recount==count)
{document.forms['portfolioForm'].elements[i].value=parseInt(document.forms['portfolioForm'].elements[i].value)+(100-total);total=100;}}}
updatePortfolioButton(total,startAfter);}
function packagePortfolio()
{if(gPortfolioDisplay==0)
{return('');}
var add='';var number_of_elements=document.forms['portfolioForm'].elements.length;for(var i=0;i<number_of_elements;i++)
{if(document.forms['portfolioForm'].elements[i].name.substring(0,10)=='portWeight')
{add=add+parseInt(document.forms['portfolioForm'].elements[i].value)+'_';}}
return('&portfolio='+add);}
function handlePortfolioSubmit(callapp,sess,sid)
{handleChartSelect(callapp,gCurrentChartType,sid,1);}
function dropDivAndRestoreCropper(div)
{Effect.DropOut(div);restoreCropper();}
function restoreCropper()
{stopcrop();}
function getCheckedValue(radioObj){if(!radioObj)
return"";var radioLength=radioObj.length;if(radioLength==undefined)
if(radioObj.checked)
return radioObj.value;else
return"";for(var i=0;i<radioLength;i++){if(radioObj[i].checked){return radioObj[i].value;}}
return"";}
function setCheckedValue(radioObj,newValue){if(!radioObj)
return;var radioLength=radioObj.length;if(radioLength==undefined){radioObj.checked=(radioObj.value==newValue.toString());return;}
for(var i=0;i<radioLength;i++){radioObj[i].checked=false;if(radioObj[i].value==newValue.toString()){radioObj[i].checked=true;}}}
function handleFuturesRadio()
{var disablePerSymbol=false;if(getCheckedValue(document.personal.futuresCommType)=='same')
{disablePerSymbol=true;}
var doChange=['futures_'];disableFormElsStartingWith(disablePerSymbol,'personal',doChange,document.personal.futuresCommType);}
function handleCommCheck()
{var dontChangeElementsWith=['startamount','showSubs','showComm','B1'];if(document.personal.showComm.checked==false)
{disableFormEls(true,'personal',dontChangeElementsWith);}
else{disableFormEls(false,'personal',dontChangeElementsWith);}}
function doSubsetDisable(clickedEl,changeClass)
{var doChange=[changeClass];var setTo;if(clickedEl.checked==true)
{setTo=false;}
else{setTo=true;}
disableFormElsStartingWith(setTo,'personal',doChange,clickedEl);}
function disableFormEls(wantDisable,FormName,refDontChangeElementsStartingWith)
{for(i=0;i<document.forms[FormName].elements.length;i++)
{elm=document.forms[FormName].elements[i];var forceNoChange=0;if(refDontChangeElementsStartingWith&&refDontChangeElementsStartingWith.length)
{for(var a=0;a<refDontChangeElementsStartingWith.length;a++)
{if(!forceNoChange)
{var testElement=refDontChangeElementsStartingWith[a];var isContained=elm.name.indexOf(testElement)!=-1;if(isContained)
{forceNoChange=1;}}}}
if(!forceNoChange)
{elm.disabled=wantDisable;}}}
function disableFormElsStartingWith(wantDisable,FormName,refChangeElementsStartingWith,skipThisEl)
{for(i=0;i<document.forms[FormName].elements.length;i++)
{elm=document.forms[FormName].elements[i];if(elm!==skipThisEl)
{var forceChange=0;if(refChangeElementsStartingWith.length)
{for(var a=0;a<refChangeElementsStartingWith.length;a++)
{if(!forceChange)
{var testElement=refChangeElementsStartingWith[a];var isContained=elm.name.indexOf(testElement)!=-1;if(isContained)
{forceChange=1;}}}}
if(forceChange)
{elm.disabled=wantDisable;}}}}
function handlePersonalCancel()
{popupshow(false);if(gTipShown[55]==1)
{gTipShown[55]=0;Effect.DropOut('topPageTip');}
if(gCurrentChartType!=='Monte Carlo')
{stopcrop();}}
function handlePersonalSubmit(callapp,sess,sid)
{var url=callapp+'?want=submitPersonalization&systemid='+sid;var didRadio=0;for(i=0;i<document.forms['personal'].elements.length;i++)
{var elm=document.forms['personal'].elements[i];var value=elm.value;if(elm.name=='futuresCommType')
{value=getCheckedValue(document.personal.futuresCommType);if(!didRadio)
{url=url+'&'+elm.name+'='+encodeURIComponent(elm.value);didRadio=1;}}
else
{var returnVal=elm.value;if(elm.type=="checkbox")
{returnVal=0;if(elm.checked==true)
{returnVal=elm.value;}}
url=url+'&'+elm.name+'='+encodeURIComponent(returnVal);}}
popupshow(false);if(gCurrentChartType!=='Monte Carlo')
{stopcrop();}
pendURL.push(url);if(gTipShown[55]==1)
{gTipShown[55]=0;moveEl1ToLocEl2('topPageTip','chartSelector',-50,100);reqSpecificTip(55,56,gsess,'');gTipShown[56]=1;}
handleChartSelect(callapp,'Personalized',sid,gPortfolioDisplay);}
function requestPopup(which)
{var url=SITE_BASE+'/cgi-perl/dashreceiver.mpl?want=reqPop&which='+encodeURIComponent(which);pendURL.push(url);}
function handleEditPersonal(sid)
{var url=SITE_BASE+'/cgi-perl/c2systems.mpl?want=forcePersonalPopUp&systemid='+sid;pendURL.push(url);}
function stopcrop(markStopped)
{return;}
function startcrop(markStopped)
{return;}
function resubmitsearch(b,searchid,switches)
{b.innerHTML='<div class="btnG"><span><span><span>Searching...</span></span></span></div>';var R=Math.random();var url=SITE_BASE+'/cgi-perl/board.mpl?want=searchforums&searchid='+searchid+'&R='+R+switches;new Effect.Opacity('content2colbig',{duration:.7,from:1,to:.2});pendURL.push(url);setTimeout('searchStatus()',5000);}
function handleForumSearchSubmit()
{if(document.forms['forumsearch'].search.value.length<3)
{document.getElementById('fsearchMsg').innerHTML='<i><b>Search term is too short.<b></i>';}
else{document.getElementById('fsearchMsg').innerHTML='Searching...&nbsp;<img src="/images/ajax-loader.gif" alt="Wait" />';document.forms['forumsearch'].B1.disabled=true;var R=Math.random();var url=SITE_BASE+'/cgi-perl/board.mpl?want=ajaxsearchforums&search='+encodeURIComponent(document.forms['forumsearch'].search.value)+'&andor='+getCheckedValue(document.forms['forumsearch'].andor)+'&R='+R;new Effect.Opacity('content2colbig',{duration:.7,from:1,to:.2});pendURL.push(url);setTimeout('searchStatus()',5000);}}
function searchStatus()
{window.location=SITE_BASE+'/cgi-perl/board.mpl?want=searchstatus';}
function checkEnterKeyForum(myfield,e)
{var keycode;if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;else return true;if(keycode==13)
{handleForumSearchSubmit();return false;}
else
return true;}
function handleForumSearch(el,woffset,hoffset)
{var popup=document.getElementById('c2popupframe');var cont='<div class="forumsearchbox"><form action="" method="post" name="forumsearch">\
<h2>&nbsp;&nbsp;&nbsp;Search within Forums</h2><div class="frightX"><a href="#" onclick="show(false,\'c2popupframe\');document.getElementById(\'c2popupframe\').style.display = \'none\';">X</a></div><br/><br/>\
<div><span>Search for:&nbsp;</span></div><div><input name="search" type="text" size="30" tabindex="1" onKeyPress="return checkEnterKeyForum(this,event)"/></div><br />\
<div id="std">Separate search terms, using commas, like this.</div><br />\
<div><span class="nudge">Find posts with</span></div><div><input name="andor" type="radio" value="or" checked  tabindex="2"/>Any</div><div><input name="andor" type="radio" value="and"  />All</div><div><span class="nudge">terms</span></div>\
<div id="sub"><input name="B1" type="button" value="Search" onclick="handleForumSearchSubmit();" tabindex="3" /></div><br />\
<div id="fsearchMsg">&nbsp;</div><br/></form></div>';popup.innerHTML=cont;var divx=findPosX(document.getElementById(el));var divy=findPosY(document.getElementById(el));var xoffset=divx+woffset;var yoffset=divy+hoffset;popup.style.position="absolute";popup.style.top=yoffset+'px';popup.style.left=xoffset+'px';show(true,'c2popupframe');document.getElementById('c2popupframe').style.display='block';document.forumsearch.search.focus();}
function forumPostSuggestion(q)
{if(q.length>1)
{var url=SITE_BASE+'/cgi-perl/suggest.mpl?format=2&entry='+encodeURIComponent(q);pendURL.push(url);}}
function setSessionVal(sess,key,uencval)
{var R=Math.random();var url=gRespondingApp+'?want=setSessionValue&key='+key+'&val='+encodeURIComponent(uencval)+'&R='+R;pendURL.push(url);}
function handleUnsubscribeRequest(sysid,caller)
{var R=Math.random();var url=SITE_BASE+'/cgi-perl/c2systems.mpl?want=unsubscribe&systemid='+sysid+'&return='+caller+'&R='+R;pendURL.push(url);}
function handleDisclosure()
{var R=Math.random();var url=SITE_BASE+'/cgi-perl/c2systems.mpl?want=pulldisclosure&R='+R;pendURL.push(url);}
function dropTableRow(sess,nameRowObj,settingVal)
{setSessionVal(sess,nameRowObj,settingVal);Effect.DropOut(nameRowObj);document.getElementById('hiddenrowStatus').innerHTML='<a href="/cgi-perl/systemmanager.mpl?clear=1">Show hidden rows?</a>';}
function changeElementsOfClass(className,changeTo)
{var all=document.all?document.all:document.getElementsByTagName('*');var elements=new Array();for(var e=0;e<all.length;e++)
{if(all[e].className==className)
elements[elements.length]=all[e];}
var numel=all.length;for(var i=0;i<elements.length;i++)
{elements[i].innerHTML=changeTo;}}
function changeMultipleEls()
{var all=document.all?document.all:document.getElementsByTagName('*');for(var e=0;e<all.length;e++)
{if(gChangeHash[all[e].className]!==undefined)
{var old=all[e].innerHTML;var pfo=parseFloat(old);var pfct=parseFloat(gChangeHash[all[e].className]);if(pfo<pfct)
{new Effect.Highlight(all[e],{startcolor:'#B6F9AD',endcolor:'#ffffff'});}
else if(pfo>pfct)
{new Effect.Highlight(all[e],{startcolor:'#FFC2C2',endcolor:'#ffffff'});}
all[e].innerHTML=gChangeHash[all[e].className];}}}
function loadSystem(sid)
{window.location='/cgi-perl/system'+sid;}
function attention(divname,wiggle,flash,postTipControl)
{gTipAcked=0;gTipFlashCount=0;setTimeout('_attention(\''+divname+'\','+wiggle+','+flash+',\''+postTipControl+'\')',3000);}
function _attention(divname,wiggle,flash,postTipControl)
{if(wiggle)
{Effect.Shake(divname);if(postTipControl.length>0)
{setTimeout('handlePostAttention(\''+divname+'\',\''+postTipControl+'\')',2000);}}
if(flash)
{tipflash(divname,wiggle,flash,postTipControl);}}
function tipflash(divname,wiggle,flash,postTipControl)
{if((gTipAcked==0)&&(gTipFlashCount<2))
{new Effect.Highlight(divname,{startcolor:'#FFF4BB',endcolor:'#ffffff'});setTimeout('tipflash(\''+divname+'\','+wiggle+','+flash+',\''+postTipControl+'\')',4000);gTipFlashCount++;}
else if(!wiggle)
{if(postTipControl.length>0)
{handlePostAttention(divname,postTipControl);}}}
function handlePostAttention(divname,dothis)
{document.getElementById('tip').className='c2tip';var e=decodeURIComponent(dothis);eval(e);}
function _flyEl(el,todiv,offsetx,offsety)
{var tipx=findPosX(el);var tipy=findPosY(el);gTipX=tipx;gTipY=tipy;var el2=document.getElementById(todiv);var posx2=findPosX(el2);var posy2=findPosY(el2);var needx=posx2-tipx+offsetx;var needy=posy2-tipy+offsety;new Effect.Move('tip',{x:needx,y:needy,mode:'relative'});}
function flytip(flydiv,todiv,offsetx,offsety,classModifier)
{classModifier=classModifier?classModifier:'';var tipel=document.getElementById(flydiv);var classname='c2tipON_topRight'+classModifier;if(offsetx>0)
{classname='c2tipON_topLeft'+classModifier;}
gReverseX=-offsetx;gReverseY=-offsety;_flyEl(tipel,todiv,offsetx,offsety);tipel.className=classname;}
function makeVideoWindow(tipguid,anchordiv,url,offsetx,offsety,videowidth,videoheight)
{var vidx;var vidy;gTipID=tipguid;if(undefined==videowidth)
{videowidth=590;}
if(undefined==videoheight)
{videoheight=425;}
win=new Window({className:"alphacube",title:"Collective2 Videos",width:videowidth,height:videoheight,destroyOnClose:true,recenterAuto:false,minimizable:false,maximizable:false,resizable:false,url:url})
if(anchordiv.length==0)
{vidx=0;vidy=0;}
else
{var anchorel=document.getElementById(anchordiv);vidx=findPosX(anchorel);vidy=findPosY(anchorel);}
vidy=vidy+offsety;vidx=vidx+offsetx;win.setLocation(vidy,vidx);win.show();return(win);}
function makeQASessionWindow(anchordiv,content,title,offsetx,offsety,width,height)
{var x;var y;if(undefined==width)
{width=590;}
if(undefined==height)
{height=425;}
win=new Window({className:"alphacube",title:title,width:width,height:height,destroyOnClose:true,recenterAuto:false,minimizable:false,maximizable:false,resizable:false})
if(anchordiv.length==0)
{x=0;y=0;}
else
{var anchorel=document.getElementById(anchordiv);x=findPosX(anchorel);y=findPosY(anchorel);}
y=y+offsety;x=x+offsetx;win.setLocation(y,x);win.getContent().innerHTML=content;win.show();return(win);}
function centered_ajax_dialog(src,w,h,ok)
{if(!w)w=930;if(!h)h=450;if(!ok)ok='OK'
Dialog.alert({url:src,options:{method:'get'}},{className:"alphacube",width:w,height:h,zIndex:999999,okLabel:ok,onOk:function(){return true;}});}
function hidetip(tipguid)
{Effect.DropOut('tip');var R=Math.random();document.getElementById('tipanchor').innerHTML='<div id="tip" class="c2tip"></div>';reqNextTip(tipguid,gsess,'');}
function ackhidetip(sess,tipid)
{Effect.DropOut('tip');var R=Math.random();var url='/cgi-perl/c2tip.mpl?want=acktip&tipid='+tipid+'&R='+R;pendURL.push(url);}
function ackhidetiptop(sess,tipid)
{Effect.DropOut('topPageTip');var R=Math.random();var url='/cgi-perl/c2tip.mpl?want=acktip&tipid='+tipid+'&R='+R;pendURL.push(url);}
function acktip(sess,tipid)
{var R=Math.random();var url='/cgi-perl/c2tip.mpl?want=acktip&tipid='+tipid+'&R='+R;pendURL.push(url);}
function forgetTips(sess)
{var R=Math.random();var url='/cgi-perl/c2tip.mpl?want=forgetTips&R='+R;pendURL.push(url);}
function requestTip()
{var url='/cgi-perl/c2tip.mpl?want=reqtip&R='+Math.random()+'&query='+encodeURIComponent(window.location.href);pendURL.push(url);}
function reqNextTip(tipguid,sess,query)
{if(tipguid>0)
{try{document.getElementById('nexttip').innerHTML='<span class="loading">Loading...</span>';}
catch(e){}}
var R=Math.random();var url='/cgi-perl/c2tip.mpl?want=reqtip&fromnexttip='+tipguid+'&query='+query+'&R='+R;pendURL.push(url);}
function reqSpecificTip(fromtipid,tipguid,sess,afterrequest)
{var R=Math.random();var url='/cgi-perl/c2tip.mpl?want=reqtip&forceid='+tipguid+'&R='+R+'&after='+encodeURIComponent(afterrequest)+'&parentid='+fromtipid;pendURL.push(url);}
function changeToAck(tipid)
{try{document.getElementById('tipcontrol').innerHTML='<ul><li><a href="#" onclick="hidetip('+tipid+');return false;">Done</a></li></ul>';}
catch(e)
{}
if(tipid==0)
{try{document.getElementById('tipcontrol').innerHTML='';}
catch(e)
{}}
acktip(gsess,tipid);}
function prevTips(sess)
{var R=Math.random();var url='/cgi-perl/c2tip.mpl?want=prevtips&R='+R;pendURL.push(url);}
function tipShowMe(thistipid,anchorname,offsetx,offsety)
{document.getElementById('tipcontrol').innerHTML='<ul><li class="lft"><a href="#" onclick="prevTips(\''+gsess+'\');return false;">&laquo;&nbsp;Prev</a></li><li class="more"><a href="#" onclick="flytip(\'tip\',\''+anchorname+'\','+offsetx+','+offsety+');changeToAck('+thistipid+');return false;">Show me</a></li><li><div id="nexttip"><a href="#" onclick="reqNextTip('+thistipid+', \''+gsess+'\',0);return false;">Next&nbsp;&raquo;</a></div></li></ul>';}
function changeToTip(fromtipid,nexttipid,anchorname,offsetx,offsety)
{try{document.getElementById('tipcontrol').innerHTML='<span class="loading">Loading...</span>';}
catch(e){}
var afterrequest='tipShowMe('+nexttipid+',\''+anchorname+'\','+offsetx+','+offsety+');';reqSpecificTip(fromtipid,nexttipid,gsess,afterrequest);}
function tipShowMeNext(thistipid,nexttipid,anchorname,offsetx,offsety,label)
{try{document.getElementById('tipcontrol').innerHTML='<ul><li class="more"><a href="#" onclick="changeToTip('+thistipid+','+nexttipid+',\''+anchorname+'\','+offsetx+','+offsety+');flytip(\'tip\',\''+anchorname+'\','+offsetx+','+offsety+');changeToAck('+thistipid+');return false;">'+label+'</a></li></ul>';}
catch(e){}}
function loadMonthlyReturns(sysid,retType)
{var R=Math.random();var url='/cgi-perl/c2systems.mpl?want=loadreturns&systemid='+sysid+'&type='+retType+'&R='+R;new Effect.Opacity('monthEquity',{duration:.7,from:1,to:.2});pendURL.push(url);}
function pausecomp(millis)
{var date=new Date();var curDate=null;do{curDate=new Date();}
while(curDate-date<millis);}
function taKeyup()
{gLastTAPressDate=new Date();setTimeout('checkMAx();',6);if(gUnprocTA==0)
{gUnprocTA=1;setTimeout('checkPendingTA();',10);}}
function checkMAx()
{var c=document.getElementById('max').className;var l=document.getElementById('maentry').value.length;if(c==='closeXoff')
{if(l>0){document.getElementById('max').className='closeX';}}
else if((c==='closeX')&&(l==0))
{document.getElementById('max').className='closeXoff'}}
function checkPendingTA()
{if(gUnprocTA)
{var end=new Date();if((document.getElementById('maentry').value.length>0)&&(document.getElementById('maentry').value>gMinMA))
{document.getElementById('maWarn').style.display="block";glowdiv('maWarn');gUnprocTA=0;return;}
else if(document.getElementById('maWarn').style.display==='block')
{fadediv('maWarn');}
var msSinceKeyPress=end.getTime()-gLastTAPressDate.getTime();if(document.getElementById('maentry').value==1)
{document.getElementById('mas').innerHTML='';}
else
{document.getElementById('mas').innerHTML='s';}
if(msSinceKeyPress>880)
{var erased=0;if((gPriorTAval>0)&&(document.getElementById('maentry').value.length==0))
{erased=1;}
if((document.getElementById('maentry').value>0)||(erased))
{var R=Math.random();var sendValue=document.getElementById('maentry').value;gPriorTAval=sendValue;drawMovingAverage(gPriorTAval);gUnprocTA=0;return(false);}
else{gUnprocTA=0;}}
else
{setTimeout('checkPendingTA();',10);}}}
function toggleVisibilOfClass(whichClass)
{var all=document.all?document.all:document.getElementsByTagName('*');var returnFinalVal;for(var e=0;e<all.length;e++)
{if(all[e].className==whichClass)
{if((all[e].style.display==='none')||(all[e].style.display===''))
{all[e].style.display="block";returnFinalVal=1;}
else
{all[e].style.display="none";returnFinalVal=0;}}}
return(returnFinalVal);}
function toggleVisibilOfTableClass(whichClass)
{var all=document.all?document.all:document.getElementsByTagName('*');var returnFinalVal;for(var e=0;e<all.length;e++)
{if(all[e].className==whichClass)
{if((all[e].style.display==='none')||(all[e].style.display===''))
{all[e].style.display="table-row";returnFinalVal=1;}
else
{all[e].style.display="none";returnFinalVal=0;}}}
return(returnFinalVal);}
function forceVisibilOfClass(whichClass,onOff)
{var all=document.all?document.all:document.getElementsByTagName('*');for(var e=0;e<all.length;e++)
{if(all[e].className==whichClass)
{if((all[e].style.display==='none')||(all[e].style.display===''))
{if(onOff==1){all[e].style.display="block";}}
else
{if(onOff==0){all[e].style.display="none";}}}}}
function intermittentflashDiv(el,periodms,newstate)
{if(newstate==0)
{setTimeout("intermittentflashDiv('"+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("intermittentflashDiv('"+el+"',"+periodms+","+nextstate+");",periodms);}
function intermittentglowDiv(el,numtimes)
{glowdiv(el);var nn=numtimes-1;if(nn>0)
{setTimeout("intermittentglowDiv('"+el+"',"+nn+");",2000);}}
function reqPM(msgid,as_admin_of,system_owner)
{fadeAndSnakeDiv('msg'+msgid);var R=Math.random();var url='/cgi-perl/user/private_message.mpl?rm=readPrivateAjax&msg='+msgid+'&R='+R;if(as_admin_of)
{url+='&as_admin_of='+as_admin_of;}
pendURL.push(url);}
function selectTab(tabkind,whichtab)
{var R=Math.random();var url=gRespondingApp+'?want=selecttab&tabkind='+encodeURIComponent(tabkind)+'&whichtab='+encodeURIComponent(whichtab)+'&R='+R;pendURL.push(url);}
function dropSeg(sid)
{Effect.DropOut('segment'+sid);if((document.getElementById('dashRestoreAll').style.display==='none')||(document.getElementById('dashRestoreAll').style.display===''))
{document.getElementById('dashRestoreAll').style.display="block";}
setSessionVal(gsess,'dashsyshide'+sid,1);glowdiv('dashRestoreAll');}
function redrawDashSys(param)
{try
{show(false,'c2popupframe');document.getElementById('c2popupframe').style.display='none';}
catch(err)
{}
var R=Math.random();var url='/cgi-perl/dashreceiver.mpl?want=refreshDashSys&R='+R+'&param='+param;new Effect.Opacity('dashsystemwrapper',{duration:.7,from:1,to:.2});pendURL.push(url);}
function regSystemSegmentForUpdates(sid,freqMS)
{var TR=Math.floor(Math.random()*6)*1000;setTimeout('reqSystemSeg('+sid+')',freqMS+TR);}
function reqSystemSeg(sid)
{var R=Math.random();var url='/cgi-perl/dashreceiver.mpl?want=reqDashSys&R='+R+'&sid='+sid;pendURL.push(url);}
function processHelpRequest(wanthelp,sid,sess)
{var R=Math.random();var url='/cgi-perl/c2systems.mpl?want=reqat&sid='+sid+'&wanthelp='+wanthelp+'&na='+document.forms.autotradehelp.neveragain.value+'&name='+encodeURIComponent(document.forms.autotradehelp.personname.value)+'&tel='+encodeURIComponent(document.forms.autotradehelp.telephone.value)+'&email='+encodeURIComponent(document.forms.autotradehelp.email.value)+'&tz='+document.forms.autotradehelp.timezone.value+'&instru='+encodeURIComponent(document.forms.autotradehelp.instrument.value)+'&R='+R;pendURL.push(url);Effect.DropOut('genericPopup');if(wanthelp==1)
{setTimeout('alert(\'Okay, a human being AutoTrade Specialist will contact you by the end of one business day.\');',750);}}
function anclick(tabclicked,currentselected)
{var R=Math.random();var url='/cgi-perl/my_analyst.mpl?want=selecttab&whichtab='+encodeURIComponent(tabclicked)+'&R='+R;pendURL.push(url);}
function changeAnTo(cid,i)
{var changeTo='';if(i==1)
{changeTo='not&nbsp;worth&nbsp;reading';}
else if(i==2)
{changeTo='worth&nbsp;a&nbsp;glance';}
else if(i==3)
{changeTo='good';}
else if(i==4)
{changeTo='very&nbsp;good';}
else if(i==5)
{changeTo='insightful';}
document.getElementById('text'+cid).innerHTML=changeTo;}
function changestars(cid,fromi,toi,picname)
{if((fromi<6)&&(toi>=fromi))
{var i;for(i=fromi;i<=toi;i++)
{document.getElementById('s'+cid+'s'+i).src='/images/'+picname;}}}
function changeRating(cid,newrate)
{var R=Math.random();var url='/cgi-perl/my_analyst.mpl?want=changerate&cid='+cid+'&rate='+newrate+'&R='+R;pendURL.push(url);}
function handleSystemPageTimePeriodSelect(drop,poolid,systemid)
{var tp=drop.value;var urienc=encodeURIComponent(tp);var url=SITE_BASE+'/cgi-perl/c2systems.mpl?cmd=reportTimePeriod&agg='+poolid+'&systemid='+systemid+'&newsetting='+urienc;document.getElementById('loadstatus').innerHTML='Recalculating...';new Effect.Opacity('resultsHolder',{duration:.7,from:1,to:.2});pendURL.push(url);}
function disableATbutton(bname)
{document.getElementById(bname).innerHTML='<a class="btnB h2"><span><span><span>Calculating...</span></span></span></a>';}
function doWarnLoad()
{pendURL.push('/cgi-perl/c2systems.mpl?want=warnload');}
function show_notify(content,style_class,use_onclick,on_cancel,prev_url,next_url)
{if(!style_class){style_class='none';}
if($(content))
{content=$(content).innerHTML;}
$('notify_bar_content').innerHTML=content;$('notify_bar').className='notify_'+style_class;if(prev_url||next_url)
{$('notify_bar').style.display='block';}
else
{Effect.Appear('notify_bar');}
if(use_onclick)
{$('notify_bar_content').onclick=function(){sub_dialog("notify_content");};}
else
{$('notify_bar_content').onclick='';}
if(on_cancel)
{$('notify_bar_cancel').onclick=function(){hide_notify();eval(on_cancel);};}
else
{$('notify_bar_cancel').onclick=function(){hide_notify();};}
if((!prev_url)&&(!next_url))
{setTimeout("$('notify_bar_cancel').style.display = 'block';",1500);}
if(prev_url)
{setTimeout("$('notify_bar_prev').style.display = 'block';",500);$('notify_bar_prev').onclick=function(){window.location=prev_url;};}
if(next_url)
{setTimeout("$('notify_bar_next').style.display = 'block';",500);$('notify_bar_next').onclick=function(){window.location=next_url;};}}
function hide_notify()
{$('notify_bar_cancel').style.display='none';$('notify_bar_prev').style.display='none';$('notify_bar_next').style.display='none';Effect.Fade('notify_bar');}
function general_hide_notify()
{Effect.BlindUp('general_notify_bar');setTimeout('_hideNotifyHolder();',2000);}
function _hideNotifyHolder()
{$('general_notify_bar_holder').style.display='none';}
function sub_dialog(div,close)
{if(!div){div='subDialog';}
if(!close){close=function(){startcrop(1);return true;}}
if(ATDemoWindow)
{ATDemoWindow.remove();}
stopcrop(1);var elementPos=$('content').cumulativeOffset();var top=elementPos[1]+200;var left=elementPos[0]+20;ATDemoWindow=new Q.Window({style:'info',top:top,left:left,width:520,text:$(div).innerHTML,position:'absolute',onHide:close});}
function showATDemoConfirm(systemid,systemname,broker,brokerName)
{var elementPos=$('sys'+systemid).cumulativeOffset();var top=elementPos[1]+20;var left=elementPos[0]+20;var html='<div class="tutorial" name="ATDemoDesc" id="ATDemoDesc"><p>Want to see for yourself how easy it is to use Collective2 AutoTrading?</p><p>We\'ll set up a simulated brokerage account, fund it with $50,000 imaginary dollars, and start you AutoTrading <b>'+systemname+'</b> for free.<br><br><span id="tryDemo"><a style="font-size:18px;font-weight:bold;float:right;margin-right:20px;color:#369" onclick="pendURL.push(\'/cgi-perl/utility/ajax_util.mpl?rm=demoAT&amp;broker='+broker+'&amp;systemid='+systemid+'\');$(\'tryDemo\').innerHTML=\'Please wait...\';return false;" href="#">Let\'s do it!</a></span></p></div>';ATDemoWindow=new Q.Window({style:'info',top:top,left:left,width:500,text:html,position:'absolute'});}
function $RF(el,radioGroup){if($(el).type&&$(el).type.toLowerCase()=='radio'){var radioGroup=$(el).name;var el=$(el).form;}else if($(el).tagName.toLowerCase()!='form'){return false;}
var checked=$(el).getInputs('radio',radioGroup).find(function(re){return re.checked;});return(checked)?$F(checked):null;}
function $CF(iSource)
{var c_value="";var fieldobj=document.getElementsByName(iSource);for(var i=0;i<fieldobj.length;i++)
{if(fieldobj[i].checked)
{c_value=c_value+fieldobj[i].value+"||";}}
return c_value;}
function toggleVisAndReport(whichClass,reportType)
{var reportValue=toggleVisibilOfTableClass(whichClass);setSessionVal('111',reportType,reportValue);}
function toggleSwitchImages(a,b)
{if(document.getElementById(a).style.display==='none')
{document.getElementById(b).style.display='none';document.getElementById(a).style.display='block';}
else if(document.getElementById(b).style.display==='none')
{document.getElementById(a).style.display='none';document.getElementById(b).style.display='block';}}
function specialWarning(wlid)
{pendURL.push('/cgi-perl/c2systems.mpl?want=warnload&special=1&wlid='+wlid);}
function readAndUnderStood(wlid)
{popupshow(false);if(wlid)
{pendURL.push('/cgi-perl/c2systems.mpl?want=readandunderstood&special=1&wlid='+wlid);}}
function getContentList(app)
{var url="/cgi-perl/dev/content_interface.mpl?rm=getContentList&app="+app;pendURL.push(url);}
function startG3FromDash(anchorDiv,needsType,x,y)
{pendURL.push("/cgi-perl/swarm/autotrade.mpl?rm=g3license&typeNeeded="+needsType+"&anchorDiv="+encodeURIComponent(anchorDiv)+'&x='+x+'&y='+y+'&returncode=dash');}
function startG3(anchorDiv,needsType)
{pendURL.push("/cgi-perl/swarm/autotrade.mpl?rm=g3license&typeNeeded="+needsType+"&anchorDiv="+encodeURIComponent(anchorDiv));}
function restoreG3Button()
{try{document.getElementById('subbutt').style.display='block';}
catch(err)
{}}
function handleG3Submit(anchorDiv)
{var L;var counter;for(counter=0;counter<document.radioform.licensetype.length;counter++)
{if(document.radioform.licensetype[counter].checked==true)
{L=document.radioform.licensetype[counter].value;}}
if(L==2){L=4;}
var url='/cgi-perl/swarm/autotrade.mpl?rm=g3Submit&cc='+document.getElementById('cardnum').value+'&exp='+document.getElementById('expiration').value+'&cvv='+document.getElementById('cvv').value+'&cctype='+document.getElementById('cctype').value+'&anchorDiv='+anchorDiv+'&licenseType='+L;document.getElementById('subbutt').style.display='none';pendURL.push(url);}
function turnOffClassOfAllBut(except,outOf)
{for(var i=1;i<=outOf;i++)
{if(i!=except){document.getElementById('commplan'+i).className='';}}}
function flagSystem(systemid,textclass)
{var url='/cgi-perl/compliance.mpl?rm=flagpublic&systemid='+systemid+'&textclass='+textclass;pendURL.push(url);}
function flagSystemAdmin(systemid,textclass)
{var url='/cgi-perl/compliance.mpl?rm=flagadmin&systemid='+systemid+'&textclass='+textclass;pendURL.push(url);}
function handleOutsideURL(systemid,textclass,rawURL)
{var url='/cgi-perl/compliance.mpl?rm=outsideURL&systemid='+systemid+'&textclass='+textclass+'&url='+encodeURIComponent(rawURL);pendURL.push(url);}
function dashReturnNow()
{document.getElementById('g3invite').innerHTML='<a href="/cgi-perl/c2dashboard.mpl">Return to the C2 Dashboard</a> when done.';}
function flashChatLight(onOff)
{if(document.getElementById('chatHolder').innerHTML=='')
{document.getElementById('chatHolder').innerHTML='<div id="chatLight"><a href="#" onclick="doChatWindow();return false;"><img src="/images/chatBubble2.png"></a></div>';Effect.Pulsate('chatLight',{pulses:10,duration:10,from:.1});}}
function deactivateChat(pid)
{var p=document.getElementById('entry'+pid);if(p)
{gChatContent[pid]=p.value;p.parentNode.removeChild(p);}
gActiveChat=0;}
function activateChat(pid)
{if((gActiveChat)&&(gActiveChat!=pid))
{deactivateChat(gActiveChat);}
if(gChatBlockActivation[pid]!=1)
{var p=document.getElementById('entry'+pid);if(!p)
{p=document.createElement('textarea');p.setAttribute('id','entry'+pid);p.setAttribute('class','rtchatTextEntry');p.setAttribute('onkeypress','return checkrtchatEnterKey(this,event,'+pid+')');p.style.display="block";document.getElementById('rtOuter'+pid).appendChild(p);p.focus();}
if(gChatContent[pid])
{p.value=gChatContent[pid];}}
gActiveChat=pid;if(document.getElementById('rtSingleConver'+pid).style.display=='none')
{document.getElementById('rtSingleConver'+pid).style.display='block';updateChatVisibilityInfo(pid,1);}}
function scrollVertical(value,elementName,slider)
{var e=document.getElementById(elementName);var m=Math.round(value/slider.maximum*(e.scrollHeight-e.offsetHeight));e.scrollTop=m;}
function hideShowATName(sigid,pid,onoff)
{var url='/cgi-perl/c2systems.mpl?want=revealpersonalAT&pid='+pid+'&sigid='+sigid+'&onoff='+onoff;pendURL.push(url);}
function q_inform(type,message,length,informID)
{win_id=informID||q_util_win_count++;if(Informer)
{length=length?length:10;if(type=='notice')
{qUtilWin[win_id]=Informer.notice(message,length);}
else if(type=='plain')
{qUtilWin[win_id]=Informer.plain(message,length);}
else if(type=='info')
{qUtilWin[win_id]=Informer.info(message,length);}
else if(type=='warning')
{qUtilWin[win_id]=Informer.warning(message,length);}
else if(type=='error')
{qUtilWin[win_id]=Informer.error(message,length);}
else if(type=='dark')
{qUtilWin[win_id]=Informer.dark(message,length);}}}
function chatInit()
{if(is_reg_user)
{var url="/cgi-perl/user/chat.mpl?rm=checkChats&initial=1";pendURL.push(url);var soundfile1=new Image();soundfile1.src='/sounds/invite.mp3';};}
function chatCheck()
{if(is_reg_user)
{var url="/cgi-perl/user/chat.mpl?rm=checkChats";pendURL.push(url);};}
function sendChatMessage(chatid,chattext)
{if(!chattext){return;}
$j("#"+chatid).chatbox("option","boxManager").addMsg('You',chattext);var urienc=encodeURIComponent(chattext);chatid=chatid.replace('chat_div_','');var url='/cgi-perl/user/chat.mpl?rm=addChatMessage&chatID='+chatid+'&text='+urienc;pendURL.push(url);}
function writeChatMessage(chat_id,from,message,initial)
{$j("#chat_div_"+chat_id).chatbox("option","boxManager").addMsg(from,message,initial);}
function chatInfoMsg(chatid,msg)
{$j("#"+chatid).chatbox("option","boxManager").addInfoMsg(msg);}
function leaveChat(chatid)
{chatid=chatid.replace('chat_div_','');var url='/cgi-perl/user/chat.mpl?rm=leaveChat&chatID='+chatid;pendURL.push(url);}
function requestChat(toPID,divIDtomod)
{var url='/cgi-perl/user/chat.mpl?rm=requestChat&with='+toPID;pendURL.push(url);try{document.getElementById(divIDtomod).innerHTML='&nbsp;<span style="color:green;"><i>Contacting...</i></span>';}
catch(err){}}
function requestChatD(toPID,divIDtomod)
{var url='/cgi-perl/user/chat.mpl?rm=requestChat&with='+toPID;pendURL.push(url);try{$(divIDtomod).src='/images/c2snake.gif';}
catch(err){}}
function acceptChat(chat_id)
{var url='/cgi-perl/user/chat.mpl?rm=acceptChat&chat_id='+chat_id;pendURL.push(url);}
function declineChat(chat_id)
{var url='/cgi-perl/user/chat.mpl?rm=declineChat&chat_id='+chat_id;pendURL.push(url);}
function blockChatUser(person_id,chat_id)
{var url='/cgi-perl/user/chat.mpl?rm=blockUser&block='+person_id+'&chat_id='+chat_id;pendURL.push(url);}
function showChatRequest(person_id,person_alias,chat_id)
{q_inform("warning",person_alias+" has requested to chat with you.<br/><br/><div style='float:right'><input type='button' value='Block' onclick='blockChatUser("+person_id+",\""+chat_id+"\");return false;' class='leftButtonGray' style='margin-right:5px'><input type='button' value='Decline' onclick='declineChat(\""+chat_id+"\");return false;' class='leftButtonGray' style='margin-right:5px'><input type='button' value='Accept' onclick='acceptChat(\""+chat_id+"\");return false;' class='leftButton'></div><br/>",'immortal');Sound.play('/sounds/invite.mp3',{replace:true});}
function newChatWindow(chat_id,chat_name,offset)
{if($j('#chat_div_'+chat_id)[0]){return 0};var el=document.createElement("div");el.setAttribute("id","chat_div_"+chat_id);$j(el).chatbox({id:"chat_div_"+chat_id,user:{},title:chat_name,offset:offset,hidden:false,messageSent:function(id,user,msg){sendChatMessage(id,msg);},boxClosed:function(id){leaveChat(id);}});}
function addFavorite(id)
{showAsFavorite(id);}
function showAsFavorite(id)
{$('favorite_'+id).className='chatFavActive';$('favorite_'+id).title='Remove from favorites';$('favorite_'+id).onclick=function(){removeFavorite(id)};}
function removeFavorite(id)
{$('favorite_'+id).className='chatFavInactive';$('favorite_'+id).title='Add to favorites';$('favorite_'+id).onclick=function(){addFavorite(id)};}
function commatize(strValue){var objRegExp=new RegExp('(-?[0-9]+)([0-9]{3})');while(objRegExp.test(strValue)){strValue=strValue.toString().replace(objRegExp,'$1,$2');}
return strValue;}
function reviewon(reviewid)
{$('left'+reviewid).className='leftON';$('reviewTxt'+reviewid).className='reviewTxtON';}
function reviewoff(reviewid)
{$('left'+reviewid).className='leftOFF';$('reviewTxt'+reviewid).className='reviewTxt';}
function showC2Register(content)
{if(LoginWindow)
{$('QCANCEL').simulate('click');}
var elementPos=$('page').cumulativeOffset();var top=elementPos[1]+100;var left=elementPos[0]+150;var fboption='<span style="float:right;padding-top:8px;font-size:10px;font-weight:normal;">Use your Facebook account instead: &nbsp;<a href="/cgi-perl/user/facebook.mpl"><img src="/images/fb_connect.gif" style="vertical-align:-6px"></a></span>';if(gC2RegisterWindow)
{gC2RegisterWindow.remove();}
gC2RegisterWindow=new Q.Window({style:'info',title:fboption,top:top,left:left,width:550,text:content,position:'absolute'});}
function showC2RegisterRelDiv(content,anchorDiv,x,y)
{if(LoginWindow)
{$('QCANCEL').simulate('click');}
var elementPos=$(anchorDiv).cumulativeOffset();var top=elementPos[1]+y;var left=elementPos[0]+x;var fboption='<span style="float:right;padding-top:8px;font-size:10px;font-weight:normal;">Use your Facebook account instead: &nbsp;<a href="/cgi-perl/user/facebook.mpl"><img src="/images/fb_connect.gif" style="vertical-align:-6px"></a></span>';if(gC2RegisterWindow)
{gC2RegisterWindow.remove();}
gC2RegisterWindow=new Q.Window({style:'info',title:fboption,top:top,left:left,width:550,text:content,position:'absolute'});}
function RegValidate(formobj)
{var gNeedPersonInfo=1;document.getElementById('signuperrmsg').innerHTML='';if(gNeedPersonInfo)
{if(formobj.firstname.value.length<1)
{document.getElementById('signuperrmsg').innerHTML='Missing: your first name.';return(false);}
if(formobj.lastname.value.length<1)
{document.getElementById('signuperrmsg').innerHTML='Missing: your last name.';return(false);}
if(formobj.email.value.length<1)
{document.getElementById('signuperrmsg').innerHTML='Missing: your email.';return(false);}
if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(formobj.email.value)))
{document.getElementById('signuperrmsg').innerHTML='The email address you entered doesn\'t seem to be valid.';return(false);}
if(formobj.password1.value.length<1)
{document.getElementById('signuperrmsg').innerHTML='Choose a password to protect your account.';return(false);}
if(formobj.password1.value.length<4)
{document.getElementById('signuperrmsg').innerHTML='Your account needs to be at least 4 characters long.';return(false);}
if(formobj.password1.value!=formobj.password2.value)
{document.getElementById('signuperrmsg').innerHTML='We ask you to enter your password twice, to make sure you type it correctly. Your two attempts do not match. Please try again.';return(false);}}
return true;}
function informSession(k,v)
{var url='/cgi-perl/dashreceiver.mpl?want=informSession&k='+encodeURIComponent(k)+'&v='+encodeURIComponent(v);pendURL.push(url);}
function echeck(str){var at="@";var dot=".";var lat=str.indexOf(at);var lstr=str.length;var ldot=str.indexOf(dot);if(str.indexOf(at)==-1){return false;}
if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){return false;}
if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){return false;}
if(str.indexOf(at,(lat+1))!=-1){return false;}
if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){return false;}
if(str.indexOf(dot,(lat+2))==-1){return false;}
if(str.indexOf(" ")!=-1){return false;}
return true;}
function checkValidOfferBroker()
{if(echeck($('current_broker_email').value))
{if($('current_broker_size').value)
{document.forms['brokeroptions'].submit();}
else
{$('error').innerHTML='Please enter your broker account size.';}}
else
{$('error').innerHTML='Please enter a valid email address.';}
return false;}
function q_confirm(type,title,text,width,win_id,on_confirm)
{win_id=win_id||q_util_win_count++;var args=new Object;args['style']=type;args['width']=width;args['position']='absolute';if(on_confirm)
{args['onConfirm']=function(){eval(on_confirm)};}
qUtilWin[win_id]=new Q.Confirm(title,text,args);}
function q_prompt(type,title,text,width,win_id,on_confirm)
{win_id=win_id||q_util_win_count++;var args=new Object;args['style']=type;args['width']=width;args['position']='absolute';if(on_confirm)
{args['onConfirm']=function(value){eval(on_confirm)};}
qUtilWin[win_id]=new Q.Prompt(title,text,args);}
function q_window(type,near_div,title,text,width,source,win_id,hide,offsetTop,offsetLeft)
{var scrollOffset;width=width||350;if(navigator.appName=="Microsoft Internet Explorer")
{scrollOffset=document.documentElement.scrollTop;}
else
{scrollOffset=window.pageYOffset;}
win_id=win_id||q_util_win_count++;var args=new Object;args['style']=type;if(near_div)
{var elementPos=$(near_div).cumulativeOffset();if(offsetTop==undefined)
{offsetTop=60;}
if(offsetLeft==undefined)
{offsetLeft=-250;}
args['top']=elementPos[1]+offsetTop;args['left']=elementPos[0]+offsetLeft;}
else
{var assumedHeight=540;var topToUse=Math.round($j(window).height()/2)-(assumedHeight/2);if(topToUse<10)
{topToUse=10;}
args['top']=topToUse;args['left']=Math.round(($j(window).width()/2)-(width/2));}
args['position']='absolute';args['width']=width;args['title']=title;if(text){args['text']=text;}
if(source){args['source']=source;}
if(hide){args['hide']=hide;}
qUtilWin[win_id]=new Q.Window(args);}
function handleDigestSub(boardid,threadid,messageid)
{var url='/cgi-perl/board.mpl?want=handleDigest&boardid='+boardid+'&threadid='+threadid+'&msgid='+messageid;pendURL.push(url);}
function showTSDesc(sid)
{$('tradestatusPop'+sid).style.display='block';$('imgTradeStatus'+sid).onclick=function(){hideTSDesc(sid);};}
function hideTSDesc(sid)
{$('tradestatusPop'+sid).style.display='none';$('imgTradeStatus'+sid).onclick=function(){showTSDesc(sid);};}
function startChangePersonAvatar(current_img,is_uploaded)
{var randomnumber=Math.floor(Math.random()*1000000000);var content="Here is your current Profile image:<br/><br/><img style='margin-left:100px;border:1px solid #000;' src='"+current_img+"'/><br/>"
if(is_uploaded)
{content+="<br/>&nbsp;&nbsp;&nbsp;<a onclick=\"qUtilWin['changePersonAvatar'].hide()\" href='"+CGIAPP+"?rm=rotateAvatar'>Rotate icon clockwise</a>";content+="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a onclick=\"qUtilWin['changePersonAvatar'].hide()\" href='"+CGIAPP+"?rm=useDefaultAvatar'>Revert to default icon</a><br/>";}
content+="<br/>You may upload an image (in JPG, GIF, or PNG format) to replace your current Profile image. Your image will be scaled to 100x100px.";content+="<br/><br/>Upload New:<br/><form method='POST' enctype='multipart/form-data' id='imgUploadForm"+randomnumber+"'><input type='hidden' name='rm' value='uploadAvatarImg'><input type='file' name='avatarUpload"+randomnumber+"' id='avatarUpload"+randomnumber+"'></form>";qUtilWin['changePersonAvatar']=new Q.Confirm("Change Profile Image",content,{onConfirm:function(){if($('avatarUpload'+randomnumber).value)
{$('imgUploadForm'+randomnumber).submit();}
else
{startChangePersonAvatar(current_img);}},style:'plain',width:'380'});}
function popupSystemInfo(anchordiv,systemid,context)
{var el=document.getElementById(anchordiv);var posx=findPosX(el);var posy=findPosY(el);var waitdiv=document.getElementById('waitdiv');if(!waitdiv)
{waitdiv=document.createElement('div');waitdiv.setAttribute('id','waitdiv');document.body.appendChild(waitdiv);}
waitdiv.innerHTML='<p>Loading system information...</p><br/><p align="center"><img src="/images/loading.gif" alt="Wait"></p><br/>';if((!isNaN(posx))&&(!isNaN(posy)))
{posx=posx+54;posy=posy+41;waitdiv.style.position="absolute";waitdiv.style.top=posy+'px';waitdiv.style.left=posx+'px';}
waitdiv.style.display='block';pendURL.push('/cgi-perl/c2systems.mpl?want=popupSystemInfo&systemid='+systemid+'&anchordiv='+encodeURIComponent(anchordiv)+'&context='+encodeURIComponent(context));}
function buildCommPlanMenu(systemid)
{pendURL.push('/cgi-perl/c2systems.mpl?want=buildCommPlanMenu&systemid='+systemid);}
function initAndDisplayTopNotifyBar(whichTemplate,systemid)
{var url='/cgi-perl/utility/ajax_util.mpl?rm=initAndDisplayTopNotifyBar&systemid='+systemid+'&whichTemplate='+encodeURIComponent(whichTemplate);pendURL.push(url);}
function forceATDemoSetup(systemid,anchorDiv,whichBroker)
{var url='/cgi-perl/utility/ajax_util.mpl?rm=autotradeDemoInvite&systemid='+systemid+'&anchorDiv='+encodeURIComponent(anchorDiv)+'&whichBroker='+encodeURIComponent(whichBroker);pendURL.push(url);}
function forceATDemoSetupWClass(systemid,anchorDiv,whichBroker,whatClass,xoffset,yoffset,switchnum)
{var url='/cgi-perl/utility/ajax_util.mpl?rm=autotradeDemoInvite&systemid='+systemid+'&anchorDiv='+encodeURIComponent(anchorDiv)+'&whichBroker='+encodeURIComponent(whichBroker)+'&class='+encodeURIComponent(whatClass)+'&xoffset='+xoffset+'&yoffset='+yoffset+'&switchnum='+switchnum;pendURL.push(url);}
function handleNotifyBarKeyUp(myfield,e,ajaxURLFormSubmit)
{var keycode;if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;else return true;if(keycode==13)
{pendURL.push(ajaxURLFormSubmit);return false;}
else
return true;}
function popupProfile(anchordiv,pid)
{var url="/cgi-perl/user/profile.mpl?p_id="+pid+"&shortProfile=1&popupNear="+anchordiv;pendURL.push(url);}
function onchangeRegisterReferral(dropdown)
{var i=dropdown.selectedIndex;if((i==4)||(i==5)||(i==6)||(i==9)||(i==10))
{document.getElementById('regMoreInfo').style.display="block";}
else
{document.getElementById('regMoreInfo').style.display="none";}}
function demonstrateTopMenu(event,topMenuItem,subMenuItem,doClick)
{var topMenuEl=$('menuMain');var menuLIs=topMenuEl.getElementsByTagName('li');var returnThisEl;var subMenu;var simulateClickOnThisEl;var linkToClick;for(var e=0;e<menuLIs.length;e++)
{if(menuLIs[e].innerHTML.indexOf("<span><span><span>"+topMenuItem+"</span></span></span>")!=-1)
{returnThisEl=menuLIs[e];simulateClickOnThisEl=returnThisEl;break;}}
var subMenu=getElementsOfClass('level',returnThisEl.childNodes)[0];if(subMenu)
{simulateCursor(event,returnThisEl);var waitThisLongForDropDown_ms=1000;setTimeout(function()
{$(subMenu).style.display='block';returnThisEl.getElementsByTagName('a')[0].className='simHover';linkToClick=returnThisEl.getElementsByTagName('a')[0].href;if(subMenuItem)
{var subMenuLIs=subMenu.getElementsByTagName('li');var returnThisSubMenuEl;for(var e=0;e<subMenuLIs.length;e++)
{if(subMenuLIs[e].innerHTML.indexOf(subMenuItem)!=-1)
{returnThisSubMenuEl=subMenuLIs[e];linkToClick=returnThisSubMenuEl.getElementsByTagName('a')[0].href;simulateClickOnThisEl=returnThisSubMenuEl;break;}}
setTimeout(function()
{simulateCursor(event,returnThisSubMenuEl);setTimeout(function(){returnThisSubMenuEl.className='simHover';},1000);},waitThisLongForDropDown_ms+700);}},waitThisLongForDropDown_ms);}
else
{simulateCursor(event,returnThisEl);linkToClick=returnThisEl.getElementsByTagName('a')[0].href;setTimeout(function(){returnThisEl.getElementsByTagName('a')[0].className='simHover';},1000);}
if(doClick)
{setTimeout(function(){new Effect.Highlight(simulateClickOnThisEl);},waitThisLongForDropDown_ms+4000);setTimeout(function(){new Effect.Highlight(simulateClickOnThisEl);},waitThisLongForDropDown_ms+4900);setTimeout(function(){if(linkToClick.indexOf('?')==-1)
{linkToClick=linkToClick+'?';}
else
{linkToClick=linkToClick+'&';}
linkToClick=linkToClick+'fromGuidedTourID='+encodeURIComponent(window.location.pathname)+'&RR='+Math.random();window.location=linkToClick;},waitThisLongForDropDown_ms+5250);}}
function getElementsOfClass(className,elementArray)
{var hasClassName=new RegExp("(?:^|\\s)"+className+"(?:$|\\s)");var results=[];var element;for(var i=0;(element=elementArray[i])!=null;i++){var elementClass=element.className;if(elementClass&&elementClass.indexOf(className)!=-1&&hasClassName.test(elementClass))
results.push(element);}
return results;}
function replaceText(p1,p2)
{new Effect.Fade($(p1));setTimeout(function(){new Effect.Appear($(p2));setTimeout(function(){intermittentglowDiv($(p2),7)},2000);},1000);}
function animateEl1ToEl2(e1,e2,offsetx,offsety)
{var toX=findPosX($(e2))+offsetx;var toY=findPosY($(e2))+offsety;var fromX=findPosX($(e1));var fromY=findPosY($(e1));var relX=toX-fromX;var relY=toY-fromY;new Effect.Move(e1,{x:relX,y:relY,mode:'relative'});}
function simulateCursor(event,toElement)
{var fakeCursor=document.getElementById('fakeCursorDiv');if(!fakeCursor)
{fakeCursor=document.createElement('div');fakeCursor=document.createElement('div');fakeCursor.setAttribute('id','fakeCursorDiv');fakeCursor.setAttribute('class','fakeCursor');document.body.appendChild(fakeCursor);moveEl1ToAbsolute('fakeCursorDiv',event.pageY,event.pageX);}
$('fakeCursorDiv').style.display='block';var toX=findPosX(toElement);var widthElement=$j(toElement).width();toX=toX+widthElement-35;var toY=findPosY(toElement);new Effect.Move('fakeCursorDiv',{x:toX,y:toY,mode:'absolute'});}
function flashNotifyBar(howManyTimes)
{intermittentglowDiv('general_notify_bar',howManyTimes);}
function checkChanged(el)
{var whichBox=el.id;var newState=0;if(el.checked==true)
{newState=1;}
var url='/cgi-perl/utility/ajax_util.mpl?rm=atShareInfo&whichBox='+whichBox+'&newState='+newState;pendURL.push(url);}
function pmt()
{doTooltip(event,'Send a private message to this member.');}
function ci()
{doTooltip(event,'User is online. Invite to chat.');}
function dashboardPreloader(){if(document.getElementById){document.getElementById("preload-01").style.background="url(/images/arrow_green_left.png) no-repeat -9999px -9999px";document.getElementById("preload-02").style.background="url(/images/arrow_green_right.png) no-repeat -9999px -9999px";}}
function featureRotate(way)
{new Effect.Opacity('outerFeatureWrapper',{duration:.7,from:1,to:.2});if(way!=1)
{way=-1;}
var url='/cgi-perl/utility/ajax_util.mpl?rm=requestNewFeature&way='+way;pendURL.push(url);}
function programAnimation1(recommendedSysID)
{animateEl1ToEl2('atRec','markChart',0,-200);setTimeout(function(){new Effect.Opacity('chartcontainer',{duration:.7,from:1,to:.2});setTimeout('addChartData('+recommendedSysID+');setTimeout(function(){replaceText(\'part1\',\'part2\')},1000);',1000);},1000);}
function handleDeclineATRec(system1,system2,restoreChart)
{setSessionVal('111','declinePortRec',system1);if(restoreChart)
{pendURL.push('/cgi-perl/system/utils.mpl?rm=storeChartComp&main='+system1+'&val=');var combined;var s2series;var commissSeries;if(combined=eqChart.get('combined'))
{combined.remove();}
if(s2series=eqChart.get('comp_'+system2))
{s2series.remove();delete compSys[system2];}
if(commissSeries=eqChart.get('system_comm'))
{commissSeries.show();}
eqChart.redraw();}
Effect.DropOut('atRec');}
function recallATRec(systemid)
{if(monteIndex.length)
{for(var i=0;i<monteIndex.length;i++)
{var series=eqChart.get(monteIndex[i])
if(series)
{series.remove(false);}}}
if(maseries=eqChart.get('movingAvg'))
{maseries.remove();}
var series=eqChart.series;for(var i=0;i<series.length;i++)
{var ser_id=series[i].id;if(ser_id)
{if(ser_id.match(/^comp_/))
{eqChart.get(ser_id).remove();var spID=ser_id.split('_');delete compSys[spID[1]];}}}
eqChart.redraw();pendURL.push('/cgi-perl/system/utils.mpl?rm=storeChartComp&main='+systemid+'&val=');pendURL.push('/cgi-perl/c2systems.mpl?want=forceATRec&systemid='+systemid);}
function togglevis(e)
{if(e.style.display==='none')
{Effect.Appear(e);}
else
{Effect.Fade(e);}}
