
function TierLogoHtml(includeAnchor,newPage)
{this.includeAnchor=includeAnchor;this.newPage=newPage;this.logoCaveatEmptor=new Image();this.logoCaveatEmptor.src=this.LOGO_IMAGES_PATH+'caveat_emptor.gif';}
TierLogoHtml.prototype.URL_GUIDE='/pink/otcguide/investors_market_tiers.jsp';TierLogoHtml.prototype.LOGO_IMAGES_PATH='/content/doc/ps/tier/logo/';TierLogoHtml.prototype.generate=function(value)
{var output=undefined;var src=undefined;var title=undefined;if(value.isCaveatEmptor)
{src=this.logoCaveatEmptor.src;title=CAPTION_CAVEAT_EMPTOR;}
else if(value.tierId&&(0<value.tierId))
{src=this.LOGO_IMAGES_PATH+value.tierId+'.gif';title=value.tierName;}
if(undefined==src)
return output;if(this.includeAnchor)
{output=document.createElement('a');output.href=this.URL_GUIDE;if(this.newPage)
output.target='_blank';}
else
{output=document.createElement('span');output.className='widgetPackage';}
var img=document.createElement('img');img.src=src;img.title=title;img.alt=title;img.border=0;output.appendChild(img);return output;}

function CompanyProfileHtml(){}
CompanyProfileHtml.prototype.doesDataExists=function(data)
{return((data!=undefined)&&(data!=null)&&(data!='')&&(trim(data)!=''));}
CompanyProfileHtml.prototype.MAX_LEN_DESCRIPTION=750;CompanyProfileHtml.prototype.formatNameAndAddress=function(value)
{var name=value.name;var output=document.createElement('span');output.className='address';if(this.doesDataExists(name))
this.appendTextNodeX(output,name);if(!this.appendAddress(output,value))
return undefined;return output;}
CompanyProfileHtml.prototype.appendAddress=function(output,value)
{var add1=value.address1;var add2=value.address2;var add3=value.address3;var city=value.city;var state=value.state;var zip=value.zip;var country=value.country;var countryId=value.countryId;var hasState=this.doesDataExists(state);var hasZip=this.doesDataExists(zip);if(add1==undefined&&add2==undefined&&add3==undefined&&city==undefined&&state==undefined&&zip==undefined&&country==undefined)
return false;if(this.doesDataExists(add1))
this.appendTextNodeX(output,add1);if(this.doesDataExists(add2))
this.appendTextNodeX(output,add2);if(this.doesDataExists(add3))
this.appendTextNodeX(output,add3);if(this.doesDataExists(city))
{output.appendChild(document.createTextNode(city));if(hasState)
output.appendChild(document.createTextNode(', '));else if(hasZip)
output.appendChild(document.createTextNode(' '));else
output.appendChild(document.createElement('br'));}
if(hasState)
output.appendChild(document.createTextNode(state+' '));if(hasZip)
output.appendChild(document.createTextNode(zip));if(hasState||hasZip)
output.appendChild(document.createElement('br'));if(this.doesDataExists(country)&&countryId!=COUNTRY_DEFAULT)
this.appendTextNodeX(output,country);return true;}
CompanyProfileHtml.prototype.appendTextNodeX=function(output,value)
{output.appendChild(document.createTextNode(value));output.appendChild(document.createElement('br'));}
CompanyProfileHtml.prototype.createListItem=function(value)
{var output=document.createElement('li');output.appendChild(document.createTextNode(value));return output;}
CompanyProfileHtml.prototype.createListItemX=function(header,value,elemX)
{var output=document.createElement('li');var elem=document.createElement('h4');elem.innerHTML=header;output.appendChild(elem);if(undefined==elemX)
{elem=output.mySpan=document.createElement('span');if(undefined!=value)
elem.appendChild(document.createTextNode(value));}
else
elem=elemX;output.appendChild(elem);return output;}
CompanyProfileHtml.prototype.generate=function(value,callback)
{var security=value.securities[0];var elem,output=document.createElement('div');output.className='companyInfoContent';var table,tr,td,rows=0;var hasDad=(value.dad!=undefined&&value.dad!=null&&this.doesDataExists(value.dad.name));var hasPal=(value.pal!=undefined&&value.pal!=null&&this.doesDataExists(value.pal.name));if(security.isOtcQX&&(hasDad||hasPal))
{var caption=hasDad?CAPTION_DAD:CAPTION_PAL;var item=hasDad?value.dad.name:value.pal.name;table=document.createElement('table');table.className='companyInfoTierDadPalTable';tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode(caption));td=tr.insertCell(1);td.className='value';td.appendChild(document.createTextNode(item));output.appendChild(table);output.appendChild(document.createElement('br'));}
if(value.unableToContact&&!security.isOtcQX)
{output.appendChild(elem=value.criteria.noInfoBody=document.createElement('span'));elem.className='errorMessage';}
else
{rows=0;table=document.createElement('table');table.className='companyInfoContactDescTable';tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode(CAPTION_CONTACT_INFO));td=tr.insertCell(1);td.className='caption';td.appendChild(document.createTextNode(CAPTION_BUSINESS_DESC));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='value contactInfoSection';if(undefined!=(elem=this.formatNameAndAddress(value)))
td.appendChild(elem);if(this.doesDataExists(value.website))
{elem=document.createElement('p');var a=document.createElement('a');a.href=value.website;a.target='_blank';a.appendChild(document.createTextNode(value.website));elem.appendChild(a);td.appendChild(elem);}
elem=document.createElement('ul');elem.className='contactInfo';if(this.doesDataExists(value.phone))
elem.appendChild(this.createListItem(CAPTION_PHONE+': '+value.phone));if(this.doesDataExists(value.fax))
elem.appendChild(this.createListItem(CAPTION_FAX+': '+value.fax));if(this.doesDataExists(value.email))
elem.appendChild(this.createListItem(CAPTION_EMAIL+': '+value.email));td.appendChild(elem);td=tr.insertCell(1);td.className='value';this.appendDescription(td,value.businessDesc);output.appendChild(table);}
output.appendChild(document.createElement('br'));rows=0;table=document.createElement('table');table.className='companyInfoCoDetailsTable';tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='companyInfoLeft';var hasBizIndicator=this.doesDataExists(value.businessIndicator);elem=document.createElement('ul');elem.className='companyInfoDetails';if(security.tierId!=0&&this.doesDataExists(security.tier))
elem.appendChild(this.createListItemX(TITLE_OTC_MARKET_TIER,security.tier));if(this.doesDataExists(value.primarySicCode))
elem.appendChild(this.createListItemX(CAPTION_PRIMARY_SIC+' &mdash; '+CAPTION_INDUSTRY_CLASSIFICATION,value.primarySicCode));if(hasBizIndicator||value.isShell)
{var stage=document.createElement('span');if(hasBizIndicator)
{stage.appendChild(document.createTextNode(value.businessIndicator));if(value.isShell)
stage.appendChild(document.createElement('br'));}
if(value.isShell)
stage.appendChild(document.createTextNode('Shell Company'));elem.appendChild(this.createListItemX(CAPTION_BUSINESS_STAGE,undefined,stage));}
else
this.appendNoItem(elem,CAPTION_BUSINESS_STAGE);td.appendChild(elem);elem=document.createElement('ul');elem.className='companyInfoDetails';if(this.doesDataExists(value.stateOfIncorporation))
elem.appendChild(this.createListItemX(CAPTION_STATE_OF_INCORPORATION,value.stateOfIncorporation));else
this.appendNoItem(elem,CAPTION_STATE_OF_INCORPORATION);if(this.doesDataExists(value.countryOfIncorporationName))
elem.appendChild(this.createListItemX(CAPTION_JURISDICTION_OF_INCORPORATION,value.countryOfIncorporationName));else if(this.doesDataExists(value.countryOfIncorporation))
elem.appendChild(this.createListItemX(CAPTION_JURISDICTION_OF_INCORPORATION,value.countryOfIncorporation));else
this.appendNoItem(elem,CAPTION_JURISDICTION_OF_INCORPORATION);if(this.doesDataExists(value.yearOfIncorporation))
elem.appendChild(this.createListItemX(CAPTION_YEAR_OF_INCORPORATION,value.yearOfIncorporation));else
this.appendNoItem(elem,CAPTION_YEAR_OF_INCORPORATION);td.appendChild(elem);if(security.isOtc)
this.appendOfficers(td,value);else
td.lastAppendage=document.createElement('ul');if(undefined!=value.numberOfEmployees)
{var data=value.numberOfEmployees;if(this.doesDataExists(value.numberOfEmployeesAsOf))
data+=' as of '+value.numberOfEmployeesAsOf;td.lastAppendage.appendChild(this.createListItemX(CAPTION_NUMBER_OF_EMPLOYEES,data));}
else
this.appendNoItem(td.lastAppendage,CAPTION_NUMBER_OF_EMPLOYEES);elem=document.createElement('ul');elem.className='companyInfoDetails';if(this.doesDataExists(value.edgarFilingStatus))
{var item=elem.appendChild(this.createListItemX(CAPTION_EDGAR_FILING_STATUS,value.edgarFilingStatus));if(value.deregistered)
item.appendChild(document.createTextNode(' as of '+value.deregistrationDate));}
if(this.doesDataExists(value.cik))
elem.appendChild(this.createListItemX(CAPTION_CIK,value.cik));else
this.appendNoItem(elem,CAPTION_CIK);if(value.isBankThrift||value.isNonBankRegulated)
{var data;if(value.isBankThrift)
data='Bank/Thrift';else
data='Non-Bank Regulated Company';if(undefined!=value.regulatoryAgencyId)
data+=': '+value.regulatoryAgencyId;elem.appendChild(this.createListItemX('Bank/Thrift/Other Regulated Company',data));}
if(this.doesDataExists(value.fiscalYearEnd))
elem.appendChild(this.createListItemX(CAPTION_FISCAL_YEAR_END,value.fiscalYearEnd));else
this.appendNoItem(elem,CAPTION_FISCAL_YEAR_END);if(this.doesDataExists(security.feName))
{var item=this.createListItemX(CAPTION_NON_US_EXCHANGE_LISTING);var data='';if(this.doesDataExists(security.feSymbol))
data+='('+security.feSymbol+') ';data+=security.feName;if(this.doesDataExists(security.feTier)&&security.feTier!='No Tier')
data+=' - '+security.feTier;if(security.feIsQualified)
data+='<br /> <a href="http://www.otcqx.com/otcqx/iQualifiedForeignExchange" >'+CAPTION_QUALIFIED_EXCHANGE+' </a>';item.mySpan.innerHTML=data;elem.appendChild(item);}
td.appendChild(elem);elem=document.createElement('ul');elem.className='companyInfoDetails';elem.style.background='none';if(this.doesDataExists(value.estimatedMarketCap))
{var data='$'+value.estimatedMarketCap;if(this.doesDataExists(value.estimatedMarketCapAsOfDate))
data+=' as of '+value.estimatedMarketCapAsOfDate;elem.appendChild(this.createListItemX(CAPTION_ESTIMATED_MARKET_CAP,data));}
else
this.appendNoItem(elem,CAPTION_ESTIMATED_MARKET_CAP);if(this.doesDataExists(security.outstandingShares))
{var data=security.outstandingShares;if(this.doesDataExists(security.outstandingSharesAsOfDate))
data+=' as of '+security.outstandingSharesAsOfDate;elem.appendChild(this.createListItemX(CAPTION_OUTSTANDING_SHARES,data));}
else
this.appendNoItem(elem,CAPTION_OUTSTANDING_SHARES);if(security.authorizedSharesUnlimited)
{elem.appendChild(this.createListItemX(CAPTION_AUTHORIZED_SHARES,CAPTION_UNLIMITED));}
else if(this.doesDataExists(security.authorizedShares))
{var data=security.authorizedShares;if(this.doesDataExists(security.authorizedSharesAsOfDate))
data+=' as of '+security.authorizedSharesAsOfDate;elem.appendChild(this.createListItemX(CAPTION_AUTHORIZED_SHARES,data));}
else
this.appendNoItem(elem,CAPTION_AUTHORIZED_SHARES);if(this.doesDataExists(security.publicFloat))
{var data=security.publicFloat;if(this.doesDataExists(security.publicFloatAsOfDate))
data+=' as of '+security.publicFloatAsOfDate;elem.appendChild(this.createListItemX(CAPTION_FLOAT,data));}
else
this.appendNoItem(elem,CAPTION_FLOAT);if(this.doesDataExists(security.numberOfShareHolders))
{var data=security.numberOfShareHolders;if(this.doesDataExists(security.numberOfShareHoldersAsOfDate))
data+=' as of '+security.numberOfShareHoldersAsOfDate;elem.appendChild(this.createListItemX(CAPTION_NUMBER_OF_SHARE_HOLDERS,data));}
else
this.appendNoItem(elem,CAPTION_NUMBER_OF_SHARE_HOLDERS);if(this.doesDataExists(security.numOfBeneficialShareholders))
{var data=security.numOfBeneficialShareholders;if(this.doesDataExists(security.numOfBeneficialShareholdersAsOfDate))
data+=' as of '+security.numOfBeneficialShareholdersAsOfDate;elem.appendChild(this.createListItemX(CAPTION_NUMBER_OF_BENEFICIAL_SHARE_HOLDERS,data));}
else
this.appendNoItem(elem,CAPTION_NUMBER_OF_BENEFICIAL_SHARE_HOLDERS);td.appendChild(elem);td=tr.insertCell(1);td.className='companyInfoVertLine';elem=document.createElement('ul');elem.className='companyInfoDetails';if(this.doesDataExists(security.currentCapitalChange)||this.doesDataExists(security.currentCapitalChangeExDate)||this.doesDataExists(security.currentCapitalChangeRecordDate)||this.doesDataExists(security.currentCapitalChangePayDate))
{var item=this.createListItemX(CAPTION_CURRENT_CAPITAL_CHANGE);if(this.doesDataExists(security.currentCapitalChange))
{item.mySpan.appendChild(document.createTextNode(security.currentCapitalChange));item.mySpan.appendChild(document.createElement('br'));}
if(this.doesDataExists(security.currentCapitalChangeExDate))
{item.mySpan.appendChild(document.createTextNode(CAPTION_EX_DATE+': '+security.currentCapitalChangeExDate));item.mySpan.appendChild(document.createElement('br'));}
if(this.doesDataExists(security.currentCapitalChangeRecordDate))
{item.mySpan.appendChild(document.createTextNode(CAPTION_RECORD_DATE+': '+security.currentCapitalChangeRecordDate));item.mySpan.appendChild(document.createElement('br'));}
if(this.doesDataExists(security.currentCapitalChangePayDate))
item.mySpan.appendChild(document.createTextNode(CAPTION_PAY_DATE+': '+security.currentCapitalChangePayDate));elem.appendChild(item);}
if(this.doesDataExists(security.dividendNote)||this.doesDataExists(security.dividendExDate)||this.doesDataExists(security.dividendPayDate)||this.doesDataExists(security.dividendRecordDate))
{var item=this.createListItemX(CAPTION_DIVIDENDS);if(this.doesDataExists(security.dividendNote))
{item.mySpan.appendChild(document.createTextNode(security.dividendNote));item.mySpan.appendChild(document.createElement('br'));}
if(this.doesDataExists(security.dividendExDate))
{item.mySpan.appendChild(document.createTextNode(CAPTION_EX_DATE+': '+security.dividendExDate));item.mySpan.appendChild(document.createElement('br'));}
if(this.doesDataExists(security.dividendRecordDate))
{item.mySpan.appendChild(document.createTextNode(CAPTION_RECORD_DATE+': '+security.dividendRecordDate));item.mySpan.appendChild(document.createElement('br'));}
if(this.doesDataExists(security.dividendPayDate))
item.mySpan.appendChild(document.createTextNode(CAPTION_PAY_DATE+': '+security.dividendPayDate));elem.appendChild(item);}
td.appendChild(elem);if(value.companyNotes!=null&&value.companyNotes!=undefined&&value.companyNotes.length>0)
{elem=document.createElement('ul');elem.className='companyInfoDetails';var item=this.createListItemX(CAPTION_COMPANY_NOTES);var elem2=document.createElement('ul');elem2.className='notesList';for(var i=0;i<value.companyNotes.length;i++)
elem2.appendChild(this.createListItem(toDisplayable(value.companyNotes[i].note)));item.mySpan.appendChild(elem2);elem.appendChild(item);td.appendChild(elem);}
if(security.securityNotes!=null&&security.securityNotes!=undefined&&security.securityNotes.length>0)
{elem=document.createElement('ul');elem.className='companyInfoDetails';var item=this.createListItemX(CAPTION_CLASS_NOTES);var elem2=document.createElement('ul');elem2.className='notesList';for(var i=0;i<security.securityNotes.length;i++)
elem2.appendChild(this.createListItem(toDisplayable(security.securityNotes[i].note)));item.mySpan.appendChild(elem2);elem.appendChild(item);td.appendChild(elem);}
if(security.transferAgents!=null&&security.transferAgents!=undefined&&security.transferAgents.length>0)
{elem=document.createElement('ul');elem.className='companyInfoDetails';var item=this.createListItemX(CAPTION_TRANSFER_AGENT);item.className='noIdent';for(var i=0;i<security.transferAgents.length;i++)
{var transferAgent=security.transferAgents[i];var data=this.createServiceProviderData(transferAgent,'CS');if(undefined!=data)
{item.mySpan.appendChild(data);item.mySpan.appendChild(document.createElement('br'));}}
elem.appendChild(item);td.appendChild(elem);}
else
this.appendNoData(td,CAPTION_TRANSFER_AGENT);this.appendServiceProvider(td,CAPTION_AUDITOR+'/'+CAPTION_ACCOUNTANT,value.auditor,'AD');this.appendServiceProvider(td,CAPTION_COMPANY_LEGAL_COUNSEL,value.legalCounsel,'LC');this.appendServiceProvider(td,CAPTION_COMPANY_INVESTOR_RELATION_FIRM,value.investorRelationFirm,'IR');output.appendChild(table);return output;}
CompanyProfileHtml.prototype.appendOfficers=function(output,value)
{var elem=output.lastAppendage=document.createElement('ul');elem.className='companyInfoDetails';if(value.officers!=undefined&&value.officers.length>0)
{var item=this.createListItemX(CAPTION_COMPANY_OFFICERS);for(var i=0;i<value.officers.length;i++)
{var officer=value.officers[i];item.mySpan.appendChild(document.createTextNode(officer.name));item.mySpan.appendChild(document.createTextNode(', '+officer.title));if(this.doesDataExists(officer.title1))
item.mySpan.appendChild(document.createTextNode(', '+officer.title1));if(this.doesDataExists(officer.title2))
item.mySpan.appendChild(document.createTextNode(', '+officer.title2));if(this.doesDataExists(officer.title3))
item.mySpan.appendChild(document.createTextNode(', '+officer.title3));item.mySpan.appendChild(document.createElement('br'));}
elem.appendChild(item);}
output.appendChild(elem);}
CompanyProfileHtml.prototype.appendServiceProvider=function(output,caption,value,typeId)
{if(undefined==value)
{this.appendNoData(output,caption);return;}
var data=this.createServiceProviderData(value,typeId);if(undefined==data)
{this.appendNoData(output,caption);return;}
var elem=output.lastAppendage=document.createElement('ul');elem.className='companyInfoDetails';elem.appendChild(this.createListItemX(caption,undefined,data));output.appendChild(elem);}
CompanyProfileHtml.prototype.createServiceProviderData=function(value,typeId)
{var output=document.createElement('span');output.className='address';if(this.doesDataExists(value.name))
this.appendServiceProviderName(output,value,typeId);if(!this.appendAddress(output,value))
return undefined;return output;}
CompanyProfileHtml.prototype.appendServiceProviderName=function(output,value,typeId)
{this.appendTextNodeX(output,value.name);}
CompanyProfileHtml.prototype.appendDescription=function(output,value)
{if(!this.doesDataExists(value))
return;if(this.MAX_LEN_DESCRIPTION>=value.length)
{output.innerHTML=value;return;}
var elem=document.createElement('div');elem.className='widget';elem.myLongVersion=value;elem.myShortVersion=value.substr(0,this.MAX_LEN_DESCRIPTION)+' ...';elem.innerHTML=elem.myShortVersion;output.appendChild(elem);output.appendChild(document.createElement('br'));var a=document.createElement('a');a.myCallback=this;a.myElement=elem;a.href='javascript:void(null)';a.onclick=this.enlargeDescription;a.appendChild(document.createTextNode('More >>'));output.appendChild(a);}
CompanyProfileHtml.prototype.appendNoItem=function(output,caption){}
CompanyProfileHtml.prototype.appendNoData=function(output,caption){}
CompanyProfileHtml.prototype.enlargeDescription=function(ev)
{this.myElement.innerHTML=this.myElement.myLongVersion;this.onclick=this.myCallback.shrinkDescription;this.innerHTML='<< Less';return false;}
CompanyProfileHtml.prototype.shrinkDescription=function(ev)
{this.myElement.innerHTML=this.myElement.myShortVersion;this.onclick=this.myCallback.enlargeDescription;this.innerHTML='More >>';return false;}

function ShoHistoryWorklistDOM(imagesPath)
{}
ShoHistoryWorklistDOM.prototype=new WorklistDOM();ShoHistoryWorklistDOM.prototype.generate=function(value,callback)
{var records=value.records;if((undefined==records)||(0==records.length))
return document.createTextNode('No data found.');var table=document.createElement('table');table.className='listing';table.cellSpacing=0;var row=table.insertRow(0);row.className='listingHeader';this.createHeaderCell(row,0,'Date',FIELD_POSITION_DATE,FIELD_DESCENDING,value,callback);this.createHeaderCell(row,1,'Reg SHO Threshold Flag');this.createHeaderCell(row,2,'Rule3210 Flag');for(var i=0;i<records.length;i++)
{row=table.insertRow(i+1);row.className=alternateCssParentListingClasses(i);var record=records[i];this.createDetailCell(row,0,Formatter.toSimpleDate(record.positionDate));this.createDetailCell(row,1,toDisplayable(record.isSho));this.createDetailCell(row,2,toDisplayable(record.isRule3210));}
var output=document.createElement('div');output.appendChild(table);var pager=new PagingLinksDOM();output.appendChild(pager.generate(value,callback));return output;}

function ShortInterestWorklistDOM(imagesPath){}
ShortInterestWorklistDOM.prototype=new WorklistDOM();ShortInterestWorklistDOM.prototype.generate=function(value,callback)
{var records=value.records;if((undefined==records)||(0==records.length))
return document.createTextNode('No data found.');var table=document.createElement('table');table.className='listing';table.cellSpacing=0;var row=table.insertRow(0);row.className='listingHeader';this.createHeaderCell(row,0,'Date',FIELD_POSITION_DATE,FIELD_DESCENDING,value,callback);this.createHeaderCell(row,1,'Short Interest').style.textAlign='right';this.createHeaderCell(row,2,'% Change').style.textAlign='right';this.createHeaderCell(row,3,'Avg. Daily Share Volume').style.textAlign='right';this.createHeaderCell(row,4,'Days to Cover').style.textAlign='right';this.createHeaderCell(row,5,'Split').style.textAlign='center';this.createHeaderCell(row,6,'New Issue').style.textAlign='center';for(var i=0;i<records.length;i++)
{row=table.insertRow(i+1);row.className=alternateCssParentListingClasses(i);var record=records[i];this.createDetailCell(row,0,Formatter.toSimpleDate(record.positionDate));this.createDetailCell(row,1,toDisplayable(Formatter.toVolume(record.volume))).style.textAlign='right';this.createDetailCell(row,2,toDisplayable(Formatter.toPercent(record.pctChgVolume))).style.textAlign='right';this.createDetailCell(row,3,toDisplayable(Formatter.toVolume(record.avgDailyVolume))).style.textAlign='right';this.createDetailCell(row,4,toDisplayable(Formatter.toPercent(record.daysToCover))).style.textAlign='right';this.createDetailCell(row,5,toDisplayable(record.isSplit)).style.textAlign='center';this.createDetailCell(row,6,toDisplayable(record.isNewIssue)).style.textAlign='center';}
var output=document.createElement('div');output.appendChild(table);var pager=new PagingLinksDOM();output.appendChild(pager.generate(value,callback));return output;}

function TierLogo(caller,body,viewer,callback)
{this.caller=caller;this.body=body;this.viewer=viewer;this.primaryVenue=undefined;this.callback=callback;}
TierLogo.prototype.doSymbol=function(symbol,body)
{this.run(new TierLogoCriteria(symbol),body);}
TierLogo.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;this.symbol=criteria.symbol;var value=this.caller.getSecurityInfo(criteria.symbol);this.doValue(value,criteria.body);}
TierLogo.prototype.doValue=function(value,body)
{var output=this.viewer.generate(value,this);body.innerHTML='';if(this.callback&&this.callback.handleTierInfoPostLoad)
this.callback.handleTierInfoPostLoad(value,output);if(undefined!=output)
body.appendChild(output);}
function TierLogoCriteria(symbol)
{this.symbol=symbol;}

function CompanyProfileSimple(caller,viewer,body)
{this.caller=caller;this.viewer=viewer;this.body=body;this.contentCaller=new PinkContentCalls();this.criteria=undefined;}
CompanyProfileSimple.prototype.CMS_URI_NO_INFO='/pink/companyProfile/noInfo';CompanyProfileSimple.prototype.setBody=function(newValue){this.body=newValue;}
CompanyProfileSimple.prototype.doSymbol=function(symbol,body)
{var value=this.caller.getSecurityInfo(symbol);if(undefined==value)
return undefined;this.run(new CompanyProfileCriteria(undefined,value.secId),body);}
CompanyProfileSimple.prototype.doSecurity=function(securityId,body)
{this.run(new CompanyProfileCriteria(undefined,securityId),body);}
CompanyProfileSimple.prototype.doCompany=function(companyId,body)
{this.run(new CompanyProfileCriteria(companyId,undefined),body);}
CompanyProfileSimple.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;this.caller.getCompanyProfile(criteria.companyId,criteria.securityId,new AjaxDataHandler(this,criteria));}
CompanyProfileSimple.prototype.doValue=function(value)
{var criteria=value.criteria;criteria.body.innerHTML='';criteria.body.appendChild(this.viewer.generate(value,this));if(undefined!=criteria.noInfoBody)
this.contentCaller.getPageText(undefined,this.CMS_URI_NO_INFO,new PinkContentDataHandler(criteria.noInfoBody));}

function ShoHistoryWorklistSimple(caller,viewer,body,callback,pageSize)
{this.caller=caller;this.viewer=viewer;this.body=body;this.callback=callback;this.pageSize=pageSize;}
ShoHistoryWorklistSimple.prototype=new WorklistSimple();ShoHistoryWorklistSimple.prototype.doPositionDate=function(positionDate,body)
{this.run(new ShortInterestFilter(positionDate,undefined,undefined,undefined,this.pageSize),body);}
ShoHistoryWorklistSimple.prototype.doSecurity=function(securityId,body)
{this.run(new ShortInterestFilter(undefined,securityId,undefined,undefined,this.pageSize),body);}
ShoHistoryWorklistSimple.prototype.doSymbol=function(symbol,body)
{this.run(new ShortInterestFilter(undefined,undefined,symbol,undefined,this.pageSize),body);}
ShoHistoryWorklistSimple.prototype.makeCall=function(criteria,dataHandler)
{this.caller.getShoHistoryWorklist(criteria,dataHandler);}
ShoHistoryWorklistSimple.prototype.gotoQuote=function(ev)
{this.myCallback.callback.gotoQuote(this.myRecord.symbol);return false;}

function ShortInterestWorklistSimple(caller,viewer,body,callback,pageSize)
{this.caller=caller;this.viewer=viewer;this.body=body;this.callback=callback;this.pageSize=pageSize;}
ShortInterestWorklistSimple.prototype=new WorklistSimple();ShortInterestWorklistSimple.prototype.doPositionDate=function(positionDate,body)
{this.run(new ShortInterestFilter(positionDate,undefined,undefined,undefined,this.pageSize),body);}
ShortInterestWorklistSimple.prototype.doSecurity=function(securityId,body)
{this.run(new ShortInterestFilter(undefined,securityId,undefined,undefined,this.pageSize),body);}
ShortInterestWorklistSimple.prototype.doSymbol=function(symbol,body)
{this.run(new ShortInterestFilter(undefined,undefined,symbol,undefined,this.pageSize),body);}
ShortInterestWorklistSimple.prototype.makeCall=function(criteria,dataHandler)
{this.caller.getShortInterestWorklist(criteria,dataHandler);}
ShortInterestWorklistSimple.prototype.gotoQuote=function(ev)
{this.myCallback.callback.gotoQuote(this.myRecord.symbol);return false;}
