
function paintSearchPage(search){var commonCaller=new PinkCommonCalls();var handler=new QuoteLookUpHandler(commonCaller,new QuoteLookUpDOM(),document.getElementById('centerContentOneCol'),this,new AdvancedSecuritySearchWorklistSimple(commonCaller,new AdvancedSecuritySearchWorklistDOM(true),undefined,new Object(),new DecorateTradeInfo(new OtcIQCalls())));handler.viewer.CAPTION='OTCQX Symbol / Company Search';handler.viewer.INTRO='Enter the Symbol or Company name below to search for an OTCQX listed company. You can also view the complete <a href="/otcqx/market/otcqxList"> OTCQX Company List</a>.';handler.run=function(criteria,body)
{if(body==undefined)
body=this.body;else
this.body=body;body.innerHTML='';this.createStructure(body);var elem;body.searchBody.appendChild(elem=this.viewer.generate(undefined,this));if(exists(criteria.searchStr)){var filter={'compSymbol':criteria.searchStr,'sortOn':FIELD_SYMBOL,'sortDir':FIELD_ASCENDING,'onlyOtcQX':true};elem.form.searchstr.value=criteria.searchStr;this.worklistHandler.doFilter(filter,this.body.worklistBody);}};handler.onSubmit=function(form){var searchstr=form.searchstr.value;if((searchstr==undefined)||(trim(searchstr)=='')){alert('Enter a search string.');return;}
var criteria={'compSymbol':searchstr,'sortOn':FIELD_COMPANY_NAME,'sortDir':FIELD_ASCENDING,'onlyOtcQX':true};form.searchstr.focus();this.worklistHandler.doFilter(criteria,this.body.worklistBody);};handler.worklistHandler.callback.gotoQuote=function(symbol,security){appNav.gotoQuote(symbol);}
handler.run({searchStr:search});}