
function UpdateCompanyProfileDOM()
{var a=new Array();for(var i=0;i<this.MONTHS_.length;i++)
a[i]={id:(i+1),caption:this.MONTHS_[i]};this.MONTHS={records:a};a=new Array();for(var i=0,b=1;i<31;i++,b++)
a[i]={id:b,caption:b};this.DAYS_OF_MONTH={records:a};this.lastInputCell=undefined;this.anchorList=new FancyAnchorList();this.anchorList.CSS_MAIN='powerAnchorList';}
UpdateCompanyProfileDOM.prototype.CSS_TOOLTIP_ACTIVE='tooltipActive';UpdateCompanyProfileDOM.prototype.CSS_TOOLTIP_HIDDEN='tooltipHidden';UpdateCompanyProfileDOM.prototype.TOOLTIP_MAX_WIDTH=200;UpdateCompanyProfileDOM.prototype.ROW_BUFFER_OFFICERS=3;UpdateCompanyProfileDOM.prototype.COLS_SUMMARY=4;UpdateCompanyProfileDOM.prototype.CMS_OTCIQ_WARNING_URI='/pinksheets/updateCompanyProfile/otciqWarning';UpdateCompanyProfileDOM.prototype.CMS_CONFIRMATION_URI='/pinksheets/updateCompanyProfile/confirmation';UpdateCompanyProfileDOM.prototype.INSTRUCTIONS_INTRO='In order to update your company information, you must first complete the contact information form '+'below. Pink Sheets may contact you to verify data changes. If you are an OTCIQ subscriber, you must update your company information via '+'the secure <a href="http://www.otciq.com">OTCIQ website</a>.';UpdateCompanyProfileDOM.prototype.INSTRUCTIONS_GENERAL='Please enter or update your company information. The form is divided into four sections which may be '+'navigated by the buttons at the top and bottom of each page. The \'Review Entire Form\' button will take you to the Summary section.';UpdateCompanyProfileDOM.prototype.INSTRUCTIONS_OFFICERS='Please note that Pink Sheets does not display or distribute officer/contact phone or email '+'information to the public.';UpdateCompanyProfileDOM.prototype.INSTRUCTIONS_SECURITIES='Listed below are all of the securities associated with the selected company. '+'If any of our information is incorrect, please note the error in the comments/notes area at the bottom of the form.';UpdateCompanyProfileDOM.prototype.INSTRUCTIONS_SUMMARY='Please confirm your information updates. To change data values, please select '+'the appropriate section from the links above. To finish please click the \'Submit\' button at the bottom of the page.';UpdateCompanyProfileDOM.prototype.MESSAGE_OTCIQ_WARNING='Our records indicate that your organization has an OTCIQ account. '+'In order to preserve the highest level of security for our information updates, '+'all OTCIQ accounts must make updates via our secure website: <a href="http://www.otciq.com" target="_new">OTCIQ.com</a>.'+'<br /><br />'+'<div style="text-align: center;"><input type="button" value="Go To OTCIQ.com" onclick="window.open(\'http://www.otciq.com\')" style="text-align: center;" /></div>';UpdateCompanyProfileDOM.prototype.MESSAGE_CONFIRMATION='Your updated company information has been sent to Pink Sheets\' Issuer Services. '+'Please be aware that these changes will not be reflected on pinksheets.com immediately. Pink Sheets will first determine this '+'information is being submitted by an authorized representation of your company. If you have any questions regarding the process, '+'please call issuer services at 212.896.4420 or email <a href="mailto:issuerservices@pinksheets.com">issuerservices@pinksheets.com</a>.'+'<br /><br />'+'<a href="javascript:appNav.gotoHome();">Return to Homepage</a>';UpdateCompanyProfileDOM.prototype.MESSAGE_FUTURE_DATE='The date cannot be in the future.';UpdateCompanyProfileDOM.prototype.TOOLTIP_CIK='A unique 10 digit code used by US Securities and Exchange Commission (SEC) to identify corporations and individual people who have filed disclosure with the SEC.';UpdateCompanyProfileDOM.prototype.NAV_LIST={ids:['doGeneral','doOfficers','doServiceProviders','doSecurities','doSummary'],values:['1. General Info','2. Officers/Company Contacts','3. Service Providers','4. Security Details','5. Summary']};UpdateCompanyProfileDOM.prototype.BANKRUPTCY_STATUS=['Not in Bankruptcy','In Bankruptcy'];UpdateCompanyProfileDOM.prototype.YES_NO=['Yes','No'];UpdateCompanyProfileDOM.prototype.MONTHS_=['January','February','March','April','May','June','July','August','September','October','November','December'];UpdateCompanyProfileDOM.prototype.checkLength=function(ev)
{var value=this.value;if(value.length<=this.myMaxLength)
return true;window.alert('Your description is too long. The maximum length is '+this.myMaxLength+'. Please trim your description.');this.focus();}
UpdateCompanyProfileDOM.prototype.generate=function(value,callback)
{var elem,output=document.createElement('form');var tr,trd,rows=0,table=document.createElement('table');table.cellSpacing=0;table.className='detail';this.lastCriteria=undefined;tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.className='detailValue';td.innerHTML=this.INSTRUCTIONS_INTRO;tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.innerHTML='&nbsp;';tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.className='h2';td.appendChild(document.createTextNode('Contact Information'));elem=document.createElement('span');elem.className='footnote';elem.appendChild(document.createTextNode(' (All Fields Required)'));td.appendChild(elem);rows=this.createBlankRow(table,rows,2);tr=table.insertRow(rows++);this.createCaption(tr,'Company Trading Symbol');this.createTextFieldCell(tr,'symbol',10,6);tr=table.insertRow(rows++);this.createCaption(tr,'Company Affiliation');this.createTextFieldCell(tr,'companyName',50,30);tr=table.insertRow(rows++);this.createCaption(tr,CAPTION_FIRST_NAME);this.createTextFieldCell(tr,'firstName',20,20);tr=table.insertRow(rows++);this.createCaption(tr,CAPTION_LAST_NAME);this.createTextFieldCell(tr,'lastName',20,20);tr=table.insertRow(rows++);this.createCaption(tr,CAPTION_EMAIL_ADDRESS);this.createTextFieldCell(tr,'emailAddress',100,50);tr=table.insertRow(rows++);this.createCaption(tr,CAPTION_PHONE);elem=this.createTextFieldCell(tr,'phone',30,20).myField;elem.onkeypress=this.phone_onkeypress;tr=table.insertRow(rows++);td=tr.insertCell(0);td=tr.insertCell(1);td.className='detailAction';td.appendChild(elem=InputField.genButton('reset','Reset',this.reset_onclick));elem.myCallback=callback;elem.myValue=value;elem.myViewer=this;elem.myGenerate='generate';elem=document.createElement('span');elem.innerHTML='&nbsp;&nbsp;&nbsp;';td.appendChild(elem);td.appendChild(elem=InputField.genSubmit('next','Next >>'));elem.myCallback=callback;elem.myValue=value;elem.myViewer=this;elem.onclick=this.symbolEntry_onclick;output.appendChild(table);output.onsubmit=function(ev){return false;};return output;}
UpdateCompanyProfileDOM.prototype.genHasAccount=function(value,callback)
{var output=document.createElement('div');output.className='detail';var contents=callback.getContents(this.CMS_OTCIQ_WARNING_URI);if(undefined==contents)
contents=this.MESSAGE_OTCIQ_WARNING;output.innerHTML=contents;return output;}
UpdateCompanyProfileDOM.prototype.genForm=function(value,callback)
{var output=document.createElement('div');output.className='widgetPackage';var anchorCriteria=value.criteria.anchorCriteria=new AnchorListCriteria(this.NAV_LIST,this.NAV_LIST.ids[0],this);anchorCriteria.myCallback=callback;anchorCriteria.myValue=value;var newChild,elem=anchorCriteria.myTop=document.createElement('div');elem.className='anchorContainer';this.anchorList.run(anchorCriteria,elem);output.appendChild(elem);output.appendChild(document.createElement('br'));elem=anchorCriteria.myBody=document.createElement('div');elem.className='formContainer';output.appendChild(elem);elem.appendChild(newChild=this.doGeneral(value,callback));try{newChild.elements[0].focus();}
catch(error){}
return output;}
UpdateCompanyProfileDOM.prototype.handleAnchorSelect=function(id,caption,criteria)
{var newChild,body=criteria.myBody;body.innerHTML='';body.appendChild(newChild=this[id](criteria.myValue,criteria.myCallback));try{newChild.elements[0].focus();}
catch(error){}
scrollToTopOf(criteria.myTop);}
UpdateCompanyProfileDOM.prototype.createForm=function(caption,instructions,colSpan)
{var output=document.createElement('form');var table=output.myTable=document.createElement('table');var tr,td,rows=0;table.cellSpacing=0;table.className='detail';if(undefined==colSpan)colSpan=2;if(undefined!=instructions)
{tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=colSpan;td.className='detailValue';td.innerHTML=instructions;rows=this.createBlankRow(table,rows,colSpan);}
tr=table.insertRow(rows++);td=output.myCaptionCell=tr.insertCell(0);td.colSpan=colSpan;td.className='h2';td.appendChild(document.createTextNode(caption));output.myRows=rows;output.onsubmit=function(ev){return false;}
output.appendChild(table);return output;}
UpdateCompanyProfileDOM.prototype.doGeneral=function(value,callback)
{var output=this.createForm('General Company Information',this.INSTRUCTIONS_GENERAL);var state,country,elem,tr,td,rows=output.myRows,table=output.myTable;var formInfo=value.criteria.formInfo;var pageInfo=value.criteria.pageInfo;this.lastCriteria=value.criteria;rows=this.createBlankRow(table,rows,2);tr=table.insertRow(rows++);this.createCaption(tr,'Company Name');td=tr.insertCell(1);td.className='detailValue';td.appendChild(document.createTextNode(value.name));tr=table.insertRow(rows++);this.createCaption(tr,'Company Address 1');td=this.createTextFieldCell(tr,'comp_address1',50,20);this.appendOldValue(value.address1);tr=table.insertRow(rows++);this.createCaption(tr,'Company Address 2');this.createTextFieldCell(tr,'comp_address2',50,20);this.appendOldValue(value.address2);tr=table.insertRow(rows++);this.createCaption(tr,'Company Address 3');this.createTextFieldCell(tr,'comp_address3',50,20);this.appendOldValue(value.address3);tr=table.insertRow(rows++);this.createCaption(tr,'City');this.createTextFieldCell(tr,'comp_city',30,20);this.appendOldValue(value.city);tr=table.insertRow(rows++);this.createCaption(tr,'Zip');this.createTextFieldCell(tr,'comp_zip',20,20);this.appendOldValue(value.zip);tr=table.insertRow(rows++);this.createCaption(tr,'Country');country=this.createSelectListCell(tr,'comp_country',pageInfo.countries,'Select One').myField;this.appendOldValue(value.countryId);tr=table.insertRow(rows++);this.createCaption(tr,'State');state=this.createStateSelectListCell(tr,'comp_state',value.countryId,value.state,'comp_country',value,callback).myField;this.appendOldValue(value.state);this.decorateCountry(country,value,callback,state);tr=table.insertRow(rows++);this.createCaption(tr,'Company Phone');this.createTextFieldCell(tr,'comp_phone',20,20).myField.onkeypress=this.phone_onkeypress;this.appendOldValue(value.phone);tr=table.insertRow(rows++);this.createCaption(tr,'Company Fax');this.createTextFieldCell(tr,'comp_cfax',20,20).myField.onkeypress=this.phone_onkeypress;this.appendOldValue(value.fax);tr=table.insertRow(rows++);this.createCaption(tr,'Company Email');this.createTextFieldCell(tr,'comp_email',100,30);this.appendOldValue(value.email);tr=table.insertRow(rows++);this.createCaption(tr,'Company Website');this.createTextFieldCell(tr,'comp_fax',100,30);this.appendOldValue(value.website);tr=table.insertRow(rows++);this.createCaption(tr,'Country of Incorporation');country=this.createSelectListCell(tr,'comp_country_inc',pageInfo.countries,'Select One').myField;this.appendOldValue(value.countryOfIncorporation);tr=table.insertRow(rows++);this.createCaption(tr,'State/Jurisdiction of Incorporation 1');state=this.createStateSelectListCell(tr,'comp_soinc1',value.countryOfIncorporation,value.stateOfIncorporation,'comp_country_inc',value,callback).myField;this.appendOldValue(value.stateOfIncorporation);this.decorateCountry(country,value,callback,state);tr=table.insertRow(rows++);this.createCaption(tr,'State/Jurisdiction of Incorporation 2');state=this.createStateSelectListCell(tr,'comp_soinc2',value.countryOfIncorporation,value.stateOfIncorporation2,'comp_country_inc',value,callback).myField;this.appendOldValue(value.stateOfIncorporation2);this.decorateCountry(country,value,callback,state);tr=table.insertRow(rows++);this.createCaption(tr,'Year Founded (yyyy)');this.createTextFieldCell(tr,'comp_year',4,4);tr=table.insertRow(rows++);this.createCaption(tr,'Number of Employees');td=this.createTextFieldCell(tr,'comp_employees',10,10);td.appendChild(document.createTextNode('  as of '));td.appendChild(this.createDateInput('comp_employees_date'));tr=table.insertRow(rows++);this.createCaption(tr,'Business Stage');td=this.createSelectListCell(tr,'business_stage',pageInfo.businessStages,'Select One');td.appendChild(document.createTextNode('  as of '));td.appendChild(this.createDateInput('business_stage_date'));this.appendOldValue(value.businessIndicator);tr=table.insertRow(rows++);td=this.createCaption(tr,'SEC CIK Code');elem=document.createElement('span');elem.innerHTML='&nbsp;&mdash;&nbsp;';td.appendChild(elem);elem=document.createElement('a');elem.className='footnote';elem.href='javascript:void(null);';elem.onclick=this.openTooltip;elem.myTooltip=this.TOOLTIP_CIK;elem.myCallback=this;elem.appendChild(document.createTextNode("What's This"));td.appendChild(elem);this.createTextFieldCell(tr,'comp_cik',20,20);this.appendOldValue(value.cik);tr=table.insertRow(rows++);this.createCaption(tr,'Fiscal Year End');td=this.createSelectListCell(tr,'comp_fis_month',this.MONTHS,'Select One');if((''==td.myField.value)&&(undefined!=value.fiscalMonthEnd))
td.myField.value=value.fiscalMonthEnd;td.appendChild(document.createTextNode(' / '));td.appendChild(elem=this.createSelectList('comp_fis_date',this.DAYS_OF_MONTH,'Select One'));if((''==elem.value)&&(undefined!=value.fiscalDayEnd))
elem.value=value.fiscalDayEnd;tr=table.insertRow(rows++);this.createCaption(tr,'Filing Cycle');td=this.createSelectListCell(tr,'comp_filing_cycle',pageInfo.filingCycles,'Select One');if((value.filingCycle!='')&&(value.filingCycle!=undefined))
td.myField.value=value.filingCycle;tr=table.insertRow(rows++)
this.createCaption(tr,'Bankruptcy Status');this.createRadioButtonsCell(tr,'bankruptcy_status',this.BANKRUPTCY_STATUS);tr=table.insertRow(rows++)
this.createCaption(tr,'Is Company a Bank/Thrift?');this.createRadioButtonsCell(tr,'bank_thrift',this.YES_NO,undefined,this.bankThrift_onclick);tr=table.insertRow(rows++)
this.createCaption(tr,'Non-bank Regulated Company');this.createRadioButtonsCell(tr,'insurance_co',this.YES_NO,undefined,this.nonBankRegulated_onclick);var isBankThrift=formInfo['bank_thrift']=='Yes';tr=table.insertRow(rows++);this.createCaption(tr,'Primary US Regulatory Agency');td=this.createSelectListCell(tr,'regulatory_agency',pageInfo.regulatoryAgencies,'Select One');td.myField.disabled=!isBankThrift;this.addEventListener(td.myField,'change',this.regulatoryAgency_onchange);td.appendChild(document.createTextNode(' Other Agency '));td.appendChild(elem=this.createInput('other_regulatory_agency',50,20));elem.disabled=!isBankThrift||('Other'!=td.myField.value);tr=table.insertRow(rows++);this.createCaption(tr,'Published in a Recognized Securities Manual');td=this.createSelectListCell(tr,'security_manual',pageInfo.securityManuals,'Select One');td.appendChild(document.createTextNode(' Last Publication Date '));td.appendChild(this.createDateInput('security_manual_date'));tr=table.insertRow(rows++);td=this.createCaption(tr,'Primary SIC Code');td.appendChild(document.createElement('br'));elem=document.createElement('a');elem.className='footnote';elem.target='_new';elem.href='http://www.sec.gov/info/edgar/siccodes.htm';elem.appendChild(document.createTextNode('Look Up Codes'));td.appendChild(elem);td=this.createSelectListCell(tr,'comp_sic_prim',pageInfo.sicCodes,'Select One');this.appendOldValue(value.primarySicCode);rows=this.createBlankRow(table,rows,2);tr=table.insertRow(rows++);this.createCaption(tr,'Secondary SIC Codes');this.createMultiSelectCell(tr,'comp_sic_sec',pageInfo.sicCodes);tr=table.insertRow(rows++);td=this.createCaption(tr,'Business Description');td.appendChild(document.createElement('br'));td.appendChild(this.createFootnote('(maximum 4,000 characters)'));td=this.createTextAreaCell(tr,'comp_description',40,5);td.myField.myRecord=value;td.myField.myMaxLength=4000;td.myField.onblur=this.checkLength;this.appendOldValue(value.businessDesc);tr=table.insertRow(rows++);td=this.createCaption(tr,'Comments/Notes');td.appendChild(document.createElement('br'));td.appendChild(this.createFootnote('General company information updates not covered by this form.'));this.createTextAreaCell(tr,'comp_general_comments',40,5);tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.style.textAlign='center';elem=InputField.genButton('reset','Reset',this.resetSection_onclick);this.decorateButton(elem,value,callback,this.resetSection_onclick);elem.myAction='doGeneral';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genButton('done','Review Entire Form',this.next_onclick);this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doSummary';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genSubmit('next','Section 2 of 5 - Company Officers/Contacts >>');this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doOfficers';td.appendChild(elem);return output;}
UpdateCompanyProfileDOM.prototype.doOfficers=function(value,callback)
{var output=this.createForm('Company Officers/Contacts',this.INSTRUCTIONS_OFFICERS);var elem,tr,td,rows=output.myRows,table=output.myTable;this.lastCriteria=value.criteria;var officers=value.officers;var formInfo=value.criteria.formInfo;var pageInfo=value.criteria.pageInfo;td=output.myCaptionCell;tr=td.parentNode;td.colSpan=1;td=tr.insertCell(1);td.style.textAlign='right';elem=document.createElement('a');elem.href='javascript:void(null)';this.decorateButton(elem,value,this,this.expandAllOfficers_onclick);elem.appendChild(document.createTextNode('Expand All'));td.appendChild(elem);td.appendChild(document.createTextNode(' | '));elem=document.createElement('a');elem.href='javascript:void(null)';this.decorateButton(elem,value,callback,this.addOfficer_onclick);elem.appendChild(document.createTextNode('Add Officer/Contact'));td.appendChild(elem);value.criteria.officerTable=table;var officerAnchors=value.criteria.officerAnchors=new Array();if((undefined!=officers)&&(0<officers.length))
{formInfo['comp_officer_count']=officers.length;for(var i=0;i<officers.length;i++)
{var officer=officers[i];rows=this.createOfficerRow(table,rows,i,officer,formInfo,pageInfo,value,callback);}
elem=officerAnchors[0];if(!elem.psIsDeleted)
this.expandOfficer(elem);}
rows=this.createBlankRow(table,rows,2);rows=this.createSeparatorRow(table,rows,2);tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.className='detailValue';td.style.textAlign='right';elem=document.createElement('a');elem.href='javascript:void(null)';this.decorateButton(elem,value,callback,this.addOfficer_onclick);elem.appendChild(document.createTextNode('Add Officer/Contact'));td.appendChild(elem);rows=this.createSeparatorRow(table,rows,2);rows=this.createBlankRow(table,rows,2);tr=table.insertRow(rows++);td=this.createCaption(tr,'Comments/Notes');td.appendChild(document.createElement('br'));td.appendChild(this.createFootnote('Officer/company contact information updates not covered by this form.'));this.createTextAreaCell(tr,'comp_officer_comments',40,5);tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.style.textAlign='center';elem=InputField.genButton('reset','Reset',this.resetSection_onclick);this.decorateButton(elem,value,callback,this.resetSection_onclick);elem.myAction='doOfficers';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genButton('back','<< Section 1 of 5 - General Info');this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doGeneral';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genButton('done','Review Entire Form',this.next_onclick);this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doSummary';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genSubmit('next','Section 3 of 5 - Service Providers >>');this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doServiceProviders';td.appendChild(elem);return output;}
UpdateCompanyProfileDOM.prototype.doServiceProviders=function(value,callback)
{var output=this.createForm('Company Service Providers');var elem,tr,td,rows=output.myRows,table=output.myTable;this.lastCriteria=value.criteria;var pageInfo=value.criteria.pageInfo;this.createServiceProviderSection(table,'legal','Legal Counsel',value.legalCounsel,true,pageInfo,value,callback);this.createServiceProviderSection(table,'ir','Investor Relations Firm',value.investorRelationFirm,false,pageInfo,value,callback);this.createServiceProviderSection(table,'auditor','Auditor/Accountant',value.auditor,true,pageInfo,value,callback);var footer=document.createElement('tbody');table.appendChild(footer);rows=0;rows=this.createBlankRow(footer,rows,2);rows=this.createSeparatorRow(footer,rows,2);rows=this.createBlankRow(footer,rows,2);tr=footer.insertRow(rows++);td=this.createCaption(tr,'Comments/Notes');td.appendChild(document.createElement('br'));td.appendChild(this.createFootnote('Service provider updates not covered by this form.'));this.createTextAreaCell(tr,'comp_service_provider_comments',40,5);tr=footer.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.style.textAlign='center';elem=InputField.genButton('reset','Reset',this.resetSection_onclick);this.decorateButton(elem,value,callback,this.resetSection_onclick);elem.myAction='doServiceProviders';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genButton('back','<< Section 2 of 5 - Company Officers/Contacts',this.next_onclick);this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doOfficers';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genButton('done','Review Entire Form',this.next_onclick);this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doSummary';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genSubmit('next','Section 4 of 5 - Security Details >>');this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doSecurities';td.appendChild(elem);return output;}
UpdateCompanyProfileDOM.prototype.doSecurities=function(value,callback)
{var elem,output=this.createForm('Security Details',this.INSTRUCTIONS_SECURITIES);var span,tr,td,rows=output.myRows,table=output.myTable;this.lastCriteria=value.criteria;var records=value.securities;var formInfo=value.criteria.formInfo;var pageInfo=value.criteria.pageInfo;var agentsX=value.criteria.agents=new Array();var agents_=new Object();var securityInfo=value.criteria.securityInfo=new Array();if(undefined!=records)
{formInfo['security_count']=records.length;for(var i=0;i<records.length;i++)
{var record=records[i];var caption=record.caption=record.issueName+(exists(record.symbol)?' ('+trim(record.symbol)+')':'');formInfo['security_caption_'+i]=caption;rows=this.createBlankRow(table,rows,2);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.className='detailHeader';td.appendChild(document.createTextNode('Security: '+caption));td=tr.insertCell(1);td.className='detailHeader';td.style.textAlign='right';var addAgent=elem=document.createElement('a');elem.href='javascript:void(null)';this.decorateButton(elem,value,callback,this.addTransferAgent_onclick);elem.appendChild(document.createTextNode('Add Transfer Agent'));td.appendChild(elem);rows=this.createBlankRow(table,rows,2);tr=table.insertRow(rows++);this.createCaption(tr,'Security Class');td=tr.insertCell(1);td.className='detailValue';Elements.addText(td,Formatter.toDisplayable(record.className));tr=table.insertRow(rows++);this.createCaption(tr,'Number of Authorized Shares');td=this.createTextFieldCell(tr,'security_auth_shares_'+i,20,20);td.myField.myIndex=i;this.addEventListener(td.myField,'change',this.sharesAuth_onchange);this.addEventListener(td.myField,'change',this.dated_onchange);this.appendOldValue(record.authorizedShares);elem=td.myField.myDate=this.createDateInput('security_auth_shares_date_'+i);td.appendChild(document.createTextNode('  as of '));td.appendChild(elem);this.appendDate(td,record.authorizedSharesAsOfDate);tr=table.insertRow(rows++);this.createCaption(tr,'Shares Outstanding');td=this.createTextFieldCell(tr,'security_oshares_'+i,20,20);td.myField.myIndex=i;this.addEventListener(td.myField,'change',this.sharesOutstanding_onchange);this.addEventListener(td.myField,'change',this.dated_onchange);this.appendOldValue(record.outstandingShares);elem=td.myField.myDate=this.createDateInput('security_oshares_date_'+i);td.appendChild(document.createTextNode('  as of '));td.appendChild(elem);this.appendDate(td,record.outstandingSharesAsOfDate);tr=table.insertRow(rows++);this.createCaption(tr,'Public Float');td=this.createTextFieldCell(tr,'security_float_'+i,20,20);td.myField.myIndex=i;this.addEventListener(td.myField,'change',this.sharesFloat_onchange);this.addEventListener(td.myField,'change',this.dated_onchange);this.appendOldValue(record.publicFloat);elem=td.myField.myDate=this.createDateInput('security_float_date_'+i);td.appendChild(document.createTextNode('  as of '));td.appendChild(elem);this.appendDate(td,record.publicFloatAsOfDate);tr=table.insertRow(rows++);this.createCaption(tr,'Shareholders of Record');td=this.createTextFieldCell(tr,'security_shareholders_'+i,20,20);td.myField.myIndex=i;this.addEventListener(td.myField,'change',this.dated_onchange);this.appendOldValue(record.numberOfShareHolders);elem=td.myField.myDate=this.createDateInput('security_shareholders_date_'+i);td.appendChild(document.createTextNode('  as of '));td.appendChild(elem);this.appendDate(td,record.numberOfShareHoldersAsOfDate);var agents=record.transferAgents;if((undefined!=agents)&&(0<agents.length))
{formInfo['agent_count_'+i]=agents.length;rows=this.createBlankRow(table,rows,2);for(var j=0;j<agents.length;j++)
{var agent=agents[j];var id=i+'_'+j;var isDeleted=formInfo['agent_removed_'+id];if(undefined==isDeleted)
isDeleted=false;if(undefined==agents_[agent.id])
{agentsX[agentsX.length]=agent;agents_[agent.id]=true;}
rows=this.createTransferAgentRow(table,rows,j,agent,formInfo,pageInfo,id,isDeleted,value,callback);}}
securityInfo[i]=addAgent.myCriteria={security:record,securityIndex:i,lastRow:rows,table:table,value:value,callback:callback};}}
rows=this.createBlankRow(table,rows,2);rows=this.createSeparatorRow(table,rows,2);rows=this.createBlankRow(table,rows,2);tr=table.insertRow(rows++);td=this.createCaption(tr,'Comments/Notes');td.appendChild(document.createElement('br'));td.appendChild(this.createFootnote('Security detail information updates not covered by this form.'));this.createTextAreaCell(tr,'comp_security_comments',40,5);tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.style.textAlign='center';elem=InputField.genButton('reset','Reset',this.resetSection_onclick);this.decorateButton(elem,value,callback,this.resetSection_onclick);elem.myAction='doSecurities';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genButton('back','<< Section 3 of 5 - Service Providers',this.next_onclick);this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doServiceProviders';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genSubmit('done','Review Entire Form');this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doSummary';td.appendChild(elem);return output;}
UpdateCompanyProfileDOM.prototype.doSummary=function(value,callback)
{var numOfCols=this.COLS_SUMMARY;var colBuffer=numOfCols-1;var output=this.createForm('Review Your Changes',this.INSTRUCTIONS_SUMMARY,numOfCols);var span,tr,td,rows=output.myRows,table=output.myTable;var formInfo=value.criteria.formInfo;rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.className='detailHeader';td.appendChild(document.createTextNode('General Information'));td=tr.insertCell(1);td.className='detailHeader';td.appendChild(document.createTextNode('New Value'));td=tr.insertCell(2);td.className='detailHeader';td.appendChild(document.createTextNode('Old Value'));td=tr.insertCell(3);td.className='detailHeader';td.style.textAlign='right';td.appendChild(this.createSectionAnchor(value,callback,'doGeneral','Edit'));rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);this.createCaption(tr,'Company Name');this.createNewValue(tr,formInfo,'comp_name');this.createOldValue(tr,value.name);var security=((undefined!=value.securities)&&(0<value.securities.length))?value.securities[0]:undefined;if(undefined!=security)
{tr=table.insertRow(rows++);this.createCaption(tr,'Issue Symbol');this.createNewValue(tr,formInfo,'comp_symbol');this.createOldValue(tr,security.symbol);}
tr=table.insertRow(rows++);this.createCaption(tr,'Company Address 1');td=this.createNewValue(tr,formInfo,'comp_address1');this.createOldValue(tr,value.address1);tr=table.insertRow(rows++);this.createCaption(tr,'Company Address 2');this.createNewValue(tr,formInfo,'comp_address2');this.createOldValue(tr,value.address2);tr=table.insertRow(rows++);this.createCaption(tr,'Company Address 3');this.createNewValue(tr,formInfo,'comp_address3');this.createOldValue(tr,value.address3);tr=table.insertRow(rows++);this.createCaption(tr,'City');this.createNewValue(tr,formInfo,'comp_city');this.createOldValue(tr,value.city);tr=table.insertRow(rows++);this.createCaption(tr,'State');this.createNewValue(tr,formInfo,'comp_state');this.createOldValue(tr,value.state);tr=table.insertRow(rows++);this.createCaption(tr,'Zip');this.createNewValue(tr,formInfo,'comp_zip');this.createOldValue(tr,value.zip);tr=table.insertRow(rows++);this.createCaption(tr,'Country');this.createNewValue(tr,formInfo,'comp_country');this.createOldValue(tr,value.country);tr=table.insertRow(rows++);this.createCaption(tr,'Company Phone');this.createNewValue(tr,formInfo,'comp_phone');this.createOldValue(tr,value.phone);tr=table.insertRow(rows++);this.createCaption(tr,'Company Fax');this.createNewValue(tr,formInfo,'comp_cfax');this.createOldValue(tr,value.fax);tr=table.insertRow(rows++);this.createCaption(tr,'Company Email');this.createNewValue(tr,formInfo,'comp_email');this.createOldValue(tr,value.email);tr=table.insertRow(rows++);this.createCaption(tr,'Company Website');this.createNewValue(tr,formInfo,'comp_fax');this.createOldValue(tr,value.website);tr=table.insertRow(rows++);this.createCaption(tr,'Country of Incorporation');this.createNewValue(tr,formInfo,'comp_country_inc');this.createOldValue(tr,value.countryOfIncorporation);tr=table.insertRow(rows++);this.createCaption(tr,'State/Jurisdiction of Incorporation 1');this.createNewValue(tr,formInfo,'comp_soinc1');this.createOldValue(tr,value.stateOfIncorporation);tr=table.insertRow(rows++);this.createCaption(tr,'State/Jurisdiction of Incorporation 2');this.createNewValue(tr,formInfo,'comp_soinc2');this.createOldValue(tr,value.stateOfIncorporation2);tr=table.insertRow(rows++);this.createCaption(tr,'Year Founded');this.createNewValue(tr,formInfo,'comp_year');tr.insertCell(2).innerHTML='&nbsp';tr=table.insertRow(rows++);this.createCaption(tr,'Number of Employees');td=this.createNewValueWithDate(tr,formInfo,'comp_employees','comp_employees_date');tr.insertCell(2).innerHTML='&nbsp';tr=table.insertRow(rows++);this.createCaption(tr,'Business Stage');this.createNewValueWithDate(tr,formInfo,'business_stage','business_stage_date',value.businessIndicator);this.createOldValue(tr,value.businessIndicator);tr=table.insertRow(rows++);this.createCaption(tr,'SEC CIK Code');this.createNewValue(tr,formInfo,'comp_cik');this.createOldValue(tr,value.cik);tr=table.insertRow(rows++);this.createCaption(tr,'Fiscal Year End');td=tr.insertCell(1);td.className='detailValue';if(undefined!=formInfo['comp_fis_month'])
{var fiscalYearEnd=formInfo['comp_fis_month'];if(undefined!=formInfo['comp_fis_date'])
fiscalYearEnd+='/'+formInfo['comp_fis_date'];else if(undefined!=value.fiscalDayEnd)
{fiscalYearEnd+='/'+value.fiscalDayEnd;formInfo['comp_fis_date']=value.fiscalDayEnd;}
td.appendChild(document.createTextNode(fiscalYearEnd));}
this.createOldValue(tr,value.fiscalYearEnd);tr=table.insertRow(rows++);this.createCaption(tr,'Filing Cycle');this.createNewValue(tr,formInfo,'comp_filing_cycle');this.createOldValue(tr,value.filingCycle);tr=table.insertRow(rows++);this.createCaption(tr,'Bankruptcy Status');this.createNewValue(tr,formInfo,'bankruptcy_status').colSpan=2;tr=table.insertRow(rows++);this.createCaption(tr,'Is Company a Bank/Thrift?');this.createNewValue(tr,formInfo,'bank_thrift').colSpan=2;tr=table.insertRow(rows++);this.createCaption(tr,'Non-bank Regulated Company');this.createNewValue(tr,formInfo,'insurance_co').colSpan=2;tr=table.insertRow(rows++);this.createCaption(tr,'Primary US Regulatory Agency');var agencyName=(undefined!=formInfo['other_regulatory_agency'])?'other_regulatory_agency':'regulatory_agency';this.createNewValue(tr,formInfo,agencyName).colSpan=2;tr=table.insertRow(rows++);this.createCaption(tr,'Published in a Recognized Securities Manual');this.createNewValueWithDate(tr,formInfo,'security_manual','security_manual_date').colSpan=2;tr=table.insertRow(rows++);this.createCaption(tr,'Primary SIC Code');this.createNewValue(tr,formInfo,'comp_sic_prim');this.createOldValue(tr,value.primarySicCode);tr=table.insertRow(rows++);td=this.createCaption(tr,'Secondary SIC Codes');td.appendChild(document.createElement('br'));td.appendChild(document.createTextNode('(comma separated)'));this.createNewValue(tr,formInfo,'comp_sic_sec');tr.insertCell(2).innerHTML='&nbsp';tr=table.insertRow(rows++);this.createCaption(tr,'Business Description');this.createNewValueX(tr,formInfo,'comp_description');if(undefined!=formInfo['comp_description'])
this.createOldValue(tr,value.businessDesc);else
tr.insertCell(2).innerHTML='&nbsp;';tr=table.insertRow(rows++);this.createCaption(tr,'General Comments');this.createNewValueX(tr,formInfo,'comp_general_comments').colSpan=2;var records=value.officers;if((undefined!=records)&&(0<records.length))
{for(var i=0;i<records.length;i++)
{var record=records[i];var isDeleted=formInfo['comp_officer_removed_'+i];if(undefined==isDeleted)
isDeleted=false;rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.className='detailHeader';if(isDeleted)
td.appendChild(document.createTextNode('Deleted '));td.appendChild(document.createTextNode('Officer/Contact: '+record.caption));td=tr.insertCell(1);td.className='detailHeader';td.appendChild(document.createTextNode('New Value'));td=tr.insertCell(2);td.className='detailHeader';td.appendChild(document.createTextNode('Old Value'));td=tr.insertCell(3);td.className='detailHeader';td.style.textAlign='right';td.appendChild(this.createSectionAnchor(value,callback,'doOfficers','Edit'));if(isDeleted)
continue;rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);this.createCaption(tr,'Title 1');this.createNewValue(tr,formInfo,'comp_officer_title1_'+i);this.createOldValue(tr,record.title);tr=table.insertRow(rows++);this.createCaption(tr,'Title 2');this.createNewValue(tr,formInfo,'comp_officer_title2_'+i);this.createOldValue(tr,record.title1);tr=table.insertRow(rows++);this.createCaption(tr,'Title 3');this.createNewValue(tr,formInfo,'comp_officer_title3_'+i);this.createOldValue(tr,record.title2);tr=table.insertRow(rows++);this.createCaption(tr,'Title 4');this.createNewValue(tr,formInfo,'comp_officer_title4_'+i);this.createOldValue(tr,record.title3);tr=table.insertRow(rows++);this.createCaption(tr,CAPTION_FIRST_NAME);this.createNewValue(tr,formInfo,'comp_officer_firstname_'+i);this.createOldValue(tr,record.name);tr=table.insertRow(rows++);this.createCaption(tr,CAPTION_LAST_NAME);this.createNewValue(tr,formInfo,'comp_officer_lastname_'+i);tr=table.insertRow(rows++);this.createCaption(tr,CAPTION_EMAIL_ADDRESS);this.createNewValue(tr,formInfo,'comp_officer_email_'+i);this.createOldValue(tr,record.email);tr=table.insertRow(rows++);this.createCaption(tr,CAPTION_PHONE);this.createNewValue(tr,formInfo,'comp_officer_phone_'+i);this.createOldValue(tr,record.phone);tr=table.insertRow(rows++);this.createCaption(tr,'Primary Contact?');this.createNewValue(tr,formInfo,'is_primary_contact_'+i);this.createOldValue(tr,record.isPrimaryContact);}}
rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.colSpan=colBuffer;td.className='detailHeader';td.appendChild(document.createTextNode('Other Officer Information'));td=tr.insertCell(1);td.className='detailHeader';td.style.textAlign='right';td.appendChild(this.createSectionAnchor(value,callback,'doOfficers','Edit'));rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);this.createCaption(tr,'Comments/Notes');this.createNewValueX(tr,formInfo,'comp_officer_comments').colSpan=colBuffer;;rows=this.createServiceProviderRO(table,rows,'legal','Legal Counsel',value.legalCounsel,formInfo,value,callback);rows=this.createServiceProviderRO(table,rows,'ir','Investor Relations Firm',value.investorRelationFirm,formInfo,value,callback);rows=this.createServiceProviderRO(table,rows,'auditor','Auditor/Accountant',value.auditor,formInfo,value,callback);rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.colSpan=colBuffer;td.className='detailHeader';td.appendChild(document.createTextNode('Other Service Provider Information'));td=tr.insertCell(1);td.className='detailHeader';td.style.textAlign='right';td.appendChild(this.createSectionAnchor(value,callback,'doServiceProviders','Edit'));rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);this.createCaption(tr,'Comments/Notes');this.createNewValueX(tr,formInfo,'comp_service_provider_comments').colSpan=colBuffer;;records=value.securities;if(undefined!=records)
{for(var i=0;i<records.length;i++)
{var record=records[i];rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.className='detailHeader';td.appendChild(document.createTextNode('Security: '+record.caption));td=tr.insertCell(1);td.className='detailHeader';td.appendChild(document.createTextNode('New Value'));td=tr.insertCell(2);td.className='detailHeader';td.appendChild(document.createTextNode('Old Value'));td=tr.insertCell(3);td.className='detailHeader';td.style.textAlign='right';td.appendChild(this.createSectionAnchor(value,callback,'doSecurities','Edit'));rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);this.createCaption(tr,'Security Class').colSpan=colBuffer;;td=tr.insertCell(1);td.className='detailValue';td.appendChild(document.createTextNode(record.className));tr=table.insertRow(rows++);this.createCaption(tr,'Number of Authorized Shares');this.createNewValueWithDate(tr,formInfo,'security_auth_shares_'+i,'security_auth_shares_date_'+i,record.authorizedShares);this.createOldValueWithDate(tr,record.authorizedShares,record.authorizedSharesAsOfDate);tr=table.insertRow(rows++);this.createCaption(tr,'Shares Outstanding');this.createNewValueWithDate(tr,formInfo,'security_oshares_'+i,'security_oshares_date_'+i,record.outstandingShares);this.createOldValueWithDate(tr,record.outstandingShares,record.outstandingSharesAsOfDate);tr=table.insertRow(rows++);this.createCaption(tr,'Public Float');this.createNewValueWithDate(tr,formInfo,'security_float_'+i,'security_float_date_'+i,record.publicFloat);this.createOldValueWithDate(tr,record.publicFloat,record.publicFloatAsOfDate);tr=table.insertRow(rows++);this.createCaption(tr,'Shareholders of Record');this.createNewValueWithDate(tr,formInfo,'security_shareholders_'+i,'security_shareholders_date_'+i,record.numberOfShareHolders);this.createOldValueWithDate(tr,record.numberOfShareHolders,record.numberOfShareHoldersAsOfDate);var agents=record.transferAgents;if((undefined!=agents)&&(0<agents.length))
{for(var j=0;j<agents.length;j++)
{var agent=agents[j];var id=i+'_'+j;var isDeleted=formInfo['agent_removed_'+id];if(undefined==isDeleted)
isDeleted=false;rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=numOfCols;td.style.whiteSpace='nowrap';td.className='detailCaption';if(isDeleted)
{td.appendChild(document.createTextNode('Deleted '));td.colSpan=numOfCols;}
td.appendChild(document.createTextNode('Transfer Agent: '+agent.name));if(isDeleted)
continue;tr=table.insertRow(rows++);this.createSubCaption(tr,'Firm Name');this.createNewValue(tr,formInfo,'agent_name_'+id);this.createOldValue(tr,agent.name);tr=table.insertRow(rows++);this.createSubCaption(tr,'Address 1');this.createNewValue(tr,formInfo,'agent_address1_'+id);this.createOldValue(tr,agent.address1);tr=table.insertRow(rows++);this.createSubCaption(tr,'Address 2');this.createNewValue(tr,formInfo,'agent_address2_'+id);this.createOldValue(tr,agent.address2);tr=table.insertRow(rows++);this.createSubCaption(tr,'Address 3');this.createNewValue(tr,formInfo,'agent_address3_'+id);this.createOldValue(tr,agent.address3);tr=table.insertRow(rows++);this.createSubCaption(tr,'City');this.createNewValue(tr,formInfo,'agent_city_'+id);this.createOldValue(tr,agent.city);tr=table.insertRow(rows++);this.createSubCaption(tr,'State/Province');this.createNewValue(tr,formInfo,'agent_state_'+id);this.createOldValue(tr,agent.state);tr=table.insertRow(rows++);this.createSubCaption(tr,'Zip/Postal Code');this.createNewValue(tr,formInfo,'agent_zip_'+id);this.createOldValue(tr,agent.zip);tr=table.insertRow(rows++);this.createSubCaption(tr,'Country');this.createNewValue(tr,formInfo,'agent_country_'+id);this.createOldValue(tr,agent.country);}}}}
rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.colSpan=colBuffer;td.className='detailHeader';td.appendChild(document.createTextNode('Other Security Information'));td=tr.insertCell(1);td.className='detailHeader';td.style.textAlign='right';td.appendChild(this.createSectionAnchor(value,callback,'doSecurities','Edit'));rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);this.createCaption(tr,'Comments/Notes');this.createNewValueX(tr,formInfo,'comp_security_comments').colSpan=colBuffer;;rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.className='detailHeader';td.colSpan=numOfCols;td.appendChild(document.createTextNode('Contact Information'));rows=this.createBlankRow(table,rows,numOfCols);tr=table.insertRow(rows++);this.createCaption(tr,'Company Affiliation');this.createNewValue(tr,formInfo,'contactAffiliation').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'First Name');this.createNewValue(tr,formInfo,'contactFirstName').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Last Name');this.createNewValue(tr,formInfo,'contactLastName').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Email Address');this.createNewValue(tr,formInfo,'contactEmail').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Phone');this.createNewValue(tr,formInfo,'contactPhone').colSpan=colBuffer;;tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=numOfCols;td.style.textAlign='center';elem=InputField.genButton('back','<< Section 4 of 5 - Security Details',this.next_onclick);this.decorateButton(elem,value,callback,this.next_onclick);elem.myNextAction='doSecurities';td.appendChild(elem);td.appendChild(document.createTextNode(' '));elem=InputField.genSubmit('submit','Submit');this.decorateButton(elem,value,callback,callback.handleSubmit);td.appendChild(elem);rows=this.createBlankRow(table,rows,numOfCols);return output;}
UpdateCompanyProfileDOM.prototype.createSectionAnchor=function(value,callback,where,caption)
{var output=document.createElement('a');this.decorateButton(output,value,callback,this.next_onclick);output.href='javascript:void(null);';output.myNextAction=where;output.appendChild(document.createTextNode(caption));return output;}
UpdateCompanyProfileDOM.prototype.openAddOfficer=function(value,callback)
{var firstField,elem,output=document.createElement('form');var tr,td,rows=0,table=document.createElement('table');var pageInfo=value.criteria.pageInfo;table.className='modalForm';output.onsubmit=function(ev){return false;};tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Title 1'));td=tr.insertCell(1);td.className='field';td.appendChild(firstField=SelectList.generate('title1',pageInfo.titles,'Select One'));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Title 2'));td=tr.insertCell(1);td.className='field';td.appendChild(SelectList.generate('title2',pageInfo.titles,'Select One'));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Title 3'));td=tr.insertCell(1);td.className='field';td.appendChild(SelectList.generate('title3',pageInfo.titles,'Select One'));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Title 4'));td=tr.insertCell(1);td.className='field';td.appendChild(SelectList.generate('title4',pageInfo.titles,'Select One'));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode(CAPTION_FIRST_NAME));td=tr.insertCell(1);td.className='field';td.appendChild(InputField.genTextBox('firstName',20,20));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode(CAPTION_LAST_NAME));td=tr.insertCell(1);td.className='field';td.appendChild(InputField.genTextBox('lastName',30,30));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode(CAPTION_EMAIL_ADDRESS));td=tr.insertCell(1);td.className='field';td.appendChild(InputField.genTextBox('email',255,50));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode(CAPTION_PHONE));td=tr.insertCell(1);td.className='field';td.appendChild(elem=InputField.genTextBox('phone',35,30));elem.onkeypress=this.phone_onkeypress;tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Primary Contact?'));td=tr.insertCell(1);td.className='field';td.appendChild(elem=InputField.genCheckBox('isPrimaryContact',1,false));tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.className='actions';td.appendChild(elem=InputField.genSubmit('add','Add'));this.decorateButton(elem,value,callback,this.handleAddOfficer);td.appendChild(document.createTextNode(' '));td.appendChild(InputField.genButton('cancel','Cancel',function(ev){ModalDialog.close();}));output.appendChild(table);ModalDialog.open('Add Officer/Contact',output);firstField.focus();}
UpdateCompanyProfileDOM.prototype.openAddTransferAgent=function(value,callback,criteria)
{var elem,output=document.createElement('form');var tr,td,rows=0,table=document.createElement('table');table.className='modalForm';output.onsubmit=function(ev){return false;};var agents=value.criteria.agents;for(var i=0;i<agents.length;i++)
{tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='empty';td.innerHTML='&bull;';td=tr.insertCell(1);td.className='empty';elem=document.createElement('a');this.decorateButton(elem,value,callback,this.handleCopyTransferAgent);elem.href='javascript:void(null);';elem.myAgentIndex=i;elem.myCriteria=criteria;elem.appendChild(document.createTextNode('Copy '+agents[i].name));td.appendChild(elem);}
tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='empty';td.innerHTML='&bull;';td=tr.insertCell(1);td.className='empty';elem=document.createElement('a');this.decorateButton(elem,value,callback,this.createTransferAgent_onclick);elem.myCriteria=criteria;elem.href='javascript:void(null);';elem.appendChild(document.createTextNode('Add a new transfer agent'));td.appendChild(elem);tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.innerHTML='&nbsp;';tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.className='actions';td.appendChild(InputField.genButton('cancel','Cancel',function(ev){ModalDialog.close();}));output.appendChild(table);ModalDialog.open('Add/Copy Transfer Agent',output);}
UpdateCompanyProfileDOM.prototype.createTransferAgent_onclick=function(ev)
{ModalDialog.close();this.myViewer.openAddTransferAgent2(this.myValue,this.myCallback,this.myCriteria);return false;}
UpdateCompanyProfileDOM.prototype.openAddTransferAgent2=function(value,callback,criteria)
{var firstField,elem,output=document.createElement('form');var tr,td,rows=0,table=document.createElement('table');var pageInfo=value.criteria.pageInfo;table.className='modalForm';output.onsubmit=function(ev){return false;};tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Firm Name'));td=tr.insertCell(1);td.className='field';td.appendChild(firstField=InputField.genTextBox('name',75,50));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Address 1'));td=tr.insertCell(1);td.className='field';td.appendChild(InputField.genTextBox('address1',40,30));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Address 2'));td=tr.insertCell(1);td.className='field';td.appendChild(InputField.genTextBox('address2',40,30));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Address 3'));td=tr.insertCell(1);td.className='field';td.appendChild(InputField.genTextBox('address3',40,30));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('City'));td=tr.insertCell(1);td.className='field';td.appendChild(InputField.genTextBox('city',20,20));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Zip/Postal Code'));td=tr.insertCell(1);td.className='field';td.appendChild(InputField.genTextBox('zip',10,10));tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('Country'));td=tr.insertCell(1);td.className='field';td.appendChild(elem=SelectList.generate('country',pageInfo.countries,'Select One'));elem.value=COUNTRY_DEFAULT;var state;tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='caption';td.appendChild(document.createTextNode('State/Province'));td=tr.insertCell(1);td.className='field';td.appendChild(state=SelectListDOM.create('state'));callback.popStates(value.criteria,state,COUNTRY_DEFAULT);this.decorateCountry(elem,value,callback,state);tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.innerHTML='&nbsp;';tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.className='actions';td.appendChild(elem=InputField.genSubmit('add','Add'));this.decorateButton(elem,value,callback,this.handleAddTransferAgent);elem.myCriteria=criteria;td.appendChild(document.createTextNode(' '));td.appendChild(InputField.genButton('cancel','Cancel',function(ev){ModalDialog.close();}));output.appendChild(table);ModalDialog.open('Add Transfer Agent',output);firstField.focus();}
UpdateCompanyProfileDOM.prototype.genConfirm=function(value,callback)
{var output=document.createElement('table');var tr,td,rows=0;output.className='detail';tr=output.insertRow(rows++);td=tr.insertCell(0);tr.className='detailHeader';td.className='detailHeader';td.innerHTML='Issuer Services &mdash; Update Confirmation';rows=this.createBlankRow(output,rows,1);var contents=callback.getContents(this.CMS_CONFIRMATION_URI);if(undefined==contents)
contents=this.MESSAGE_CONFIRMATION;tr=output.insertRow(rows++);td=tr.insertCell(0);td.className='detailValue';td.innerHTML=contents;return output;}
UpdateCompanyProfileDOM.prototype.appendDate=function(o,v)
{if(v)
Elements.addText(o,Formatter.toDate(v));}
UpdateCompanyProfileDOM.prototype.createBlankRow=function(table,rows,colspan)
{var tr=table.insertRow(rows++);var td=tr.insertCell(0);td.colSpan=colspan;td.innerHTML='&nbsp;';return rows;}
UpdateCompanyProfileDOM.prototype.createSeparatorRow=function(table,rows,colspan)
{var tr=table.insertRow(rows++);var td=tr.insertCell(0);td.colSpan=colspan;td.appendChild(document.createElement('hr'));return rows;}
UpdateCompanyProfileDOM.prototype.createFootnote=function(value)
{var output=document.createElement('span');output.className='footnote';output.innerHTML=value;return output;}
UpdateCompanyProfileDOM.prototype.createCaption=function(tr,value)
{var output=tr.insertCell(0);output.className='detailCaption detailCaptionWrap';output.appendChild(document.createTextNode(value));return output;}
UpdateCompanyProfileDOM.prototype.createSubCaption=function(tr,value)
{var output=tr.insertCell(0);output.className='detailValue';output.style.width='1%';output.style.whiteSpace='nowrap';output.style.paddingLeft='15px';output.appendChild(document.createTextNode(value));return output;}
UpdateCompanyProfileDOM.prototype.createNewValue=function(tr,data,name)
{var output=tr.insertCell(1);output.style.verticalAlign='top';output.className='detailValue';var value=data[name];if(undefined!=value)
output.appendChild(document.createTextNode(toDisplayable(value)));return output;}
UpdateCompanyProfileDOM.prototype.createNewValueX=function(tr,data,name)
{var output=tr.insertCell(1);output.style.verticalAlign='top';output.className='detailValue';var value=data[name];if(undefined!=value)
output.innerHTML=fromLongText(value);return output;}
UpdateCompanyProfileDOM.prototype.createNewValueWithDate=function(tr,data,name,dateName,oldValue)
{var output=tr.insertCell(1);output.style.verticalAlign='top';output.className='detailValue';var value=data[name];var asOf=data[dateName];if(undefined==value)
{if((undefined==asOf)||(undefined==oldValue))
return output;value=data[name]=oldValue;}
output.appendChild(document.createTextNode(value));if(undefined!=asOf)
{output.appendChild(document.createTextNode(' as of '));output.appendChild(document.createTextNode(asOf));}
return output;}
UpdateCompanyProfileDOM.prototype.createOldValue=function(tr,value)
{var output=tr.insertCell(2);output.style.verticalAlign='top';output.className='detailValue';output.colSpan=2;if(undefined!=value)
output.appendChild(document.createTextNode(toDisplayable(value)));return output;}
UpdateCompanyProfileDOM.prototype.createOldValueWithDate=function(tr,value,dateValue)
{var output=tr.insertCell(2);output.style.verticalAlign='top';output.className='detailValue';output.colSpan=2;if(undefined!=value)
{output.appendChild(document.createTextNode(value));if(undefined!=dateValue)
output.appendChild(document.createTextNode(' as of '+dateValue));}
return output;}
UpdateCompanyProfileDOM.prototype.createInputCell=function(tr)
{var output=this.lastInputCell=tr.insertCell(1);output.style.verticalAlign='top';output.className='detailValue';return output;}
UpdateCompanyProfileDOM.prototype.createTextFieldCell=function(tr,name,maxLength,size)
{var output=this.createInputCell(tr);output.appendChild(output.myField=this.createInput(name,maxLength,size));return output;}
UpdateCompanyProfileDOM.prototype.createTextAreaCell=function(tr,name,cols,rows)
{var output=this.createInputCell(tr);output.appendChild(output.myField=this.createTextArea(name,cols,rows));return output;}
UpdateCompanyProfileDOM.prototype.createRadioButtonsCell=function(tr,name,values,selected,onclick)
{var elem,output=this.createInputCell(tr);var formInfo=this.lastCriteria.formInfo;if(undefined!=formInfo[name])
selected=formInfo[name];for(var i=0;i<values.length;i++)
{var value=values[i];output.appendChild(elem=InputField.genRadio(name,value,(selected==value)));output.appendChild(document.createTextNode(' '+value+'      '));elem.myFormInfo=formInfo;elem.myCallback=this;this.addEventListener(elem,'click',this.radioButton_onclick);if(undefined!=onclick)
this.addEventListener(elem,'click',onclick);}
return output;}
UpdateCompanyProfileDOM.prototype.createSelectListCell=function(tr,name,values,header)
{var output=this.createInputCell(tr);output.appendChild(output.myField=this.createSelectList(name,values,header));return output;}
UpdateCompanyProfileDOM.prototype.createStateSelectListCell=function(tr,name,countryId,stateId,countryFieldName,value,callback)
{var formInfo=value.criteria.formInfo;var elem,output=this.createInputCell(tr);output.appendChild(elem=output.myField=SelectListDOM.create(name));if(undefined!=formInfo[countryFieldName])
countryId=formInfo[countryFieldName];if(countryId&&(0<trim(countryId).length))
{var current=formInfo[name];if(undefined!=current)
stateId=current;if(undefined!=stateId)
stateId=RTrim(stateId);callback.popStates(value.criteria,elem,countryId,stateId);}
else
{var options=elem.options;options.length=0;options[0]=new Option('Select Country First','');}
this.decorateElement(elem);return output;}
UpdateCompanyProfileDOM.prototype.createMultiSelectCell=function(tr,name,value)
{var formInfo=this.lastCriteria.formInfo;var output=this.createInputCell(tr);var elem=Elements.addDiv(output,'multiSelect');var selection=Elements.addDiv(output);var records=value.records;for(var i=0;i<records.length;i++)
{if(0<i)
Elements.addBreak(elem);var r=records[i];var checked=formInfo[name+'_'+r.id];if(undefined==checked)
checked=false;var item=InputField.genCheckBox(name,r.id,checked);item.myFormInfo=formInfo;item.mySelection=selection;item.onclick=this.multiSelect_onclick;elem.appendChild(item);Elements.addText(elem,' '+r.caption);}
var a=formInfo[name];if(a&&(0<a.length))
{Elements.addBreak(selection);Elements.addText(selection,'Selected: '+a);}
return output;}
UpdateCompanyProfileDOM.prototype.multiSelect_onclick=function(ev)
{var value='';var formInfo=this.myFormInfo;var fields=this.form.elements[this.name];formInfo[this.name+'_'+this.value]=this.checked;for(var i=0;i<fields.length;i++)
{if(!fields[i].checked)
continue;if(0<value.length)
value+=', ';value+=fields[i].value;}
formInfo[this.name]=value;this.mySelection.innerHTML='';if(0<value.length)
{this.mySelection.appendChild(document.createElement('br'));this.mySelection.appendChild(document.createTextNode('Selected: '+value));}}
UpdateCompanyProfileDOM.prototype.appendOldValue=function(value)
{this.appendOldValueByField(this.lastInputCell.myField,value);}
UpdateCompanyProfileDOM.prototype.appendOldValueByField=function(elem,value)
{if((undefined!=value)&&(0==elem.value.length))
elem.value=value;}
UpdateCompanyProfileDOM.prototype.appendOldValueWithDate=function(value,dateValue)
{var td=this.lastInputCell;var output=document.createElement('span');output.style.fontStyle='italic';if(undefined!=value)
{output.appendChild(document.createTextNode(value));if(undefined!=dateValue)
output.appendChild(document.createTextNode(' as of '+dateValue));}
td.appendChild(document.createTextNode(' '));td.appendChild(output);return output;}
UpdateCompanyProfileDOM.prototype.createInput=function(name,maxLength,size)
{return this.decorateElement(InputField.genTextBox(name,maxLength,size));}
UpdateCompanyProfileDOM.prototype.createDateInput=function(name)
{var output=this.createInput(name,10,12);output.myCallback=this;output.onfocus=this.openCalendar;output.className='calendarField';this.addEventListener(output,'change',this.date_onchange);return output;}
UpdateCompanyProfileDOM.prototype.createHidden=function(name,value)
{return InputField.genHidden(name,value);}
UpdateCompanyProfileDOM.prototype.createTextArea=function(name,cols,rows)
{return this.decorateElement(InputField.genTextArea(name,cols,rows));}
UpdateCompanyProfileDOM.prototype.createSelectList=function(name,values,header)
{return this.decorateElement(SelectList.generate(name,values,header));}
UpdateCompanyProfileDOM.prototype.decorateCountry=function(elem,value,callback,state)
{if(undefined==elem.myStates)
{elem.myValue=value;elem.myCallback=callback;elem.myStates=new Array();this.addEventListener(elem,'change',this.country_onchange);}
elem.myStates[elem.myStates.length]=state;}
UpdateCompanyProfileDOM.prototype.decorateElement=function(elem)
{if(undefined!=this.lastCriteria)
{elem.myFormInfo=this.lastCriteria.formInfo;elem.myCallback=this;this.addEventListener(elem,'change',this.element_onchange);var value=elem.myFormInfo[elem.name];if(undefined!=value)
elem.value=value;}
return elem;}
UpdateCompanyProfileDOM.prototype.decorateCheckBox=function(elem)
{if(undefined!=this.lastCriteria)
{elem.myFormInfo=this.lastCriteria.formInfo;elem.myCallback=this;this.addEventListener(elem,'click',this.element_onclick);var checked=elem.myFormInfo[elem.name];if(undefined!=checked)
elem.checked=checked;}
return elem;}
UpdateCompanyProfileDOM.prototype.decorateButton=function(elem,value,callback,onclick)
{elem.myViewer=this;elem.myCallback=callback;elem.myValue=value;elem.onclick=onclick;}
UpdateCompanyProfileDOM.prototype.createOfficerSection=function(table,index,record,formInfo,pageInfo,value,callback)
{this.createOfficerRow(table,(index*3)+this.ROW_BUFFER_OFFICERS,index,record,formInfo,pageInfo,value,callback);}
UpdateCompanyProfileDOM.prototype.createOfficerRow=function(table,rows,index,record,formInfo,pageInfo,value,callback)
{var tr,td,elem,isDeleted=formInfo['comp_officer_removed_'+index];if(undefined==isDeleted)
isDeleted=false;var title=record.caption=record.name+(exists(record.title)?' ('+trim(record.title)+')':'');formInfo['comp_officer_caption_'+index]=title;rows=this.createBlankRow(table,rows,2);tr=table.insertRow(rows++);tr.className='detailHeader';td=tr.insertCell(0);td.className='detailHeader';elem=value.criteria.officerAnchors[index]=document.createElement('a');var img=document.createElement('img');img.border=0;img.src=iconExpand.src;elem.href='javascript:void(null)';elem.appendChild(img);elem.onclick=this.officerExpand_onclick;elem.myCallback=this;elem.myImage=img;elem.psIsDeleted=isDeleted;if(isDeleted)
td.appendChild(document.createTextNode('Deleted:'));else
td.appendChild(elem);td.appendChild(document.createTextNode(' '+title));td=tr.insertCell(1);td.className='detailHeader';td.style.textAlign='right';var a=document.createElement('a');a.href='javascript:void(null)';a.myTable=table;a.myIndex=index;a.myRecord=record;a.formInfo=formInfo;a.myExpandAnchor=elem;a.myCallback=this;var anchorCaption;if(isDeleted)
{a.onclick=this.unremoveOfficer_onclick;anchorCaption='Restore';}
else
{a.onclick=this.removeOfficer_onclick;anchorCaption='Delete';}
a.appendChild(document.createTextNode(anchorCaption));td.appendChild(a);tr=elem.myContainer=table.insertRow(rows++);tr.style.display='none';td=tr.insertCell(0);td.colSpan=2;td.className='subContainer';var subTable=document.createElement('table');subTable.className='detail';var subRows=0;tr=subTable.insertRow(subRows++);this.createCaption(tr,'Title 1');this.createSelectListCell(tr,'comp_officer_title1_'+index,pageInfo.titles,'Select One');this.appendOldValue(record.title);tr=subTable.insertRow(subRows++);this.createCaption(tr,'Title 2');this.createSelectListCell(tr,'comp_officer_title2_'+index,pageInfo.titles,'Select One');this.appendOldValue(record.title1);tr=subTable.insertRow(subRows++);this.createCaption(tr,'Title 3');this.createSelectListCell(tr,'comp_officer_title3_'+index,pageInfo.titles,'Select One');this.appendOldValue(record.title2);tr=subTable.insertRow(subRows++);this.createCaption(tr,'Title 4');this.createSelectListCell(tr,'comp_officer_title4_'+index,pageInfo.titles,'Select One');this.appendOldValue(record.title3);tr=subTable.insertRow(subRows++);this.createCaption(tr,CAPTION_FIRST_NAME);this.createTextFieldCell(tr,'comp_officer_firstname_'+index,20,20);this.appendOldValue(record.name);tr=subTable.insertRow(subRows++);this.createCaption(tr,CAPTION_LAST_NAME);this.createTextFieldCell(tr,'comp_officer_lastname_'+index,30,30);tr=subTable.insertRow(subRows++);this.createCaption(tr,CAPTION_EMAIL_ADDRESS);this.createTextFieldCell(tr,'comp_officer_email_'+index,255,50);this.appendOldValue(record.email);tr=subTable.insertRow(subRows++);this.createCaption(tr,CAPTION_PHONE);this.createTextFieldCell(tr,'comp_officer_phone_'+index,35,30).myField.onkeypress=this.phone_onkeypress;this.appendOldValue(record.phone);tr=subTable.insertRow(subRows++);this.createCaption(tr,'Primary Contact?');this.createInputCell(tr).appendChild(elem=this.decorateCheckBox(InputField.genCheckBox('is_primary_contact_'+index,1,record.isPrimaryContact)));td.appendChild(subTable);return rows;}
UpdateCompanyProfileDOM.prototype.createServiceProviderSection=function(table,name,caption,record,needsDate,pageInfo,value,callback)
{var rows=0;var hasRecord=(undefined!=record);var formInfo=value.criteria.formInfo;var deleteAnchor,isDeleted=false;var prefix='comp_'+name;if(!hasRecord)
record=new Object();else
{isDeleted=formInfo[prefix+'_removed'];formInfo[prefix+'_caption']=record.name;}
var sub=document.createElement('tbody');table.appendChild(sub);rows=this.createBlankRow(sub,rows,2);var tr=sub.insertRow(rows++);var td=tr.insertCell(0);tr.className='detailHeader';td.className='detailHeader';if(isDeleted)
td.appendChild(document.createTextNode('Deleted: '));td.appendChild(document.createTextNode(caption));if(!hasRecord)
td.colSpan=2;else
{var cap=isDeleted?'Restore':'Delete';var action=isDeleted?this.unremoveServiceProvider_onclick:this.removeServiceProvider_onclick;var a=deleteAnchor=document.createElement('a');a.href='javascript:void(null);';this.decorateButton(a,value,this,action);a.myName=prefix+'_removed';a.myCaptionCell=td;a.myCaption=caption;a.appendChild(document.createTextNode(cap));td=tr.insertCell(1);td.className='detailHeader';td.style.textAlign='right';td.appendChild(a);}
sub=document.createElement('tbody');if(undefined!=deleteAnchor)
deleteAnchor.myContainer=sub;table.appendChild(sub);if(isDeleted)
sub.style.display='none';rows=0;rows=this.createBlankRow(sub,rows,2);tr=sub.insertRow(rows++);this.createCaption(tr,'Firm Name');td=this.createTextFieldCell(tr,prefix+'_name');if(needsDate)
{td.appendChild(document.createTextNode('  as of '));td.appendChild(this.createDateInput(prefix+'_date'));}
this.appendOldValue(record.name);tr=sub.insertRow(rows++);this.createCaption(tr,'Contact First Name');this.createTextFieldCell(tr,prefix+'_firstname');tr=sub.insertRow(rows++);this.createCaption(tr,'Contact Last Name');this.createTextFieldCell(tr,prefix+'_lastname');tr=sub.insertRow(rows++);this.createCaption(tr,'Contact Email');this.createTextFieldCell(tr,prefix+'_email');tr=sub.insertRow(rows++);this.createCaption(tr,'Contact Phone');this.createTextFieldCell(tr,prefix+'_phone').myField.onkeypress=this.phone_onkeypress;tr=sub.insertRow(rows++);this.createCaption(tr,'Contact Fax');this.createTextFieldCell(tr,prefix+'_fax').myField.onkeypress=this.phone_onkeypress;tr=sub.insertRow(rows++);this.createCaption(tr,'Website');this.createTextFieldCell(tr,prefix+'_website');tr=sub.insertRow(rows++);this.createCaption(tr,'Address 1');this.createTextFieldCell(tr,prefix+'_address1');this.appendOldValue(record.address1);tr=sub.insertRow(rows++);this.createCaption(tr,'Address 2');this.createTextFieldCell(tr,prefix+'_address2');this.appendOldValue(record.address2);tr=sub.insertRow(rows++);this.createCaption(tr,'Address 3');this.createTextFieldCell(tr,prefix+'_address3');this.appendOldValue(record.address3);tr=sub.insertRow(rows++);this.createCaption(tr,'City');this.createTextFieldCell(tr,prefix+'_city');this.appendOldValue(record.city);tr=sub.insertRow(rows++);this.createCaption(tr,'Zip/Postal Code');this.createTextFieldCell(tr,prefix+'_zip');this.appendOldValue(record.zip);tr=sub.insertRow(rows++);this.createCaption(tr,'Country');var country=this.createSelectListCell(tr,prefix+'_country',pageInfo.countries,'Select One').myField;this.appendOldValue(record.countryId);tr=sub.insertRow(rows++);this.createCaption(tr,'State/Province');var state=this.createStateSelectListCell(tr,prefix+'_state',record.countryId,record.stateId,'comp_'+name+'_country',value,callback).myField;this.appendOldValue(record.stateId);this.decorateCountry(country,value,callback,state);}
UpdateCompanyProfileDOM.prototype.createServiceProviderRO=function(table,rows,name,caption,record,formInfo,value,callback)
{rows=this.createBlankRow(table,rows,this.COLS_SUMMARY);if(undefined==record)
record=new Object();var colBuffer=this.COLS_SUMMARY-1;var prefix='comp_'+name;var isDeleted=formInfo[prefix+'_removed'];var tr=table.insertRow(rows++);var td=tr.insertCell(0);tr.className='detailHeader';td.className='detailHeader';if(isDeleted)
td.appendChild(document.createTextNode('Deleted: '));td.appendChild(document.createTextNode(caption));if(isDeleted)
{td.colSpan=colBuffer;td=tr.insertCell(1);td.className='detailHeader';td.style.textAlign='right';td.colSpan=colBuffer;td.appendChild(this.createSectionAnchor(value,callback,'doServiceProviders','Edit'));return rows;}
td=tr.insertCell(1);td.className='detailHeader';td.appendChild(document.createTextNode('New Value'));td=tr.insertCell(2);td.className='detailHeader';td.appendChild(document.createTextNode('Old Value'));td=tr.insertCell(3);td.className='detailHeader';td.style.textAlign='right';td.appendChild(this.createSectionAnchor(value,callback,'doServiceProviders','Edit'));rows=this.createBlankRow(table,rows,this.COLS_SUMMARY);tr=table.insertRow(rows++);this.createCaption(tr,'Firm Name');this.createNewValueWithDate(tr,formInfo,'comp_'+name+'_name','comp_'+name+'_date',record.name);this.createOldValue(tr,record.name);tr=table.insertRow(rows++);this.createCaption(tr,'Contact First Name');this.createNewValue(tr,formInfo,'comp_'+name+'_firstname').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Contact Last Name');this.createNewValue(tr,formInfo,'comp_'+name+'_lastname').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Contact Email');this.createNewValue(tr,formInfo,'comp_'+name+'_email').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Contact Phone');this.createNewValue(tr,formInfo,'comp_'+name+'_phone').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Contact Fax');this.createNewValue(tr,formInfo,'comp_'+name+'_fax').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Website');this.createNewValue(tr,formInfo,'comp_'+name+'_website').colSpan=colBuffer;;tr=table.insertRow(rows++);this.createCaption(tr,'Address 1');this.createNewValue(tr,formInfo,'comp_'+name+'_address1');this.createOldValue(tr,record.address1);tr=table.insertRow(rows++);this.createCaption(tr,'Address 2');this.createNewValue(tr,formInfo,'comp_'+name+'_address2');this.createOldValue(tr,record.address2);tr=table.insertRow(rows++);this.createCaption(tr,'Address 3');this.createNewValue(tr,formInfo,'comp_'+name+'_address3');this.createOldValue(tr,record.address3);tr=table.insertRow(rows++);this.createCaption(tr,'City');this.createNewValue(tr,formInfo,'comp_'+name+'_city');this.createOldValue(tr,record.city);tr=table.insertRow(rows++);this.createCaption(tr,'State/Province');this.createNewValue(tr,formInfo,'comp_'+name+'_state');this.createOldValue(tr,record.state);tr=table.insertRow(rows++);this.createCaption(tr,'Zip/Postal Code');this.createNewValue(tr,formInfo,'comp_'+name+'_zip');this.createOldValue(tr,record.zip);tr=table.insertRow(rows++);this.createCaption(tr,'Country');this.createNewValue(tr,formInfo,'comp_'+name+'_country');this.createOldValue(tr,record.country);return rows;}
UpdateCompanyProfileDOM.prototype.createTransferAgentRow=function(table,rows,index,record,formInfo,pageInfo,id,isDeleted,value,callback)
{formInfo['agent_caption_'+id]=record.name;var caption=record.name;if((undefined!=record.city)||(undefined!=record.state))
{caption+=' - ';if(undefined!=record.city)
caption+=record.city;if(undefined!=record.state)
{if(undefined!=record.city)
caption+=', ';caption+=record.state;}}
tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;var subTable=document.createElement('table');subTable.style.width='100%';var subRow=subTable.insertRow(0);var captionCell=subRow.insertCell(0);captionCell.className='detailCaption';captionCell.style.whiteSpace='nowrap';captionCell.myCaption=caption;var a=document.createElement('a');a.href='javascript:void(null)';a.myCallback=this;a.onclick=this.transferAgentExpand_onclick;var img=a.myImage=document.createElement('img');img.border=0;img.src=iconExpand.src;a.appendChild(img);if(isDeleted)
{captionCell.appendChild(document.createTextNode('Deleted Transfer Agent: '+caption));}
else
{captionCell.appendChild(a);captionCell.appendChild(document.createTextNode(' Transfer Agent: '+caption));}
var subCell=subRow.insertCell(1);subCell.style.textAlign='right';elem=document.createElement('a');elem.href='javascript:void(null)';elem.myCallback=this;elem.onclick=isDeleted?this.unremoveTransferAgent_onclick:this.removeTransferAgent_onclick;elem.myExpandAnchor=a;elem.myCaptionCell=captionCell;elem.myAgentId=id;elem.formInfo=formInfo;elem.appendChild(document.createTextNode(isDeleted?'Restore Transfer Agent >>':'<< Delete Transfer Agent'));subCell.appendChild(elem);td.appendChild(subTable);tr=a.myContainer=table.insertRow(rows++);tr.style.display='none';td=tr.insertCell(0);td.colSpan=2;td.className='subContainer';subTable=document.createElement('table');var subRows=0;td.appendChild(subTable);tr=subTable.insertRow(subRows++);this.createSubCaption(tr,'Firm Name');this.createTextFieldCell(tr,'agent_name_'+id,75,50);this.appendOldValue(record.name);tr=subTable.insertRow(subRows++);this.createSubCaption(tr,'Address 1');this.createTextFieldCell(tr,'agent_address1_'+id,40,30);this.appendOldValue(record.address1);tr=subTable.insertRow(subRows++);this.createSubCaption(tr,'Address 2');this.createTextFieldCell(tr,'agent_address2_'+id,40,30);this.appendOldValue(record.address2);tr=subTable.insertRow(subRows++);this.createSubCaption(tr,'Address 3');this.createTextFieldCell(tr,'agent_address3_'+id,40,30);this.appendOldValue(record.address3);tr=subTable.insertRow(subRows++);this.createSubCaption(tr,'City');this.createTextFieldCell(tr,'agent_city_'+id,20,20);this.appendOldValue(record.city);tr=subTable.insertRow(subRows++);this.createSubCaption(tr,'Zip/Postal Code');this.createTextFieldCell(tr,'agent_zip_'+id,10,10);this.appendOldValue(record.zip);tr=subTable.insertRow(subRows++);this.createSubCaption(tr,'Country');var country=this.createSelectListCell(tr,'agent_country_'+id,pageInfo.countries,'Select One').myField;this.appendOldValue(record.countryId);tr=subTable.insertRow(subRows++);this.createSubCaption(tr,'State/Province');var state=this.createStateSelectListCell(tr,'agent_state_'+id,record.countryId,record.stateId,'agent_country_'+id,value,callback).myField;this.appendOldValue(record.stateId);this.decorateCountry(country,value,callback,state);return rows;}
UpdateCompanyProfileDOM.prototype.reset_onclick=function(ev)
{var callback=this.myCallback;var value=this.myValue;var criteria=value.criteria;criteria.body.innerHTML='';criteria.body.appendChild(this.myViewer[this.myGenerate](value,callback));}
UpdateCompanyProfileDOM.prototype.symbolEntry_onclick=function(ev)
{var me=this.myViewer;var callback=this.myCallback;var value=this.myValue;var theForm=this.form;try
{value.symbol=me.getFieldValue(theForm.symbol,'Symbol');value.contactAffiliation=me.getFieldValue(theForm.companyName,'Company Affiliation');value.contactFirstName=me.getFieldValue(theForm.firstName,'First Name');value.contactLastName=me.getFieldValue(theForm.lastName,'Last Name');value.contactEmail=me.getFieldValue(theForm.emailAddress,'Email Address');value.contactPhone=me.getFieldValue(theForm.phone,'Phone');if(!callback.handleSymbolEntry(value))
theForm.symbol.focus();}
catch(error)
{window.alert('Invalid or missing '+error.caption+' value.');error.field.focus();}
return true;}
UpdateCompanyProfileDOM.prototype.next_onclick=function(ev)
{var me=this.myViewer;var callback=this.myCallback;var value=this.myValue;me.anchorList.setSelectedItem(value.criteria.anchorCriteria,this.myNextAction);}
UpdateCompanyProfileDOM.prototype.phone_onkeypress=function(ev)
{return KeyCode.isPhoneCode(KeyCode.getPress(ev));}
UpdateCompanyProfileDOM.prototype.resetSection_onclick=function(ev)
{var me=this.myViewer;var callback=this.myCallback;var value=this.myValue;var formInfo=value.criteria.formInfo;var elements=this.form.elements;for(var i=0;i<elements.length;i++)
{var name=elements[i].name;if(undefined!=formInfo[name])
formInfo[name]=undefined;}
me.anchorList.setSelectedItem(value.criteria.anchorCriteria,this.myAction);}
UpdateCompanyProfileDOM.prototype.radioButton_onclick=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;that.myFormInfo[that.name]=that.value;}
UpdateCompanyProfileDOM.prototype.sharesAuth_onchange=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;var i=that.myIndex;var elem=that.form['security_oshares_'+i];if((undefined==elem)||(0==elem.value.length)||(0==that.value.length))
return true;var sharesOut=parseIntX(elem.value);var sharesAuth=parseIntX(that.value);if(sharesAuth<sharesOut)
{window.alert('The Shares Outstanding cannot exceed the Number of Authorized Shares.');that.focus();return false;}
return true;}
UpdateCompanyProfileDOM.prototype.sharesOutstanding_onchange=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;var i=that.myIndex;if(0==that.value.length)
return true;var shares=parseIntX(that.value);var elem=that.form['security_auth_shares_'+i];if((undefined!=elem)&&(0!=elem.value.length))
{var compare=parseIntX(elem.value);if(shares>compare)
{window.alert('The Shares Outstanding cannot exceed the Number of Authorized Shares.');that.focus();return false;}}
elem=that.form['security_float_'+i];if((undefined!=elem)&&(0!=elem.value.length))
{var compare=parseIntX(elem.value);if(shares<compare)
{window.alert('The Public Float cannot exceed the Shares Outstanding.');that.focus();return false;}}
return true;}
UpdateCompanyProfileDOM.prototype.sharesFloat_onchange=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;var i=that.myIndex;var elem=that.form['security_oshares_'+i];if((undefined==elem)||(0==elem.value.length)||(0==that.value.length))
return true;var sharesOut=parseIntX(elem.value);var sharesFloat=parseIntX(that.value);if(sharesFloat>sharesOut)
{window.alert('The Public Float cannot exceed the Shares Outstanding.');that.focus();return false;}
return true;}
UpdateCompanyProfileDOM.prototype.dated_onchange=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;var myDate=that.myDate;if((undefined!=myDate)&&(0==myDate.value.length)&&(0<that.value.length))
{var newValue=formatInputDate(new Date());myDate.value=newValue;that.myFormInfo[myDate.name]=newValue;}}
UpdateCompanyProfileDOM.prototype.date_onchange=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;var value=that.value;if((undefined==value)||(0==value.length))
return true;try
{var now=new Date();if(now.getTime()>parseInputDate(value).getTime())
return true;window.alert(that.myCallback.MESSAGE_FUTURE_DATE);setTimeout(function(){that.focus();},100);}
catch(error){window.alert(error);}
if(undefined==ev)ev=window.event;if(ev.cancelable)
ev.preventDefault();else
ev.returnValue=false;return false;}
UpdateCompanyProfileDOM.prototype.element_onchange=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;that.myFormInfo[that.name]=(''==that.value)?undefined:that.value;}
UpdateCompanyProfileDOM.prototype.element_onclick=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;that.myFormInfo[that.name]=that.checked;}
UpdateCompanyProfileDOM.prototype.country_onchange=function(ev)
{var that=(undefined!=this.myStates)?this:event.srcElement;var states=that.myStates;for(var i=0;i<states.length;i++)
that.myCallback.popStates(that.myValue.criteria,states[i],that.value);}
UpdateCompanyProfileDOM.prototype.nonBankRegulated_onclick=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;if(that.myCallback.handleBankThrift(that,that.form['bank_thrift']))
that.myFormInfo['bank_thrift']=undefined;}
UpdateCompanyProfileDOM.prototype.bankThrift_onclick=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;if(that.myCallback.handleBankThrift(that,that.form['insurance_co']))
that.myFormInfo['insurance_co']='No';}
UpdateCompanyProfileDOM.prototype.handleBankThrift=function(that,others)
{var disabled=('No'==that.value);if(disabled)
{if(!others[0].checked)
{that.form.regulatory_agency.disabled=disabled;that.form.other_regulatory_agency.disabled=disabled;}}
else
{that.form.regulatory_agency.disabled=disabled;that.myCallback.activateRegulatoryAgency(that.form.regulatory_agency);others[1].checked=true;}
return!disabled;}
UpdateCompanyProfileDOM.prototype.regulatoryAgency_onchange=function(ev)
{var that=(undefined!=this.myFormInfo)?this:event.srcElement;that.myCallback.activateRegulatoryAgency(that);}
UpdateCompanyProfileDOM.prototype.activateRegulatoryAgency=function(elem)
{var disabled=('Other'!=elem.value);var elem=elem.form.other_regulatory_agency;elem.disabled=disabled;if(disabled)
{elem.value='';elem.myFormInfo[elem.name]=undefined;}
else
elem.focus();}
UpdateCompanyProfileDOM.prototype.removeServiceProvider_onclick=function(ev)
{this.myContainer.style.display='none';this.innerHTML='Restore';this.onclick=this.myCallback.unremoveServiceProvider_onclick;this.myValue.criteria.formInfo[this.myName]=true;this.myCaptionCell.innerHTML='Deleted: '+this.myCaption;return false;}
UpdateCompanyProfileDOM.prototype.unremoveServiceProvider_onclick=function(ev)
{this.myContainer.style.display=DISPLAY_TBODY;this.innerHTML='Delete';this.onclick=this.myCallback.removeServiceProvider_onclick;this.myValue.criteria.formInfo[this.myName]=false;this.myCaptionCell.innerHTML=this.myCaption;return false;}
UpdateCompanyProfileDOM.prototype.addOfficer_onclick=function(ev)
{this.myViewer.openAddOfficer(this.myValue,this.myCallback);}
UpdateCompanyProfileDOM.prototype.handleAddOfficer=function(ev)
{var me=this.myViewer;var theForm=this.form;var callback=this.myCallback;var value=this.myValue;var formInfo=value.criteria.formInfo;var pageInfo=value.criteria.pageInfo;var records=value.officers;var index=0;if(undefined==records)
value.officers=records=new Array();else
index=records.length;try
{var title=me.getFieldValue(theForm.title1,'Title 1');var firstName=me.getFieldValue(theForm.firstName,CAPTION_FIRST_NAME);var lastName=me.getFieldValue(theForm.lastName,CAPTION_LAST_NAME);formInfo['comp_officer_title1_'+index]=title;formInfo['comp_officer_title2_'+index]=theForm.title2.value;formInfo['comp_officer_title3_'+index]=theForm.title3.value;formInfo['comp_officer_title4_'+index]=theForm.title4.value;formInfo['comp_officer_firstname_'+index]=firstName;formInfo['comp_officer_lastname_'+index]=lastName;formInfo['comp_officer_email_'+index]=theForm.email.value;formInfo['comp_officer_phone_'+index]=theForm.phone.value;formInfo['is_primary_contact_'+index]=theForm.isPrimaryContact.checked;var record=new OfficerItem(firstName+' '+lastName,title);me.createOfficerSection(value.criteria.officerTable,index,record,formInfo,pageInfo,value,callback);records[index]=record;formInfo['comp_officer_count']=records.length;ModalDialog.close();}
catch(error)
{window.alert('Invalid or missing '+error.caption+' value.');error.field.focus();}}
UpdateCompanyProfileDOM.prototype.removeOfficer_onclick=function(ev)
{var me=this.myCallback;var i=this.myIndex;var table=this.myTable;var record=this.myRecord;var row=(3*i)+1+me.ROW_BUFFER_OFFICERS;var tr=table.rows[row];var td=tr.cells[0];td.innerHTML='';td.appendChild(document.createTextNode('Deleted: '+record.name));if(undefined!=record.title)
td.appendChild(document.createTextNode(' ('+record.title+')'));this.innerHTML='Restore';this.onclick=me.unremoveOfficer_onclick;table.rows[row+1].style.display='none';this.myExpandAnchor.psIsDeleted=true;this.formInfo['comp_officer_removed_'+i]=true;return false;}
UpdateCompanyProfileDOM.prototype.unremoveOfficer_onclick=function(ev)
{var me=this.myCallback;var i=this.myIndex;var table=this.myTable;var record=this.myRecord;var row=(3*i)+1+me.ROW_BUFFER_OFFICERS;var tr=table.rows[row];var td=tr.cells[0];var a=this.myExpandAnchor;a.myImage.src=iconExpand.src;a.onclick=me.officerExpand_onclick;a.psIsDeleted=false;td.innerHTML='';td.appendChild(a);td.appendChild(document.createTextNode(' '+record.name));if(undefined!=record.title)
td.appendChild(document.createTextNode(' ('+record.title+')'));this.innerHTML='Delete';this.onclick=me.removeOfficer_onclick;this.formInfo['comp_officer_removed_'+i]=false;return false;}
UpdateCompanyProfileDOM.prototype.expandAllOfficers_onclick=function(ev)
{var me=this.myCallback;var values=this.myValue.criteria.officerAnchors;for(var i=0;i<values.length;i++)
if(!values[i].psIsDeleted)
me.expandOfficer(values[i]);this.innerHTML='Collapse All';this.onclick=me.collapseAllOfficers_onclick
return false;}
UpdateCompanyProfileDOM.prototype.collapseAllOfficers_onclick=function(ev)
{var me=this.myCallback;var values=this.myValue.criteria.officerAnchors;for(var i=0;i<values.length;i++)
me.collapseOfficer(values[i]);this.innerHTML='Expand All';this.onclick=me.expandAllOfficers_onclick
return false;}
UpdateCompanyProfileDOM.prototype.officerExpand_onclick=function(ev)
{this.myCallback.expandOfficer(this);return false;}
UpdateCompanyProfileDOM.prototype.expandOfficer=function(elem)
{elem.myContainer.style.display=trDisplayValue;elem.myImage.src=iconCollapse.src;elem.onclick=this.officerCollapse_onclick;}
UpdateCompanyProfileDOM.prototype.officerCollapse_onclick=function(ev)
{this.myCallback.collapseOfficer(this);return false;}
UpdateCompanyProfileDOM.prototype.collapseOfficer=function(elem)
{elem.myContainer.style.display='none';elem.myImage.src=iconExpand.src;elem.onclick=this.officerExpand_onclick;}
UpdateCompanyProfileDOM.prototype.addTransferAgent_onclick=function(ev)
{this.myViewer.openAddTransferAgent(this.myValue,this.myCallback,this.myCriteria);}
UpdateCompanyProfileDOM.prototype.handleCopyTransferAgent=function(ev)
{var criteria=this.myValue.criteria;var me=this.myViewer;var _criteria=this.myCriteria;me.handleAddTransferAgent_(criteria,_criteria,criteria.agents[this.myAgentIndex]);ModalDialog.close();}
UpdateCompanyProfileDOM.prototype.handleAddTransferAgent=function(ev)
{var me=this.myViewer;var theForm=this.form;try
{var name=me.getFieldValue(theForm.name,'Firm Name');var record=new TransferAgentItem(undefined,name,theForm.address1.value,theForm.address2.value,theForm.address3.value,theForm.city.value,theForm.state.value,theForm.zip.value,theForm.country.value);var criteria=this.myValue.criteria;me.handleAddTransferAgent_(criteria,this.myCriteria,record);var agents=criteria.agents;agents[agents.length]=record;ModalDialog.close();}
catch(error)
{window.alert('Invalid or missing '+error.caption+' value.');error.field.focus();}}
UpdateCompanyProfileDOM.prototype.handleAddTransferAgent_=function(criteria,_criteria,newRecord)
{var formInfo=criteria.formInfo;var security=_criteria.security;var securityIndex=_criteria.securityIndex;var agents=security.transferAgents;var agentIndex=agents.length;var id=securityIndex+'_'+agentIndex;var lastRow=_criteria.lastRow;formInfo['agent_name_'+id]=newRecord.name;formInfo['agent_address1_'+id]=newRecord.address1;formInfo['agent_address2_'+id]=newRecord.address2;formInfo['agent_address3_'+id]=newRecord.address3;formInfo['agent_city_'+id]=newRecord.city;formInfo['agent_state_'+id]=newRecord.state;formInfo['agent_zip_'+id]=newRecord.zip;formInfo['agent_country_'+id]=newRecord.country;if(0==agentIndex)
_criteria.lastRow=this.createBlankRow(_criteria.table,_criteria.lastRow,2);_criteria.lastRow=this.createTransferAgentRow(_criteria.table,_criteria.lastRow,agentIndex,newRecord,formInfo,criteria.pageInfo,id,false,_criteria.value,_criteria.callback);agents[agentIndex]=newRecord;formInfo['agent_count_'+securityIndex]=agents.length;var diff=_criteria.lastRow-lastRow;var securityInfo=criteria.securityInfo;for(var i=securityIndex+1;i<securityInfo.length;i++)
securityInfo[i].lastRow+=diff;}
UpdateCompanyProfileDOM.prototype.removeTransferAgent_onclick=function(ev)
{var td=this.myCaptionCell;var container=this.myExpandAnchor.myContainer;container.style.display='none';td.innerHTML='Deleted Transfer Agent: '+td.myCaption;this.innerHTML='Restore Transfer Agent >>';this.onclick=this.myCallback.unremoveTransferAgent_onclick;this.formInfo['agent_removed_'+this.myAgentId]=true;return false;}
UpdateCompanyProfileDOM.prototype.unremoveTransferAgent_onclick=function(ev)
{var a=this.myExpandAnchor;var td=this.myCaptionCell;a.myImage.src=iconExpand.src;a.onclick=this.myCallback.transferAgentExpand_onclick;td.innerHTML='';td.appendChild(a);td.appendChild(document.createTextNode(' Transfer Agent: '+td.myCaption));this.innerHTML='<< Delete Transfer Agent';this.onclick=this.myCallback.removeTransferAgent_onclick;this.formInfo['agent_removed_'+this.myAgentId]=false;return false;}
UpdateCompanyProfileDOM.prototype.transferAgentExpand_onclick=function(ev)
{this.myContainer.style.display=trDisplayValue;this.myImage.src=iconCollapse.src;this.onclick=this.myCallback.transferAgentCollapse_onclick;return false;}
UpdateCompanyProfileDOM.prototype.transferAgentCollapse_onclick=function(ev)
{this.myContainer.style.display='none';this.myImage.src=iconExpand.src;this.onclick=this.myCallback.transferAgentExpand_onclick;return false;}
UpdateCompanyProfileDOM.prototype.openTooltip=function(ev)
{var me=this.myCallback;var popup=me.getPopup();popup.innerHTML=this.myTooltip;popup.className=me.CSS_TOOLTIP_ACTIVE;popup.style.display='block';positionRightAndAboveElement(popup,this);ModalDialog.altSelectLists(true);if(popup.offsetWidth>me.TOOLTIP_MAX_WIDTH)
popup.style.width=me.TOOLTIP_MAX_WIDTH;this.onclick=me.closeTooltip;return false;}
UpdateCompanyProfileDOM.prototype.closeTooltip=function(ev)
{var me=this.myCallback;var popup=me.getPopup();popup.className=me.CSS_TOOLTIP_HIDDEN;popup.style.display='none';ModalDialog.altSelectLists(false);this.onclick=me.openTooltip;return false;}
UpdateCompanyProfileDOM.prototype.handleCalendarOpen=function()
{ModalDialog.altSelectLists(true);}
UpdateCompanyProfileDOM.prototype.handleCalendarClose=function()
{ModalDialog.altSelectLists(false);}
UpdateCompanyProfileDOM.prototype.handleCalendarSelect=function(newDate,elem)
{if(undefined==newDate)
elem.value='';else if(newDate.getTime()>(new Date()).getTime())
{window.alert(this.MESSAGE_FUTURE_DATE);elem.focus();return false;}
else
elem.value=formatInputDate(newDate);elem.myFormInfo[elem.name]=elem.value;}
UpdateCompanyProfileDOM.prototype.openCalendar=function(ev)
{var me=this.myCallback;if(undefined==me.calendar)
{var popup=me.getPopup();popup.className='calendarContainer';me.calendar=new Calendar(popup,me);}
if(0==this.value.length)
me.calendar.doNow(this);else
me.calendar.doString(this.value,this);}
UpdateCompanyProfileDOM.prototype.getPopup=function()
{if(undefined==this.popup)
{this.popup=document.createElement('div');this.popup.style.display='none';this.popup.style.position='absolute';this.popup.style.zIndex=100;document.body.insertBefore(this.popup,document.body.firstChild);}
return this.popup;}
UpdateCompanyProfileDOM.prototype.addEventListener=function(target,type,action)
{if(target.addEventListener)
target.addEventListener(type,action,false);else
target.attachEvent('on'+type,action);}
UpdateCompanyProfileDOM.prototype.getFieldValue=function(field,caption)
{var value=field.value;if((undefined==value)||(0==value.length))
throw{field:field,caption:caption};return value;}