
var CAPTION_ACCOUNT_NO='Account No';var CAPTION_ACTIVATE='Activate';var CAPTION_ANNOUNCEMENT='Announcement';var CAPTION_ANNUAL_HIGH='52 wk. High';var CAPTION_ANNUAL_LOW='52 wk. Low';var CAPTION_ASK_PRICE='Ask Price';var CAPTION_BACK='Back';var CAPTION_BEST_BID='Best Bid';var CAPTION_BEST_ASK='Best Ask';var CAPTION_BETA_COEFFICIENT='Beta Coefficient';var CAPTION_BID_PRICE='Bid Price';var CAPTION_BACK='Back';var CAPTION_CALENDAR='Calendar';var CAPTION_CAN_DISTRIBUTE='Can Redistribute';var CAPTION_CANCEL='Cancel';var CAPTION_CHANGE='Change';var CAPTION_DATE_TIME='Date/Time';var CAPTION_DAILY_HIGH='Daily High';var CAPTION_DAILY_LOW='Daily Low';var CAPTION_DEACTIVATE='Deactivate';var CAPTION_DO_NOT_REDISTRIBUTE='Do not redistribute';var CAPTION_ENTER_SEARCH_TEXT='Enter search text';var CAPTION_EDGAR_FILER='Edgar filer';var CAPTION_SEDAR_FILER='Sedar filer';var CAPTION_SUBTITLE='Subtitle';var CAPTION_ID='Id';var CAPTION_ISSUE_CORRECTION='Correct';var CAPTION_JOURNAL_NAME='Journal Name';var CAPTION_MARKET_MAKER_INFO='Market Maker Information';var CAPTION_NEWS_DATE='News Date';var CAPTION_NEWS_RELEASE_ID='Id';var CAPTION_PERIOD_END_DATE='Period End Date';var CAPTION_PERIOD_DATE='Period End Date';var CAPTION_REFRESH='Refresh All Data';var CAPTION_RELEASE_DATE='Release Date';var CAPTION_SEC_TEMPORARY_SUSPENSION_ANNOUNCEMENT='SEC Temp Suspension';var CAPTION_STATUS='Status';var CAPTION_TRADE_HEADER='Trade Data';var CAPTION_TYPE='Type';var CAPTION_CONTENTS='Contents';var CAPTION_IS_IMMEDIATE='Is Immediate';var CAPTION_FINANCIAL_REPORT_ID='Financial Report Id';var CAPTION_TOTAL_LIABILITIES='Total Liabilities';var CAPTION_SHAREHOLDERS_EQUITY='Shareholders Equity';var CAPTION_TOTAL_REVENUE='Total Revenue';var CAPTION_OPERATING_INCOME='Operating Income';var CAPTION_NET_INCOME='Net Income';var CAPTION_DIVIDENDS_PAID='Dividends Paid';var CAPTION_DIVIDEND='Dividend';var CAPTION_TOTAL_SHARES_OUTSTANDING='Total Shares Outstanding';var CAPTION_EARNINGS_PER_SHARE='Earnings/Share';var CAPTION_NEWS='News Release';var CAPTION_FINANCIAL_REPORT='Financial Report';var CAPTION_ABUSE='Abuse';var CAPTION_ABUSES='Abuses';var CAPTION_ACCOUNT_NO='Account No.';var CAPTION_ACTIVE='Active';var CAPTION_ACTIVE_ASK='Make This Logo Active?';var CAPTION_ADD='Add';var CAPTION_ADMIN_EMAIL_ADDRESS='Admin. E-mail Address';var CAPTION_ADMINISTRATIVE='Administrative';var CAPTION_ADMINISTRATOR='Administrator';var CAPTION_ALL='All';var CAPTION_ANALYZE_LEGACY_DB_INTERVAL='Analyze Legacy DB Interval';var CAPTION_ANALYZE_LEGACY_DB_INTERVAL_UNIT='milliseconds';var CAPTION_ASCENDING='FIFO';var CAPTION_AUTHOR='Author';var CAPTION_BIRTH_DATE='Birth Date';var CAPTION_BY='by';var CAPTION_CANCEL='Cancel';var CAPTION_CHANGE='Change';var CAPTION_CITY='City';var CAPTION_COLLAPSE='Collapse';var CAPTION_COMMENTS='Comments';var CAPTION_COMPANY='Company';var CAPTION_COMPANY_ID='Comp Id';var CAPTION_COMPANY_NAME='Company Name';var CAPTION_COMPANIES='Companies';var CAPTION_COUNTRY='Country';var CAPTION_CREATE='Create';var CAPTION_CREATED_DATE='Created On';var CAPTION_CREATED='Created';var CAPTION_CREATOR='Creator';var CAPTION_CREDIT_CARD_EXP_DATE='Credit Card Exp. Date';var CAPTION_DEACTIVATION_DATE='Deactivated On';var CAPTION_DEACTIVATOR='Deactivator';var CAPTION_DEAR='Dear';var CAPTION_DEFAULT_EMAIL_POST_REPLY='By Default E-mail Post Replies';var CAPTION_DELETE='Delete';var CAPTION_DESCENDING='LIFO';var CAPTION_DOLLAR_UNIT='$';var CAPTION_DONT_KNOW='Don\'t Know';var CAPTION_EDIT='Edit';var CAPTION_EDUCATION_LEVEL='Education';var CAPTION_EMAIL_ADDRESS='E-mail Address';var CAPTION_EMPTY='Empty';var CAPTION_END_DATE='End Date';var CAPTION_EXPAND='Expand';var CAPTION_EXPAND_COLLAPSE='Expand/Collapse';var CAPTION_EXPANDED='Expanded';var CAPTION_FAX_NUMBER='Fax Number';var CAPTION_FILE_NAME='File Name';var CAPTION_FIND='Find';var CAPTION_FIRST_NAME='First Name';var CAPTION_FOLLOW_UP='Follow Up';var CAPTION_FORUM='Forum';var CAPTION_FORUMS='Forums';var CAPTION_GENDER='Gender';var CAPTION_GLOBAL_INFO='Global Settings';var CAPTION_ID='ID';var CAPTION_INACTIVE='Inactive';var CAPTION_INCOME_LEVEL='Income Level';var CAPTION_INDUSTRY='Industry';var CAPTION_INFORMATION='Information';var CAPTION_IP_ADDRESS='IP Address';var CAPTION_IS_ACTIVE='Is Active?';var CAPTION_ISSUER_NEWS_RELEASES='Issuer News Releases';var CAPTION_ISSUER_FINANCIAL_REPORTS='Issuer Financial Reports';var CAPTION_JOB_TITLE='Job Title';var CAPTION_LATEST_NEWS_HEADER='Latest News';var CAPTION_LAST_MODIFIED_DATE='Last Modified On';var CAPTION_LAST_MODIFIER='Last Modifier';var CAPTION_LAST_NAME='Last Name';var CAPTION_LAST_SALE='Last Sale';var CAPTION_LAST_TRADE_DATE_TIME='Last Trade';var CAPTION_LOCATION='Location';var CAPTION_LOGIN='Login';var CAPTION_LOGIN_NAME='E-mail Address';var CAPTION_LOGO='Logo';var CAPTION_LOGOUT='Logout';var CAPTION_MARITAL_STATUS='Marital Status';var CAPTION_ME='Me';var CAPTION_MEMBER_SINCE='Member Since';var CAPTION_MIDDLE_NAME='Middle Name';var CAPTION_MMID='MMID';var CAPTION_MONTAGE_HEADER='Real-Time Level 2 Montage';var CAPTION_INSIDE_HEADER='Inside Quote';var CAPTION_NAME='Name';var CAPTION_NAME_SUFFIX='Name Suffix';var CAPTION_NAME_TITLE='Title';var CAPTION_NONE='None';var CAPTION_NUMBER_OF_SECURITIES='Number of Different Stocks Invested';var CAPTION_OCCUPATION='Occupation';var CAPTION_OPENING_PRICE='Opening Price';var CAPTION_ONLY='Only';var CAPTION_ORDER_BY='Order By';var CAPTION_OTC='OTC';var CAPTION_PASSWORD='Password';var CAPTION_PASSWORD_CONFIRM='Password Confirmation';var CAPTION_PASSWORD_NEW='New Password';var CAPTION_PE_RATIO='P/E Ratio';var CAPTION_PERCENT_CHANGE='% Change';var CAPTION_PHONE_NUMBER='Phone Number';var CAPTION_PIGGYBACK_QUALIFIED='PiggyBack&nbsp;Qualified';var CAPTION_PINK_COMMON_BASE_URL='Pink Common Base URL';var CAPTION_PINK_FORUMS_BASE_URL='Pink Forums Base URL';var CAPTION_PINK_NEWS_RELEASE='Pink Sheets News Releases';var CAPTION_PINK_COVERAGE_IN_NEWS='Pink Sheets Coverage In News';var CAPTION_PINK_SHEETS_BASE_URL='Pink Sheets Base URL';var CAPTION_PORTFOLIO='Portfolio';var CAPTION_PREVIEW='Preview';var CAPTION_PREVIOUS_CLOSE='Prev Close';var CAPTION_PRIVATE='Private';var CAPTION_PROFILE='Profile';var CAPTION_PRIMARY_VENUE='Primary Venue';var CAPTION_PUBLIC='Public';var CAPTION_QUOTE_STATUS='Quote Status';var CAPTION_READ_LESS='<< Less';var CAPTION_READ_MORE='More >>';var CAPTION_RECEIVED='Received';var CAPTION_REGISTER='Register';var CAPTION_REGISTRATION_CONFIRM_CODE='Registration Confirmation Code';var CAPTION_REGISTRATION_CONFIRM_IMAGE='Registration Confirmation Image';var CAPTION_REGISTRATION_CONSENT='Registration Consent';var CAPTION_REINSTATE='Reinstate';var CAPTION_REPORTED_BY='Reported By';var CAPTION_REPORTED_ON='Reported On';var CAPTION_RESPONDED_BY='Responded By';var CAPTION_RESPONDED_ON='Responded On';var CAPTION_RESPOND='Respond';var CAPTION_RESPONSE='Response';var CAPTION_ROLE='Role';var CAPTION_ROLES='Roles';var CAPTION_ROLE_COMPANY='Role/Company';var CAPTION_ROLES_COMPANIES='Roles/Companies';var CAPTION_SCREEN_NAME='Screen Name';var CAPTION_SEARCH='Search';var CAPTION_SEARCH_TYPE='Search Type';var CAPTION_SECURITY='Security';var CAPTION_SECURITIES='Securities';var CAPTION_SEND_NOTIFICATION_='Send Notification?';var CAPTION_SENTIMENT='Sentiment';var CAPTION_SENTIMENT_NONE='Do Not Disclose';var CAPTION_SIZE_OF_PORTFOLIO='Size of Portfolio';var CAPTION_SIZE_OF_PORTFOLIO_UNIT='$';var CAPTION_SHARES='Shares';var CAPTION_START_DATE='Start Date';var CAPTION_STATE='State';var CAPTION_STATE_EXT='State/Province/Region';var CAPTION_STOCK='Stock';var CAPTION_SUBMIT='Submit';var CAPTION_SUBTITLE='Subtitle';var CAPTION_SUMMARY='Summary';var CAPTION_SUPPORT='Support';var CAPTION_SUPPORT_EMAIL_ADDRESS='Support E-mail Address';var CAPTION_SYMBOL='Symbol';var CAPTION_THANK_YOU='Thank You';var CAPTION_TICK='Tick';var CAPTION_TIER='Tier';var CAPTION_TIME_LAST_INSIDE_CHANGE='Time of Last Inside Change';var CAPTION_TITLE='Title';var CAPTION_TODAY='Today';var CAPTION_TRADER_ID='Trader Id';var CAPTION_TRADING_FREQUENCY='Trading Frequency';var CAPTION_TRADING_LEVEL='Trading Level';var CAPTION_UNPRICED='Unpriced';var CAPTION_UPDATE='Update';var CAPTION_UPDATES='Updates';var CAPTION_UNSOLICITED='Unsolicited';var CAPTION_URL='URL';var CAPTION_USER='User';var CAPTION_USERS='Users';var CAPTION_USER_NAME='Login Name';var CAPTION_VOLUME='Volume';var CAPTION_WORKLIST='Worklist';var CAPTION_YESTERDAY='Yesterday';var CAPTION_YIELD='Yield';var FIELD_APPLICATION_ID='applicationId';var FIELD_CAN_DISTRIBUTE='canDistribute';var FIELD_COMPANY_ID='companyId';var FIELD_CONTENTS='contents';var FIELD_HAS_JOURNAL_NAME='hasJournalName';var FIELD_HAS_CONTENT_SECTION='hasContentSection';var FIELD_HAS_URL_SECTION='hasUrlSection';var FIELD_HAS_STATEMENT='hasStatement';var FIELD_ID='id';var FIELD_IS_IMMEDIATE='isImmediate';var FIELD_INCLUDE_IN_QX='includeInQX';var FIELD_INCLUDE_IN_IQ='includeInIQ';var FIELD_INCLUDE_IN_PS='includeInPS';var FIELD_INCLUDE_IN_QX_HOME='includeInQXHome';var FIELD_INCLUDE_IN_IQ_HOME='includeInIQHome';var FIELD_INCLUDE_IN_PS_HOME='includeInPSHome';var FIELD_IS_HOME_PAGE='isHomePage';var FIELD_JOURNAL_NAME='journalName';var FIELD_LOCATION='location';var FIELD_NEWS_DATE='newsDate';var FIELD_ONLY_RECENT='onlyRecent';var FIELD_PERIOD_DATE='periodDate';var FIELD_PERIOD_END_DATE='periodDate';var FIELD_REALTIME='realtime';var FIELD_RELEASE_DATE='releaseDate';var FIELD_RELEASE_DATE_TIME='releaseDateTime';var FIELD_RELEASE_DATE_HOUR='releaseDateHour';var FIELD_RELEASE_DATE_MIN='releaseDateMin';var FIELD_RELEASE_DATE_AMPM='releaseDateAMPM';var FIELD_SET_FIN_REP='setFinRep';var FIELD_SHOW_MM_INFO='showMMInfo';var FIELD_STATUS_ID='statusId';var FIELD_TAB_INDEX='tabIndex';var FIELD_TITLE='title';var FIELD_TYPE_ID='typeId';var FIELD_USER_ID='userId';var FIELD_CORRECTED_NEWS_ID='correctedNewsId';var FIELD_FINANCIAL_REPORT_ID='financialReportId';var FIELD_TOTAL_LIABILITIES='totalLiabilities';var FIELD_SHAREHOLDERS_EQUITY='shareholdersEquity';var FIELD_TOTAL_REVENUE='totalRevenue';var FIELD_OPERATING_INCOME='operatingIncome';var FIELD_NET_INCOME='netIncome';var FIELD_DIVIDENDS_PAID='dividendsPaid';var FIELD_DO_NOT_REDISTRIBUTE='doNotRedistribute';var FIELD_TOTAL_SHARES_OUTSTANDING='totalSharesOutstanding';var FIELD_EARNINGS_PER_SHARE='earningsPerShare';var FIELD_ABUSE='abuseId';var FIELD_ACTION='action';var FIELD_ACTIVE='active';var FIELD_ACCOUNT_NO='accountNo';var FIELD_AD_SPACE='adSpaceId';var FIELD_ADMIN_EMAIL_ADDRESS='adminEmailAddress';var FIELD_ANALYZE_LEGACY_DB_INTERVAL='analyzeLegacyDbInterval';var FIELD_APP_SECTION='appSection';var FIELD_APP_SUB_SECTION='appSubSection';var FIELD_ASCENDING='ASC';var FIELD_BACK_URL='back';var FIELD_BIRTH_DATE='birthDate';var FIELD_CAPTION='caption';var FIELD_CITY='city';var FIELD_COMMENTS='comments';var FIELD_COMPANY='companyId';var FIELD_COMPANY_NAME='companyName';var FIELD_COMP_SEARCH_TYPE='compSearchType';var FIELD_COUNTRY='countryId';var FIELD_CREATED_DATE='createdDate';var FIELD_CREATOR='creatorId';var FIELD_CREDIT_CARD_EXP_DATE='creditCardExpDate';var FIELD_DEFAULT_EMAIL_POST_REPLY='defaultEmailPostReply';var FIELD_DESCENDING='DESC';var FIELD_EDUCATION_LEVEL='educationLevelId';var FIELD_EMAIL_ADDRESS='emailAddress';var FIELD_END_DATE='endDate';var FIELD_EXPANDED='expanded';var FIELD_FALSE='0';var FIELD_FAX_NUMBER='fax';var FIELD_FIRST_NAME='firstName';var FIELD_FOLLOW_UP='followUp';var FIELD_FORM_HANDLER_ERROR='formHandlerError';var FIELD_FORM_HANDLER_OK='formHandlerOK';var FIELD_GENDER='genderId';var FIELD_GLOBAL_INFO='globalInfoId';var FIELD_ID='id';var FIELD_INCOME_LEVEL='incomeLevelId';var FIELD_INDUSTRY='industryId';var FIELD_IS_ACTIVE='isActive';var FIELD_IS_QX='isQX';var FIELD_JOB_TITLE='jobTitle';var FIELD_JSP_NAME='jspName';var FIELD_LAST_NAME='lastName';var FIELD_LOGO='logo';var FIELD_LIMIT='limit';var FIELD_MARITAL_STATUS='maritalStatusId';var FIELD_MIDDLE_NAME='middleName';var FIELD_MIME_TYPE='mimeType';var FIELD_MMID='mmId';var FIELD_NAME='name';var FIELD_NAME_SUFFIX='nameSuffix';var FIELD_NAME_TITLE='nameTitle';var FIELD_NUMBER_OF_SECURITIES='numberOfSecurities';var FIELD_OCCUPATION='occupationId';var FIELD_PAGE='page';var FIELD_PASSWORD='password';var FIELD_PASSWORD_CONFIRM='passwordConfirm';var FIELD_PHONE_NUMBER='phone';var FIELD_PINK_COMMON_BASE_URL='pinkCommonBaseUrl';var FIELD_PINK_FORUMS_BASE_URL='pinkForumsBaseUrl';var FIELD_PINK_SHEETS_BASE_URL='pinkSheetsBaseUrl';var FIELD_REGISTRATION_CONFIRM_CODE='registrationConfirmCode';var FIELD_REGISTRATION_CONFIRM_IMAGE='registrationConfirmationImage';var FIELD_REGISTRATION_CONSENT='registrationConsent';var FIELD_RESPONSE='response';var FIELD_ROLE='role';var FIELD_SCREEN_NAME='screenName';var FIELD_SEARCH_BY='searchBy';var FIELD_SEARCH_TYPE='searchTypeId';var FIELD_SEARCH_VALUE='searchValue';var FIELD_SECURITY='securityId';var FIELD_SEND_NOTIFICATION='sendNotification';var FIELD_SENTIMENT='sentimentId';var FIELD_SHOW_AD_FOOTER_2='showAdFooter2';var FIELD_SIZE_OF_PORTFOLIO='sizeOfPortfolio';var FIELD_SORT_DIR='sortDir';var FIELD_SORT_ON='sortOn';var FIELD_START_DATE='startDate';var FIELD_STATE='stateId';var FIELD_SUMMARY='summary';var FIELD_SUPPORT_EMAIL_ADDRESS='supportEmailAddress';var FIELD_SYMBOL='symbol';var FIELD_TITLE='title';var FIELD_TRADING_FREQUENCY='tradingFreqId';var FIELD_TRADING_LEVEL='tradingLevelId';var FIELD_TRUE='1';var FIELD_USER='userId';var FIELD_USER_ROLE_COMPANY='userRoleCompanyId';var FIELD_USER_ROLE_COMPANY_COUNT='userRoleCompanyCount';var FIELD_USER_NAME='userName';var FIELD_URL='url';var FORMAT_DATE_INPUT='mm/dd/yyyy';var ICON_ADD='/icons/add.png';var ICON_DEACTIVATE='/icons/deactivate.png';var ICON_ISSUE_CORRECTION='/icons/issuecorrection.png';var ICON_CALENDAR='/icons/cal.gif';var ICON_DIR='/icons';var ICON_COLLAPSE='/icons/collapse.gif';var ICON_DELETE='/icons/delete.gif';var ICON_EDIT='/icons/edit.png';var ICON_EXPAND='/icons/expand.gif';var ICON_PLACEHOLDER='/icons/placeholder.gif';var ICON_USER_ACTIVE='/icons/user_active.png';var ICON_USER_INACTIVE='/icons/user_inactive.png';var MAX_LEN_LOCATION=128;var MAX_LEN_NEWS_TITLE=255;var SIZE_LOCATION=60;var SIZE_NEWS_TITLE=70;var MAX_LEN_ACCOUNT_NO=20;var MAX_LEN_ADMIN_EMAIL_ADDRESS=100;var MAX_LEN_ANALYZE_LEGACY_DB_INTERVAL=10;var MAX_LEN_CITY=64;var MAX_LEN_COMMENTS_USER=255;var MAX_LEN_COMPANY_NAME=75;var MAX_LEN_CREDIT_CARD_EXP_DATE=7;var MAX_LEN_EMAIL_ADDRESS=100;var MAX_LEN_FAX_NUMBER=35;var MAX_LEN_FIRST_NAME=25;var MAX_LEN_JOB_TITLE=50;var MAX_LEN_LAST_NAME=32;var MAX_LEN_LOGIN_NAME=100;var SIZE_LOGIN_NAME=50;var MAX_LEN_MIDDLE_NAME=25;var MAX_LEN_NUMBER_OF_SECURITIES=5;var MAX_LEN_PASSWORD=10;var MIN_LEN_PASSWORD=6;var MAX_LEN_PHONE_NUMBER=35;var MAX_LEN_PINK_COMMON_BASE_URL=64;var MAX_LEN_PINK_FORUMS_BASE_URL=64;var MAX_LEN_PINK_SHEETS_BASE_URL=64;var MAX_LEN_REGISTRATION_CONFIRM_CODE=32;var MAX_LEN_REGISTRATION_CONSENT=5000;var MAX_LEN_SCREEN_NAME=20;var MAX_LEN_SIZE_OF_PORTFOLIO=12;var MAX_LEN_SUPPORT_EMAIL_ADDRESS=100;var MAX_LEN_SYMBOL=6;var PAGE_SIZE_WORKLIST=20;var PAGE_SIZE_LATEST_PINK_NEWS=3;var PAGE_SIZE_ALL_PINK_NEWS=10;var PAGE_SIZE_LATEST_NEWS_RELEASES=10;var PAGE_SIZE_LATEST_FIN_REP_RELEASES=10;var PAGE_SIZE_SUBLISTING=10;var TITLE_ADD_PINK_NEWS_RELEASE='Add a Pink Sheets News below';var TITLE_ADD_NEWS_RELEASE='Add a News Release';var TITLE_ADD_ANNOUNCEMENT='Add a Announcement';var TITLE_ADD_SEC_TEMP_SUSPENSION_ANNOUNCEMENT='Add a '+CAPTION_SEC_TEMPORARY_SUSPENSION_ANNOUNCEMENT;var TITLE_EDIT_NEWS_RELEASE='Edit News Release';var TITLE_EDIT_PINK_NEWS_RELEASE='Edit Pink Sheets News below';var TITLE_ISSUE_CORRECTION='Issue Correction for News Release';var TITLE_FINANCIAL_REPORT='Financial Report';var TITLE_FINANCIAL_REPORTS='Financial Reports';var TITLE_NEWS_RELEASE='News Release';var TITLE_NEWS_RELEASES='News Releases';var TITLE_ABUSE_REPORT='Abuse Report';var TITLE_ABUSE_REPORT_RESPONSE='Abuse Report Response';var TITLE_ADMINISTRATIVE_INFORMATION='Administrative Information';var TITLE_CHANGE_PASSWORD='Change Password';var TITLE_EDIT_GLOBAL_INFO='Edit Global Settings';var TITLE_EDIT_USER_PROFILE='Edit My Profile';var TITLE_FIND_USER='Find a User';var TITLE_FORGOT_PASSWORD='Forgot Password';var TITLE_FORUMS_HOME='OTC Discussion Forums';var TITLE_ICON_LEGEND='Icon Legend';var TITLE_IQ_SERVICE='OTC Disclosure & News Service';var TITLE_LOGIN='Login';var TITLE_NOT_AUTHORIZED='Not Authorized';var TITLE_REGISTER_USER='Register Me';var TITLE_REGISTRATION_CONFIRMATION='Confirm Registration';var TITLE_REGISTRATION_SUBMISSION='Registration Submission';var TITLE_REPORT_ABUSE='Report Abuse';var TITLE_ROLES_COMPANIES_INFORMATION='Roles/Companies Information';var TITLE_TRADING_PROFILE='Trading Profile';var TITLE_USER_ACCOUNT_CHANGE_NOTIFICATION='Pink Sheets User Account Change Notification';var TITLE_USER_ACTIVE='Active User';var TITLE_USER_ADD='Add User';var TITLE_USER_EDIT='Edit User';var TITLE_USER_INACTIVE='Inactive User';var TITLE_USER_INFORMATION='User Information';var TITLE_USER_PROFILE='User Profile';var TITLE_USER_WORKLIST='User Worklist';var TITLE_VOLUNTARY_INFORMATION='Voluntary Information';var TITLE_YOUR_TRADING_PROFILE='Your Trading Profile';var TITLE_PINK_SHEETS_NEWS_SERVICE=TITLE_COMPANY+' News Service';var STATUS_ID_ACTIVE='A';var STATUS_ID_INACTIVE='I';var STATUS_ID_PENDING='P';var STATUS_ID_DELETE='D';var STATUS_ID_UNDEFINED=undefined;var ANNOUNCEMENT_TYPE_ID='A';var PRESS_RELEASE_TYPE_ID='PR';var CORRECTION_TYPE_ID='COR';var STOCK_TRANSACTIONS='STIA';var FIN_REPORT_NEWS_RELEASE_TYPE_ID='FRNR';var FIN_REPORT_ATTORNEY_LETTER_WRT_CI_ID='ALCI';var FIN_REPORT_ATTORNEY_OPINION_SP_ID='AOSP';var FIN_REPORT_HOME_COUNTRY_NEWS_RELEASE='HCPR';var FIN_REPORT_ANNUAL_ID='AR';var FIN_REPORT_SEMI_ANNUAL_ID='SAR';var FIN_REPORT_QUARTERLY_ID='QR';var FIN_REPORT_ANNUAL_REPORT_AND_PROXY_STATEMENT_ID='ANPS';var FIN_REPORT_INTERIM_ID='IFR';var FIN_REPORT_INITIAL_COMP_DISCL_ID='CIDS';var FIN_REPORT_RESEARCH_REPORT='RR';var SEC_TEMPORARY_SUSPENSION_ANNOUNCEMENT_ID='STSA';var COMTEX_ID='CMTX';var PINKSHEETS_URL='pinksheets.com';var ZERO=0;var ONE=1;var YES='Y';var NO='N';var COPYRIGHT_TEXT='(C)Copyright 2004, Pink Sheets LLC. All rights reserved.';var COPYRIGHT_YEAR='2004';var ACTIVATE_NEWS_TASK_PARAMETER='activateNewsTaskInterval';var ACTIVATE_REPORTS_TASK_PARAMETER='activateReportsTaskInterval';var PINKSHEETS_STRING='Pink Sheets';var PINK_SHEETS_COVERAGE_NEWS_TYPE_ID='PSCN';var PINK_SHEETS_NEWS_RELEASE_TYPE_ID='PSNR';var FUNCTION_OPEN_NEWS='openNews';var FUNCTION_OPEN_FINANCIAL_REPORTS='openFinancialReports';var FUNCTION_OPEN_DISCUSSIONS='openDiscussions';var FUNCTION_OPEN_QA='openQA';var FUNCTION_OPEN_CHARTS='openCharts';var FUNCTION_OPEN_FILINGS='openFilings';var FUNCTION_OPEN_EDGAR_NEWS='openEdgarNews';var FUNCTION_OPEN_COMPANY_PROFILE='openCompanyProfile';var FUNCTION_OPEN_COMPANY_LOGO='openCompanyLogo';var FUNCTION_OPEN_COMPANY_ACCOUNT='openAccountInfo';var FUNCTION_OPEN_COMPANY_UPDATE='openCompanyUpdate';var FUNCTION_OPEN_BLUE_SKY='openBlueSky';var FUNCTION_OPEN_QUOTE='openQuote';var FUNCTION_OPEN_MODERATOR='openModerator';var FUNCTION_ADD_NEWS='addNews';var FUNCTION_ADD_ANNOUNCEMENT='addAnnouncement';var FUNCTION_ADD_SEC_TEMP_ANNOUNCEMENT='addSecTempAnnouncement';var FUNCTION_ADD_FINANCIAL_REPORT='addFinancialReport';var FUNCTION_PREVIEW_NEWS='previewNews';var FUNCTION_ISSUE_CORRECTION='issueCorrection';var FUNCTION_OPEN_PINK_NEWS='openPinkNews';var FUNCTION_ADD_PINK_NEWS='addPinkNews';var FUNCTION_OPEN_MARKET_REPORT='openMarketReport';var FUNCTION_OPEN_LEVEL_2_QUOTES='openLevel2Quotes';var VENUE_DUALLY_QUOTED_NAME='Dually Quoted';var VENUE_PINK_SHEETS_NAME='Pink Sheets';var ROLE_PRESS_RELEASE='OSIP';var ROLE_FINANCIAL_REPORT='OSIF';var FORMAT_INPUT_DATE='mm/dd/yyyy';var VALUE_TRUE='true';var VALUE_FALSE='false';var CMS_EDITOR_SIZE='400px';var TIER_GROUP_ALL='ALL';

function AdvanceCompanySearchCriteria(searchBy,searchValue,page,pageSize)
{this.searchBy=searchBy;this.searchValue=searchValue;this.page=page;this.pageSize=pageSize;}
function CompanyLogoItem(id,companyId,creatorId,createdDate,creatorName,mimeType,companyName,isActive,lastModifierId,lastModifierName,lastModifiedDate)
{this.id=id;this.companyId=companyId;this.creatorId=creatorId;this.createdDate=createdDate;this.creatorName=creatorName;this.mimeType=mimeType;this.companyName=companyName;this.isActive=isActive;this.lastModifierId=lastModifierId;this.lastModifierName=lastModifierName;this.lastModifiedDate=lastModifiedDate;}
function CompanyReportItem(id,companyId,name,isActive)
{this.id=id;this.companyId=companyId;this.name=name;this.isActive=isActive;}
function EditFinancialReportCriteria(id,companyId)
{this.id=id;this.companyId=companyId;}
function EditPinkNewsCriteria(id,caption,title,typeId)
{this.id=id;this.caption=caption;this.title=title;this.typeId=typeId;}
function IssueCorrectionCriteria(companyId,correctedNewsId)
{this.companyId=companyId;this.userId=userId;this.title=title;this.typeId=typeId;this.correctedNewsId=correctedNewsId;}
function FinancialReportItem(id,companyId,userId,title,typeId,statusId,periodDate,isImmediate,createdDate,lastModifiedDate,releaseDate,deleteDate,statusDescript,typeName,companyName,userName,userTitle,releaseDateTime,hasStatement,primarySymbol,releaseDateInput,periodDateInput,canDistribute,reviewStatusId,reviewStatusName,frId)
{this.id=id;this.companyId=companyId;this.userId=userId;this.title=title;this.typeId=typeId;this.statusId=statusId;this.periodDate=periodDate;this.isImmediate=isImmediate;this.createdDate=createdDate;this.lastModifiedDate=lastModifiedDate;this.releaseDate=releaseDate;this.deleteDate=deleteDate;this.statusDescript=statusDescript;this.typeName=typeName;this.companyName=companyName;this.userName=userName;this.userTitle=userTitle;this.releaseDateTime=releaseDateTime;this.hasStatement=hasStatement;this.primarySymbol=primarySymbol;this.symbol=primarySymbol;this.releaseDateInput=releaseDateInput;this.periodDateInput=periodDateInput;this.canDistribute=canDistribute;this.reviewStatusId=reviewStatusId;this.reviewStatusName=reviewStatusName;this.frId=frId;}
FinancialReportItem.prototype.getTitle=function(){var ret=(undefined!=this.typeName)?this.typeName:this.title;ret=(undefined!=this.typeName&&undefined!=this.title)?ret+' - '+this.title:ret;return ret;}
function FinancialReportTypeItem(id,name,isActive,hasStatement)
{this.id=id;this.name=name;this.isActive=isActive;this.hasStatement=hasStatement;}
function FinancialStatementItem(financialReportId,totalLiabilities,shareholdersEquity,totalRevenue,operatingIncome,netIncome,dividendsPaid,totalSharesOutstanding,earningsPerShare)
{this.financialReportId=financialReportId;this.totalLiabilities=totalLiabilities;this.shareholdersEquity=shareholdersEquity;this.totalRevenue=totalRevenue;this.operatingIncome=operatingIncome;this.netIncome=netIncome;this.dividendsPaid=dividendsPaid;this.totalSharesOutstanding=totalSharesOutstanding;this.earningsPerShare=earningsPerShare;}
function LinkingAndFramingTermsValue(firstName,lastName,companyName,emailAddress,phone,url,comments)
{this.firstName=firstName;this.lastName=lastName;this.companyName=companyName;this.emailAddress=emailAddress;this.phone=phone;this.url=url;this.comments=comments;}
function ListFinancialReportCriteria(companyId,statusId,page,pageSize,sortOn,sortDir)
{this.companyId=companyId;this.statusId=statusId;this.page=page;this.pageSize=pageSize;this.sortOn=sortOn;this.sortDir=sortDir;this.onlyRecent=false;this.isQX=false;this.isHomePage=false;this.onlyFilings=false;}
function ListFinancialReport(singular,plural,records,sortOn,sortDir,pageNavInfo,companyId,statusId)
{this.singular=singular;this.plural=plural;this.records=records;this.sortOn=sortOn;this.sortDir=sortDir;this.pageNavInfo=pageNavInfo;this.companyId=companyId;this.statusId=statusId;}
function ListNewsRelease(singular,plural,records,sortOn,sortDir,pageNavInfo,companyId,statusId)
{this.singular=singular;this.plural=plural;this.records=records;this.sortOn=sortOn;this.sortDir=sortDir;this.pageNavInfo=pageNavInfo;this.companyId=companyId;this.statusId=statusId;}
function ListNewsReleaseCriteria(companyId,statusId,page,pageSize,sortOn,sortDir)
{this.companyId=companyId;this.statusId=statusId;this.page=page;this.pageSize=pageSize;this.sortOn=sortOn;this.sortDir=sortDir;}
function MontageItem(mmId,mmIdDisplay,price,size,transTime,isUnsolicited,isClosed,isUnpriced,isOtcbb,isBidOfferWanted,traderId,traderCode)
{this.mmId=mmId;this.mmIdDisplay=mmIdDisplay;this.price=price;this.size=size;this.transTime=transTime;this.isUnsolicited=isUnsolicited;this.isClosed=isClosed;this.isUnpriced=isUnpriced;this.isOtcbb=isOtcbb;this.isBidOfferWanted=isBidOfferWanted;this.traderId=traderId;this.traderCode=traderCode;}
function NewsReleaseItem(id,companyId,userId,title,typeId,statusId,location,isImmediate,contents,createdDate,lastModifiedDate,releaseDate,deleteDate,correctedNewsId,canDistribute,wasDistributed,statusDescript,newsTypeDescript,companyName,userName,userTitle,releaseDateTime,primarySymbol,releaseDateInput)
{this.id=id;this.companyId=companyId;this.userId=userId;this.title=title;this.typeId=typeId;this.statusId=statusId;this.location=location;this.isImmediate=isImmediate;this.contents=contents;this.createdDate=createdDate;this.lastModifiedDate=lastModifiedDate;this.releaseDate=releaseDate;this.deleteDate=deleteDate;this.correctedNewsId=correctedNewsId;this.canDistribute=canDistribute;this.wasDistributed=wasDistributed;this.statusDescript=statusDescript;this.newsTypeDescript=newsTypeDescript;this.companyName=companyName;this.userName=userName;this.userTitle=userTitle;this.releaseDateTime=releaseDateTime;this.primarySymbol=primarySymbol;this.symbol=primarySymbol;this.releaseDateInput=releaseDateInput;}
NewsReleaseItem.prototype.getTitle=function(){return this.title}
function PinkNewsFilter(applicationId,statusId,isHomePage)
{this.applicationId=applicationId;this.statusId=statusId;this.isHomePage=isHomePage;}
function QuoteCriteria(symbol,securityId,applicationId)
{this.symbol=symbol;this.securityId=securityId;this.applicationId=applicationId;}
function QServInside(symbol,bidPrice,bidSize,askPrice,askSize,transTime,isRealtime)
{this.symbol=symbol;this.bidPrice=bidPrice;this.bidSize=bidSize;this.askPrice=askPrice;this.askSize=askSize;this.transTime=transTime;this.isRealtime=isRealtime;}
function QServMontage(symbol,buyList,sellList,today,traders,includeOtcbb)
{this.symbol=symbol;this.buyList=buyList;this.sellList=sellList;this.today=today;this.traders=traders;this.includeOtcbb=includeOtcbb;}
function QtServTradeStatFilter(appId,pageSize,sortOn,priceMin,tierGroupId)
{this.appId=appId;this.pageSize=pageSize;this.sortOn=sortOn;this.priceMin=priceMin;this.tierGroupId=tierGroupId;}
function ResourcesFilter(page,pageSize,sortOn,sortDir,isHomePage,statusId,onlyRecent)
{this.page=page;this.pageSize=pageSize;this.sortOn=sortOn;this.sortDir=sortDir;this.isHomePage=isHomePage;this.statusId=statusId;this.onlyRecent=onlyRecent;}
function SecurityContainerValue(securities,selectedId)
{this.securities=securities;this.selectedId=selectedId;}
function SecurityDetailsItem(symbol,isPiggyBacked,isUnsolicited,primaryMarket,className,tierName,tierId,isOtc,isPinkSheets,statusName)
{this.symbol=symbol;this.isPiggyBacked=isPiggyBacked;this.primaryMarket=primaryMarket;this.isUnsolicited=isUnsolicited;this.className=className;this.tierName=tierName;this.tierId=tierId;this.isOtc=isOtc;this.isPinkSheets=isPinkSheets;this.statusName=statusName;}
function TraderItem(mmId,traderId,name,phone1,phone2,location)
{this.mmId=mmId;this.traderId=traderId;this.name=name;this.phone1=phone1;this.phone2=phone2;this.location=location;}
function TradeInfo(symbol,companyName,lastSale,change,percentChange,tickCode,tickName,quoteTime,dailyHigh,dailyLow,openingPrice,volume,volumeFormatted,annualHigh,annualLow,dividend,previousClose,yield,betaCoefficient,lastTradeTime,exchangeCode,exchangeName,nasdaqCode,nasdaqDesc,eps,peRatio,delay,isADR)
{this.symbol=symbol;this.companyName=companyName;this.lastSale=lastSale;this.change=change;this.percentChange=percentChange;this.tickCode=tickCode;this.tickName=tickName;this.quoteTime=quoteTime;this.dailyHigh=dailyHigh;this.dailyLow=dailyLow;this.openingPrice=openingPrice;this.volume=volume;this.volumeFormatted=volumeFormatted;this.annualHigh=annualHigh;this.annualLow=annualLow;this.dividend=dividend;this.previousClose=previousClose;this.yield=yield;this.betaCoefficient=betaCoefficient;this.lastTradeTime=lastTradeTime;this.exchangeCode=exchangeCode;this.exchangeName=exchangeName;this.nasdaqCode=nasdaqCode;this.nasdaqDesc=nasdaqDesc;this.eps=eps;this.peRatio=peRatio;this.delay=delay;this.isADR=isADR;}
function UserBean(id,screenName,fullName,emailAddress,isAdmin,isFinancialReport,isPressRelease,isModerator,isRegulator,isExternal,currentCompanyId,userBelongsToCompany)
{this.id=id;this.screenName=screenName;this.fullName=fullName;this.emailAddress=emailAddress;this.isAdmin=isAdmin;this.isFinancialReport=isFinancialReport;this.isPressRelease=isPressRelease;this.isModerator=isModerator;this.isRegulator=isRegulator;this.isExternal=isExternal;this.currentCompanyId=currentCompanyId;this.userBelongsToCompany=userBelongsToCompany;}
function UserCompanyAuth(isFinancialReport,isPressRelease,isModerator)
{this.isFinancialReport=isFinancialReport;this.isPressRelease=isPressRelease;this.isModerator=isModerator;}

function toHttpURLformat(url)
{if((url.indexOf('http://')==0)||(url.indexOf('https://')==0))
{return url;}
else
{url='http://'+url;return url;}}
function incrementIQPageView(actionUri,symbol)
{helper.logThisPageHit(actionUri,symbol);}
function toggleValue(formField,source,dest)
{if(formField.value==source)
formField.value=dest;return;}

function OtcIQCalls(rootPath)
{this.rootPath=rootPath;if(undefined==this.rootPath)
this.rootPath='/otciq';this.servicePath=this.rootPath+'/ajax';this.cdataElements=new Array();this.cdataElements[FIELD_TITLE]=FIELD_TITLE;this.cdataElements[FIELD_CONTENTS]=FIELD_CONTENTS;this.cdataElements[FIELD_COMPANY_NAME]=FIELD_COMPANY_NAME;}
OtcIQCalls.prototype=new AjaxHelper();OtcIQCalls.prototype.activateNewsRelease=function(id)
{return this.synchCall(this.servicePath+'/admin/activateNewsRelease?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.activateFinancialReport=function(id)
{return this.synchCall(this.servicePath+'/member/activateFinancialReport?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.addCompanyReportService=function(companyId,typeId)
{return this.synchCall(this.servicePath+'/admin/addCompanyReportService?'+FIELD_COMPANY_ID+'='+companyId+
toHttpParameter(FIELD_TYPE_ID,typeId));}
OtcIQCalls.prototype.deactivateNewsRelease=function(id)
{return this.synchCall(this.servicePath+'/admin/deactivateNewsRelease?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.deactivateFinancialReport=function(id)
{return this.synchCall(this.servicePath+'/member/deactivateFinancialReport?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.deleteCompanyReportService=function(companyId,typeId)
{return this.synchCall(this.servicePath+'/admin/deleteCompanyReportService?'+FIELD_COMPANY_ID+'='+companyId+
toHttpParameter(FIELD_TYPE_ID,typeId));}
OtcIQCalls.prototype.deleteNewsRelease=function(id)
{return this.synchCall(this.servicePath+'/admin/deleteNewsRelease?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.deleteFinancialReport=function(id)
{return this.synchCall(this.servicePath+'/admin/deleteFinancialReport?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.formatDateTime=function(value)
{if(undefined==value)
return undefined;return this.synchCall(this.servicePath+'/formatDateTime?'+FIELD_ID+'='+escape(value));}
OtcIQCalls.prototype.formatSimpleDate=function(value)
{if(undefined==value)
return undefined;return this.synchCall(this.servicePath+'/formatSimpleDate?'+FIELD_ID+'='+escape(value));}
OtcIQCalls.prototype.getAggregateWombatTrades=function(appId,callback)
{this.asynchPostMap(this.servicePath+'/getAggregateWombatTrades.json',{appId:appId},callback);}
OtcIQCalls.prototype.getAggregateWombatTradesForTierGroup=function(tierGroupId,callback)
{this.asynchPostMap(this.servicePath+'/getAggregateWombatTradesForTierGroup.json',{tierGroupId:tierGroupId},callback);}
OtcIQCalls.prototype.getCompanyReportsService=function(companyId)
{return this.synchCall(this.servicePath+'/admin/getCompanyReportsService'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?'));}
OtcIQCalls.prototype.getFinancialReport=function(id,callback)
{var url=this.servicePath+'/getFinancialReport.json'+toHttpParameter(FIELD_ID,id,'?');if(callback==undefined)
return this.synchCall(url);return this.asynchCall(url,callback);}
OtcIQCalls.prototype.getFinRepMaxSize=function()
{return this.synchCall(this.servicePath+'/getFinRepMaxSize');}
OtcIQCalls.prototype.getFinancialReports=function(filter,callback)
{if(undefined==callback)
return this.synchPostMap(this.servicePath+'/getFinancialReports.json',filter);this.asynchPostMap(this.servicePath+'/getFinancialReports.json',filter,callback);}
OtcIQCalls.prototype.getFinancialReportTypes=function()
{return this.synchCall(this.servicePath+'/getFinancialReportTypes');}
OtcIQCalls.prototype.getFinAndCompReportTypes=function(companyId)
{return this.synchCall(this.servicePath+'/getFinAndCompReportTypes'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?'));}
OtcIQCalls.prototype.getFinancialReportTypeById=function(id)
{return this.synchCall(this.servicePath+'/getFinancialReportTypeById?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.getFinancialStatement=function(id)
{return this.synchCall(this.servicePath+'/getFinancialStatement'+toHttpParameter(FIELD_ID,id,'?'));}
OtcIQCalls.prototype.getInside=function(symbol,securityId,applicationId,callback)
{var qs=this.toQueryString('',FIELD_SYMBOL,symbol);qs=this.toQueryString(qs,FIELD_SECURITY,securityId);qs=this.toQueryString(qs,FIELD_APPLICATION_ID,applicationId);this.asynchCall(this.servicePath+'/getInside'+qs,callback);}
OtcIQCalls.prototype.getLatestFinancialReports=function(filter,callback)
{if(undefined==callback)
return this.synchPostMap(this.servicePath+'/getLatestFinancialReports.json',filter);this.asynchPostMap(this.servicePath+'/getLatestFinancialReports.json',filter,callback);}
OtcIQCalls.prototype.getLatestQuarterlyAndAnnualReports=function(companyId,limit,sortOn,sortDir)
{return this.synchCall(this.servicePath+'/getLatestQuarterlyAndAnnualReports?'+FIELD_COMPANY_ID+'='+companyId+
toHttpParameter(FIELD_LIMIT,limit)+
toHttpParameter(FIELD_SORT_ON,sortOn)+
toHttpParameter(FIELD_SORT_DIR,sortDir));}
OtcIQCalls.prototype.getLatestNewsReleases=function(filter,callback)
{this.asynchPostMap(this.servicePath+'/getLatestNewsReleases.json',filter,callback);}
OtcIQCalls.prototype.getMarketMaker=function(mmId)
{return this.synchCall(this.servicePath+'/getMarketMaker?'+FIELD_MMID+'='+mmId);}
OtcIQCalls.prototype.getMontage=function(symbol,securityId,applicationId,showMMInfo,callback)
{var qs=this.toQueryString('',FIELD_SYMBOL,symbol);qs=this.toQueryString(qs,FIELD_SECURITY,securityId);qs=this.toQueryString(qs,FIELD_APPLICATION_ID,applicationId);qs=this.toQueryString(qs,FIELD_SHOW_MM_INFO,showMMInfo);this.asynchCall(this.servicePath+'/getMontage'+qs,callback);}
OtcIQCalls.prototype.getMyCompanyAuth=function(companyId)
{return this.synchCall(this.servicePath+'/member/getMyCompanyAuth'+
toHttpParameter(FIELD_COMPANY,companyId,'?'));}
OtcIQCalls.prototype.getNewsRelease=function(id)
{return this.synchCall(this.servicePath+'/getNewsRelease'+toHttpParameter(FIELD_ID,id,'?'));}
OtcIQCalls.prototype.getNewsReleases=function(filter,callback)
{this.asynchPostMap(this.servicePath+'/getNewsReleases.json',filter,callback);}
OtcIQCalls.prototype.getNewsType=function(id)
{return this.synchCall(this.servicePath+'/getNewsType.json'+toHttpParameter(FIELD_ID,id,'?'));}
OtcIQCalls.prototype.getNewsTypes=function()
{return this.synchCall(this.servicePath+'/getNewsTypes');}
OtcIQCalls.prototype.getPeriodEndDates=function(companyId,typeId)
{return this.synchCall(this.servicePath+'/getPeriodEndDates?companyId='+companyId+"&reportType="+typeId);}
OtcIQCalls.prototype.getPinkNewsType=function(id)
{return this.synchCall(this.servicePath+'/getPinkNewsType.json'+toHttpParameter(FIELD_ID,id,'?'));}
OtcIQCalls.prototype.getPinkNewsTypes=function()
{return this.synchCall(this.servicePath+'/getPinkNewsTypes');}
OtcIQCalls.prototype.getResources=function(filter,callback)
{this.asynchPostMap(this.servicePath+'/getResourcesList.json',filter,callback);}
OtcIQCalls.prototype.getFinancialReportTypes=function()
{return this.synchCall(this.servicePath+'/getFinancialReportTypes');}
OtcIQCalls.prototype.getSecurityDetails=function(symbol,callback)
{var url=this.servicePath+'/getSecurityDetails?'+FIELD_SYMBOL+'='+symbol;if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
OtcIQCalls.prototype.getReviewStatusListItem=function(isAttorneyLetter)
{return this.synchCall(this.servicePath+'/getReviewStatusListItem?isAttorneyLetter='+isAttorneyLetter);}
OtcIQCalls.prototype.getStatuses=function()
{return this.synchCall(this.servicePath+'/getStatuses');}
OtcIQCalls.prototype.getTopMarketMakers=function(filter,callback)
{this.asynchPostMap(this.servicePath+'/getTopMarketMakers.json',filter,callback);}
OtcIQCalls.prototype.getTopQuoted=function(filter,callback)
{this.asynchPostMap(this.servicePath+'/getTopQuoted.json',filter,callback);}
OtcIQCalls.prototype.getTopWombatTrades=function(filter,callback)
{this.asynchPostMap(this.servicePath+'/getTopWombatTrades.json',filter,callback);}
OtcIQCalls.prototype.getTrader=function(id)
{return this.synchCall(this.servicePath+'/getTrader?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.getTradeInfo=function(symbol,applicationId,callback)
{var queryString=this.toQueryString('',FIELD_SYMBOL,symbol);queryString=this.toQueryString(queryString,FIELD_APPLICATION_ID,applicationId);var url=this.servicePath+'/getTradeInfo'+queryString;if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
OtcIQCalls.prototype.hasReports=function(companyId,statusId,includeTypes)
{var filter={companyId:companyId,statusId:statusId,includeTypes:includeTypes};return this.synchPostMap(this.servicePath+'/hasReports.json',filter).payload;}
OtcIQCalls.prototype.hasInactiveReports=function(companyId){return this.hasReports(companyId,STATUS_ID_INACTIVE);}
OtcIQCalls.prototype.hasResearchReports=function(companyId){return this.hasReports(companyId,STATUS_ID_ACTIVE,FIN_REPORT_RESEARCH_REPORT);}
OtcIQCalls.prototype.sendLinkingAndFramingTermsRequest=function(value,callback)
{this.asynchPostMap(this.servicePath+'/sendLinkingAndFramingTermsRequest.json',value,callback);}
OtcIQCalls.prototype.setNewsRelease=function(value)
{this.convertAll(value);return this.synchPostXml(this.servicePath+'/member/setNewsRelease',this.toXml(value));}
OtcIQCalls.prototype.setFinancialReport=function(map)
{return this.synchPostMap(this.setFinancialReportUrl(),map);}
OtcIQCalls.prototype.setFinancialReportUrl=function()
{return this.servicePath+'/member/setFinancialReport';}
OtcIQCalls.prototype.previewFinancialReportUrl=function()
{return this.servicePath+'/member/previewFinancialReport';}
OtcIQCalls.prototype.setAnnouncement=function(value)
{return this.synchPostXml(this.servicePath+'/member/setAnnouncement',this.toXml(value));}
OtcIQCalls.prototype.validateAnnouncement=function(value)
{return this.synchPostXml(this.servicePath+'/member/validateAnnouncement',this.toXml(value));}
OtcIQCalls.prototype.validateNewsRelease=function(value)
{return this.synchPostXml(this.servicePath+'/member/validateNewsRelease',this.toXml(value));}
OtcIQCalls.prototype.validatePinkNewsRelease=function(value,callback)
{value.contents=this.convertChar(value.contents);this.asynchPostMap(this.servicePath+'/admin/validatePinkNewsRelease.json',value,callback);}
OtcIQCalls.prototype.getPinkNewsRelease=function(id,callback)
{return this.asynchCall(this.servicePath+'/getPinkNewsRelease.json'+toHttpParameter(FIELD_ID,id,'?'),callback);}
OtcIQCalls.prototype.getPinkNewsReleases=function(value,callback)
{return this.asynchPostMap(this.servicePath+'/getPinkNewsReleases.json',value,callback);}
OtcIQCalls.prototype.activatePinkNewsRelease=function(id,callback)
{this.asynchCall(this.servicePath+'/admin/activatePinkNewsRelease.json?'+FIELD_ID+'='+id,callback);}
OtcIQCalls.prototype.deactivatePinkNewsRelease=function(id,callback)
{this.asynchCall(this.servicePath+'/admin/deactivatePinkNewsRelease.json?'+FIELD_ID+'='+id,callback);}
OtcIQCalls.prototype.deletePinkNewsRelease=function(id,callback)
{this.asynchCall(this.servicePath+'/admin/deletePinkNewsRelease.json?'+FIELD_ID+'='+id,callback);}
OtcIQCalls.prototype.setPinkNewsRelease=function(value,callback)
{this.convertAll(value);this.asynchPostMap(this.servicePath+'/admin/setPinkNewsRelease.json',value,callback);}
OtcIQCalls.prototype.isSecurityUnsolicited=function(symbol)
{return this.synchCall(this.servicePath+'/isSecurityUnsolicited?'+FIELD_SYMBOL+'='+symbol);}
OtcIQCalls.prototype.hasActiveCompanyLogo=function(companyId)
{return this.synchCall(this.servicePath+'/hasActiveCompanyLogo?'+FIELD_COMPANY_ID+'='+companyId);}
OtcIQCalls.prototype.getCompanyLogoSrc=function(companyId)
{return this.servicePath+'/showCompanyLogoByCompanyId?'+FIELD_COMPANY_ID+'='+
companyId+'&token='+(new Date()).getTime();}
OtcIQCalls.prototype.getCompanyLogo=function(companyId)
{var value=this.synchCall(this.servicePath+'/member/getCompanyLogoByCompanyId?'+FIELD_COMPANY_ID+'='+companyId);if(undefined==value)
value={'companyId':companyId};else
value.logoSrc=this.getCompanyLogoSrc(companyId);return value;}
OtcIQCalls.prototype.deleteCompanyLogo=function(id)
{return this.synchCall(this.servicePath+'/member/deleteCompanyLogo?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.activateCompanyLogo=function(id)
{return this.synchCall(this.servicePath+'/member/activateCompanyLogo?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.deactivateCompanyLogo=function(id)
{return this.synchCall(this.servicePath+'/member/deactivateCompanyLogo?'+FIELD_ID+'='+id);}
OtcIQCalls.prototype.setCompanyLogo=function(theForm)
{return this.synchPostForm(this.setCompanyLogoUrl(),theForm);}
OtcIQCalls.prototype.setCompanyLogoUrl=function()
{return this.servicePath+'/member/setCompanyLogo';}
OtcIQCalls.prototype.showFinancialReportUrl=function(id)
{return this.servicePath+'/showFinancialReportById.pdf?id='+id;}
OtcIQCalls.prototype.showSessionFinancialReportUrl=function()
{return this.servicePath+'/showSessionFinancialReport.pdf';}

function OtcIQAppNav(rootPath)
{this.rootPath=rootPath;if(undefined==this.rootPath)
this.rootPath='/otciq';this.docLibrary='http://www.otcdealer.com/pinkdocs';}
OtcIQAppNav.prototype.gotoHome=function(){window.location.href=this.rootPath+'/home';}
OtcIQAppNav.prototype.gotoLogin=function(){this.gotoHome();}
OtcIQAppNav.prototype.gotoLoginPage=function(){window.location.href=this.rootPath+'/loginPage';}
OtcIQAppNav.prototype.gotoQuotes=function(){window.location.href=this.rootPath+'/quotes';}
OtcIQAppNav.prototype.gotoContact=function(){window.location.href=this.rootPath+'/contact';}
OtcIQAppNav.prototype.gotoMyProfile=function(companyId,symbol){window.location.href=this.rootPath+'/member/myProfile'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoAboutus=function(){window.location.href=this.rootPath+'/aboutus';}
OtcIQAppNav.prototype.gotoFaq=function(){window.location.href=this.rootPath+'/faq';}
OtcIQAppNav.prototype.gotoSampleRelease=function(){window.location.href=this.rootPath+'/docs/sample_release.pdf';}
OtcIQAppNav.prototype.gotoCompanyInfo=function(companyId,symbol){window.location.href=this.rootPath+'/member/companyInfo?companyId='+companyId+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoContract=function(){window.location.href=this.rootPath+'/contract';}
OtcIQAppNav.prototype.gotoCopyright=OtcIQAppNav.prototype.gotoTrademarks=function(){window.location.href=this.rootPath+'/tm';}
OtcIQAppNav.prototype.gotoCopyrightAuth=OtcIQAppNav.prototype.gotoTrademarksAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/tmAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoTos=function(){window.location.href=this.rootPath+'/tos';}
OtcIQAppNav.prototype.gotoTosAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/tosAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoPrivacy=function(){window.location.href=this.rootPath+'/privacy';}
OtcIQAppNav.prototype.gotoPrivacyAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/privacyAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoRisk=function(){window.location.href=this.rootPath+'/risk';}
OtcIQAppNav.prototype.gotoRiskAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/riskAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoNewsReleases=function(companyId,symbol){window.location.href=this.rootPath+'/member/newsReleases?companyId='+companyId+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoQuotesPlus=function(companyId,symbol){window.location.href=this.rootPath+'/member/quotesPlus?companyId='+companyId+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoTabs=function(){window.location.href=this.rootPath+'/member/tabs';}
OtcIQAppNav.prototype.openFinancialReport=function(id){return window.open(this.rootPath+'/ajax/showFinancialReportById.pdf?id='+id,'newWindow');}
OtcIQAppNav.prototype.gotoPinkNews=function(){window.location.href=this.rootPath+'/admin/pinkNews';}
OtcIQAppNav.prototype.gotoUserAdmin=function(){window.location.href=this.rootPath+'/admin/userAdmin';}
OtcIQAppNav.prototype.gotoFinancialReports=function(companyId,symbol){window.location.href=this.rootPath+'/member/financialReports?companyId='+companyId+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoCompanySearch=function(compSearchType){window.location.href=this.rootPath+'/member/companySearch'+toHttpParameter(FIELD_COMP_SEARCH_TYPE,compSearchType,'?');}
OtcIQAppNav.prototype.gotoAccountInfo=function(companyId,symbol){window.location.href=this.rootPath+'/admin/accountInfo?companyId='+companyId+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoSignup=function(){window.location.href=this.rootPath+'/signup';}
OtcIQAppNav.prototype.gotoForgotPassword=function(){window.location.href=this.rootPath+'/forgotPassword';}
OtcIQAppNav.prototype.gotoServices=function(){window.location.href=this.rootPath+'/services';}
OtcIQAppNav.prototype.gotoServicesBSD=function(){window.location.href=this.rootPath+'/servicesBSD';}
OtcIQAppNav.prototype.gotoServicesNR=function(){window.location.href=this.rootPath+'/servicesNR';}
OtcIQAppNav.prototype.gotoServicesFR=function(){window.location.href=this.rootPath+'/servicesFR';}
OtcIQAppNav.prototype.gotoServicesQuotes=function(){window.location.href=this.rootPath+'/servicesQuotes';}
OtcIQAppNav.prototype.gotoServicesRTL2=function(){window.location.href=this.rootPath+'/servicesRTL2';}
OtcIQAppNav.prototype.gotoServicesMR=function(){window.location.href=this.rootPath+'/servicesMR';}
OtcIQAppNav.prototype.gotoServicesMF=function(){window.location.href=this.rootPath+'/servicesMF';}
OtcIQAppNav.prototype.gotoServicesOTCQuote=function(){window.location.href=this.rootPath+'/servicesOTCQuote';}
OtcIQAppNav.prototype.gotoServicesOTCQX=function(){window.location.href=this.rootPath+'/servicesOTCQX';}
OtcIQAppNav.prototype.gotoServicesFeeSchedule=function(){window.location.href=this.rootPath+'/servicesFeeSchedule';}
OtcIQAppNav.prototype.gotoServicesAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesBSDAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesBSDAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesNRAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesNRAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesFRAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesFRAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesQuotesAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesQuotesAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesRTL2Auth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesRTL2Auth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesMRAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesMRAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesMFAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesMFAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesOTCQuoteAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesOTCQuoteAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesOTCQXAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesOTCQXAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoServicesFeeScheduleAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesFeeScheduleAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoHelp=function(){window.location.href=this.rootPath+'/help';}
OtcIQAppNav.prototype.gotoHelpFAQ=function(){window.location.href=this.rootPath+'/helpFAQ';}
OtcIQAppNav.prototype.gotoHelpFR=function(){window.location.href=this.rootPath+'/helpFR';}
OtcIQAppNav.prototype.gotoHelpMR=function(){window.location.href=this.rootPath+'/helpMR';}
OtcIQAppNav.prototype.gotoHelpNR=function(){window.location.href=this.rootPath+'/helpNR';}
OtcIQAppNav.prototype.gotoHelpTD=function(){window.location.href=this.rootPath+'/helpTD';}
OtcIQAppNav.prototype.gotoHelpWR=function(){window.location.href=this.rootPath+'/helpWR';}
OtcIQAppNav.prototype.gotoHelpAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/helpAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoHelpFAQAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/helpFAQAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoHelpFRAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/helpFRAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoHelpMRAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/helpMRAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoHelpNRAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/helpNRAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoHelpTDAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/helpTDAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoHelpWRAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/helpWRAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoAboutusAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/aboutusAuth'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.openSubscriptionForm=function(){window.open(this.rootPath+'/docs/subscription_form.pdf');}
OtcIQAppNav.prototype.openSubscriptionFormWord=function(){window.open(this.rootPath+'/docs/subscription_form.doc');}
OtcIQAppNav.prototype.openRealtimeSpec=function(){window.open(this.docLibrary+'/realtime_spec.pdf');}
OtcIQAppNav.prototype.openLevel2DisplayPolicy=function(){window.open(this.docLibrary+'/Level2_Display_Policy.pdf');}
OtcIQAppNav.prototype.openRSADevicePolicies=function(){window.open(this.docLibrary+'/RSA_Device_Policies.pdf');}
OtcIQAppNav.prototype.gotoQuotesPL=function(companyId,tabIndex,symbol){window.location.href=this.rootPath+'/member/quotesPL?companyId='+companyId+toHttpParameter(FIELD_TAB_INDEX,tabIndex,'&')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}

function MarketMakerHtml(){}
MarketMakerHtml.prototype.CSS_ROWS=['mmEven','mmOdd'];MarketMakerHtml.prototype.generate=function(value,callback)
{if((undefined==value)||(0==value.length))
return document.createElement('div');var output=document.createElement('table');output.style.width='100%';output.className='sectional fullTradeData';var elem=output.createCaption();elem.innerHTML=CAPTION_MARKET_MAKER_INFO;var rows=0;var cells=0;var row=output.insertRow(rows++);this.createHeaderCell(row,cells++,CAPTION_MMID);this.createHeaderCell(row,cells++,CAPTION_NAME);this.createHeaderCell(row,cells++,CAPTION_PHONE);this.createHeaderCell(row,cells++,CAPTION_PHONE);this.createHeaderCell(row,cells++,CAPTION_LOCATION);var j=0;for(var i=0;i<value.length;i++)
{var record=value[i];if(undefined==record)
continue;cells=0;var cssClass=this.CSS_ROWS[j++%2];row=output.insertRow(rows++);row.className=cssClass;this.createDetailCell(row,cells++,record.mmId);this.createDetailCell(row,cells++,record.name);this.createDetailCell(row,cells++,record.phone1);this.createDetailCell(row,cells++,record.phone2);this.createDetailCell(row,cells++,record.location);}
return output;}
MarketMakerHtml.prototype.createHeaderCell=function(row,cells,caption)
{var output=row.insertCell(cells);output.className='detailCaptionMin';output.innerHTML=caption;return output;}
MarketMakerHtml.prototype.createDetailCell=function(row,cells,value)
{var output=row.insertCell(cells);output.innerHTML=toDisplayable(value);return output;}

function MiniMarketMakerHtml(){}
MiniMarketMakerHtml.prototype.generate=function(value,callback)
{if(value==undefined)
return document.createElement('div');var all=(undefined!=value.phone1);var output=document.createElement('table');output.className='miniMMData';var rows=0;var cells=0;var row=output.insertRow(rows++);this.createHeaderCell(row,cells++,CAPTION_MMID);this.createHeaderCell(row,cells++,CAPTION_NAME);if(all)
{this.createHeaderCell(row,cells++,CAPTION_LOCATION);}
cells=0;row=output.insertRow(rows++);this.createDetailCell(row,cells++,value.mmId);this.createDetailCell(row,cells++,value.name);if(all)
{this.createDetailCell(row,cells++,value.location);}
return output;}
MiniMarketMakerHtml.prototype.createHeaderCell=function(row,cells,caption)
{var output=row.insertCell(cells);output.style.fontWeight='bold';output.innerHTML=caption;return output;}
MiniMarketMakerHtml.prototype.createDetailCell=function(row,cells,value)
{var output=row.insertCell(cells);output.innerHTML=toDisplayable(value);return output;}

function MiniMarketMakerDOM(){}
MiniMarketMakerDOM.prototype.generate=function(value,callback)
{if(value==undefined)
return document.createElement('div');var all=(undefined!=value.phone1);var output=document.createElement('table');var rows=0;var row=output.insertRow(rows++);var cell=this.createHeaderCell(row,0,value.name);cell.colSpan=2;row=output.insertRow(rows++);this.createHeaderCell(row,0,'Trader ID ');this.createDetailCell(row,1,value.traderId);if(all)
{row=output.insertRow(rows++);this.createHeaderCell(row,0,'Phone ');cell=row.insertCell(1);var div=document.createElement('div');div.appendChild(document.createTextNode(value.phone1));if(value.phone2!=undefined){div.appendChild(document.createElement('br'));div.appendChild(document.createTextNode(value.phone2));}
cell.appendChild(div);}
return output;}
MiniMarketMakerDOM.prototype.createHeaderCell=function(row,cells,caption)
{var output=row.insertCell(cells);output.style.fontWeight='bold';output.className='miniMMData';output.innerHTML=caption;return output;}
MiniMarketMakerDOM.prototype.createDetailCell=function(row,cells,value)
{var output=row.insertCell(cells);output.className='miniMMData';output.innerHTML=toDisplayable(value);return output;}

function NewsContentHtml(useFootnote,imagesPath)
{this.useFootnote=(undefined==useFootnote)?true:useFootnote;this.imagesPath=imagesPath;}
NewsContentHtml.prototype.FIND_CARRIAGE_RETURNS=/\r\n/gi;NewsContentHtml.prototype.FIND_NEW_LINE=/\n/gi;NewsContentHtml.prototype.FOOTNOTE='The above news release has been provided by the above company via the OTC Disclosure and News Service. Issuers of news releases and not Pink OTC Markets Inc. are solely responsible for the accuracy of such news releases.';NewsContentHtml.prototype.generate=function(value,callback)
{var contents=value.contents;contents=contents.replace(this.FIND_CARRIAGE_RETURNS,'<br />');contents=contents.replace(this.FIND_NEW_LINE,'<br />');var output=document.createElement('div');output.className='widgetPackage';var elem=document.createElement('strong');if(value.releaseSimpleDateFormatted)
elem.appendChild(document.createTextNode(value.releaseSimpleDateFormatted));else if(value.releaseDate.getTime)
elem.appendChild(document.createTextNode(Formatter.toDate(value.releaseDate)));else
elem.appendChild(document.createTextNode(Formatter.toDisplayable(value.releaseDate)));output.appendChild(elem);output.appendChild(document.createElement('br'));output.appendChild(document.createTextNode(TITLE_PINK_SHEETS_NEWS_SERVICE));output.appendChild(document.createElement('br'));output.appendChild(document.createElement('br'));if(undefined!=value.location)
{elem=document.createElement('em');elem.appendChild(document.createTextNode(value.location));output.appendChild(elem);elem=document.createElement('span');elem.innerHTML=' &mdash; ';output.appendChild(elem);}
elem=document.createElement('span');elem.style.padding='0px';elem.innerHTML=contents;output.appendChild(elem);if(this.useFootnote&&(value.typeId!=ANNOUNCEMENT_TYPE_ID)&&(value.typeId!=SEC_TEMPORARY_SUSPENSION_ANNOUNCEMENT_ID))
{output.appendChild(document.createElement('br'));output.appendChild(document.createElement('br'));elem=document.createElement('em');elem.appendChild(document.createTextNode(this.FOOTNOTE));output.appendChild(elem);}
return output;}

function NewsReleaseHtml(contentFormatter,imagesPath)
{this.contentFormatter=contentFormatter;this.imagesPath=imagesPath;}
NewsReleaseHtml.prototype.generate=function(value,callback)
{var output=document.createElement('div');output.className='widgetPackage';if(!value.noBackButton)
{output.appendChild(this.createBackButton(value,callback));output.appendChild(document.createElement('br'));}
var elem=document.createElement('div');elem.className='newsContainer';var inner=document.createElement('div');inner.className='innerdiv';var h3=document.createElement('h3');h3.innerHTML=value.title;inner.appendChild(h3);var p=document.createElement('p');p.appendChild(this.contentFormatter.generate(value,callback));inner.appendChild(p);elem.appendChild(inner);output.appendChild(elem);if(!value.noBackButton)
output.appendChild(this.createBackButton(value,callback));return output;}
NewsReleaseHtml.prototype.createBackButton=function(value,callback)
{var output=document.createElement('div');output.className='newsBack';var anchor=document.createElement('a');anchor.href='javascript:void(null);';anchor.onclick=callback.reopen;anchor.myCallback=callback;anchor.myRecord=value;anchor.psDecorated=true;anchor.innerHTML='&lt; Back';output.appendChild(anchor);return output;}

function FinancialStatementHtml(){}
FinancialStatementHtml.prototype.generate=function(value,callback)
{var output=document.createElement('table');output.border=0;output.cellSpacing=0;output.cellPadding=3;var rows=0;this.createRow(output,rows++,CAPTION_TOTAL_LIABILITIES,value.totalLiabilities);this.createRow(output,rows++,CAPTION_SHAREHOLDERS_EQUITY,value.shareholdersEquity);this.createRow(output,rows++,CAPTION_TOTAL_REVENUE,value.totalRevenue);this.createRow(output,rows++,CAPTION_OPERATING_INCOME,value.operatingIncome);this.createRow(output,rows++,CAPTION_NET_INCOME,value.netIncome);return output;}
FinancialStatementHtml.prototype.createRow=function(table,rows,caption,value)
{var output=table.insertRow(rows);output.insertCell(0).innerHTML=caption;output.insertCell(1).innerHTML=value;return output;}

function ListNewsReleaseHtml(){}
ListNewsReleaseHtml.prototype=new WorklistDOM();ListNewsReleaseHtml.prototype.NO_USER_PERMISSION='You do not have the correct privileges to access the News Release Service.  '
+'This may be because your company has not subscribed to the service, the subscription has expired, or your user credentials have not been assigned to News Releases for this issuer.<br /><br />'
+'To sign up for the News Release Service please complete the <a href="http://www.pinksheets.com/products/issuerservices_agreement.pdf" target="_blank">OTCIQ subscription agreement</a> and fax it to 212-652-5920.  '
+'To manage the user credentials for an issuer that is currently subscribed to the service, '
+'please contact our Issuer Service Department at 212.896.4420 or by email at <a href="mailto:issuerservices@pinksheets.com">issuerservices@pinksheets.com.</a> <br />';ListNewsReleaseHtml.prototype.generate=function(value,callback)
{var elem,output;if(this.noUserPermission)
{output=document.createElement('div');output.className='note';output.innerHTML=this.NO_USER_PERMISSION;return output;}
var records=value.records;if((undefined==value.records)||(0==value.records.length))
return this.createNoDataFound(value,callback);output=document.createElement('div');output.className='widgetPackage';var table=document.createElement('table');table.cellSpacing=0;table.className='listing';var row=table.insertRow(0);row.className='listingHeader';this.createHeaderCell(row,0,CAPTION_NEWS_DATE,FIELD_RELEASE_DATE,FIELD_DESCENDING,value,callback);this.createHeaderCell(row,1,CAPTION_TITLE,FIELD_TITLE,FIELD_ASCENDING,value,callback);this.createHeaderCell(row,2,CAPTION_TYPE,FIELD_TYPE_ID,FIELD_ASCENDING,value,callback);for(var i=0;i<value.records.length;i++)
{var record=value.records[i];row=table.insertRow(i+1);row.className=alternateCssParentListingClasses(i);this.createDetailCell(row,0,Formatter.toDate(record.releaseDate)).style.whiteSpace='nowrap';var cell=row.insertCell(1);cell.className=row.className;cell.appendChild(elem=document.createElement('strong'));elem.appendChild(elem=document.createElement('a'));elem.href='javascript:void(null);';elem.myValue=value;elem.myRecord=record;elem.myCallback=callback;elem.onclick=callback.handleOpenContents;elem.psDecorated=true;elem.innerHTML=toDisplayable(record.title);this.createDetailCell(row,2,toDisplayable(record.newsTypeDescript));;}
output.appendChild(table);var pager=new PagingLinksDOM();output.appendChild(pager.generate(value,callback));return output;}

function ListFinancialReportHtml(){}
ListFinancialReportHtml.prototype=new WorklistDOM();ListFinancialReportHtml.prototype.NO_USER_PERMISSION='You do not have the correct privileges to access the Financial Report Service.  '+'This may be because your company has not subscribed to the service, the subscription has expired, or your user credentials have not been assigned to Financial Reports for this issuer.<br /><br />'+'To sign up for the News Release Service please complete the <a href="http://www.pinksheets.com/products/issuerservices_agreement.pdf" target="_blank">OTCIQ subscription agreement</a> and fax it to 212-652-5920.  '+'To manage the user credentials for an issuer that is currently subscribed to the service, '+'please contact our Issuer Service Department at 212.896.4420 or by email at <a href="mailto:issuerservices@pinksheets.com">issuerservices@pinksheets.com.</a> <br />';ListFinancialReportHtml.prototype.NO_RECORDS_FOUND='No Financial Reports have been published on the OTC Disclosure and News Service by this company.';ListFinancialReportHtml.prototype.generate=function(value,callback)
{var records=value.records;var output=document.createElement('div');if((this.noUserPermission)||(undefined==records)||(0==records.length))
{output.className='note';if(this.noUserPermission)
output.innerHTML=this.NO_USER_PERMISSION;else
output.innerHTML=this.NO_RECORDS_FOUND;return output;}
var table=document.createElement('table');table.className='listing';table.cellSpacing=0;var rows=0;var cell,cells=0;var row=table.insertRow(rows++);row.className='listingHeader';this.createHeaderCell(row,cells++,CAPTION_TYPE,FIELD_TYPE_ID,FIELD_ASCENDING,value,callback).style.width='450px';this.createHeaderCell(row,cells++,CAPTION_PERIOD_END_DATE,FIELD_PERIOD_END_DATE,FIELD_DESCENDING,value,callback);this.createHeaderCell(row,cells++,CAPTION_RECEIVED,FIELD_RELEASE_DATE,FIELD_DESCENDING,value,callback);for(var i=0;i<records.length;i++)
{cells=0;var record=records[i];row=table.insertRow(rows++);row.className=alternateCssParentListingClasses(i);var title=(undefined!=record.typeName)?record.typeName:record.title;var subtitle=(undefined!=record.typeName&&undefined!=record.title)?' - '+record.title:'';var a=document.createElement('a');a.href='javascript:void(null);';a.myCallback=callback;a.myValue=value;a.myRecord=record;a.onclick=callback.handleOpenContents;a.className='normal';a.psDecorated=true;a.innerHTML=toDisplayable(title);cell=this.createDetailCell(row,cells++,subtitle);cell.style.width='450px';cell.insertBefore(a,cell.firstChild);this.createDetailCell(row,cells++,Formatter.toDate(record.periodDate));this.createDetailCell(row,cells++,Formatter.toDate(record.releaseDate));}
output.appendChild(table);var pager=new PagingLinksDOM();output.appendChild(pager.generate(value,callback));return output;}

var ListResourcesDOM=new WorklistDOM();ListResourcesDOM.generate=function(value,callback)
{var elem,output;var records=value.records;if((undefined==value.records)||(0==value.records.length))
return this.createNoDataFound(value,callback);output=document.createElement('div');output.className='widgetPackage';var table=document.createElement('table');table.cellSpacing=0;table.className='listing';var row=table.insertRow(0);row.className='listingHeader';this.createHeaderCell(row,0,CAPTION_NEWS_DATE,FIELD_RELEASE_DATE,FIELD_DESCENDING,value,callback);this.createHeaderCell(row,1,CAPTION_TITLE);this.createHeaderCell(row,2,CAPTION_TYPE,FIELD_TYPE_ID,FIELD_ASCENDING,value,callback);for(var i=0;i<value.records.length;i++)
{var record=value.records[i];row=table.insertRow(i+1);row.className=this.getRowCss(i);this.createDetailCell(row,0,Formatter.toDate(record.releaseDate)).style.whiteSpace='nowrap';var cell=row.insertCell(1);cell.className=row.className;cell.appendChild(elem=document.createElement('strong'));elem.appendChild(elem=document.createElement('a'));elem.href='javascript:void(null);';elem.myRecord=record;elem.onclick=function(ev){callback.handleSelect(value,this);return false;};elem.innerHTML=toDisplayable(record.title);elem.psDecorated=true;this.createDetailCell(row,2,toDisplayable(record.typeName));;}
output.appendChild(table);var pager=new PagingLinksDOM();output.appendChild(pager.generate(value,callback));return output;}

function SnapshotTradeHtml(){}
SnapshotTradeHtml.prototype.generate=function(value,callback)
{var output=document.createElement('table');output.style.width='100%';output.className='sectional snapshotTradeData';output.createCaption();var tr,td,rows=0;tr=output.insertRow(rows++);this.createHeader(tr,0,CAPTION_LAST_SALE,'lastsale');this.createCell(tr,1,value.lastSale,'');this.createHeader(tr,2,CAPTION_PREVIOUS_CLOSE,'previousclose');this.createCell(tr,3,value.previousClose,'');tr=output.insertRow(rows++);this.createHeader(tr,0,CAPTION_CHANGE,'change');if(value.change!=null&&value.change!=undefined)
{var change=value.change;var cssClass=''
if(change<0||change.charAt(0)=='-')
{cssClass='tradePercentageDown';if(change.charAt(0)!='-')
change='-'+change;}
else
{cssClass='tradePercentageUp';if(change.charAt(0)!='+')
change='+'+change;}
this.createCell(tr,1,change,cssClass);}
else
this.createCell(tr,1,' ','');this.createHeader(tr,2,CAPTION_PERCENT_CHANGE,'change');if(value.percentChange!=null&&value.percentChange!=undefined)
{var change=value.percentChange;var cssClass='';if(change<0||change.charAt(0)=='-')
{cssClass='tradePercentageDown';if(change.charAt(0)!='-')
change='-'+change;}
else
{cssClass='tradePercentageUp';if(change.charAt(0)!='+')
change='+'+change;}
this.createCell(tr,3,change,cssClass);}
else
this.createCell(tr,3,' ','');tr=output.insertRow(rows++);this.createHeader(tr,0,CAPTION_DAILY_HIGH,'dailyhigh');this.createCell(tr,1,value.dailyHigh,'');this.createHeader(tr,2,CAPTION_DAILY_LOW,'dailylow');this.createCell(tr,3,value.dailyLow,'');tr=output.insertRow(rows++);this.createHeader(tr,0,CAPTION_VOLUME,'volume');this.createCell(tr,1,value.volumeFormatted,'');this.createHeader(tr,2,CAPTION_LAST_TRADE_DATE_TIME);this.createCell(tr,3,value.quoteTime,'');return output;}
SnapshotTradeHtml.prototype.createHeader=function(row,index,caption,glossaryId)
{var output=row.insertCell(index);output.psGlossaryId=glossaryId;output.className='tradeCaption';output.appendChild(document.createTextNode(caption));return output;}
SnapshotTradeHtml.prototype.createCell=function(row,index,caption,cssClass)
{var output=row.insertCell(index);output.className=cssClass;output.appendChild(document.createTextNode(caption));return output;}

function TradeHtml(){}
TradeHtml.prototype.generate=function(value,callback)
{var output=document.createElement('table');output.style.width='100%';output.className='sectional fullTradeData';var caption=output.createCaption();caption.appendChild(document.createTextNode(CAPTION_TRADE_HEADER+' / '));var span=document.createElement('span');span.className='lastTrade';span.appendChild(document.createTextNode(CAPTION_LAST_TRADE_DATE_TIME+' '+value.quoteTime));caption.appendChild(span);var tr,td,rows=0;tr=output.insertRow(rows++);tr.className='tradeOdd';this.createHeader(tr,0,CAPTION_LAST_SALE,'lastsale');this.createCell(tr,1,value.lastSale,'').style.width='250px';this.createHeader(tr,2,CAPTION_CHANGE,'change');if(value.change!=null&&value.change!=undefined)
{var change=value.change;var cssClass=''
if(change<0||change.charAt(0)=='-')
{cssClass='tradePercentageDown';if(change.charAt(0)!='-')
change='-'+change;}
else
{cssClass='tradePercentageUp';if(change.charAt(0)!='+')
change='+'+change;}
this.createCell(tr,3,change,cssClass);}
else
this.createCell(tr,3,' ','');tr=output.insertRow(rows++);tr.className='tradeEven';this.createHeader(tr,0,CAPTION_PERCENT_CHANGE,'change');if(value.percentChange!=null&&value.percentChange!=undefined)
{var change=value.percentChange;var cssClass='';if(change<0||change.charAt(0)=='-')
{cssClass='tradePercentageDown';if(change.charAt(0)!='-')
change='-'+change;}
else
{cssClass='tradePercentageUp';if(change.charAt(0)!='+')
change='+'+change;}
this.createCell(tr,1,change,cssClass);}
else
this.createCell(tr,1,' ','');this.createHeader(tr,2,CAPTION_TICK,'tick');this.createCell(tr,3,toDisplayable(value.tickName),'');tr=output.insertRow(rows++);tr.className='tradeOdd';this.createHeader(tr,0,CAPTION_DAILY_HIGH,'dailyhigh');this.createCell(tr,1,value.dailyHigh,'');this.createHeader(tr,2,CAPTION_DAILY_LOW,'dailylow');this.createCell(tr,3,value.dailyLow,'');tr=output.insertRow(rows++);tr.className='tradeEven';this.createHeader(tr,0,CAPTION_OPENING_PRICE,'openprice');this.createCell(tr,1,value.openingPrice,'');this.createHeader(tr,2,CAPTION_VOLUME,'volume');this.createCell(tr,3,value.volumeFormatted,'');tr=output.insertRow(rows++);tr.className='tradeOdd';this.createHeader(tr,0,CAPTION_ANNUAL_HIGH,'annualhigh');this.createCell(tr,1,value.annualHigh,'');this.createHeader(tr,2,CAPTION_ANNUAL_LOW,'annuallow');this.createCell(tr,3,value.annualLow,'');tr=output.insertRow(rows++);tr.className='tradeEven';this.createHeader(tr,0,CAPTION_PREVIOUS_CLOSE,'previousclose');this.createCell(tr,1,value.previousClose,'');this.createHeader(tr,2,CAPTION_DIVIDEND,'dividend');this.createCell(tr,3,value.dividend,'');tr=output.insertRow(rows++);tr.className='tradeOdd';this.createHeader(tr,0,CAPTION_YIELD,'yield');this.createCell(tr,1,value.yield,'');this.createHeader(tr,2,CAPTION_BETA_COEFFICIENT,'beta');this.createCell(tr,3,value.betaCoefficient,'');if(EXCHANGE_NASDAQ_OTC!=value.exchangeCode)
{tr=output.insertRow(rows++);tr.className='tradeEven';this.createHeader(tr,0,CAPTION_EARNINGS_PER_SHARE,'eps');this.createCell(tr,1,value.eps,'');this.createHeader(tr,2,CAPTION_PE_RATIO,'peratio');this.createCell(tr,3,toDisplayable(value.peRatio),'');}
tr=output.insertRow(rows++);this.createCell(tr,0,'Trade data delayed '+value.delay+' minutes.','').colSpan=4;return output;}
TradeHtml.prototype.createHeader=function(row,index,caption,glossaryId)
{var output=row.insertCell(index);output.psGlossaryId=glossaryId;output.style.fontWeight='bold';output.appendChild(document.createTextNode(caption));return output;}
TradeHtml.prototype.createCell=function(row,index,caption,cssClass)
{var output=row.insertCell(index);output.className=cssClass;output.appendChild(document.createTextNode(caption));return output;}

function TradeDOM(){}
TradeDOM.prototype.generate=function(value,callback)
{var output=document.createElement('table');output.style.width='100%';output.className='sectional fullTradeData';var caption=output.myCaption=output.createCaption();caption.appendChild(document.createTextNode('Trade Data Summary'));var tr,td,rows=0;tr=output.insertRow(rows++);tr.className='tradeOdd';this.createHeader(tr,0,CAPTION_LAST_SALE,'lastsale');this.createCell(tr,1,value.lastSale+' &mdash; '+value.quoteTime,'').style.width='250px';this.createHeader(tr,2,'Daily Range','dailyhigh');this.createCell(tr,3,value.dailyLow+' - '+value.dailyHigh,'');tr=output.insertRow(rows++);tr.className='tradeEven';this.createHeader(tr,0,CAPTION_CHANGE,'change');var change;if(value.change!=null&&value.change!=undefined)
{var change=value.change;var pchange=value.percentChange;var cssClass='';if(change<0||change.charAt(0)=='-')
{cssClass='tradePercentageDown';if(change.charAt(0)!='-')
change='-'+change;if(pchange.charAt(0)!='-')
pchange='-'+pchange;}
else
{cssClass='tradePercentageUp';if(change.charAt(0)!='+')
change='+'+change;if(pchange.charAt(0)!='+')
pchange='+'+pchange;}
change+=' ('+pchange+'%)';this.createCell(tr,1,change,cssClass);}
else
this.createCell(tr,1,' ','');this.createHeader(tr,2,'52wk Range','annualhigh');this.createCell(tr,3,value.annualLow+' - '+value.annualHigh,'');tr=output.insertRow(rows++);tr.className='tradeOdd';this.createHeader(tr,0,CAPTION_PREVIOUS_CLOSE,'previousclose');this.createCell(tr,1,value.previousClose,'');this.createHeader(tr,2,CAPTION_VOLUME,'volume');this.createCell(tr,3,value.volumeFormatted,'');tr=output.insertRow(rows++);tr.className='tradeEven';this.createHeader(tr,0,CAPTION_OPENING_PRICE,'openprice');this.createCell(tr,1,value.openingPrice,'');this.createHeader(tr,2,'Dividend (Yield)','dividend');this.createCell(tr,3,value.dividend+' ('+value.yield+')');tr=output.insertRow(rows++);var div=document.createElement('div');div.className='footnote';var sup=document.createElement('sup');sup.appendChild(document.createTextNode('1'));div.appendChild(sup);div.appendChild(document.createTextNode('Trade data delayed '+value.delay+' minutes.'));var td=tr.insertCell(0);td.colSpan=4;td.appendChild(div);return output;}
TradeDOM.prototype.createHeader=function(row,index,caption,glossaryId)
{var output=row.insertCell(index);output.psGlossaryId=glossaryId;output.style.fontWeight='bold';output.appendChild(document.createTextNode(caption));return output;}
TradeDOM.prototype.createCell=function(row,index,caption,cssClass)
{var output=row.insertCell(index);output.className=cssClass;output.innerHTML=caption;return output;}

function MontageHtml(){}
MontageHtml.prototype.generate=function(criteria,callback)
{var value=criteria.montage;var output=document.createElement('table');output.border=0;output.style.width='100%';output.className='sectional';var elem=output.createCaption();elem.innerHTML=CAPTION_MONTAGE_HEADER;var rows=0;var row=output.insertRow(rows++);elem=row.insertCell(0);elem.style.verticalAlign='top';elem.style.width='50%';elem.appendChild(this.genList(value.buyList,CAPTION_BID_PRICE,'OW',value,callback));elem=row.insertCell(1);elem.style.verticalAlign='top';elem.style.width='50%';elem.appendChild(this.genList(value.sellList,CAPTION_ASK_PRICE,'BW',value,callback));row=output.insertRow(rows++);elem=row.insertCell(0);elem.className='footnote';elem.innerHTML='Real time as of '+value.today;return output;}
MontageHtml.prototype.genList=function(list,priceCaption,priceWanted,value,callback)
{var output=document.createElement('table');output.border=0;output.className='montage';var rows=0;var row=output.insertRow(rows++);var cells=0;this.createHeaderCell(row,cells++,CAPTION_MMID);this.createHeaderCell(row,cells++,priceCaption);this.createHeaderCell(row,cells++,CAPTION_SHARES);this.createHeaderCell(row,cells++,CAPTION_DATE_TIME);row=output.insertRow(rows++);var cell=row.insertCell(0);cell.colSpan=cells;cell.style.height='3px';cell.style.border=0;if(undefined!=list)
{for(var i=0;i<list.length;i++)
{cells=0;var item=list[i];row=output.insertRow(rows++);cell=this.createDetailCell(row,cells++,item,item.mmIdDisplay);cell.style.fontWeight='bold';cell.className=cell.className+' montageMmId';cell.myCallback=callback;cell.myValue=value;cell.myRecord=item;cell.onmouseover=callback.handleMMOnMouseOver;cell.onmouseout=callback.handleMMOnMouseOut;var price=item.price;var size=item.size;if(item.isBidOfferWanted)
{price=priceWanted;size='';}
this.createDetailCell(row,cells++,item,price);this.createDetailCell(row,cells++,item,size);this.createDetailCell(row,cells++,item,item.transTime);}}
return output;}
MontageHtml.prototype.createHeaderCell=function(row,cells,caption)
{var output=row.insertCell(cells);output.className='detailCaptionMin captionMontage';output.innerHTML=caption;return output;}
MontageHtml.prototype.createDetailCell=function(row,cells,item,caption)
{var output=row.insertCell(cells);output.className=item.tdColor+' '+item.textColor;output.innerHTML=toDisplayable(caption);return output;}
MontageHtml.prototype.currentDateTime=function()
{var value=new Date();var hour=value.getHours();var min=value.getMinutes();var sec=value.getSeconds()
var amPm=" AM";var output="";if(hour>=12)
{hour-=12;amPm=" PM";}
if(hour==0)hour=12;output=value.getUTCDay()+" "+value.getDate()+", "+value.getFullYear()+" "+hour+":"+((min<10)?"0":"")+min+":"+sec+amPm;return output;}

function MontageDOM(){}
MontageDOM.prototype.generate=function(criteria,callback)
{var value=criteria.montage;var elem,a,output=document.createElement('table');output.border=0;output.style.width='100%';output.className='sectional';elem=output.createCaption();var caption=CAPTION_MONTAGE_HEADER;if(!value.isOtc)
caption+="<sup>1</sup>";elem.innerHTML=caption;elem.appendChild(a=document.createElement('a'));a.className='right';a.href='javascript:void(null);';a.innerHTML=CAPTION_REFRESH;a.onclick=function(ev){callback.doRefresh(criteria);return false;};var rows=0;var row=output.insertRow(rows++);elem=row.insertCell(0);elem.style.verticalAlign='top';elem.style.width='50%';elem.appendChild(this.genList(value.buyList,CAPTION_BID_PRICE,'OW',value,callback));elem=row.insertCell(1);elem.style.verticalAlign='top';elem.style.width='50%';elem.appendChild(this.genList(value.sellList,CAPTION_ASK_PRICE,'BW',value,callback));row=output.insertRow(rows++);elem=row.insertCell(0);elem.className='footnote';elem.innerHTML='Real time as of '+value.today;return output;}
MontageDOM.prototype.genList=function(list,priceCaption,priceWanted,value,callback)
{var output=document.createElement('table');output.border=0;output.className='montage';var rows=0;var row=output.insertRow(rows++);var cells=0;this.createHeaderCell(row,cells++,CAPTION_MMID);this.createHeaderCell(row,cells++,priceCaption);this.createHeaderCell(row,cells++,CAPTION_SHARES);this.createHeaderCell(row,cells++,CAPTION_DATE_TIME);var cell,elem;if(undefined!=list)
{for(var i=0;i<list.length;i++)
{cells=0;var item=list[i];row=output.insertRow(rows++);row.className=((i%2)==0)?'montageEven':'montageOdd';cell=this.createDetailCell(row,cells++,item,'');cell.style.fontWeight='bold';cell.myCallback=callback;cell.myValue=value;cell.myRecord=item;cell.onmouseover=callback.handleMMOnMouseOver;cell.onmouseout=callback.handleMMOnMouseOut;if(callback.gotoMarketMaker){elem=document.createElement('a');elem.href='javascript:void (null);';elem.myCallback=callback;elem.onclick=callback.gotoMarketMaker;elem.myRecord=item;elem.innerHTML=toDisplayable(item.mmIdDisplay);cell.appendChild(elem);}
else
cell.innerHTML=toDisplayable(item.mmIdDisplay);var price=item.price;var size=item.size;if(item.isBidOfferWanted)
{price=priceWanted;size='';}
this.createDetailCell(row,cells++,item,price);this.createDetailCell(row,cells++,item,size);this.createDetailCell(row,cells++,item,item.transTime);}}
return output;}
MontageDOM.prototype.createHeaderCell=function(row,cells,caption)
{var output=row.insertCell(cells);output.className='detailCaptionMin captionMontage';output.innerHTML=caption;return output;}
MontageDOM.prototype.createDetailCell=function(row,cells,item,caption)
{var output=row.insertCell(cells);output.className=item.tdColor+' '+item.textColor+' '+row.className;output.innerHTML=toDisplayable(caption);return output;}
MontageDOM.prototype.currentDateTime=function()
{var value=new Date();var hour=value.getHours();var min=value.getMinutes();var sec=value.getSeconds()
var amPm=" AM";var output="";if(hour>=12)
{hour-=12;amPm=" PM";}
if(hour==0)hour=12;output=value.getUTCDay()+" "+value.getDate()+", "+value.getFullYear()+" "+hour+":"+((min<10)?"0":"")+min+":"+sec+amPm;return output;}

function InsideHtml(){}
InsideHtml.prototype.generate=function(value,callback)
{var output=document.createElement('table');output.border=0;output.style.width='100%';output.className='sectional insideData';var rows=0;var td,tr;var caption=output.createCaption();caption.appendChild(document.createTextNode(CAPTION_INSIDE_HEADER));tr=output.insertRow(rows++);this.createHeader(tr,0,CAPTION_BEST_BID,'bestbid');this.createHeader(tr,1,CAPTION_BEST_ASK,'bestask');this.createHeader(tr,2,CAPTION_TIME_LAST_INSIDE_CHANGE);var cssClass=(value.isRealtime)?'insideRealtimeValue':'insideDelayedValue';tr=output.insertRow(rows++);if(undefined==value)
{this.createCell(tr,0,'Unavailable',cssClass).colSpan=3;}
else
{if(value.bidPrice==0)
this.createCell(tr,0,'No Inside',cssClass);else
this.createCell(tr,0,value.bidPrice+' ('+value.bidSize+' shares)',cssClass);if(value.askPrice==0)
this.createCell(tr,1,'No Inside',cssClass);else
this.createCell(tr,1,value.askPrice+' ('+value.askSize+' shares)',cssClass);this.createCell(tr,2,toDisplayable(value.transTime),cssClass);}
return output;}
InsideHtml.prototype.createHeader=function(row,index,caption,glossaryId)
{var output=row.insertCell(index);output.psGlossaryId=glossaryId;output.className='insideCaption';output.appendChild(document.createTextNode(caption));}
InsideHtml.prototype.createCell=function(row,index,caption,cssClass)
{var output=row.insertCell(index);output.className=cssClass;output.appendChild(document.createTextNode(caption));}

function InsideDOM(){}
InsideDOM.prototype.generate=function(value,callback)
{var output=document.createElement('table');output.border=0;output.style.width='100%';output.className='sectional insideData mergedCells';var rows=0;var td,tr;var caption=output.createCaption();caption.appendChild(document.createTextNode('Quote Data'));tr=output.insertRow(rows++);this.createHeader(tr,0,CAPTION_BEST_BID,'bestbid');this.createHeader(tr,1,CAPTION_BEST_ASK,'bestask');this.createHeader(tr,2,CAPTION_TIME_LAST_INSIDE_CHANGE);var cssClass=(value.isRealtime)?'insideRealtimeValue':'insideDelayedValue';tr=output.insertRow(rows++);if(undefined==value)
{this.createCell(tr,0,'Unavailable',cssClass).colSpan=3;}
else
{if(value.bidPrice==0)
this.createCell(tr,0,'No Inside',cssClass);else
this.createCell(tr,0,value.bidPrice+' x '+value.bidSize+' shares',cssClass);if(value.askPrice==0)
this.createCell(tr,1,'No Inside',cssClass);else
this.createCell(tr,1,value.askPrice+' x '+value.askSize+' shares',cssClass);this.createCell(tr,2,toDisplayable(value.transTime),cssClass);}
return output;}
InsideDOM.prototype.createHeader=function(row,index,caption,glossaryId)
{var output=row.insertCell(index);output.psGlossaryId=glossaryId;output.className='insideCaption';output.appendChild(document.createTextNode(caption));}
InsideDOM.prototype.createCell=function(row,index,caption,cssClass)
{var output=row.insertCell(index);output.className=cssClass;output.appendChild(document.createTextNode(caption));}

function QuoteDOM(){}
QuoteDOM.prototype.generate=function(value,callback)
{var output=document.createElement('div');output.className='widgetPackage';var trade,inside,montage,marketMakers;trade=document.createElement('div');output.appendChild(trade);inside=document.createElement('div');output.appendChild(inside);montage=document.createElement('div');output.appendChild(montage);marketMakers=document.createElement('div');marketMakers.style.width='100%';output.appendChild(marketMakers);var refresh=document.createElement('div');refresh.style.padding='3px';refresh.style.width='99%';refresh.style.textAlign='right';var anchor=document.createElement('a');anchor.className='lightButton';anchor.href='javascript:void(null);';anchor.onclick=callback.handleRefresh;anchor.myValue=value;anchor.myCallback=callback;anchor.appendChild(document.createTextNode(CAPTION_REFRESH));refresh.appendChild(anchor);output.appendChild(refresh);output.myInside=inside;output.myTrade=trade;output.myMarketMakers=marketMakers;output.myMontage=montage;return output;}
QuoteDOM.prototype.generateMontageDisclaimer=function(hasBB,callback)
{var e,o=document.createElement('div');o.appendChild(e=document.createElement('div'));e.className='footnote';var disclaimer='All quotes displayed here are published by market makers on Pink Quote, Pink OTC Markets\' electronic inter-dealer quotation system for OTC securities';if(hasBB)
disclaimer+=', unless they are identified as OTCBB quotes in the legend below. OTCBB quotations are provided by Nasdaq';disclaimer+='.<br /><br />Please see <a href="http://www.pinksheets.com/tos.jsp">Terms of Service</a> and <a href="http://www.pinksheets.com/risk.jsp">Risk Warning</a> for more information.';e.innerHTML=disclaimer;o.appendChild(document.createElement('br'));var b=function(a,css,caption,text)
{var e,o=document.createElement('div');o.className='widgetSection';a.appendChild(o);o.appendChild(e=document.createElement('span'));e.className=css;e.innerHTML=caption;o.appendChild(e=document.createElement('span'));e.innerHTML='&nbsp;&mdash;&nbsp;'+text;}
b(o,'highlightPS','MMID','Market maker quotation published in Pink Quote that meets the Inside market');b(o,'montageInsideColor','MMID','Market maker quotation published in Pink Quote');b(o,'highlightClosed','cMMID','Closed quote');b(o,'montageNormalColor','U','Unpriced quote in Pink Quote');if(hasBB)
b(o,'montageBBInsideColor','U','Unpriced quote in OTCBB');b(o,'montageNormalColor','MMIDu','Unsolicited market maker quotation published in Pink Quote');if(hasBB)
{b(o,'highlightBB','MMID','Market maker quotation published in OTCBB that meets the Inside market');b(o,'montageBBInsideColor','MMID','Market maker quotation published in OTCBB');}
return o;}

function QuoteHtml(){}
QuoteHtml.prototype.generate=function(value,callback)
{var output=document.createElement('div');output.className='widgetPackage';var inside,montage,trade,marketMakers,tr,td;var table=document.createElement('table');table.border=0;table.style.width='100%';tr=table.insertRow(0);inside=tr.insertCell(0);inside.style.paddingRight='16px';output.mySnapshotTrade=tr.insertCell(1);output.appendChild(table);montage=document.createElement('div');montage.style.width='100%';output.appendChild(montage);trade=document.createElement('div');trade.style.width='100%';output.appendChild(trade);marketMakers=document.createElement('div');marketMakers.style.width='100%';output.appendChild(marketMakers);var refresh=document.createElement('div');refresh.style.padding='3px';refresh.style.width='99%';refresh.style.textAlign='right';var anchor=document.createElement('a');anchor.className='lightButton';anchor.href='javascript:void(null);';anchor.onclick=callback.handleRefresh;anchor.myValue=value;anchor.myCallback=callback;anchor.appendChild(document.createTextNode(CAPTION_REFRESH));refresh.appendChild(anchor);output.appendChild(refresh);output.myInside=inside;output.myTrade=trade;output.myMarketMakers=marketMakers;output.myMontage=montage;return output;}
QuoteHtml.prototype.generateMontageDisclaimer=QuoteDOM.prototype.generateMontageDisclaimer;

function SecurityDetailsHtml(){}
SecurityDetailsHtml.prototype.generate=function(value,callback)
{var output=document.createElement('div');output.className='widgetPackage';if(undefined==value)
{output.appendChild(document.createTextNode('Unavailable'));return output;}
var row,cell,tbody,table=document.createElement('table');table.cellSpacing=0;table.style.width='100%';table.appendChild(tbody=document.createElement('tbody'));var title=(undefined!=value.symbol)?value.symbol+' &mdash; '+value.companyName:value.companyName;tbody.appendChild(row=document.createElement('tr'));row.appendChild(cell=document.createElement('th'));cell.innerHTML=title;if(value.className!=undefined)
{tbody.appendChild(row=document.createElement('tr'));row.appendChild(cell=document.createElement('td'));cell.className='securityDetailsCaption';cell.innerHTML=toDisplayable(value.className);if(value.noPar||(undefined!=value.parValueX))
{cell.appendChild(document.createElement('br'));if(value.noPar)
cell.appendChild(document.createTextNode(CAPTION_NO_PAR));else
cell.appendChild(document.createTextNode(CAPTION_PAR_VALUE+': '+value.parValueX));}}
cell=document.createElement('td');if(!value.isOtc&&(undefined!=value.primaryMarket))
cell.appendChild(document.createTextNode(CAPTION_PRIMARY_VENUE+': '+value.primaryMarket));if(value.isUnsolicited)
this.appendText(cell,CAPTION_QUOTE_STATUS+': '+CAPTION_UNSOLICITED);if(value.isPinkSheets&&value.isPiggyBacked)
this.appendText(cell,CAPTION_PIGGYBACK_QUALIFIED);if(undefined!=value.statusName)
this.appendText(cell,CAPTION_STATUS+': '+value.statusName);if(cell.hasChildNodes())
{tbody.appendChild(row=document.createElement('tr'));row.appendChild(cell);}
output.appendChild(table);return output;}
SecurityDetailsHtml.prototype.appendText=function(elem,value)
{if(elem.hasChildNodes())
value=' / '+value;elem.appendChild(document.createTextNode(value));}

function ListNewsReleaseSimple(caller,viewer,pageSize,body,pager,isOpenTab)
{this.caller=caller;this.viewer=viewer;this.pageSize=pageSize;this.body=body;this.pager=(undefined!=pager)?pager:appNav;this.isOpenTab=isOpenTab;this.records=new Array();}
ListNewsReleaseSimple.prototype=new WorklistSimple();ListNewsReleaseSimple.prototype.getStoryViewer=function()
{if(undefined==this.storyViewer)
{this.contentWindow=new ContentWindow();this.storyViewer=new NewsReleaseHtml(new NewsContentHtml());}
return this.storyViewer;}
ListNewsReleaseSimple.prototype.doSearch=function(company,statusId,body)
{var criteria=new ListNewsReleaseCriteria(company.getId(),statusId);criteria.company=company;this.run(criteria,body);}
ListNewsReleaseSimple.prototype.doCompany=function(companyId,body)
{this.run(new ListNewsReleaseCriteria(companyId,STATUS_ID_ACTIVE),body);}
ListNewsReleaseSimple.prototype.doStockTransactions=function(companyId,body)
{var filter=new ListNewsReleaseCriteria(companyId,STATUS_ID_ACTIVE);filter.includeTypes=STOCK_TRANSACTIONS;this.run(filter,body);}
ListNewsReleaseSimple.prototype.doLatest=function(body)
{this.run(new ListNewsReleaseCriteria(undefined,STATUS_ID_ACTIVE),body);}
ListNewsReleaseSimple.prototype.doQx=function(body,isHome)
{var criteria=new ListNewsReleaseCriteria(undefined,STATUS_ID_ACTIVE);criteria.isQX=true;criteria.isHomePage=isHome;this.run(criteria,body);}
ListNewsReleaseSimple.prototype.reopen=function(ev)
{var wrapper=this.myCallback;wrapper.callback.run(wrapper.criteria);}
ListNewsReleaseSimple.prototype.makeCall=function(criteria,dataHandler)
{if(undefined!=criteria.companyId)
this.caller.getNewsReleases(criteria,dataHandler);else
this.caller.getLatestNewsReleases(criteria,dataHandler);}
ListNewsReleaseSimple.prototype.handleOpenContents=function(ev)
{var me=this.myCallback;var record=this.myRecord;if(me.isOpenTab)
me.pager.gotoQuote(record.symbol,'1');else
me.showContents(record,this.myValue);return false;}
ListNewsReleaseSimple.prototype.showContents=function(record,value,me)
{if(!me)
me=this;var cached=this.records[record.id];if(undefined!=cached)
record=cached;else
{cached=this.caller.getNewsRelease(record.id);this.records[cached.id]=record=cached;}
var criteria=value.criteria;var wrapper=new AjaxDataHandler(me,criteria);wrapper.reopen=this.reopen;var contents=this.getStoryViewer().generate(record,wrapper);this.contentWindow.runInline(new ContentWindowInfo(record.title,contents,criteria.body));}
ListNewsReleaseSimple.prototype.handleSelection=function(ev)
{this.myCallback.pager.gotoNews(this.myRecord.symbol);return false;}

function ListFinancialReportSimple(caller,viewer,pageSize,body,statementViewer,pager)
{this.caller=caller;this.viewer=viewer;this.pageSize=pageSize;this.body=body;this.statementViewer=statementViewer;this.pager=pager;}
ListFinancialReportSimple.prototype=new WorklistSimple();ListFinancialReportSimple.prototype.doSearch=function(company,statusId,body)
{this.run(new ListFinancialReportCriteria(company.getId(),statusId),body);}
ListFinancialReportSimple.prototype.doCompany=function(companyId,body)
{this.run(new ListFinancialReportCriteria(companyId,STATUS_ID_ACTIVE),body);}
ListFinancialReportSimple.prototype.doFilings=function(companyId,body)
{this.doFilingsByStatus(companyId,STATUS_ID_ACTIVE,body);}
ListFinancialReportSimple.prototype.doFilingsByStatus=function(companyId,statusId,body)
{var filter=new ListFinancialReportCriteria(companyId,statusId);filter.onlyFilings=true;this.run(filter,body);}
ListFinancialReportSimple.prototype.doResearchReports=function(companyId,body)
{var filter=new ListFinancialReportCriteria(companyId,STATUS_ID_ACTIVE);filter.includeTypes=FIN_REPORT_RESEARCH_REPORT;this.run(filter,body);}
ListFinancialReportSimple.prototype.doLatest=function(body)
{var criteria=new ListFinancialReportCriteria(undefined,STATUS_ID_ACTIVE);criteria.isHomePage=true;this.run(criteria,body);}
ListFinancialReportSimple.prototype.doQx=function(body)
{var criteria=new ListFinancialReportCriteria(undefined,STATUS_ID_ACTIVE);criteria.isQX=true;criteria.isHomePage=true;this.run(criteria,body);}
ListFinancialReportSimple.prototype.doHomePageLatest=function(body)
{var criteria=new ListFinancialReportCriteria(undefined,STATUS_ID_ACTIVE);criteria.onlyRecent=true;criteria.isHomePage=true;this.run(criteria,body);}
ListFinancialReportSimple.prototype.doHomePageQx=function(body)
{var criteria=new ListFinancialReportCriteria(undefined,STATUS_ID_ACTIVE);criteria.onlyRecent=true;criteria.isQX=true;criteria.isHomePage=true;this.run(criteria,body);}
ListFinancialReportSimple.prototype.makeCall=function(criteria,dataHandler)
{this.caller.getFinancialReports(criteria,dataHandler);}
ListFinancialReportSimple.prototype.changeStatus=function(ev)
{var me=this.myCallback;var criteria=this.myValue.criteria;criteria.statusId=this.myStatusId;mw.run(criteria);}
ListFinancialReportSimple.prototype.handleOpenContents=function(ev)
{this.myCallback.pager.openFinancialReport(this.myRecord.id);return false;}
ListFinancialReportSimple.prototype.handleSelection=function(ev)
{this.myCallback.pager.gotoFinancialReports(this.myRecord.symbol);return false;}

function ListResourcesSimple(caller,viewer,pageSize,body,callback)
{this.caller=caller;this.viewer=viewer;this.pageSize=pageSize;this.body=body;this.callback=callback}
ListResourcesSimple.prototype=new WorklistSimple();ListResourcesSimple.prototype.doLatest=function(body,isHomePage)
{var criteria={};criteria.isHomePage=isHomePage;criteria.statusId=STATUS_ID_ACTIVE;this.run(criteria,body);}
ListResourcesSimple.prototype.doInsiderTrans=function(body,companyId)
{this.filter({companyId:companyId,statusId:STATUS_ID_ACTIVE,onlyInsiderTrans:true},body);}
ListResourcesSimple.prototype.makeCall=function(criteria,dataHandler)
{this.caller.getResources(criteria,dataHandler);}
ListResourcesSimple.prototype.handleSelect=function(v,e)
{var r=e.myRecord;var t=r.resourceType;if(t=='NR')
this.callback.handleNews(v,r);else
this.callback.handleFR(v,r);}

function MarketMakerInfo(caller,viewer,callback)
{this.caller=caller;this.viewer=viewer;this.callback=callback;this.records=new Array();}
MarketMakerInfo.prototype.open=function(from,mmId,traderId)
{var theTop=((undefined!=document.documentElement)&&document.documentElement.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop;var body=this.getPopup();body.innerHTML='';body.appendChild(this.viewer.generate(this.getRecord(mmId,traderId),this));body.style.display='block';if(undefined!=from)
positionLeftAndBelowElement(body,from);else
centerElement(body);window.scrollTo(0,theTop);}
MarketMakerInfo.prototype.getRecord=function(mmId,traderId)
{var record;if(undefined!=traderId)
{record=this.records[traderId];if(undefined!=record)
return record;record=this.caller.getTrader(traderId);if(undefined!=record)
return this.records[traderId]=record;}
record=this.records[mmId];if(undefined!=record)
return record;record=this.caller.getMarketMaker(mmId);if(undefined==record)
record={};return this.records[mmId]=record;}
MarketMakerInfo.prototype.getPopup=function()
{if(undefined==this.popup)
{var elem=this.popup=document.createElement('div');elem.className='popup';document.body.insertBefore(elem,document.body.firstChild);}
return this.popup;}
MarketMakerInfo.prototype.close=function()
{this.getPopup().style.display='none';}

function QuoteSimple(caller,edgarCaller,commonCaller,viewer,body,insideViewer,montageViewer,tradeViewer,snapshotTradeViewer,appId,callback)
{this.caller=caller;this.edgarCaller=edgarCaller;this.commonCaller=commonCaller;this.viewer=viewer;this.body=body;this.callback=callback;this.insideViewer=insideViewer;this.montageViewer=montageViewer;this.tradeViewer=tradeViewer;this.snapshotTradeViewer=snapshotTradeViewer;this.appId=appId;this.hasBB=(appId==APPLICATION_ID_OTCIQ)?true:false;this.showMMInfo=false;}
QuoteSimple.prototype.CSS_MONTAGE_BASE='montageBasicTd montageBasicText';QuoteSimple.prototype.CSS_MONTAGE_TD_COLORS=['montageClosedTd','montageBBInsideTd','montageInsideTd','montageNormalTd','montageNormalTd'];QuoteSimple.prototype.CSS_MONTAGE_TEXT_COLORS=['montageClosedText','montageBBInsideText','montageInsideText','montageBBText','montagePSText'];QuoteSimple.prototype.setBody=function(newValue){this.body=newValue;}
QuoteSimple.prototype.doSymbol=function(symbol,body)
{this.run(new QuoteCriteria(symbol,undefined,this.appId),body);}
QuoteSimple.prototype.doSecurity=function(securityId,body)
{this.run(new QuoteCriteria(undefined,securityId,this.appId),body);}
QuoteSimple.prototype.doSec=function(security,body)
{var criteria=new QuoteCriteria(security.symbol,security.secId,this.appId);criteria.isOtc=security.isOtc;this.run(criteria,body);}
QuoteSimple.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;criteria.inside=undefined;criteria.montage=undefined;criteria.trade=undefined;var output=criteria.output=this.viewer.generate(criteria,this);criteria.body.innerHTML='';criteria.body.appendChild(output);this.caller.getInside(criteria.symbol,criteria.securityId,this.appId,new QuoteSimpleInsideHandler(this,criteria));if(output.myChart)
criteria.body.myChart=output.myChart;if(undefined!=criteria.symbol)
this.caller.getTradeInfo(criteria.symbol,this.appId,new QuoteSimpleTradeHandler(this,criteria));}
QuoteSimple.prototype.gotoMarketMaker=function(){var me=this.myCallback;var record=this.myRecord;me.getMMInfo().close();me.callback.callback.gotoMarketMaker(record.mmId);return false;}
QuoteSimple.prototype.popSnapshot=function(criteria)
{if((criteria.montage!=undefined)&&(criteria.inside!=undefined)&&(undefined!=criteria.trade)&&(undefined!=criteria.trade.symbol)&&(criteria.output.mySnapshotTrade!=undefined))
criteria.output.mySnapshotTrade.appendChild(this.snapshotTradeViewer.generate(criteria.trade,this));}
QuoteSimple.prototype.handleMMOnMouseOver=function(ev)
{var record=this.myRecord;this.style.cursor='pointer';this.myCallback.getMMInfo().open(this,record.mmId,record.traderId);}
QuoteSimple.prototype.handleMMOnMouseOut=function(ev)
{this.style.cursor='default';this.myCallback.getMMInfo().close();}
QuoteSimple.prototype.getMMInfo=function()
{if(undefined==this.mmInfo)
this.mmInfo=(this.appId==APPLICATION_ID_OTCQUOTE)?new MarketMakerInfo(this.caller,new MiniMarketMakerDOM(),this):new MarketMakerInfo(this.caller,new MiniMarketMakerHtml(),this);return this.mmInfo;}
QuoteSimple.prototype.doRefresh=function(criteria){this.run(criteria);}
QuoteSimple.prototype.handleRefresh=function(ev){this.myCallback.run(this.myValue);}
QuoteSimple.prototype.decorateMontage=function(list,comparePrice)
{if(undefined==list)
return;for(var i=0;i<list.length;i++)
{var item=list[i];var index=(item.isClosed)?0:((item.price!=0)&&(item.price==comparePrice))?((item.isOtcbb)?1:2):(item.isOtcbb)?3:4;item.tdColor=this.CSS_MONTAGE_BASE+' '+this.CSS_MONTAGE_TD_COLORS[index];item.textColor=this.CSS_MONTAGE_TEXT_COLORS[index];}}
function QuoteSimpleInsideHandler(callback,criteria)
{this.callback=callback;this.criteria=criteria;this.errorBody=criteria.output.myInside;}
QuoteSimpleInsideHandler.prototype.handleRequestData=function(value)
{var me=this.callback;var criteria=this.criteria;var output=criteria.output;criteria.inside=value;if(undefined!=value)
{criteria.bestBidPrice=value.bidPrice;criteria.bestAskPrice=value.askPrice;if(output.myInside)
output.myInside.appendChild(me.insideViewer.generate(value,me));}
if(me.callback&&me.callback.handleInside){me.callback.handleInside(value);}
me.caller.getMontage(criteria.symbol,criteria.securityId,me.appId,me.showMMInfo,new QuoteSimpleMontageHandler(me,criteria));}
function QuoteSimpleMontageHandler(callback,criteria)
{this.callback=callback;this.criteria=criteria;this.errorBody=criteria.output.myMontage;}
QuoteSimpleMontageHandler.prototype.handleRequestData=function(value)
{var me=this.callback;var criteria=this.criteria;var output=criteria.output;criteria.montage=value;if(undefined==value)
return;me.decorateMontage(value.buyList,criteria.bestBidPrice);me.decorateMontage(value.sellList,criteria.bestAskPrice);value.isOtc=criteria.isOtc;value.showMMInfo=me.showMMInfo;output.myMontage.style.paddingTop='3px';output.myMontage.appendChild(me.montageViewer.generate(criteria,me));if(me.showMMInfo&&(value.traders!=undefined))
{me.marketMakerViewer=new MarketMakerHtml();output.myMarketMakers.style.paddingTop='6px';output.myMarketMakers.appendChild(me.marketMakerViewer.generate(value.traders,me));}
criteria.body.appendChild(document.createElement('br'));criteria.body.appendChild(me.viewer.generateMontageDisclaimer(value.includeOtcbb,me));me.popSnapshot(criteria);}
function QuoteSimpleTradeHandler(callback,criteria)
{this.callback=callback;this.criteria=criteria;this.errorBody=criteria.output.myTrade;}
QuoteSimpleTradeHandler.prototype.handleRequestData=function(value)
{var me=this.callback;var criteria=this.criteria;var output=criteria.output;criteria.trade=value;var tradeOutput=output.myTrade;if(undefined==value.symbol)
output.myTrade.innerHTML='<div>No Trade data available.</div>';else
{output.myTrade.appendChild(tradeOutput=me.tradeViewer.generate(value,me));me.popSnapshot(criteria);}
if((undefined!=me.callback)&&(undefined!=me.callback.handleTradeInfo))
me.callback.handleTradeInfo(value,tradeOutput);}
QuoteSimpleTradeHandler.prototype.handleRequestError=QuoteSimpleMontageHandler.prototype.handleRequestError=QuoteSimpleInsideHandler.prototype.handleRequestError=function(error)
{this.errorBody.innerHTML=(error.message?error.message:error);}

function SecurityDetailsPage(caller,viewer,body)
{this.caller=caller;this.body=body;this.viewer=viewer;}
SecurityDetailsPage.prototype.doSymbol=function(symbol,body)
{this.run(new SecurityDetailsPageCriteria(symbol),body);}
SecurityDetailsPage.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;this.criteria=criteria;this.caller.getSecurityDetails(criteria.symbol,new AjaxDataHandler(this,criteria));}
SecurityDetailsPage.prototype.doValue=function(value,body)
{if(undefined==body)
body=value.criteria.body;body.innerHTML='';body.appendChild(this.viewer.generate(value,this));}
function SecurityDetailsPageCriteria(symbol)
{this.symbol=symbol;}
