
function NewsSnapshotHandler(iqCaller,callback,body,pageSize,appId,isHome){this.callback=callback;this.iqCaller=iqCaller;this.isHome=isHome;pageSize=(undefined==pageSize)?PAGE_SIZE_SUBLISTING:pageSize;var nrViewer=new NewsWorklistDOM(true,false);var frViewer=new NewsWorklistDOM(true,true);this.nrHandler=new ListNewsReleaseSimple(this.iqCaller,nrViewer,pageSize,undefined,appNav,true);this.nrHandler.callback=this;this.nrHandler.isHome=isHome;this.nrHandler.gotoQuote=function(ev){appNav.gotoQuote(this.myRecord.symbol);return false;};this.nrHandler.doNewsDetail=function(ev){appNav.gotoNewsInQuote(this.myRecord.symbol,1);return false;};this.frHandler=new ListFinancialReportSimple(this.iqCaller,frViewer,pageSize,undefined,undefined,undefined,appNav);this.frHandler.isHome=isHome;this.frHandler.callback=this;this.frHandler.gotoQuote=function(ev){appNav.gotoQuote(this.myRecord.symbol);return false;};this.frHandler.doNewsDetail=function(ev){appNav.gotoFilingsInQuote(this.myRecord.symbol,4);return false;};if(!isHome)this.rssElem=document.getElementById('newsRSS');this.decorateRSSLink=window.decorateRSSLink;this.init();}
NewsSnapshotHandler.prototype.init=function(){this.tabberOptions={'ids':undefined,'defaultTab':this.DEFAULT_TAB,'titles':this.TAB_CAPTIONS,'calls':this.TAB_CALLS,'onClick':function(args){try{if(!this.callback.isHome&&id&&(args.index==2)){this.callback.doPinkNewsDetail({'id':id},args.tab.body);}
else{this.callback[this.calls[args.index]](args.tab.body);}}
catch(error){window.alert(error);return false;}
args.tab.isEmpty=false;return true;},'onLoad':function(args){this.onClick(args);}}
this.tabberOptions.callback=this;this.tabber=new Tabbers(this.tabberOptions);}
NewsSnapshotHandler.prototype.TAB_CAPTIONS=['News Releases','Financial Reports','Pink News'];NewsSnapshotHandler.prototype.TAB_CALLS=['doNewsRelease','doFinancialReports','doPinkNews'];NewsSnapshotHandler.prototype.DEFAULT_TAB=0;NewsSnapshotHandler.prototype.run=function(body){this.tabber.run((body==undefined)?this.body:body);}
NewsSnapshotHandler.prototype.doNewsRelease=function(body){if(this.rssElem&&this.rssElem.className!='rssNR'){this.rssElem.className='rssNR';this.rssElem.isDecorated=false;}
this.nrHandler.doQx(body,this.isHome);}
NewsSnapshotHandler.prototype.doFinancialReports=function(body){if(this.rssElem&&this.rssElem.className!='rssNR'){this.rssElem.className='rssNR';this.rssElem.isDecorated=false;}
if(this.isHome)
this.frHandler.doHomePageQx(body);else
this.frHandler.doQx(body);}
NewsSnapshotHandler.prototype.handlePostLoad=function(value,output){this.decorateRSSLink.run(this);}
