
function MarketMakerHandler(caller){this.caller=caller;var viewer=new RTTradeStatsSnapshotDOM(true);this.anchorList=new FancyAnchorList();this.mmHandler=new TopMarketMakersSimple(caller,viewer,undefined,this,PAGE_SIZE_WORKLIST,'QX');}
MarketMakerHandler.prototype.TOP_TRADE_TITLES=['$ Volume','Share Volume','# Trades'];MarketMakerHandler.prototype.TOP_TRADE_CALLS=['doDollarVolume','doVolume','doTrades'];MarketMakerHandler.prototype.init=function(body)
{value=new Object();value.id='QX';var div,elem=value.marketMakerBody=document.createElement('div');elem.className='bodyContainer';body.innerHTML='';body.appendChild(this.genAnchors(this.TOP_TRADE_TITLES,this.TOP_TRADE_CALLS,elem,this.mmHandler,undefined,value.id));body.appendChild(elem);this.mmHandler.doTrades(value.marketMakerBody,this.PAGE_SIZE_BIG,value.id);}
MarketMakerHandler.prototype.handleAnchorSelect=function(id,caption,criteria)
{this[id](criteria.myWidget,criteria.myBody,criteria.myPageSize,criteria.myTierGroupId);this.lastAction=id;this.lastCriteria=criteria;if(undefined!=criteria.moreAnchor)
criteria.moreAnchor.myCall=id;}
MarketMakerHandler.prototype.genAnchors=function(captions,calls,body,widget,pageSize,tierGroupId,moreAnchor,call)
{if(undefined==call)
call=calls[2];var listItems={ids:calls,values:captions};var criteria=new AnchorListCriteria(listItems,call,this);criteria.myWidget=widget;criteria.myBody=body;criteria.myPageSize=pageSize;criteria.myTierGroupId=tierGroupId;criteria.moreAnchor=moreAnchor;var output=document.createElement('div');output.className='anchorContainer';this.anchorList.run(criteria,output);return output;}
MarketMakerHandler.prototype.doDollarVolume=function(widget,body,pageSize,tierGroupId){widget.doDollarVolume(body,pageSize,tierGroupId);}
MarketMakerHandler.prototype.doVolume=function(widget,body,pageSize,tierGroupId){widget.doVolume(body,pageSize,tierGroupId);}
MarketMakerHandler.prototype.doTrades=function(widget,body,pageSize,tierGroupId){widget.doTrades(body,pageSize,tierGroupId);}