
var CSS_PARENT_LISTING_CLASSES=new Array("listingOdd","listingEven");var CSS_LISTING_CLASSES=new Array("subListingOdd","subListingEven");var _USER_AGENT=navigator.userAgent.toLowerCase();var isIE=(0<=_USER_AGENT.indexOf('msie'));var isSafari=(0<=_USER_AGENT.indexOf('safari'));var isNetscape=(navigator.appName=="Netscape");var trDisplayValue=isIE?'block':'table-row';var DISPLAY_TBODY=isIE?'block':'table-row-group';var REG_COMMA=/,/g;var REG_CARRIAGE_RETURN=/\n\r/g;var REG_NEW_LINE=/\n/g;function alternateCssParentListingClasses(index)
{return CSS_PARENT_LISTING_CLASSES[index%2];}
function alternateCssListingClasses(index)
{return CSS_LISTING_CLASSES[index%2];}
function centerElement(positionee)
{var topper=((undefined!=document.documentElement)&&document.documentElement.scrollTop)?document.documentElement:document.body;var clientWidth=(undefined!=window.innerWidth)?window.innerWidth:topper.clientWidth;var clientHeight=(undefined!=window.innerHeight)?window.innerHeight:topper.clientHeight;var x=(((clientWidth-positionee.offsetWidth)/2)+topper.scrollLeft);var y=(((clientHeight-positionee.offsetHeight)/2)+topper.scrollTop);positionee.style.position='absolute';positionee.style.left=x+'px';positionee.style.top=y+'px';}
function getDocumentBodySize()
{return new CoordInfo(document.body.offsetWidth,document.body.offsetHeight);}
function getElementAbsoluteCoord(elem)
{var value=new CoordInfo(0,0);var i=0;while((undefined!=elem)&&(null!=elem))
{var clientLeft=0;var clientTop=0;if((0>elem.offsetLeft)&&(undefined!=elem.offsetParent)&&(undefined!=elem.offsetParent.clientLeft))
clientLeft=elem.offsetParent.clientLeft;if((0>elem.offsetTop)&&(undefined!=elem.offsetParent)&&(undefined!=elem.offsetParent.clientTop))
clientTop=elem.offsetParent.clientTop;value.x+=(elem.offsetLeft+clientLeft);value.y+=(elem.offsetTop+clientTop);elem=elem.offsetParent;}
return value;}
function listAttributes(map)
{var output='{ ';for(var id in map)
{var value=map[id];if('function'==typeof(value))
value='function';else if(('string'==typeof(value))&&(20<value.length))
value=value.substr(0,20)+'...';output+=id+': '+value+'; ';}
return output+'}';}
function outputSortDirIconImg(fieldName,sortedOn,sortedDir,isSubListing)
{var source=outputSortDirIconSource(fieldName,sortedOn,sortedDir,isSubListing);if(undefined==source)
return'';return'<span class="'+source+'">&nbsp;&nbsp;&nbsp;</span>';}
function outputSortDirIconSource(fieldName,sortedOn,sortedDir,isSubListing)
{if(fieldName!=sortedOn)
return undefined;if(FIELD_ASCENDING==sortedDir)
return isSubListing?'ascendingIconSub':'ascendingIcon';return isSubListing?'descendingIconSub':'descendingIcon';}
function outputWorklistTitle(value)
{var pageNavInfo=value.pageNavInfo;if(undefined==pageNavInfo)
pageNavInfo=new PageNavInfo(value.totalRecords,value.pages,value.currentPage,value.pageSize);return outputPageTitle(value.plural,pageNavInfo,value.records.length,value.singular);}
function outputPageTitle(caption,pageInfo,numberOfValues,singularCaption)
{var output='';if(undefined!=singularCaption)
{output=pageInfo.totalRecords+' ';if(1==pageInfo.totalRecords)
output+=singularCaption;else
output+=caption;}
else
output=caption;if(1<pageInfo.totalPages)
{var startRecord=((pageInfo.currentPage-1)*pageInfo.pageSize)+1;output+=" ("+startRecord;if(1<numberOfValues)
output+=" through "+((startRecord+numberOfValues)-1)+")";else
output+=")";}
return output;}
function outputParentPaging(pageInfo,action)
{return outputPaging(pageInfo,action,'listingPaging');}
function outputPaging(pageInfo,action,cssAnchor)
{var output='';if(undefined==cssAnchor)
cssAnchor='normal';if(1>=pageInfo.totalPages)
return output;output+='Page: ';if(1<pageInfo.currentPage)
output+='<a href="'+action+(pageInfo.currentPage-1)+')" style="font-weight: bold;" class="'+cssAnchor+'">prev</a> &nbsp;';output+='<select onChange="'+action+' this.value)">';for(i=1;i<=pageInfo.totalPages;i++)
{var selected=(i!=pageInfo.currentPage)?'':' selected';output+='<option value="'+i+'"'+selected+' style="font-weight: bold;">'+i+'</option>';}
output+='</select>';if(pageInfo.totalPages>pageInfo.currentPage)
output+='&nbsp<a href="'+action+(pageInfo.currentPage+1)+')" style="font-weight: bold;" class="'+cssAnchor+'">next</a>';return output;}
function outputParentPagingAsLinks(pageInfo,action)
{return outputPagingAsLinks(pageInfo,'8',action,'paging');}
function outputPagingAsLinks(pageInfo,maxLinks,action,cssAnchor)
{var output='';if(maxLinks==undefined)
maxLinks=8;if(undefined==cssAnchor)
cssAnchor='paging';if(1>=pageInfo.totalPages)
return output;if(pageInfo.totalPages<=maxLinks){output+='<div class="'+cssAnchor+'">';output+='<ul class="pageList">';if(1<pageInfo.currentPage)
output+='<li><a href="'+action+(pageInfo.currentPage-1)+')"> &lt;&lt; prev</a></li>';for(i=1;i<=pageInfo.totalPages;i++)
{if(i==pageInfo.currentPage){output+='<li><span class="curr">'+i+'</span></li>';}else{output+='<li><a href="'+action+(i)+')">'+i+'</a></li>';}}
if(pageInfo.totalPages>pageInfo.currentPage)
output+='<li><a href="'+action+(pageInfo.currentPage+1)+')">next &gt;&gt;</a></li>';output+='</ul>';output+='</div>';}
else{var halfMaxLinks=parseInt(maxLinks/2);var startIndex=undefined;var endIndex=undefined;if((pageInfo.currentPage-halfMaxLinks)<1){startIndex=1;endIndex=maxLinks;}
else if((pageInfo.currentPage+halfMaxLinks)>pageInfo.totalPages){endIndex=pageInfo.totalPages;startIndex=endIndex-maxLinks+1;}
else{startIndex=pageInfo.currentPage-halfMaxLinks;endIndex=pageInfo.currentPage+halfMaxLinks-1;}
output+='<div class="'+cssAnchor+'">';output+='<ul class="pageList">';if(1<pageInfo.currentPage)
output+='<li><a href="'+action+(pageInfo.currentPage-1)+')"> &lt;&lt; prev</a></li>';for(i=startIndex;i<=endIndex;i++)
{if(i==pageInfo.currentPage){output+='<li><span class="curr">'+i+'</span></li>';}else{output+='<li><a href="'+action+(i)+')">'+i+'</a></li>';}}
if(pageInfo.totalPages>pageInfo.currentPage)
output+='<li><a href="'+action+(pageInfo.currentPage+1)+')">next &gt;&gt;</a></li>';output+='</ul>';output+='</div>';}
return output;}
function outputSelectOptions(name,options,selectedItem,header,onChange)
{var _onChange=(undefined==onChange)?'':' onChange="'+onChange+';"';var output='<select id="'+name+'" name="'+name+'"'+_onChange+'>';if(undefined!=header)
output+='<option value="">'+header+'</option>';for(var i=0;i<options.length;i++)
{var selected=(selectedItem==options[i].getId())?' selected':'';output+='<option value="'+options[i].getId()+'"'+selected+'>'+options[i].getValue()+'</option>';}
output+='</select>';return output;}
function outputSelectList(name,listItemInfo,selectedItem,header,onChange,tabindex)
{var _onChange=(undefined==onChange)?'':' onChange="'+onChange+';"';var _tabindex=(undefined==tabindex)?'':' tabindex="'+tabindex+'"';var output='<select id="'+name+'" name="'+name+'"'+_onChange+_tabindex+'>';if(undefined!=header)
output+='<option value="">'+header+'</option>';var count=(undefined!=listItemInfo)?listItemInfo.ids.length:0;for(var i=0;i<count;i++)
{var selected=(selectedItem==listItemInfo.ids[i])?' selected':'';output+='<option value="'+listItemInfo.ids[i]+'"'+selected+'>'+listItemInfo.values[i]+'</option>';}
output+='</select>';return output;}
function outputRadioList(name,listItemInfo,selectedItem)
{var count=(undefined!=listItemInfo)?listItemInfo.ids.length:0;var output='';for(var i=0;i<count;i++)
{var checked=(selectedItem==listItemInfo.ids[i])?' checked ':'';output+='<input type="radio" name="'+name+'" value="'+listItemInfo.ids[i]+'" '+checked+'>'+listItemInfo.values[i]+'&nbsp;&nbsp;';}
return output;}
function parseInputDate(whenString){return Formatter.fromInputDate(whenString);}
function formatInputDate(date){return Formatter.toInputDate(date);}
function populateSelectListWithHeader(select,listItemInfo,header)
{var options=select.options;var ids=listItemInfo.ids;var values=listItemInfo.values;options.length=0;if(0<header.length)
options[0]=new Option(header,'',false,false);for(i=0;i<ids.length;i++)
options[options.length]=new Option(values[i],ids[i],false,false);}
function populateSelectList(select,warningSection,listItemInfo)
{var options=select.options;var ids=listItemInfo.ids;var values=listItemInfo.values;options.length=0;for(i=0;i<ids.length;i++)
options[i]=new Option(values[i],ids[i],false,false);if(0==warningSection.length)
return;var message=createListItemInfoWarning(listItemInfo);if(0==message.length)
return;document.getElementById(warningSection).innerHTML=message;}
function createListItemInfoWarning(listItemInfo)
{var message='';var ids=listItemInfo.ids;var totalRecords=listItemInfo.totalRecords;if(0==totalRecords)
message='No matches found';else if(0==ids.length)
message='Too many matches - '+totalRecords;else if(totalRecords>ids.length)
message='Displaying '+ids.length+' of '+totalRecords+' matches';else if(1==totalRecords)
message='Found 1 match';else
message='Found '+totalRecords+' matches';return message;}
function positionBelowElement(positionee,elem)
{var coord=getElementAbsoluteCoord(elem);coord.y+=elem.offsetHeight;positionee.style.position='absolute';positionee.style.left=coord.x+'px';positionee.style.top=coord.y+'px';}
function positionRightAndAboveElement(positionee,elem)
{var coord=getElementAbsoluteCoord(elem);coord.x+=elem.offsetWidth
coord.y-=positionee.offsetHeight;positionee.style.position='absolute';positionee.style.left=coord.x+'px';positionee.style.top=coord.y+'px';}
function positionLeftAndBelowElement(positionee,elem)
{var coord=getElementAbsoluteCoord(elem);coord.y+=elem.offsetHeight;coord.x=coord.x+elem.offsetWidth-positionee.offsetWidth;if(0>coord.x)
coord.x=0;positionee.style.position='absolute';positionee.style.left=coord.x+'px';positionee.style.top=coord.y+'px';}
function scrollToTopOf(elem)
{var topper=((undefined!=document.documentElement)&&document.documentElement.scrollTop)?document.documentElement:document.body;var clientHeight=(undefined!=window.innerHeight)?window.innerHeight:topper.clientHeight;var coord=getElementAbsoluteCoord(elem);if((topper.scrollTop>coord.y)||((topper.scrollTop+clientHeight)<coord.y))
window.scrollTo(0,coord.y);}
function validateChecked(checkBox,singular,plural)
{var message='';if(undefined==checkBox)
message='There are no '+plural+' to select.';else if(undefined==checkBox.length)
{if(!checkBox.checked)
message='You have not selected the '+singular+'. Please do so before continuing.';}
else
{var checked=false;for(i=0;i<checkBox.length;i++)
if(checked=checkBox[i].checked)
break;if(!checked)
message='You have not selected any '+plural+'. Please do so before continuing.';}
if(0==message.length)
return true;window.alert(message);return false;}
function toDisplayable(value)
{if((undefined==value)||(0==value.length))
return'';else if(typeof(value)=='boolean')
return(value)?'Yes':'No';return value;}
function fromDisplayable(value)
{if(''==value)
return undefined;return value;}
function rewriteUrlParam(url,param,newValue)
{var pos=url.indexOf(param);if(0>pos)
{if(undefined==newValue)
return url;var paramSep=(0>url.indexOf('?'))?'?':'&';url+=paramSep+param+'='+newValue;return url;}
var endParam=url.indexOf('=',pos+1);if(0>endParam)
return undefined;var newUrl='';if(undefined==newValue)
newUrl=url.substr(0,pos-1);else
newUrl=url.substr(0,endParam+1)+newValue;pos=url.indexOf('&',endParam+1);if(0<=pos)
{var paramSep=(0>newUrl.indexOf('?'))?'?':'&';newUrl+=paramSep;newUrl+=url.substr(pos+1);}
return newUrl;}
function toggleIconLegend(thisItem,containerId)
{if(0<=thisItem.innerHTML.indexOf('&lt;'))
{thisItem.innerHTML=TITLE_ICON_LEGEND+' &gt;&gt;';document.getElementById(containerId).style.display='none';}
else
{thisItem.innerHTML=TITLE_ICON_LEGEND+' &lt;&lt;';thisElement=document.getElementById(containerId);thisElement.style.display=trDisplayValue;}}
function toHttpParameter(name,value,conjunction)
{if((undefined==value)||(0==value.length))
return'';if(undefined==conjunction)
conjunction='&';return conjunction+name+'='+value;}
function getPageParam(page,conjunction)
{return toHttpParameter(FIELD_PAGE,page,conjunction);}
function parseIntX(value)
{if(undefined==value)
return undefined;return parseInt(value.replace(REG_COMMA,''));}
function parseFloatX(value)
{if(undefined==value)
return undefined;return parseFloat(value.replace(REG_COMMA,''));}
function LTrim(value)
{var re=/\s*((\S+\s*)*)/;return value.replace(re,"$1");}
function RTrim(value)
{var re=/((\s*\S+)*)\s*/;return value.replace(re,"$1");}
function trim(value)
{return LTrim(RTrim(value));}
function trimToLength(str,len)
{if((undefined==str)||(0==str.length))
return'';if(str.length<len)
return str;return str.substring(0,len-1)+'...';}
function exists(data)
{if((data==undefined)||(data==null)||(data=='')||(data.replace&&(trim(data)=='')))
return false;return true;}
function fromLongText(value)
{return value.replace(REG_CARRIAGE_RETURN,'<br />').replace(REG_NEW_LINE,'<br />');}
function validateEmail(str)
{var at="@";var dot=".";var lat=str.indexOf(at);var lstr=str.length;var ldot=str.indexOf(dot);if(str.indexOf(at)==-1){window.alert("Invalid E-mail ID");return false;}
if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){window.alert("Invalid E-mail ID");return false;}
if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){window.alert("Invalid E-mail ID");return false;}
if(str.indexOf(at,(lat+1))!=-1){window.alert("Invalid E-mail ID");return false;}
if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){window.alert("Invalid E-mail ID");return false;}
if(str.indexOf(dot,(lat+2))==-1){window.alert("Invalid E-mail ID");return false;}
if(str.indexOf(" ")!=-1){window.alert("Invalid E-mail ID");return false;}
return true;}
function isInt(value){if(value){return value.match(/^[1-9]\d*$/)?true:false;}else{return false;}}
function isFloat(value){if(value){return value.match(/^[1-9]*\d*\.?\d*$/)?true:false;}else{return false;}}
function emailPage(subject,body)
{if(subject==undefined)
subject=document.title;if(body==undefined)
body=document.title;mail_str="mailto:?subject="+document.title;mail_str+="&body= "+document.title;mail_str+="... at: "+location.href;location.href=mail_str;}
function consoleLog(msg){if(window.console)
console.log(msg);}

function ajaxHelperHandleReadyStateChange(req,callback)
{if(4!=req.readyState)
return;try
{var value=eval(req.responseText);callback.handleRequestData(value);}
catch(error)
{if(error.isNotAuthenticatedException&&window.handleNotAuthenticated)
handleNotAuthenticated(error);else if(callback.handleRequestError)
callback.handleRequestError(error);else if(window.console)
console.log(error);else
window.alert(error.message?error.message:error);}
if(window.onajaxcall)
window.onajaxcall(callback,value);}
function AjaxHelper(){}
AjaxHelper.prototype.CONTENT_TYPE_POST='application/x-www-form-urlencoded';AjaxHelper.prototype.CONTENT_TYPE_XML='text/xml; charset=utf-16';AjaxHelper.prototype.getRequester=function()
{if(window.XMLHttpRequest)
return new XMLHttpRequest();return new ActiveXObject("Microsoft.XMLHTTP");}
AjaxHelper.prototype.handleCall=function(req,data,url)
{req.send(data);if(200==req.status)
return eval(req.responseText);var error='HTTP error ('+req.status+') ';if(undefined!=req.statusText)
error+=req.statusText+' - ';error+=url;throw error;}
AjaxHelper.prototype.asynchCall=function(url,callback)
{var req=this.getRequester();req.open('GET',url,true);req.onreadystatechange=function(){ajaxHelperHandleReadyStateChange(req,callback);}
req.send(null);}
AjaxHelper.prototype.synchCall=function(url)
{var req=this.getRequester();req.open('GET',url,false);return this.handleCall(req,null,url);}
AjaxHelper.prototype.synchPostForm=function(url,theForm)
{var data='';for(var i=0;i<theForm.elements.length;i++)
{var item='';var element=theForm.elements[i];var type=element.type;type=(undefined==type)?undefined:type.toLowerCase();if(('checkbox'==type)||('radio'==type))
{if(undefined!=element.length)
{for(var j=0;j<element.length;j++)
if(element[j].checked)
item=element[j].name+'='+element[j].value;}
else if(element.checked)
item=element.name+'='+element.value;}
else
item=element.name+'='+escape(element.value);if(0==item.length)
continue;if(0<data.length)
data+='&';data+=item;}
return this.synchPostData(url,data,this.CONTENT_TYPE_POST);}
AjaxHelper.prototype.createPostMapData=function(map)
{var data='';for(var id in map)
{var value=map[id];if(undefined==value)
continue;else if(value.length&&(typeof(value)!='string'))
{for(var i=0;i<value.length;i++)
{if(0<data.length)
data+='&';data+=id+'='+encodeURIComponent(value[i]);}}
else
{if(0<data.length)
data+='&';if(value.getTime)
value=value.getTime();data+=id+'='+encodeURIComponent(value);}}
return data;}
AjaxHelper.prototype.synchPostMap=function(url,map)
{var data=this.createPostMapData(map);try{return this.synchPostData(url,data,this.CONTENT_TYPE_POST);}
catch(error)
{if(error.isNotAuthenticatedException&&window.handleNotAuthenticated)
{handleNotAuthenticated(error);return undefined;}
else
throw error;}}
AjaxHelper.prototype.asynchPostMap=function(url,map,callback)
{var data=this.createPostMapData(map);var req=this.getRequester();req.open('POST',url,true);req.setRequestHeader('Content-Type',this.CONTENT_TYPE_POST);req.onreadystatechange=function(){ajaxHelperHandleReadyStateChange(req,callback);}
req.send(data);}
AjaxHelper.prototype.synchPostXml=function(url,data)
{return this.synchPostData(url,data,this.CONTENT_TYPE_XML);}
AjaxHelper.prototype.synchPostData=function(url,data,contentType)
{var req=this.getRequester();req.open('POST',url,false);req.setRequestHeader('Content-Type',contentType);return this.handleCall(req,data,url);}
AjaxHelper.prototype.login=function(userName,password)
{return this.loginTo(userName,password,true);}
AjaxHelper.prototype.loginWithoutLog=function(userName,password)
{return this.loginTo(userName,password,false);}
AjaxHelper.prototype.loginTo=function(userName,password,logAuth)
{return this.synchPostMap(this.rootPath+'/Login.json',{userName:userName,password:password,logAuth:logAuth});}
AjaxHelper.prototype.logout=function()
{return this.synchCall(this.rootPath+'/Logout.json');}
AjaxHelper.prototype.loginTrader=function(traderId,sessionId,logAuth)
{return this.synchPostMap(this.rootPath+'/LoginTrader.json',{traderId:traderId,mdsSessionId:sessionId,logAuth:logAuth});}
AjaxHelper.prototype.isLoggedIn=function()
{return this.synchCall(this.rootPath+'/IsLoggedIn.json').payload;}
AjaxHelper.prototype.touch=function()
{return this.isLoggedIn();}
AjaxHelper.prototype.accessRSA=function(userName,password,tokenCode,nextTokenCode)
{var path=(this.servicePath?this.servicePath+'/auth':this.rootPath+'/member');var value={userName:userName,password:password,tokenCode:tokenCode,nextTokenCode:nextTokenCode};return this.synchPostMap(path+'/accessRSA',value);}
AjaxHelper.prototype.toQueryString=function(existing,name,param)
{if(undefined==param)
return existing;if((undefined==existing)||(0==existing.length))
existing='?';else
existing+='&';return existing+name+'='+param;}
AjaxHelper.prototype.toXml=function(map)
{var data='<data count="1"><item>';for(var id in map)
{var value=map[id];if(undefined==value)
continue;data+='<'+id+'>';if(undefined!=this.cdataElements[id])
data+='<![CDATA['+value+']]>';else
data+=value;data+='</'+id+'>';}
return data+'</item></data>';}
AjaxHelper.prototype.makeUnique=function(queryString)
{return this.toQueryString(queryString,'UNIQUETIMESTAMP',(new Date()).getTime());}
AjaxHelper.prototype.convertChar=function(v)
{if(!v)
return undefined;var o='';for(var i=0;i<v.length;i++)
{var c=v.charCodeAt(i);if(150<=c)
o+='&#'+c+';';else
o+=v.charAt(i);}
return o;}
AjaxHelper.prototype.convertAll=function(map)
{var value;for(var id in this.cdataElements)
if(undefined!=(value=map[id]))
map[id]=this.convertChar(value);return map;}
function AjaxDataHandler(callback,criteria)
{this.callback=callback;this.criteria=criteria;}
AjaxDataHandler.prototype.handleRequestData=function(value)
{if(value==undefined)
value=new Object();value.criteria=this.criteria;this.callback.doValue(value);}
AjaxDataHandler.prototype.handleRequestError=function(error)
{var b=this.criteria.body;var m=error.message?error.message:error;if(b)
b.innerHTML=m;else if(window.console)
console.log(error);else
window.alert(m);}

function PinkCommonCalls(rootPath)
{this.rootPath=rootPath;if(undefined==this.rootPath)
this.rootPath='/common';this.cdataElements=new Array();this.cdataElements[FIELD_COMMENTS]=true;this.cdataElements['comp_description']=true;this.cdataElements['comp_general_comments']=true;this.cdataElements['comp_officer_comments']=true;this.cdataElements['comp_service_provider_comments']=true;this.cdataElements['comp_security_comments']=true;}
PinkCommonCalls.prototype=new AjaxHelper();PinkCommonCalls.prototype.acceptUserAgreement=function(value,callback)
{this.asynchPostMap(this.rootPath+'/member/AcceptUserAgreement.json',value,callback);}
PinkCommonCalls.prototype.getOfficer=function(id,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetOfficer.json',{id:id},callback);}
PinkCommonCalls.prototype.addAccountContact=function(companyId,officerId,callback)
{this.asynchPostMap(this.rootPath+'/admins/AddAccountContact.json',{companyId:companyId,officerId:officerId},callback);}
PinkCommonCalls.prototype.getActiveAlertUsers=function(callback){if(callback==undefined)
return this.synchCall(this.rootPath+'/member/GetActiveAlertUsers.json');this.asynchCall(this.rootPath+'/member/GetActiveAlertUsers.json',callback);}
PinkCommonCalls.prototype.addOfficerToService=function(compServiceId,officerId,callback)
{this.asynchPostMap(this.rootPath+'/admins/AddOfficerToService.json',{compServiceId:compServiceId,officerId:officerId},callback);}
PinkCommonCalls.prototype.addOfficerToMktReportService=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/AddOfficerToMktReportService.json',value,callback);}
PinkCommonCalls.prototype.addServiceProviderContactToService=function(compServiceId,serviceProviderContactId,callback)
{this.asynchPostMap(this.rootPath+'/admins/AddServiceProviderContactToService.json',{compServiceId:compServiceId,serviceProviderContactId:serviceProviderContactId},callback);}
PinkCommonCalls.prototype.addUserRoleCompany=function(userId,roleId,companyId,callback)
{this.asynchPostMap(this.rootPath+'/admins/AddUserRoleCompany.json',new UserRoleCompany(userId,roleId,companyId,true),callback);}
PinkCommonCalls.prototype.changeIssuerProfile=function(currentPassword,emailAddress,newPassword,confirmPassword)
{var map=new Array();map[FIELD_CURRENT_PASSWORD]=currentPassword;map[FIELD_EMAIL_ADDRESS]=emailAddress;map[FIELD_PASSWORD]=newPassword;map[FIELD_PASSWORD_CONFIRM]=confirmPassword;return this.synchPostMap(this.rootPath+'/member/ChangeIssuerProfile',map);}
PinkCommonCalls.prototype.changeMyPassword=function(value,callback)
{this.asynchPostMap(this.rootPath+'/quote/ChangeMyPassword.json',value,callback);}
PinkCommonCalls.prototype.changePassword=function(theForm)
{return this.synchPostForm(this.rootPath+'/admin/ChangePassword.json',theForm).payload;}
PinkCommonCalls.prototype.changeCompanyServiceStatus=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/ChangeCompanyServiceStatus.json',value,callback);}
PinkCommonCalls.prototype.changeContactAddressStatus=function(companyId,hasContactAddress,callback)
{this.asynchPostMap(this.rootPath+'/admins/ChangeContactAddressStatus.json',{companyId:companyId,hasContactAddress:hasContactAddress},callback);}
PinkCommonCalls.prototype.changeCustomerActivation=function(value)
{return this.synchPostMap(this.rootPath+'/admins/SetCustomerActivation',value);}
PinkCommonCalls.prototype.changeSecurityServiceStatus=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/ChangeSecurityServiceStatus.json',value,callback);}
PinkCommonCalls.prototype.changeSitemapRobot=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/ChangeSitemapRobot.json',value,callback);}
PinkCommonCalls.prototype.changeUserActivation=function(value)
{return this.synchPostMap(this.rootPath+'/admins/SetUserActivation',value);}
PinkCommonCalls.prototype.changeUserRoleCompanyStatus=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/ChangeUserRoleCompanyStatus.json',value,callback);}
PinkCommonCalls.prototype.changeUserRoleCompanyServiceType=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/ChangeUserRoleCompanyServiceType.json',value,callback);}
PinkCommonCalls.prototype.changeDailyReportStatus=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/ChangeDailyReportStatus.json',value,callback);}
PinkCommonCalls.prototype.changeWeeklyReportStatus=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/ChangeWeeklyReportStatus.json',value,callback);}
PinkCommonCalls.prototype.changeHtmlEmailStatus=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/ChangeHtmlEmailStatus.json',value,callback);}
PinkCommonCalls.prototype.confirmRegistration=function(theForm)
{return this.synchPostForm(this.rootPath+'/ConfirmRegistration',theForm);}
PinkCommonCalls.prototype.countMyCompanies=function(name)
{return this.synchCall(this.rootPath+'/member/CountMyCompanies'+
toHttpParameter(FIELD_COMPANY_NAME,name,'?'));}
PinkCommonCalls.prototype.countSecuritiesByCountry=function(callback,filter)
{this.asynchPostMap(this.rootPath+'/CountSecuritiesByCountry.json',filter,callback);}
PinkCommonCalls.prototype.countSecuritiesByType=function(callback,filter)
{this.asynchPostMap(this.rootPath+'/CountSecuritiesByType.json',filter,callback);}
PinkCommonCalls.prototype.countSecuritiesByVenue=function(callback,filter)
{this.asynchPostMap(this.rootPath+'/CountSecuritiesByVenue.json',filter,callback);}
PinkCommonCalls.prototype.countSecuritiesByTierGroup=function(callback)
{this.asynchCall(this.rootPath+'/CountSecuritiesByTierGroup.json',callback);}
PinkCommonCalls.prototype.countSecuritiesByTier=function(callback)
{this.asynchCall(this.rootPath+'/CountSecuritiesByTier.json',callback);}
PinkCommonCalls.prototype.defaultCustomerLocation=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/DefaultCustomerLocation.json',value,callback);}
PinkCommonCalls.prototype.deleteAccountContact=function(companyId,callback)
{this.asynchPostMap(this.rootPath+'/admins/DeleteAccountContact.json',{companyId:companyId},callback);}
PinkCommonCalls.prototype.deleteCompanyService=function(id,callback)
{this.asynchPostMap(this.rootPath+'/admins/DeleteCompanyService.json',{id:id},callback);}
PinkCommonCalls.prototype.deleteCustomerLocation=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/DeleteCustomerLocation.json',value,callback);}
PinkCommonCalls.prototype.deleteMarketMakerService=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/DeleteMarketMakerService.json',value,callback);}
PinkCommonCalls.prototype.deleteMktReportUser=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/DeleteMktReportUser.json',value,callback);}
PinkCommonCalls.prototype.deleteSecurityService=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/DeleteSecurityService.json',value,callback);}
PinkCommonCalls.prototype.deleteSitemap=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/DeleteSitemap.json',value,callback);}
PinkCommonCalls.prototype.deleteUserRoleCompany=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/DeleteUserRoleCompany.json',value,callback);}
PinkCommonCalls.prototype.deleteUserRoleCustomer=function(id)
{return this.synchCall(this.rootPath+'/admins/DeleteUserRoleCustomer'+
toHttpParameter(FIELD_ID,id,'?'));}
PinkCommonCalls.prototype.forgotPassword=function(emailAddress)
{var map=new Array();map[FIELD_EMAIL_ADDRESS]=emailAddress;return this.synchPostMap(this.rootPath+'/ForgotPassword',map);}
PinkCommonCalls.prototype.generatePasscode=function(size,callback)
{this.asynchPostMap(this.rootPath+'/admin/GeneratePasscode.json',{id:size},callback);}
PinkCommonCalls.prototype.getAdvanceCompanies=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetAdvanceCompanies.json',filter,callback);}
PinkCommonCalls.prototype.getAdvanceCompaniesByUser=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/member/GetAdvanceCompaniesByUser.json',filter,callback);}
PinkCommonCalls.prototype.getAdvancedSecuritySearchPO=function(onlyOtc,callback)
{this.asynchPostMap(this.rootPath+'/GetAdvancedSecuritySearchPO.json',{onlyOtc:onlyOtc},callback);}
PinkCommonCalls.prototype.getAdvancedSecuritySearchWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetAdvancedSecuritySearchWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getAnticipatedPiggybackWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetAnticipatedPiggybackWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getBaseUrls=function(callback)
{var url=this.rootPath+'/GetBaseUrls.json';if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getBillableUserWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetBillableUserWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getBlueskyVO=function(params,callback)
{this.asynchPostMap(this.rootPath+'/member/GetBlueskyVO.json',params,callback);}
PinkCommonCalls.prototype.getBuildNo=function()
{return this.synchCall(this.rootPath+'/GetBuildNo.json').payload;}
PinkCommonCalls.prototype.getCaveatEmptorChangesWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetCaveatEmptorChangesWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getCompany=function(id)
{return this.synchCall(this.rootPath+'/member/GetCompany'+
toHttpParameter(FIELD_ID,id,'?'));}
PinkCommonCalls.prototype.getCompanyAccount=function(id,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCompanyAccount.json',{id:id},callback);}
PinkCommonCalls.prototype.getCompanyNameChangesWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetCompanyNameChangesWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getCompanyProfile=function(companyId,securityId,callback)
{this.asynchPostMap(this.rootPath+'/GetCompanyProfile.json',{companyId:companyId,securityId:securityId},callback);}
PinkCommonCalls.prototype.getCompanyProfilePO=function(countryId,callback)
{this.asynchPostMap(this.rootPath+'/GetCompanyProfilePO.json',{id:countryId},callback);}
PinkCommonCalls.prototype.getCompanySimple=function(id)
{return this.synchCall(this.rootPath+'/GetCompanySimple'+
toHttpParameter(FIELD_ID,id,'?'));}
PinkCommonCalls.prototype.getCompanyUsers=function(compServiceId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCompanyUsers.json',{id:compServiceId},callback);}
PinkCommonCalls.prototype.getCompanyUserStatus=function(callback)
{var url=this.rootPath+'/member/GetCompanyUserStatus.json';if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getCompanyUserWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCompanyUserWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getCompaniesAsListItemsByName=function(name,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCompanies.json',{id:name},callback);}
PinkCommonCalls.prototype.getCompaniesSimple=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/member/GetCompaniesSimple.json',filter,callback);}
PinkCommonCalls.prototype.getCompanyWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetCompanyWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getContactAddressStatus=function(companyId)
{return this.synchCall(this.rootPath+'/admins/GetContactAddressStatus'+
toHttpParameter(FIELD_COMPANY,companyId,'?'));}
PinkCommonCalls.prototype.getCorporateActionPO=function(callback)
{var url=this.rootPath+'/GetCorporateActionPO.json';if(callback)
this.asynchCall(url,callback);else
return this.synchCall(url);}
PinkCommonCalls.prototype.getCountries=function(dataHandler){if(dataHandler!=undefined)
return this.asynchCall(this.rootPath+'/GetCountries',dataHandler);else
return this.synchCall(this.rootPath+'/GetCountries');}
PinkCommonCalls.prototype.getCustomer=function(id,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomer.json',{id:id},callback);}
PinkCommonCalls.prototype.getCustomerAccountWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerAccountWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getCustomerLocation=function(id,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerLocation.json',{id:id},callback);}
PinkCommonCalls.prototype.getCustomerLocationPage=function(countryId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerLocationPage.json',{id:countryId},callback);}
PinkCommonCalls.prototype.getCustomerLocationWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerLocationWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getCustomerPage=function(countryId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerPage.json',{id:countryId},callback);}
PinkCommonCalls.prototype.getCustomers=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomers',filter,callback);}
PinkCommonCalls.prototype.getCustomerUser=function(id,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerUser.json',{id:id},callback);}
PinkCommonCalls.prototype.getCustomerUserPage=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerUserPage.json',filter,callback);}
PinkCommonCalls.prototype.getCustomerUserStatus=function(callback)
{var url=this.rootPath+'/member/GetCustomerUserStatus';if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getCustomerWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getCustomerUserWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetCustomerUserWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getDefaultCanDistribute=function(companyId)
{return this.synchCall(this.rootPath+'/member/GetDefaultCanDistribute'+
toHttpParameter(FIELD_COMPANY,companyId,'?'));}
PinkCommonCalls.prototype.getDeletedSymbolWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetDeletedSymbolWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getDividendWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetDividendWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getExcludedOfficers=function(companyId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetExcludedOfficers.json',{id:companyId},callback);}
PinkCommonCalls.prototype.getExcludedRoles=function(companyId,userId)
{var queryString=this.toQueryString('',FIELD_COMPANY,companyId);queryString=this.toQueryString(queryString,FIELD_USER,userId);return this.synchCall(this.rootPath+'/admins/GetExcludedRoles'+queryString);}
PinkCommonCalls.prototype.getExcludedSecurityRoles=function(securityId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetExcludedSecurityRoles.json',{id:securityId},callback);}
PinkCommonCalls.prototype.getFootnoteMaster=function(callback)
{this.asynchCall(this.rootPath+'/member/GetFootnoteMaster.json',callback);}
PinkCommonCalls.prototype.getMarketMakerWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetMarketMakerWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getMarketMakerLocationWorklist=function(parentId,callback)
{this.asynchPostMap(this.rootPath+'/GetMarketMakerLocationWorklist.json',{id:parentId},callback);}
PinkCommonCalls.prototype.getMktReportUsers=function(securityId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetMktReportUsers.json',{id:securityId},callback);}
PinkCommonCalls.prototype.getMMQuotePage=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetMMQuotePage.json',filter,callback);}
PinkCommonCalls.prototype.getMMQuoteWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetMMQuoteWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getMarketMakersByMonthlyActivity=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetMarketMakersByMonthlyActivity.json',filter,callback);}
PinkCommonCalls.prototype.getMonthlyMarketMakerActivity=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetMonthlyMarketMakerActivity.json',filter,callback);}
PinkCommonCalls.prototype.getMMIDs=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetMMIDs',filter,callback);}
PinkCommonCalls.prototype.getMotleyFool=function(secId,symbol,callback)
{this.asynchPostMap(this.rootPath+'/GetMotleyFool.json',{id:secId,symbol:symbol},callback);}
PinkCommonCalls.prototype.getMarketStatus=function(callback)
{var url=this.rootPath+'/GetMarketStatus.json';if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getGlobalInfo=function(callback)
{this.asynchCall(this.rootPath+'/admin/GetGlobalInfo.json',callback);}
PinkCommonCalls.prototype.getHistoryPriceWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetHistoryPriceWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getMyCompanies=function(name)
{return this.synchCall(this.rootPath+'/member/GetMyCompanies'+
toHttpParameter(FIELD_COMPANY_NAME,name,'?'));}
PinkCommonCalls.prototype.getMyCompaniesAsListItems=function(name)
{return this.synchCall(this.rootPath+'/member/GetMyCompaniesAsListItems'+
toHttpParameter(FIELD_COMPANY_NAME,name,'?'));}
PinkCommonCalls.prototype.getMyCustomerRoles=function(callback)
{this.asynchCall(this.rootPath+'/quote/GetMyCustomerRoles.json',callback);}
PinkCommonCalls.prototype.getMyCustomerUser=function(callback)
{this.asynchCall(this.rootPath+'/quote/GetMyCustomerUser.json',callback);}
PinkCommonCalls.prototype.getCompSymbolInfo=function(symbol,callback)
{this.asynchPostMap(this.rootPath+'/GetCompSymbolInfo.json',{symbol:symbol},callback);}
PinkCommonCalls.prototype.getCompSymbolsAsListItems=function(name,pageSize,callback)
{this.asynchPostMap(this.rootPath+'/GetCompSymbolsAsListItems.json',{name:name,pageSize:pageSize},callback);}
PinkCommonCalls.prototype.getLevel2SecuritiesWorklist=function(page,pageSize,callback)
{return this.asynchPostMap(this.rootPath+'/GetLevel2SecuritiesWorklist.json',{page:page,pageSize:pageSize},callback);}
PinkCommonCalls.prototype.getLoginLogPO=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetLoginLogPO.json',filter,callback);}
PinkCommonCalls.prototype.getLoginLogWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetLoginLogWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getMarketMakerServicePage=function(value,callback)
{this.asynchCall(this.rootPath+'/admin/GetMarketMakerServicePage.json',callback);}
PinkCommonCalls.prototype.getMarketMakerServices=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admin/GetMarketMakerServices.json',filter,callback);}
PinkCommonCalls.prototype.getNewListingsWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetNewListingsWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getOpenCloseTraderWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetOpenCloseTraderWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getOrderCount=function(tierGroupId,callback)
{this.asynchPostMap(this.rootPath+'/GetOrderCount.json',{'id':tierGroupId},callback);}
PinkCommonCalls.prototype.getPiggybackQualifiedWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetPiggybackQualifiedWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getOfficerWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetOfficerWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getPlinkAdMMWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetPlinkAdMMWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getPlinkTrail=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetPlinkTrail.json',filter,callback);}
PinkCommonCalls.prototype.getPlinkWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetPlinkWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getQueryGroupWorklist=function(filter,callback)
{this.asynchCall(this.rootPath+'/admin/GetQueryGroupWorklist.json',callback);}
PinkCommonCalls.prototype.getQueryLogPO=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetQueryLogPO.json',filter,callback);}
PinkCommonCalls.prototype.getQueryLogWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetQueryLogWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getQueryTypeSummary=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetQueryTypeSummary.json',filter,callback);}
PinkCommonCalls.prototype.getQueryTypeWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admin/GetQueryTypeWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getQuoteAggregateWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetQuoteAggregateWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getQuoteBlock=function(securityId,symbol)
{return this.synchPostMap(this.rootPath+'/GetQuoteBlock.json',{id:securityId,symbol:symbol});}
PinkCommonCalls.prototype.getQuoteDivergenceWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetQuoteDivergenceWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getQuoteWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetQuoteWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getQXNarrowWorklist=function(page,pageSize,callback)
{this.asynchPostMap(this.rootPath+'/GetQXNarrowWorklist.json',{page:page,pageSize:pageSize},callback);}
PinkCommonCalls.prototype.getQXSecurities=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetQXSecurities.json',filter,callback);}
PinkCommonCalls.prototype.getQXSecurityBySymbol=function(symbol,callback)
{this.asynchPostMap(this.rootPath+'/GetQXSecurityBySymbol.json',{symbol:symbol},callback);}
PinkCommonCalls.prototype.getReportingServiceProviderContacts=function(companyId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetReportingServiceProviderContacts.json',{id:companyId},callback);}
PinkCommonCalls.prototype.getRevokedSuspendedWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetRevokedSuspendedWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getRoles=function(callback)
{this.asynchCall(this.rootPath+'/admins/GetRoles.json',callback);}
PinkCommonCalls.prototype.getResearchReportsWorklist=function(criteria,callback)
{this.asynchPostMap(this.rootPath+'/GetResearchReportsWorklist.json',criteria,callback);}
PinkCommonCalls.prototype.getSecurities=function(companyId,callback)
{this.asynchPostMap(this.rootPath+'/member/GetSecurities.json',{id:companyId},callback);}
PinkCommonCalls.prototype.getSecuritiesAsListItems=function(companyId)
{return this.synchCall(this.rootPath+'/member/GetSecuritiesAsListItems?'+FIELD_COMPANY+'='+companyId);}
PinkCommonCalls.prototype.getSecuritiesByCompAndSecServiceRole=function(companyId,secServiceRoleId,callback)
{var url=this.rootPath+'/member/GetSecuritiesByCompAndSecServiceRole?'+FIELD_COMPANY+'='+companyId+'&'+FIELD_ROLE_ID+'='+secServiceRoleId;if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getSecurityHistoryWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetSecurityHistoryWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getSecurityInfo=function(symbol,callback)
{var url=this.rootPath+'/GetSecurityInfo?symbol='+symbol;if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getSecurityInfoByCusip=function(cusip,callback)
{var url=this.rootPath+'/GetSecurityInfo?cusip='+cusip;if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getSecurityInfoById=function(securityId,callback)
{var url=this.rootPath+'/GetSecurityInfo?id='+securityId;if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getSecurityServices=function(securityId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetSecurityServices.json',{id:securityId},callback);}
PinkCommonCalls.prototype.getSecurityServicesPage=function(securityId,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetSecurityServicesPage.json',{id:securityId},callback);}
PinkCommonCalls.prototype.getSecurityWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/quote/GetSecurityWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getServiceProvider=function(id,callback)
{this.asynchPostMap(this.rootPath+'/GetServiceProvider.json',{id:id},callback);}
PinkCommonCalls.prototype.getServiceProviderWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetServiceProviderWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getServiceTypes=function(callback)
{return this.synchCall(this.rootPath+'/admins/GetServiceTypes.json');}
PinkCommonCalls.prototype.getShoHistoryDatesAsListItems=function(pageSize,callback)
{var queryString=this.toQueryString('',FIELD_LIMIT,pageSize);var url=this.rootPath+'/GetShoHistoryDatesAsListItems'+queryString;this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getShoHistoryWorklist=function(criteria,callback)
{this.asynchPostMap(this.rootPath+'/GetShoHistoryWorklist.json',criteria,callback);}
PinkCommonCalls.prototype.getShortInterestDatesAsListItems=function(pageSize,callback)
{var queryString=this.toQueryString('',FIELD_LIMIT,pageSize);var url=this.rootPath+'/GetShortInterestDatesAsListItems'+queryString;this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getShortInterestWorklist=function(criteria,callback)
{this.asynchPostMap(this.rootPath+'/GetShortInterestWorklist.json',criteria,callback);}
PinkCommonCalls.prototype.getSitemapWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admin/GetSitemapWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getSplitsWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetSplitsWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getStatesAsListItemsByCountry=function(countryId,callback)
{var url=this.rootPath+'/GetStates?'+FIELD_COUNTRY+'='+countryId;if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getStatesWithHeader=function(countryId,callback)
{this.asynchPostMap(this.rootPath+'/GetStatesWithHeader.json',{id:countryId},callback);}
PinkCommonCalls.prototype.getStockScreenerFilterValues=function(filter,callback){this.asynchPostMap(this.rootPath+'/GetStockScreenerFilterValues.json',filter,callback);}
PinkCommonCalls.prototype.getStockScreener=function(filter,callback){this.asynchPostMap(this.rootPath+'/GetStockScreener.json',filter,callback);}
PinkCommonCalls.prototype.getStatesXAsListItemsByCountry=function(countryId,callback)
{var url=this.rootPath+'/GetStatesX?'+FIELD_COUNTRY+'='+countryId;if(undefined==callback)
return this.synchCall(url);this.asynchCall(url,callback);}
PinkCommonCalls.prototype.getSymbolAndNameChangesWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetSymbolAndNameChangesWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getSymbolChangesWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetSymbolChangesWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getTierChangesWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetTierChangesWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getTierInfoBySymbol=function(symbol)
{return this.synchCall(this.rootPath+'/GetTierInfo?'+FIELD_SYMBOL+'='+symbol);}
PinkCommonCalls.prototype.getTiersAsListItems=function(callback)
{this.asynchCall(this.rootPath+'/GetTiersAsListItems',callback);}
PinkCommonCalls.prototype.getTiersXAsListItems=function(callback)
{this.asynchCall(this.rootPath+'/GetTiersXAsListItems.json',callback);}
PinkCommonCalls.prototype.getTierSecurityStatsWorklist=function(callback)
{this.asynchCall(this.rootPath+'/GetTierSecurityStatsWorklist.json',callback);}
PinkCommonCalls.prototype.getTimeAndSalesAnalytics=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetTimeAndSalesAnalytics.json',filter,callback);}
PinkCommonCalls.prototype.getTimeAndSalesFilterOptions=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetTimeAndSalesFilterOptions.json',filter,callback);}
PinkCommonCalls.prototype.getTimeAndSalesWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetTimeAndSalesWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getTraderPO=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetTraderPO.json',filter,callback);}
PinkCommonCalls.prototype.getTraders=function(mmid,callback)
{this.asynchPostMap(this.rootPath+'/member/GetTraders.json',{mmid:mmid},callback);}
PinkCommonCalls.prototype.getTraderWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetTraderWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getTradeStatSummary=function(tierGroupId,callback)
{this.asynchCall(this.rootPath+'/GetTradeStatSummary.json?tierGroupId='+tierGroupId,callback);}
PinkCommonCalls.prototype.getTradeStatsWorklist=function(filter,callback)
{return this.asynchPostMap(this.rootPath+'/GetTradeStatsWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getUserAdmin=function(id,callback)
{this.asynchPostMap(this.rootPath+'/admin/GetUserAdmin.json',{id:id},callback);}
PinkCommonCalls.prototype.getUserAdminEntryInfo=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetUserAdminEntryInfo.json',filter,callback);}
PinkCommonCalls.prototype.getUserInfoByUser=function(userId)
{return this.synchPostMap(this.rootPath+'/admin/GetUserInfo.json',{id:userId});}
PinkCommonCalls.prototype.getUserMin=function(callback)
{this.asynchCall(this.rootPath+'/member/GetUserMin.json',callback);}
PinkCommonCalls.prototype.getUserProfile=function(callback)
{this.asynchCall(this.rootPath+'/GetUserProfile.json',callback);}
PinkCommonCalls.prototype.getUserProfileEntryInfo=function(callback)
{this.asynchCall(this.rootPath+'/GetUserProfileEntryInfo.json',callback);}
PinkCommonCalls.prototype.getUserRoleCompanyWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetUserRoleCompanyWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getUserRoleCustomerPage=function(callback)
{this.asynchCall(this.rootPath+'/admins/GetUserRoleCustomerPage.json',callback);}
PinkCommonCalls.prototype.getUserRoleCustomerWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetUserRoleCustomerWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getUserScreenNames=function(screenName)
{return this.synchCall(this.rootPath+'/member/GetUserScreenNames?'+FIELD_SCREEN_NAME+'='+screenName);}
PinkCommonCalls.prototype.getUserSearchFilterPage=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/GetUserSearchFilterPage.json',value,callback);}
PinkCommonCalls.prototype.getUserWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/admin/GetUserWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getVenueBySymbol=function(symbol)
{return this.synchCall(this.rootPath+'/GetVenue?'+FIELD_SYMBOL+'='+symbol);}
PinkCommonCalls.prototype.getVenueChangesWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/GetVenueChangesWorklist.json',filter,callback);}
PinkCommonCalls.prototype.getVenuesAsListItems=function(callback)
{this.asynchCall(this.rootPath+'/GetVenuesAsListItems.json',callback);}
PinkCommonCalls.prototype.hasAccount=function(symbol)
{var queryString=this.toQueryString('',FIELD_SYMBOL,symbol);return this.synchCall(this.rootPath+'/HasAccount'+queryString);}
PinkCommonCalls.prototype.hasPrivileges=function(){return this.synchCall(this.rootPath+'/HasPrivileges');}
PinkCommonCalls.prototype.hasSecurityService=function(securityId,roleId)
{return this.synchCall(this.rootPath+'/member/HasSecurityService?'+FIELD_SECURITY+'='+securityId+'&'+FIELD_ROLE_ID+'='+roleId);}
PinkCommonCalls.prototype.hasService=function(companyId,roleId)
{return this.synchCall(this.rootPath+'/admins/HasService?'+FIELD_COMPANY+'='+companyId+'&'+FIELD_ROLE_ID+'='+roleId);}
PinkCommonCalls.prototype.hasUserToken=function(userName)
{return this.synchCall(this.rootPath+'/HasUserToken'+this.toQueryString('',FIELD_USER_NAME,userName));}
PinkCommonCalls.prototype.isExternalUser=function(){return this.synchCall(this.rootPath+'/IsExternalUser');}
PinkCommonCalls.prototype.listCustomerLocations=function(customerId,callback)
{this.asynchPostMap(this.rootPath+'/admins/ListCustomerLocations.json',{id:customerId},callback);}
PinkCommonCalls.prototype.sendFeedback=function(value,callback)
{this.asynchPostMap(this.rootPath+'/sendFeedback.json',value,callback);}
PinkCommonCalls.prototype.setAdditionalEmails=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetAdditionalEmails.json',value,callback);}
PinkCommonCalls.prototype.setCompanyAccount=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetCompanyAccount.json',this.convertAll(value),callback);}
PinkCommonCalls.prototype.logRequest=function(applicationId,uri,symbol)
{var map=new Object();map[FIELD_APPLICATION_ID]=applicationId;map[FIELD_URI]=uri;map[FIELD_SYMBOL]=symbol;this.asynchPostMap(this.rootPath+'/LogRequest',map,this);}
PinkCommonCalls.prototype.handleRequestData=function(value){}
PinkCommonCalls.prototype.setCompanyService=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetCompanyService.json',value,callback);}
PinkCommonCalls.prototype.setCompanyUser=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetCompanyUser.json',value,callback);}
PinkCommonCalls.prototype.setCustomer=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetCustomer.json',value,callback);}
PinkCommonCalls.prototype.setCustomerLocation=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetCustomerLocation.json',value,callback);}
PinkCommonCalls.prototype.setCustomerUser=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetCustomerUser.json',value,callback);}
PinkCommonCalls.prototype.setGlobalInfo=function(value,callback)
{return this.asynchPostMap(this.rootPath+'/admin/SetGlobalInfo.json',value,callback);}
PinkCommonCalls.prototype.setMarketMakerService=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/SetMarketMakerService.json',value,callback);}
PinkCommonCalls.prototype.setQueryGroup=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/SetQueryGroup.json',value,callback);}
PinkCommonCalls.prototype.setQueryType=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/SetQueryType.json',value,callback);}
PinkCommonCalls.prototype.setSecurityService=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetSecurityService.json',value,callback);}
PinkCommonCalls.prototype.setSitemap=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/SetSitemap.json',value,callback);}
PinkCommonCalls.prototype.setUserActivation=function(theForm)
{return this.synchPostForm(this.rootPath+'/admin/SetUserActivation',theForm);}
PinkCommonCalls.prototype.setUserAdmin=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/SetUserAdmin.json',value,callback);}
PinkCommonCalls.prototype.setUserCredentials=function(value,callback)
{this.asynchPostMap(this.rootPath+'/member/SetUserCredentials.json',value,callback);}
PinkCommonCalls.prototype.setUserProfile=function(value,callback)
{this.asynchPostMap(this.rootPath+'/SetUserProfile.json',value,callback);}
PinkCommonCalls.prototype.setUserRoleCustomer=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admins/SetUserRoleCustomer.json',value,callback);}
PinkCommonCalls.prototype.submitUserSignUpForm=function(value,callback)
{this.asynchPostMap(this.rootPath+'/UserSignUpForm.json',value,callback);}
PinkCommonCalls.prototype.updateCompanyProfile=function(map)
{var data='<data count="1"><item>';for(var id in map)
{var value=map[id];if((undefined==value)||(0<id.indexOf(' '))||(0<id.indexOf(',')))
continue;data+='<'+id+'><![CDATA['+map[id]+']]></'+id+'>';}
data+='</item></data>';return this.synchPostXml(this.rootPath+'/UpdateCompanyProfile',data);}
PinkCommonCalls.prototype.updateCustomers=function(value)
{return this.synchPostXml(this.rootPath+'/admins/UpdateCustomers',value);}
PinkCommonCalls.prototype.updateUsers=function(value)
{return this.synchPostXml(this.rootPath+'/admins/UpdateUsers',value);}
PinkCommonCalls.prototype.userBelongsToCompany=function(companyId)
{return this.synchPostMap(this.rootPath+'/member/UserBelongsToCompany.json',{id:companyId});}
PinkCommonCalls.prototype.validateSecurityIdentifiers=function(securityIds)
{var o=this.synchPostMap(this.rootPath+'/member/ValidateSecurityIdentifiers.json',{ids:securityIds});if(!o)
return o;return o.payload;}

function AnchorList(body)
{this.body=body;}
AnchorList.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;criteria.body.innerHTML='';var ids=criteria.listItems.ids;var values=criteria.listItems.values;if(undefined!=criteria.defaultValue)
criteria.body.appendChild(this.outputItem(undefined,criteria.defaultValue,criteria));var separator=criteria.separator;for(var i=0;i<ids.length;i++)
{if((undefined!=separator)&&criteria.body.hasChildNodes())
criteria.body.appendChild(document.createTextNode(separator));criteria.body.appendChild(this.outputItem(ids[i],values[i],criteria));}}
AnchorList.prototype.onClick=function(ev)
{var me=this.myCallback;var criteria=this.myCriteria;var id=this.myId;var value=this.myValue;criteria.callback.handleAnchorSelect(id,value,criteria);criteria.selectedItem=id;me.run(criteria);return false;}
AnchorList.prototype.outputItem=function(id,value,criteria)
{var output;if(criteria.selectedItem==id)
{output=document.createElement('span');output.className='selected';output.appendChild(document.createTextNode(value));}
else
{output=document.createElement('a');output.href='javascript:void(null);';output.myCallback=this;output.myCriteria=criteria;output.myId=id;output.myValue=value;output.onclick=this.onClick;output.className='normal';output.appendChild(document.createTextNode(value));}
return output;}
function AnchorListCriteria(listItems,selectedItem,callback,defaultValue,separator)
{this.listItems=listItems;this.selectedItem=selectedItem;this.callback=callback;this.defaultValue=defaultValue;this.separator=separator;}

function Calendar(body,callback)
{this.body=body;this.callback=callback;this.isOpen=false;}
Calendar.CSS_CONTAINER='calendarContainer';Calendar.prototype.CSS_INPUT='calendarField';Calendar.getInstance=function(callback)
{if(!this.body)
{var elem=this.body=document.createElement('div');elem.className=Calendar.CSS_CONTAINER;document.body.insertBefore(elem,document.body.firstChild);}
return new Calendar(this.body,callback);}
Calendar.getInstanceX=function()
{var o=Calendar.getInstance({handleCalendarSelect:function(date,field){o.close();field.value=date?Formatter.toInputDate(date):'';}});return o;}
Calendar.prototype.MONTHS=['January','February','March','April','May','June','July','August','September','October','November','December'];Calendar.prototype.LAST_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31];Calendar.prototype.DAYS=['Sun','Mon','Tues','Wed','Thur','Fri','Sat'];Calendar.prototype.getDaysInMonth=function(month,year)
{if(1!=month)
return this.LAST_DAYS[month];var offset=(0==(year%4))?1:0;return this.LAST_DAYS[month]+offset;}
Calendar.prototype.createField=function(name,value)
{var o=InputField.genTextBox(name,10,12);o.className=this.CSS_INPUT;if(value)
{o.myDate=new Date(value.getTime());o.value=Formatter.toInputDate(value);}
else
o.value=FORMAT_DATE_INPUT;var me=this;o.onfocus=function(ev)
{if(FORMAT_DATE_INPUT==this.value)
this.value='';if(this.myDate)
me.doWhen(this.myDate,this);else
me.doNow(this);};o.onchange=function(ev)
{try
{var v=this.value;if(0==v.length)
this.myDate=undefined;else
this.myDate=Formatter.fromInputDate(v);if(me.callback&&me.callback.handleCalendarSelect)
me.callback.handleCalendarSelect(this.myDate,this);}
catch(error)
{window.alert(error);var a=this;setTimeout(function(){a.focus();},200);}}
return o;}
Calendar.prototype.doNow=function(offsetElem,body)
{var now=new Date();this.run(new CalendarCriteria(new Date(now.getFullYear(),now.getMonth(),now.getDate()),offsetElem),body);}
Calendar.prototype.doWhen=function(when,offsetElem,body)
{this.run(new CalendarCriteria(when,offsetElem),body);}
Calendar.prototype.doString=function(whenString,offsetElem,body)
{this.doWhen(Formatter.fromInputDate(whenString),offsetElem,body);}
Calendar.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;var elem=criteria.offsetElem;elem.myCalendar=this;elem.onkeydown=this.offsetElem_onKeyDown;this.addEventListener(elem,'blur',this.scheduleClose);criteria.body.innerHTML='';criteria.body.appendChild(this.generate(criteria,this));this.open();positionLeftAndBelowElement(criteria.body,criteria.offsetElem);this.criteria=criteria;}
Calendar.prototype.generate=function(value,callback)
{var output=document.createElement('table');var tr,td,cells,rows=0;output.border=1;output.cellSpacing=0;output.cellPadding=2;tr=output.insertRow(rows++);tr.className='calendarCaption';td=tr.insertCell(0);td.colSpan=this.DAYS.length;td.appendChild(this.genHeader(value,callback));tr=output.insertRow(rows++);tr.className='calendarHeader';for(var i=0;i<this.DAYS.length;i++)
{td=tr.insertCell(i);td.className='calendarHeader';td.appendChild(document.createTextNode(this.DAYS[i]));}
var today=value.when.getDate();var when=new Date(value.when.getTime());when.setDate(1);var dayOffset=when.getDay();tr=output.insertRow(rows++);cells=0;if(0<dayOffset)
{td=tr.insertCell(cells++);td.colSpan=dayOffset;td.innerHTML='&nbsp;';td.className='calendarDay';}
var daysInMonth=this.getDaysInMonth(when.getMonth(),when.getFullYear());for(var i=1;i<=daysInMonth;i++)
{if(this.DAYS.length<=dayOffset)
{dayOffset=0;tr=output.insertRow(rows++);cells=0;}
var cssClass='calendarDay';if(today==i)
cssClass='calendarSelected';td=tr.insertCell(cells++);td.className=cssClass;td.appendChild(this.createAnchor(i,this.handleSelection,value,callback,i));dayOffset++;}
if(this.DAYS.length>dayOffset)
{td=tr.insertCell(cells++);td.colSpan=this.DAYS.length-dayOffset;td.innerHTML='&nbsp;';td.className='calendarDay';}
tr=output.insertRow(rows++);tr.className='calendarFooter';td=tr.insertCell(0);td.colSpan=this.DAYS.length;td.appendChild(this.genFooter(value,callback));return output;}
Calendar.prototype.genHeader=function(value,callback)
{var output=document.createElement('table');output.border=0;output.cellSpacing=0;output.cellPadding=0;output.style.width='100%';var tr,td,rows=0;tr=output.insertRow(rows++);td=tr.insertCell(0);td.style.width='50%';td.className='calendarCaption';td.appendChild(this.createAnchor('&lt;',callback.changeMonth,value,callback,-1));td.appendChild(this.createSpace());td.appendChild(document.createTextNode(this.MONTHS[value.when.getMonth()]));td.appendChild(this.createSpace());td.appendChild(this.createAnchor('&gt;',callback.changeMonth,value,callback,1));td=tr.insertCell(1);td.style.width='50%';td.className='calendarCaption';td.appendChild(this.createAnchor('&lt;',callback.changeYear,value,callback,-1));td.appendChild(this.createSpace());td.appendChild(document.createTextNode(value.when.getFullYear()));td.appendChild(this.createSpace());td.appendChild(this.createAnchor('&gt;',callback.changeYear,value,callback,1));return output;}
Calendar.prototype.genFooter=function(value,callback)
{var output=document.createElement('table');output.border=0;output.cellSpacing=0;output.cellPadding=0;output.style.width='100%';var tr,td,rows=0;tr=output.insertRow(rows++);td=tr.insertCell(0);td.style.width='50%';td.className='calendarFooter';td.appendChild(this.createAnchor('Today',callback.handleToday,value,callback));td=tr.insertCell(1);td.style.width='50%';td.className='calendarFooter';td.appendChild(this.createAnchor('Close',callback.handleClose,value,callback));return output;}
Calendar.prototype.createAnchor=function(caption,action,value,callback,extra)
{var output=document.createElement('a');output.href='javascript:void(null)';output.myCalendar=callback;output.myRecord=value;output.myExtra=extra;output.innerHTML=caption;this.addEventListener(output,'click',callback.cancelClose);this.addEventListener(output,'click',action);this.addEventListener(output,'blur',callback.scheduleClose);return output;}
Calendar.prototype.createSpace=function()
{var output=document.createElement('span');output.innerHTML='&nbsp;&nbsp;';return output;}
Calendar.prototype.changeMonth=function(ev)
{var that=(this.myCalendar)?this:event.srcElement;var me=that.myCalendar;var criteria=that.myRecord;var tick=that.myExtra;criteria.when.setMonth(criteria.when.getMonth()+tick);me.run(criteria);}
Calendar.prototype.changeYear=function(ev)
{var that=(this.myCalendar)?this:event.srcElement;var me=that.myCalendar;var criteria=that.myRecord;var tick=that.myExtra;criteria.when.setFullYear(criteria.when.getFullYear()+tick);me.run(criteria);}
Calendar.prototype.handleSelection=function(ev)
{var that=(this.myCalendar)?this:event.srcElement;var me=that.myCalendar;var criteria=that.myRecord;criteria.when.setDate(that.myExtra);me.handleSelection_(criteria);}
Calendar.prototype.handleSelection_=function(criteria)
{this.close();var w=criteria.when;var e=criteria.offsetElem;e.myDate=w;this.callback.handleCalendarSelect(w,e);}
Calendar.prototype.handleToday=function(ev)
{var that=(this.myCalendar)?this:event.srcElement;var me=that.myCalendar;var criteria=that.myRecord;criteria.when=new Date();me.handleSelection_(criteria);}
Calendar.prototype.handleClose=function(ev)
{var that=(this.myCalendar)?this:event.srcElement;that.myCalendar.close();}
Calendar.prototype.open=function()
{this.continueWithClose=false;if(this.isOpen)
return;this.body.style.display='block';this.isOpen=true;if(undefined!=this.callback.handleCalendarOpen)
this.callback.handleCalendarOpen();}
Calendar.prototype.close=function()
{if(!this.isOpen)
return;this.body.style.display='none';this.isOpen=false;if(undefined!=this.callback.handleCalendarClose)
this.callback.handleCalendarClose();}
Calendar.prototype.cancelClose=function(ev)
{var that=(this.myCalendar)?this:event.srcElement;that.myCalendar.continueWithClose=false;}
Calendar.prototype.scheduleClose=function(ev)
{var that=(this.myCalendar)?this:event.srcElement;var me=that.myCalendar;me.continueWithClose=true;window.setTimeout(function(){if(me.continueWithClose)me.close();},1000);}
Calendar.prototype.addEventListener=function(target,type,action)
{if(target.addEventListener)
target.addEventListener(type,action,false);else
target.attachEvent('on'+type,action);}
Calendar.prototype.offsetElem_onKeyDown=function(ev)
{if(KEY_ESCAPE==getKeyCode(ev))
{this.myCalendar.close();return false;}
return true;}
function CalendarCriteria(when,offsetElem)
{this.when=when;this.offsetElem=offsetElem;}

function ActivationStatus(count,activated)
{this.count=count;this.activated=activated;}
function ActivationStatusValue(ids,newStatus)
{this.ids=ids;this.newStatus=newStatus;}
function ChangedCompanyServiceStatus(id,isActive)
{this.id=id;this.isActive=isActive;}
function ChangedContactAddressStatus(companyId,isActive)
{this.companyId=companyId;this.isActive=isActive;}
function ChangedSecurityServiceStatus(id,isActive)
{this.id=id;this.isActive=isActive;}
function ChangedUserRoleCompanyStatus(id,isActive)
{this.id=id;this.isActive=isActive;}
function ChangedDailyReportStatus(id,isDailyReport)
{this.id=id;this.isDailyReport=isDailyReport;}
function ChangedWeeklyReportStatus(id,isWeeklyReport)
{this.id=id;this.isWeeklyReport=isWeeklyReport;}
function ChangedHtmlEmailStatus(id,isHtmlEmailFormat)
{this.id=id;this.isHtmlEmailFormat=isHtmlEmailFormat;}
function CompanyProfileCriteria(companyId,securityId)
{this.securityId=securityId;this.companyId=companyId;}
CompanyProfileCriteria.prototype.getKey=function(){return(undefined!=companyId)?companyId:securityId;}
function CompanySimple(id,name,city,stateName,countryName,location,primarySecurityId,primarySymbol,primaryExchange,accountNo)
{this.id=id;this.compId=id;this.name=name;this.city=city;this.stateName=stateName;this.countryName=countryName;this.location=location;this.primarySecurityId=primarySecurityId;this.primarySymbol=primarySymbol;this.primaryExchange=primaryExchange;this.accountNo=accountNo;this.symbol=primarySymbol;}
CompanySimple.prototype.getId=function(){return this.id;}
CompanySimple.prototype.getValue=function()
{var output=this.name;if(undefined!=this.location)
output+=', '+this.location;return output;}
function CompSymbolValue(symbol,companyName)
{this.symbol=symbol;this.companyName=companyName;}
function CompanyWorklist(singular,plural,records,pageNavInfo,sortOn,sortDir)
{this.singular=singular;this.plural=plural;this.records=records;this.pageNavInfo=pageNavInfo;this.sortOn=sortOn;this.sortDir=sortDir;}
function CustomerPage(states,countries,serviceTypes)
{this.states=states;this.countries=countries;this.serviceTypes=serviceTypes;}
function CustomerUserStatus(accountNo,approachingEndDate,pastEndDate,pastExtensionDate,endDate,extensionDate,daysToEndDate,daysToExtensionDate,endDateX,extensionDateX,nasdaqAgreementVersion,agreed)
{this.accountNo=accountNo;this.approachingEndDate=approachingEndDate;this.pastEndDate=pastEndDate;this.pastExtensionDate=pastExtensionDate;this.endDate=endDate;this.extensionDate=extensionDate;this.daysToEndDate=daysToEndDate;this.daysToExtensionDate=daysToExtensionDate;this.endDateX=endDateX;this.extensionDateX=extensionDateX;this.nasdaqAgreementVersion=nasdaqAgreementVersion;this.agreed=agreed;}
function GlobalInfoValue(id,name,pinkSheetsBaseUrl,pinkContentBaseUrl,pinkCommonBaseUrl,pinkForumsBaseUrl,adminEmailAddress,supportEmailAddress,issuerAlertsEmailAddress,issuerServicesEmailAddress,analyzeLegacyDbInterval,otciqBaseUrl,otcqxBaseUrl,infoEmailAddress,tradingServicesEmailAddress,syndicateBaseUrl,syndicateTitle,customerWarningDays,nasdaqAgreementVersion,otcquoteBaseUrl,histBaseUrl,showOtcqxAd,otcqxAdDays)
{this.id=id;this.name=name;this.pinkSheetsBaseUrl=pinkSheetsBaseUrl;this.pinkContentBaseUrl=pinkContentBaseUrl;this.pinkCommonBaseUrl=pinkCommonBaseUrl;this.pinkForumsBaseUrl=pinkForumsBaseUrl;this.adminEmailAddress=adminEmailAddress;this.supportEmailAddress=supportEmailAddress;this.issuerAlertsEmailAddress=issuerAlertsEmailAddress;this.issuerServicesEmailAddress=issuerServicesEmailAddress;this.analyzeLegacyDbInterval=analyzeLegacyDbInterval;this.otciqBaseUrl=otciqBaseUrl;this.otcqxBaseUrl=otcqxBaseUrl;this.infoEmailAddress=infoEmailAddress;this.tradingServicesEmailAddress=tradingServicesEmailAddress;this.syndicateBaseUrl=syndicateBaseUrl;this.syndicateTitle=syndicateTitle;this.customerWarningDays=customerWarningDays;this.nasdaqAgreementVersion=nasdaqAgreementVersion;this.otcquoteBaseUrl=otcquoteBaseUrl;this.histBaseUrl=histBaseUrl;this.showOtcqxAd=showOtcqxAd;this.otcqxAdDays=otcqxAdDays;}
function CoordInfo(x,y)
{this.x=x;this.y=y;}
function Credentials(userName,password)
{this.userName=userName;this.password=password;}
function ForgotPassword(emailAddress)
{this.emailAddress=emailAddress;}
function ListItemInfo(ids,values,totalRecords)
{this.ids=ids;this.values=values;this.totalRecords=totalRecords;}
function ListItemExt(id,name,iconSource,comments)
{this.id=id;this.name=name;this.iconSource=iconSource;this.comments=comments;}
function ListQXSecurityInfo(singular,plural,sortOn,sortDir,pageNavInfo,records)
{this.singular=singular;this.plural=plural;this.sortOn=sortOn;this.sortDir=sortDir;this.pageNavInfo=pageNavInfo;this.records=records;}
function LoginInfo(userName,isSuccess,isFailure,isPending,isAuthorizationFailure)
{this.userName=userName;this.isSuccess=isSuccess;this.isFailure=isFailure;this.isPending=isPending;this.isAuthorizationFailure=isAuthorizationFailure;}
function MarketMakerFilter(name,nameAndId,searchType,sortOn,sortDir,page,pageSize,mmId,symbol)
{this.name=name;this.nameAndId=nameAndId;this.searchType=searchType;this.sortOn=sortOn;this.sortDir=sortDir;this.page=page;this.pageSize=pageSize;this.mmId=mmId;this.symbol=symbol;}
function MktReportUserValue(id,secId,officerId,officerName,officerEmail,isWeeklyReport,isDailyReport,isHtmlEmailFormat,additionalEmails)
{this.id=id;this.secId=secId;this.officerId=officerId;this.officerName=officerName;this.officerEmail=officerEmail;this.isWeeklyReport=isWeeklyReport;this.isDailyReport=isDailyReport;this.isHtmlEmailFormat=isHtmlEmailFormat;this.additionalEmails=additionalEmails;}
function NotAuthenticatedException(message)
{this.isNotAuthenticatedException=true;this.message=message;}
NotAuthenticatedException.prototype.toString=function(){return this.message;}
function NotAuthorizedException(message)
{this.isNotAuthorizedException=true;this.message=message;}
NotAuthorizedException.prototype.toString=function(){return this.message;}
function OfficerItem(name,title,title1,title2,title3,email,phone,isPrimaryContact)
{this.name=name;this.title=title;this.title1=title1;this.title2=title2;this.title3=title3;this.email=email;this.phone=phone;this.isPrimaryContact=isPrimaryContact;}
function PageInfo(title,url)
{this.title=title;this.url=url;}
function PageNavInfo(totalRecords,totalPages,currentPage,pageSize)
{this.totalRecords=totalRecords;this.totalPages=totalPages;this.currentPage=currentPage;this.pageSize=pageSize;}
function QXSecurityInfo(companyId,securityId,companyName,symbol,tier,dad,pal,industry,region,marketCap,lastSale,startDate)
{this.companyId=companyId;this.securityId=securityId;this.companyName=companyName;this.symbol=symbol;this.tier=tier;this.dad=dad;this.pal=pal;this.region=region;this.industry=industry;this.marketCap=marketCap;this.lastSale=lastSale;this.startDate=startDate;}
function ResearchReportValue(firmName,url)
{this.firmName=firmName;this.url=url;}
function ResearchReportFilter(compId,firmName,page,pageSize,sortOn,sortDir)
{this.compId=compId;this.firmName=firmName;this.page=page;this.pageSize=pageSize;this.sortOn=sortOn;this.sortDir=sortDir;}
function SecurityInfo(secId,compId,companyName,issueName,symbol,primaryVenue,isOtc,isPinkSheets,statusName,className,tierId,tierName,isOtcQX,isCaveatEmptor,piggyBacked,noPar,parValue,parValueX,precisionIrUrl,isAdr,ratioAdr,ratioOrd,cusip)
{this.secId=secId;this.compId=compId;this.companyName=companyName;this.issueName=issueName;this.symbol=symbol;this.primaryVenue=primaryVenue;this.primaryMarket=primaryVenue;this.venue=primaryVenue;this.isOtc=isOtc;this.isPinkSheets=isPinkSheets;this.statusName=statusName;this.className=className;this.tierId=tierId;this.tierName=tierName;this.isOtcQX=isOtcQX;this.isCaveatEmptor=isCaveatEmptor;this.piggyBacked=piggyBacked;this.noPar=noPar;this.parValue=parValue;this.parValueX=parValueX;this.precisionIrUrl=precisionIrUrl;this.isAdr=isAdr;this.ratioAdr=ratioAdr;this.ratioOrd=ratioOrd;this.cusip=cusip;}
function SecurityServiceInfo(id,roleId,roleName,startDate,endDate,isActive,startDateJs,endDateJs,secId,symbol,token)
{this.id=id;this.roleId=roleId;this.roleName=roleName;this.startDate=startDate;this.endDate=endDate;this.isActive=isActive;this.startDateJs=startDateJs;this.endDateJs=endDateJs;this.secId=secId;this.symbol=symbol;this.token=token;}
function ServiceProviderWorklistFilter(type,isDadPal,sortOn,sortDir,page,pageSize)
{this.type=type;this.isDadPal=isDadPal;this.sortOn=sortOn;this.sortDir=sortDir;this.page=page;this.pageSize=pageSize;}
function SecurityFilterValue(searchTypeId,symbol,companyName,page,limit)
{this.searchTypeId=searchTypeId;this.symbol=symbol;this.companyName=companyName;this.page=page;this.limit=limit;}
function ShortInterestFilter(positionDate,securityId,symbol,page,pageSize,sortOn,sortDir)
{this.positionDateX=positionDate;if(undefined!=positionDate)
this.positionDate=positionDate.getTime();this.securityId=securityId;this.symbol=symbol;this.page=page;this.pageSize=pageSize;this.sortOn=sortOn;this.sortDir=sortDir;}
function TierInfoItem(symbol,tierId,tierName)
{this.symbol=symbol;this.tierId=tierId;this.tierName=tierName;}
function TradeStatFilter(pageSize,sortOn,priceMin,tierGroupId)
{this.pageSize=pageSize;this.sortOn=sortOn;this.priceMin=priceMin;this.tierGroupId=tierGroupId;}
function TransferAgentItem(id,name,address1,address2,address3,city,state,zip,countryId,isPublic,country)
{this.id=id;this.name=name;this.address1=address1;this.address2=address2;this.address3=address3;this.city=city;this.state=state;this.zip=zip;this.country=country;this.countryId=countryId;this.isPublic=isPublic;}
function UserRoleCompany(userId,roleId,compId,isActive)
{this.userId=userId;this.roleId=roleId;this.compId=compId;this.isActive=isActive;}
function UserRoleCompanyWorklistFilter(userId,onlyServices,page,pageSize,sortOn,sortDir)
{this.userId=userId;this.onlyServices=onlyServices;this.page=page;this.pageSize=pageSize;this.sortOn=sortOn;this.sortDir=sortDir;}
function UserRoleCustomerFilter(userId,page,pageSize,sortOn,sortDir)
{this.userId=userId;this.page=page;this.pageSize=pageSize;this.sortOn=sortOn;this.sortDir=sortDir;}
function UserSearchFilter(emailAddress,screenName,firstName,lastName,companyName,roleId,countryId,stateId,city,customerName,onlyCustomers)
{this.emailAddress=emailAddress;this.screenName=screenName;this.firstName=firstName;this.lastName=lastName;this.companyName=companyName;this.roleId=roleId;this.countryId=countryId;this.stateId=stateId;this.city=city;this.customerName=customerName;this.onlyCustomers=onlyCustomers;}
function CompanyDirectoryFilter(page,pageSize,sortOn,sortDir,tierGroupId){this.page=page;this.pageSize=pageSize;this.sortOn=sortOn;this.sortDir=sortDir;this.tierGroupId=tierGroupId;}
function ValidationException(message,field,caption,value)
{this.isOk=false;this.isError=true;this.isValidationException=true;this.message=message;this.field=field;this.caption=caption;this.value=value;window.lastPinkException=this;}
ValidationException.prototype.toString=function(){return this.message;}
function WebSuccessInfo(payload,redirectUrl)
{this.isOk=true;this.isError=false;this.payload=payload;this.redirectUrl=redirectUrl;}

var APPLICATION_ID_OTCIQ='IQ';var APPLICATION_ID_OTCQX='QX';var APPLICATION_ID_PINKSHEETS='PS';var APPLICATION_ID_OTCQUOTE='QTE';var APPLICATION_ID_CORP='CORP';var APPLICATION_ID_OTCMARKETS='OTCM';var ARRAY_SEARCH_TYPE={'values':['Contains','Starts With'],'ids':['contains','startswith']};var CAPTION_12G32B='Exempt Under 12g3-2(b)';var CAPTION_ABUSE='Abuse';var CAPTION_ABUSES='Abuses';var CAPTION_ACCOUNT_NO='Account No.';var CAPTION_ACCOUNT_CONTACT='Account Contact';var CAPTION_ACCOUNTANT='Accountant';var CAPTION_ACTIVE='Active';var CAPTION_ADD='Add';var CAPTION_ADDRESS='Address';var CAPTION_ADMIN_EMAIL_ADDRESS='Admin. E-mail Address';var CAPTION_ADMINISTRATIVE='Administrative';var CAPTION_ADMINISTRATOR='Administrator';var CAPTION_ALL='All';var CAPTION_AMOUNT='Amount';var CAPTION_ANALYZE_LEGACY_DB_INTERVAL='Analyze Legacy DB Interval';var CAPTION_ANALYZE_LEGACY_DB_INTERVAL_UNIT='milliseconds';var CAPTION_ASCENDING='FIFO';var CAPTION_AUDITED_DESIGNATION='Audited Or Unaudited Designation';var CAPTION_AUDITOR='Auditor';var CAPTION_AUTHOR='Author';var CAPTION_AUTHORIZED_SHARES='Authorized Shares';var CAPTION_BILLING_FREQUENCY='Billing Frequency';var CAPTION_BIRTH_DATE='Birth Date';var CAPTION_BLUE_SKY_STATUS='Blue Sky Status';var CAPTION_BUILD_NO='Build Number';var CAPTION_BUSINESS_DESC='Business Description';var CAPTION_BUSINESS_INDICATOR='Business Indicator';var CAPTION_BUSINESS_STAGE='Business Stage';var CAPTION_BY='by';var CAPTION_CANCEL='Cancel';var CAPTION_CATEGORY='Category';var CAPTION_CATEGORIES='Categories';var CAPTION_CAVEAT_EMPTOR='Caveat Emptor';var CAPTION_CHANGE='Change';var CAPTION_CIK='CIK';var CAPTION_CITY='City';var CAPTION_CLASS='Class';var CAPTION_CLASS_NOTES='Security Notes';var CAPTION_COLLAPSE='Collapse';var CAPTION_COUNTRY_OF_INCORPORATION='Country Of Incorporation';var CAPTION_COMMENTS='Comments';var CAPTION_COMPANY='Company';var CAPTION_COMPANY_AUDITOR='Company Auditor';var CAPTION_COMPANY_CONTACT='Company Contact';var CAPTION_COMPANY_DIRECTORS='Company Directors';var CAPTION_COMPANY_INVESTOR_RELATION_FIRM='Investor Relations Firm';var CAPTION_COMPANY_LEGAL_COUNSEL='Legal Counsel';var CAPTION_COMPANY_NAME='Company Name';var CAPTION_COMPANY_NOTES='Company Notes';var CAPTION_COMPANY_OFFICERS='Company Officers';var CAPTION_COMPANY_SERVICE='Company Service';var CAPTION_COMPANY_SERVICES='Company Services';var CAPTION_COMPANY_TYPE='Company Type';var CAPTION_COMPANIES='Companies';var CAPTION_CONTACT='Contact';var CAPTION_CONTACT_INFO='Contact Information';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_CRITICAL_ALERT_EMAIL_ADDRESS='Critical Alert Email Address';var CAPTION_CURRENT_CAPITAL_CHANGE='Current Capital Change';var CAPTION_CURRENT_PASSWORD='Current Password';var CAPTION_CUSTOMER='Customer';var CAPTION_CUSTOMERS='Customers';var CAPTION_CUSTOMER_NAME=CAPTION_CUSTOMER+' Name';var CAPTION_DAD_PAL='DAD/PAL';var CAPTION_DAD='DAD';var CAPTION_DATA_NOT_AVAILABLE='Data Not Available';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_DEREGISTERED='De-Registered from the SEC';var CAPTION_DESCRIPTION='Description';var CAPTION_DESCENDING='LIFO';var CAPTION_DISCLOSURE_CATEGORY='Disclosure Category';var CAPTION_DIVIDEND='Dividend';var CAPTION_DIVIDENDS='Dividends';var CAPTION_DIVIDEND_DETAILS='Dividend Details';var CAPTION_DOLLAR_UNIT='$';var CAPTION_DONT_KNOW='Don\'t Know';var CAPTION_EDGAR_FILING_STATUS='Reporting Standard';var CAPTION_EDIT='Edit';var CAPTION_EDUCATION_LEVEL='Education';var CAPTION_EFFECTIVE_DATE='Effective Date';var CAPTION_ELIGIBLE_DATE='Eligible Date';var CAPTION_EMAIL='E-mail';var CAPTION_EMAIL_ADDRESS='E-mail Address';var CAPTION_EMPTY='Empty';var CAPTION_END_DATE='End Date';var CAPTION_ERROR_ALERT_EMAIL_ADDRESS='Error Alert Email Address';var CAPTION_ESTIMATED_MARKET_CAP='Estimated Market Cap';var CAPTION_EXERCISE_DATE='Exercise Date';var CAPTION_EXPAND='Expand';var CAPTION_EXPAND_COLLAPSE='Expand/Collapse';var CAPTION_EXPANDED='Expanded';var CAPTION_EXPIRED='Expired';var CAPTION_EXTENSION_DATE='Extension Date';var CAPTION_EX_DATE='Ex-Date';var CAPTION_FAX='Fax';var CAPTION_FAX_NUMBER='Fax Number';var CAPTION_FISCAL_YEAR_END='Fiscal Year End';var CAPTION_FIND='Find';var CAPTION_FIRST_NAME='First Name';var CAPTION_FLOAT='Float (shares)';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_GREY_MARKET='Grey Market';var CAPTION_ID='ID';var CAPTION_INACTIVE='Inactive';var CAPTION_INCOME_LEVEL='Income Level';var CAPTION_INDUSTRY='Industry';var CAPTION_INDUSTRY_CLASSIFICATION=CAPTION_INDUSTRY+' Classification';var CAPTION_INFO_EMAIL_ADDRESS='Info E-mail Address';var CAPTION_INFORMATION='Information';var CAPTION_IP_ADDRESS='IP Address';var CAPTION_IS_ACTIVE='Is Active?';var CAPTION_ISSUER_ALERTS_EMAIL_ADDRESS='Issuer Alerts E-mail Address';var CAPTION_ISSUER_SERVICES_EMAIL_ADDRESS='Issuer Services E-mail Address';var CAPTION_JOB_TITLE='Job Title';var CAPTION_JURISDICTION_OF_INCORPORATION='Jurisdiction Of Incorporation';var CAPTION_KEY='Key';var CAPTION_LAST_MODIFIER='Last Modifier';var CAPTION_LAST_NAME='Last Name';var CAPTION_LAST_UPDATED='Last Updated';var CAPTION_LOCATION='Location';var CAPTION_LOCATIONS='Locations';var CAPTION_LOGIN='Login';var CAPTION_LOGIN_NAME='E-mail Address';var CAPTION_LOGOUT='Logout';var CAPTION_MARITAL_STATUS='Marital Status';var CAPTION_MAIN_SIC_CODE='Main SIC Code';var CAPTION_MARKET_MAKER='Market Maker';var CAPTION_ME='Me';var CAPTION_MEMBER_SINCE='Member Since';var CAPTION_MIDDLE_NAME='Middle Name';var CAPTION_MMID='MMID';var CAPTION_NA='N/A';var CAPTION_NAME='Name';var CAPTION_NAME_SUFFIX='Name Suffix';var CAPTION_NAME_TITLE='Title';var CAPTION_NEXT_TOKEN_CODE='Next Token Code';var CAPTION_NO_PAR='No Par';var CAPTION_NONE='None';var CAPTION_NON_US_EXCHANGE_LISTING='Non-U.S. Exchange Listing';var CAPTION_NOTE='Note';var CAPTION_NUMBER_OF_SECURITIES='Number of Different Stocks Invested';var CAPTION_NUMBER_OF_EMPLOYEES='Number of Employees';var CAPTION_NUMBER_OF_COMPANY_LOC='Number of Company Locations';var CAPTION_NUMBER_OF_SHARE_HOLDERS='Number of Shareholders of Record';var CAPTION_NUMBER_OF_BENEFICIAL_SHARE_HOLDERS='Number of Beneficial Shareholders';var CAPTION_OCCUPATION='Occupation';var CAPTION_OFFICER='Officer';var CAPTION_ONLY='Only';var CAPTION_ORDER_BY='Order By';var CAPTION_OTC='OTC';var CAPTION_OTCIQ_BASE_URL='OTCIQ Base URL';var CAPTION_OTCQX_BASE_URL='OTCQX Base URL';var CAPTION_OUTSTANDING_SHARES='Outstanding Shares';var CAPTION_OTHER_COMPANY_CONTACTS='Other Company Contacts';var CAPTION_PAL='PAL';var CAPTION_PAR_VALUE='Par Value';var CAPTION_PASSWORD='Password';var CAPTION_PASSWORD_CONFIRM='Password Confirmation';var CAPTION_PASSWORD_NEW='New Password';var CAPTION_PAY_DATE='Pay Date';var CAPTION_PHONE='Phone';var CAPTION_PHONE_NUMBER='Phone Number';var CAPTION_PINK_COMMON_BASE_URL='Pink Common Base URL';var CAPTION_PINK_CONTENT_BASE_URL='Pink Content Base URL';var CAPTION_PINK_FORUMS_BASE_URL='Pink Forums Base URL';var CAPTION_PINK_SHEETS_BASE_URL='Pink Sheets Base URL';var CAPTION_PORTFOLIO='Portfolio';var CAPTION_POSTAL_CODE='Postal Code';var CAPTION_PRECISION_IR_URL='Precision IR URL';var CAPTION_PRICE='Price';var CAPTION_PRIMARY_SIC='Primary SIC';var CAPTION_PRIVATE='Private';var CAPTION_PROFILE='Profile';var CAPTION_PUBLIC='Public';var CAPTION_QUALIFIED_EXCHANGE='Qualified Exchange';var CAPTION_READ_LESS='<< Less';var CAPTION_READ_MORE='More >>';var CAPTION_RECORD_DATE='Record Date';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_REQUIRED='* ';var CAPTION_RESET='Reset';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_SCHEDULED_DATE='Scheduled Date';var CAPTION_SCREEN_NAME='Screen Name';var CAPTION_SEARCH='Search';var CAPTION_SEARCH_TYPE='Search Type';var CAPTION_SECURITY='Security';var CAPTION_SECURITY_TYPE='Security Type';var CAPTION_SECURITIES='Securities';var CAPTION_SEDAR_FILING_STATUS='Sedar Filing Status';var CAPTION_SEND_NOTIFICATION='Send Notification?';var CAPTION_SEND_QUERY_LOG_ALERTS='Send Query Log Alerts?';var CAPTION_SENTIMENT='Sentiment';var CAPTION_SENTIMENT_NONE='Do Not Disclose';var CAPTION_SERVICE='Service';var CAPTION_SERVICES='Services';var CAPTION_SERVICE_PROVIDER_CONTACT='Service Provider Contact';var CAPTION_SERVICE_TYPE='Service Type';var CAPTION_SHELL_COMPANY='Shell Company';var CAPTION_SHELL_COMPANY_STATUS='Shell Company Status';var CAPTION_SHO='SHO';var CAPTION_SHORT_INTEREST='Short Interest';var CAPTION_SIC_CODE='SIC Code';var CAPTION_SIZE_OF_PORTFOLIO='Size of Portfolio';var CAPTION_SIZE_OF_PORTFOLIO_UNIT='$';var CAPTION_SOFTRAX_ID='SofTrax No.';var CAPTION_SOFTRAX_LOCATION_ID='SofTrax Location No.';var CAPTION_SPLIT='Split';var CAPTION_SPLITS='Splits';var CAPTION_START_DATE='Start Date';var CAPTION_STATE='State';var CAPTION_STATE_OF_INCORPORATION='State Of Incorporation';var CAPTION_STATE_EXT='State/Province/Region';var CAPTION_STATUS='Status';var CAPTION_STOCK='Stock';var CAPTION_SUBMIT='Submit';var CAPTION_SUBMITTING='Submitting ... Please wait';var CAPTION_SUMMARY='Summary';var CAPTION_SUPPORT='Support';var CAPTION_SUPPORT_EMAIL_ADDRESS='Support E-mail Address';var CAPTION_SYMBOL='Symbol';var CAPTION_SYNDICATE_BASE_URL='Syndicate Base URL';var CAPTION_SYNDICATE_TITLE='Syndicate Title';var CAPTION_THANK_YOU='Thank You';var CAPTION_TIER='Tier';var CAPTION_TITLE='Title';var CAPTION_TODAY='Today';var CAPTION_TOKEN='Token';var CAPTION_TOKEN_CODE='Token Code';var CAPTION_TOKEN_SERIAL_NO='Token Serial No.';var CAPTION_TRADING_FREQUENCY='Trading Frequency';var CAPTION_TRADING_LEVEL='Trading Level';var CAPTION_TRADING_SERVICES_EMAIL_ADDRESS='Trading Services E-mail Address';var CAPTION_TRADING_SERVICES_FEEDBACK_EMAIL_ADDRESS='Trading Services Feedback E-mail Address';var CAPTION_TRADING_SYMBOL='Trading Symbol';var CAPTION_TRANSFER_AGENT='Transfer Agent';var CAPTION_TWITTER_URL='Twitter URL';var CAPTION_TYPE='Type';var CAPTION_UPDATE='Update';var CAPTION_UNLIMITED='Unlimited';var CAPTION_USER='User';var CAPTION_USERS='Users';var CAPTION_USER_NAME='Login Name';var CAPTION_VENUE='Venue';var CAPTION_VOLUME='Volume';var CAPTION_WARNING_ALERT_EMAIL_ADDRESS='Warning Alert Email Address';var CAPTION_WEB_SERVICE_PASSCODE='Web Service Passcode';var CAPTION_WEBSITE='Website';var CAPTION_WORKLIST='Worklist';var CAPTION_YEAR_OF_INCORPORATION='Year Of Incorporation';var CAPTION_YES='Yes';var CAPTION_YESTERDAY='Yesterday';var FIELD_ABUSE='abuseId';var FIELD_ACCOUNT_TYPE='accountType';var FIELD_ACTION='action';var FIELD_ACTION_DATE='actionDate';var FIELD_ACTIVE='active';var FIELD_ACCOUNT_NO='accountNo';var FIELD_AD_SPACE='adSpaceId';var FIELD_ADDITIONAL_EMAILS='additionalEmails';var FIELD_ADDRESS_1='address1';var FIELD_ADDRESS_2='address2';var FIELD_ADDRESS_3='address3';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_APPLICATION_ID='applicationId';var FIELD_ASCENDING='ASC';var FIELD_BACK_URL='back';var FIELD_BIRTH_DATE='birthDate';var FIELD_CAPTION='caption';var FIELD_CITY='city';var FIELD_CLASS='class';var FIELD_COMMENTS='comments';var FIELD_COMPANY='companyId';var FIELD_COMPANY_NAME='companyName';var FIELD_COMPANY_SERVICE='compServiceId';var FIELD_CONTACT_ID='contactId';var FIELD_COUNTRY='countryId';var FIELD_CREATED_DATE='createdDate';var FIELD_CREATOR='creatorId';var FIELD_CREDIT_CARD_EXP_DATE='creditCardExpDate';var FIELD_CURRENT_PASSWORD='currentPassword';var FIELD_DEFAULT_EMAIL_POST_REPLY='defaultEmailPostReply';var FIELD_DESCENDING='DESC';var FIELD_DOLLAR_VOLUME='dollarVolume';var FIELD_EDUCATION_LEVEL='educationLevelId';var FIELD_ELIGIBLE_DATE='eligibleDate';var FIELD_EMAIL_ADDRESS='emailAddress';var FIELD_END_DATE='endDate';var FIELD_EXERCISE_DATE='exerciseDate';var FIELD_EXPANDED='expanded';var FIELD_EXTENSION_DATE='extensionDate';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_GAIN='gain';var FIELD_GENDER='genderId';var FIELD_GLOBAL_INFO='globalInfoId';var FIELD_HAS_CONTACT_ADDRESS='hasContactAddress';var FIELD_ID='id';var FIELD_INFO_EMAIL_ADDRESS='infoEmailAddress';var FIELD_INCOME_LEVEL='incomeLevelId';var FIELD_INDUSTRY='industryId';var FIELD_IS_ACTIVE='isActive';var FIELD_IS_DAILY_REPORT='isDailyReport';var FIELD_IS_HTML_EMAIL_FORMAT='isHtmlEmailFormat';var FIELD_IS_WEEKLY_REPORT='isWeeklyReport';var FIELD_ISSUE_NAME='issueName';var FIELD_ISSUER_ALERTS_EMAIL_ADDRESS='issuerAlertsEmailAddress';var FIELD_ISSUER_SERVICES_EMAIL_ADDRESS='issuerServicesEmailAddress';var FIELD_JOB_TITLE='jobTitle';var FIELD_JSP_NAME='jspName';var FIELD_LAST_NAME='lastName';var FIELD_LIMIT='limit';var FIELD_LOCATION='location';var FIELD_LOSS='loss';var FIELD_MARITAL_STATUS='maritalStatusId';var FIELD_MIDDLE_NAME='middleName';var FIELD_NAME='name';var FIELD_NAME_SUFFIX='nameSuffix';var FIELD_NAME_TITLE='nameTitle';var FIELD_NEXT_TOKEN_CODE='nextTokenCode';var FIELD_NUMBER_OF_SECURITIES='numberOfSecurities';var FIELD_OCCUPATION='occupationId';var FIELD_OFFICER='officerId';var FIELD_OTCIQ_BASE_URL='otciqBaseUrl';var FIELD_OTCQX_BASE_URL='otcqxBaseUrl';var FIELD_PAGE='page';var FIELD_PASSWORD='password';var FIELD_PASSWORD_CONFIRM='passwordConfirm';var FIELD_PHONE_NUMBER='phone';var FIELD_PHONE_1='phone1';var FIELD_PHONE_2='phone2';var FIELD_PINK_COMMON_BASE_URL='pinkCommonBaseUrl';var FIELD_PINK_FORUMS_BASE_URL='pinkForumsBaseUrl';var FIELD_PINK_SHEETS_BASE_URL='pinkSheetsBaseUrl';var FIELD_POSITION_DATE='positionDate';var FIELD_POSTAL_CODE='postalCode';var FIELD_PRICE='price';var FIELD_PRICE_NET='priceNet';var FIELD_PRICE_PCT='pricePct';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_ROLE_ID='roleId';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_SECURITY_SERVICE='secServiceId';var FIELD_SEND_NOTIFICATION='sendNotification';var FIELD_SENTIMENT='sentimentId';var FIELD_SERVICE_PROVIDER_CONTACT='serviceProviderContact';var FIELD_SERVICE_TYPE='serviceType';var FIELD_SHOW_AD_FOOTER_2='showAdFooter2';var FIELD_SIZE_OF_PORTFOLIO='sizeOfPortfolio';var FIELD_SOFTRAX_ID='softraxId';var FIELD_SOFTRAX_LOCATION_ID='softraxLocationId';var FIELD_SORT_DIR='sortDir';var FIELD_SORT_ON='sortOn';var FIELD_START_DATE='startDate';var FIELD_STATE='stateId';var FIELD_STATUS='statusId';var FIELD_SUMMARY='summary';var FIELD_SUPPORT_EMAIL_ADDRESS='supportEmailAddress';var FIELD_SYMBOL='symbol';var FIELD_TIER='tier';var FIELD_TITLE='title';var FIELD_TOKEN='token';var FIELD_TOKEN_CODE='tokenCode';var FIELD_TOKEN_SERIAL_NO='tokenId';var FIELD_TRADE='trade';var FIELD_TRADING_FREQUENCY='tradingFreqId';var FIELD_TRADING_LEVEL='tradingLevelId';var FIELD_TRADING_SERVICES_EMAIL_ADDRESS='tradingServicesEmailAddress';var FIELD_TRUE='1';var FIELD_URI='uri';var FIELD_USER='userId';var FIELD_USER_ROLE_COMPANY='userRoleCompanyId';var FIELD_USER_ROLE_COMPANY_COUNT='userRoleCompanyCount';var FIELD_USER_NAME='userName';var FIELD_VOLUME='volume';var FIELD_ZIP='zip';var ICON_ASCENDING_BLACK='/icons/ascending_black.gif';var ICON_DIR='/icons';var ICON_CALENDAR='/icons/cal.gif';var ICON_COLLAPSE='/icons/collapse.gif';var ICON_CHECK_MARK='/icons/checkmark.gif';var ICON_CHECK_MARK_OFF='/icons/checkmark_off.gif';var ICON_DESCENDING_BLACK='/icons/descending_black.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_PS_HOMEPAGE='/icons/ps_homepage.png';var ICON_QX_HOMEPAGE='/icons/qx_homepage.png';var ICON_USER_ACTIVE='/icons/user_active.png';var ICON_USER_INACTIVE='/icons/user_inactive.png';var MAX_LEN_ACCOUNT_NO=20;var MAX_LEN_ADDRESS=100;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=2048;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_HIST_BASE_URL=64;var MAX_LEN_JOB_TITLE=50;var MAX_LEN_LAST_NAME=32;var MAX_LEN_LOGIN_NAME=100;var SIZE_LOGIN_NAME=50;var SIZE_DATES=10;var MAX_LEN_MIDDLE_NAME=25;var MAX_LEN_MMID=10;var MAX_LEN_NUMBER_OF_SECURITIES=5;var MAX_LEN_OTCIQ_BASE_URL=64;var MAX_LEN_OTCQUOTE_BASE_URL=64;var MAX_LEN_OTCQX_BASE_URL=64;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_POSTAL_CODE=16;var MAX_LEN_PRECISION_IR_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_SOFTRAX_ID=32;var MAX_LEN_SOFTRAX_LOCATION_ID=32;var MAX_LEN_SUPPORT_EMAIL_ADDRESS=100;var MAX_LEN_SYMBOL=6;var MAX_LEN_SYNDICATE_BASE_URL=64;var MAX_LEN_SYNDICATE_TITLE=100;var MAX_LEN_TOKEN_CODE=6;var MAX_LEN_TOKEN_SERIAL_NO=15;var PAGE_SIZE_WORKLIST=20;var PAGE_SIZE_SUBLISTING=10;var PAGE_SIZE_LARGE=50;var TIER_INTL_PREMIER_QX='International PremierQX';var TIER_INTL_PRIME_QX='International PrimeQX';var TIER_PRIME_QX='PrimeQX';var TIER_PREMIER_QX='PremierQX';var TIER_NO_TIER='No Tier';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_COMPANY='Pink OTC Markets';var TITLE_CUSTOMER_ADD=CAPTION_ADD+' '+CAPTION_CUSTOMER;var TITLE_CUSTOMER_EDIT=CAPTION_EDIT+' '+CAPTION_CUSTOMER;var TITLE_CUSTOMER_SEARCH=CAPTION_SEARCH+' '+CAPTION_CUSTOMER;var TITLE_DISCLOSURE_CATEGORY='Disclosure '+CAPTION_CATEGORY;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_LOGIN='Login';var TITLE_NOT_AUTHORIZED='Not Authorized';var TITLE_OTC_MARKET_TIER='OTC Market Tier';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_SHORT_POSITION='Short Position';var TITLE_SHORT_POSITIONS='Short Positions';var TITLE_THRESHOLD_SECURITY='Threshold '+CAPTION_SECURITY;var TITLE_THRESHOLD_SECURITIES='Threshold '+CAPTION_SECURITIES;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 AGREEMENT_NASDAQ='NAS';var AGREEMENT_QX_INTERNATIONAL='QXI';var FORMAT_CREDIT_CARD_EXP='mm/yyyy';var ROLE_ID_FINANCIAL_REPORT='OSIF';var ROLE_ID_PRESS_RELEASE='OSIP';var ROLE_ID_REAL_TIME_LEVEL_2='RTL2';var ROLE_ID_OTC_MARKET_REPORT='OMR';var ROLE_ID_EXTERNAL_LEVEL_2_QUOTE='EL2Q';var COLOR_POSITIVE='green';var COLOR_NEGATIVE='red';var COUNTRY_USA='USA';var COUNTRY_NAME_USA='United States';var COUNTRY_DEFAULT=COUNTRY_USA;var DISCLAIMER_COMPANY_INFO='The information provided here has been obtained from publicly available sources as well as directly from issuers in some cases.';var ISSUE_TYPE_ID_BOND='b';var MESSAGE_TOKEN_SUSPECT='Your account is in a suspect state due to prior login failures. Please wait until your token code changes. '+'Then key the new token into the field, Token Code. Wait another minute and key the next token code into the new field, Next Token Code. '+'Finally, submit.';var TIER_NO_INFO=22;var VENUE_EXCHANGES_CODE='EXCH';var VENUE_EXCHANGES_NAME='All Exchanges';var VENUE_ALL_PINK_CODE='PINK';var VENUE_ALL_PINK_NAME='Pink Quote & PQ/BB';var VENUE_PINK_SHEETS_CODE='PS';var VENUE_YELLOW_SHEETS_CODE='YS';var VENUE_PINK_QUOTE_NAME='Pink Quote';var VENUE_OTCBB_NAME='OTCBB';var TRADE_CATEGORY_ADJUSTED='A';var TRADE_CATEGORY_UNADJUSTED='U';var FILE_EXTENSION_CSV='csv';var FILE_EXTENSION_EXCEL='xls';var SERVICE_TYPE_PAID='P';var MMID_ANONYMOUS='ANON';var QUOTE_SOURCE_PINK='pink';var QUOTE_SOURCE_OTCBB='bb';

function ContentWindow(options)
{this.options=(undefined==options)?this.DEFAULT_OPTIONS:options;}
ContentWindow.prototype.DEFAULT_OPTION='height=500,width=700,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes';ContentWindow.prototype.run=function(criteria,body)
{var name='contentsWindow'+criteria.contents.length;var opened=window.open("",name,this.options);opened.document.open();opened.document.write(criteria.contents);opened.document.close();opened.document.title=criteria.title;var links=window.document.getElementsByTagName('link');var openedBody=opened.document.getElementsByTagName('head');if(0==openedBody.length)
openedBody=opened.document.body;else
openedBody=openedBody[0];for(var i=0;i<links.length;i++)
{var link=links[i];var newLink=opened.document.createElement(link.tagName);newLink.rel=link.rel;newLink.href=link.href;newLink.type=link.type;openedBody.insertBefore(newLink,openedBody.firstChild);}
return opened;}
ContentWindow.prototype.runInline=function(criteria,body)
{criteria.body.innerHTML='';criteria.body.appendChild(criteria.contents);}
function ContentWindowInfo(title,contents,body)
{this.title=title;this.contents=contents;this.body=body;}
ContentWindowInfo.prototype.getName=function(){return this.title;}

var Cookies=new Object();Cookies.getValue=function(name)
{var value=document.cookie.match('(^|;) ?'+name+'=([^;]*)(;|$)');if(value)
return unescape(value[2]);return undefined;}
Cookies.setValue=function(name,value,expires,path)
{var item=name+"="+escape(value);if(expires)
item+="; expires="+expires.toGMTString();if(path)
item+="; path="+escape(path);document.cookie=item;}
Cookies.deleteValue=function(name,path)
{Cookies.setValue(name,'',new Date(0),path);}
if(undefined==window.btoa)
{window.btoa=function(input)
{var output="";for(var i=0;i<input.length;i++)
output+=String.fromCharCode(input.charCodeAt(i)+1);return output;};window.atob=function(input)
{var output="";for(var i=0;i<input.length;i++)
output+=String.fromCharCode(input.charCodeAt(i)-1);return output;};}

function DecorateRSSLink(commonCaller)
{this.init=false;this.commonCaller=commonCaller;}
DecorateRSSLink.prototype.run=function(callback,body)
{if(!this.init)
this.commonCaller.getBaseUrls(new AjaxDataHandler(this,body));else
this.decorate(body);}
DecorateRSSLink.prototype.decorate=function(body){var i,span,info;var elems=!body?document.getElementsByTagName('span'):body.getElementsByTagName('span');for(i=0;i<elems.length;i++)
{span=elems[i];if(info=this.INFO[span.className])
{if(span.isDecorated)continue;span.innerHTML='';this.createLink(span,info);span.isDecorated=true;}}}
DecorateRSSLink.prototype.createLink=function(span,info)
{span.appendChild(img=document.createElement('img'));img.src=this.ICON;img.title=info.title;var a=document.createElement('a');a.href=info.url;a.target='_new';a.appendChild(document.createTextNode(this.TEXT));span.appendChild(a);}
DecorateRSSLink.prototype.doValue=function(value)
{this.init=true;this.INFO.rssNR.url=value.syndicateBaseUrl+'/rss.xml';this.INFO.rssPR.url=value.syndicateBaseUrl+'/rssPinkNews.xml';this.INFO.rssPC.url=value.syndicateBaseUrl+'/rssPendingChanges.xml';this.decorate(value.criteria);}
DecorateRSSLink.prototype.ICON='/content/doc/ps/logos/rss/small.gif';DecorateRSSLink.prototype.INFO={rssNR:{title:'The Pink OTC Markets RSS feed only includes filings published via the OTC Disclosure and News Service.'},rssPR:{title:'The Pink OTC Markets RSS feed only includes news stories published via the OTC Disclosure and News Service.'},rssPC:{title:'The Pink OTC Markets RSS feed only includes pending corporate actions to be published via the OTC Disclosure and News Service.'}};DecorateRSSLink.prototype.TEXT='Subscribe';

function DecorateSymbols(caller,doc,iconPath,quoteUrl)
{this.caller=caller;this.doc=(undefined==doc)?window.document:doc;this.cache=new Array();this.cache['']={};this.iconPath=(undefined==iconPath)?'/content/doc/ps/tier/icon/':iconPath;this.iconCaveatEmptor=new Image();this.iconCaveatEmptor.src=this.iconPath+'caveat_emptor.gif';this.quoteUrl=quoteUrl;}
DecorateSymbols.prototype.URL_GUIDE='http://www.otcmarkets.com/otcguide/investors_market_tiers.jsp';DecorateSymbols.prototype.createImage=function(tierId)
{var value=new Image();value.src=this.iconPath+tierId+'.gif';return value;}
DecorateSymbols.prototype.doAll=function(){this.run(undefined,this.doc.body);}
DecorateSymbols.prototype.doSection=function(body){this.run(undefined,body);}
DecorateSymbols.prototype.run=function(criteria,body)
{var elements=body.getElementsByTagName('a');for(var i=0;i<elements.length;i++)
{var elem=elements[i];if(elem.myRecord&&!elem.psDecorated)
this.getSecurityInfo(elem.myRecord,elem);}}
DecorateSymbols.prototype.generate=function(value,elem)
{if(elem.psDecorated)
return;elem.psDecorated=true;elem.psSecurityInfo=value;if(this.quoteUrl)
elem.href=this.quoteUrl+value.symbol;var icon=undefined;var title=undefined;if(undefined!=value)
{if(value.isCaveatEmptor)
{icon=this.iconCaveatEmptor;title=CAPTION_CAVEAT_EMPTOR;}
else if(value.tierId)
{icon=this.createImage(value.tierId);if(undefined!=icon)
title=value.tierName;}}
var cell=elem.parentNode;var cellIndex=cell.cellIndex;var row=cell.parentNode;var td=row.insertCell(cellIndex);td.className=cell.className;td.style.width='1%';if(undefined!=icon)
{var img=this.doc.createElement('img');img.border=0;img.src=icon.src;img.title=title;img.alt=title;var a=this.doc.createElement('a');a.href=this.URL_GUIDE;a.appendChild(img);td.appendChild(a);}
this.fixTable(row.parentNode,cellIndex);}
DecorateSymbols.prototype.fixTable=function(table,cellIndex)
{if(table.psDecorated)
return;table.psDecorated=true;var rows=table.rows;for(var i=0;i<rows.length;i++)
{var row=rows[i];if((row.className=='listingHeader')||row.fixMissingSymbolAnchor)
{var cell=row.insertCell(cellIndex);cell.className=row.className;cell.style.width='1%';}
else if(row.cells[0].colSpan>1)
row.cells[0].colSpan++;}}
DecorateSymbols.prototype.cacheValue=function(symbol,value){this.cache[symbol]=value;}
DecorateSymbols.prototype.getSecurityInfo=function(record,elem)
{var bySymbol=(undefined!=record.symbol);var symbol=(bySymbol)?RTrim(record.symbol):record.securityId;if(undefined==symbol)
return;var value=this.cache[symbol];if(undefined!=value)
this.generate(value,elem);else
{var callback=new DecorateSymbolsCallback(elem,this,symbol);if(bySymbol)
this.caller.getSecurityInfo(symbol,callback);else
this.caller.getSecurityInfoById(symbol,callback);}}
function DecorateSymbolsCallback(elem,callback,symbol)
{this.elem=elem;this.callback=callback;this.symbol=symbol;}
DecorateSymbolsCallback.prototype.handleRequestData=function(value)
{this.callback.cacheValue(this.symbol,value);this.callback.generate(value,this.elem);}
DecorateSymbolsCallback.prototype.handleRequestError=function(error)
{if(window.console)console.log(error);}

function DecorateMarketMaker(caller){this.caller=caller;}
DecorateMarketMaker.prototype.VIEW_MM_CSS='viewMM';DecorateMarketMaker.prototype.run=function(callback,table){var row,cell,a,rows=table.rows;row=rows[0];cell=row.insertCell(row.cells.length);cell.className=row.className;cell.appendChild(document.createTextNode('Market Makers'));for(var rowNum=1;rowNum<rows.length;rowNum++){row=rows[rowNum];cell=row.insertCell(row.cells.length);cell.className=row.className+' '+this.VIEW_MM_CSS;var record=row.myRecord;if(CAPTION_GREY_MARKET==record.venueName)
continue;var symbol=record.symbol;a=document.createElement('a');a.innerHTML='View Market Makers';a.mySymbol=symbol;a.myCallback=callback;a.href='javascript:void(null);';a.onclick=function(ev){this.myCallback.openMarketMakers(this.mySymbol);return false;}
cell.appendChild(a);}}

function DhtmlHistory()
{this.history=new Array();this.isStarted=false;}
DhtmlHistory.prototype.BLANK_PAGE='/common/blank.htm?';DhtmlHistory.prototype.start=function()
{if(window.isSafari||this.isStarted)
return;var me=this;var e=this.iframe=document.createElement('iframe');e.src=this.BLANK_PAGE;e.style.display='none';this.currentId=undefined;if(e.addEventListener)
e.addEventListener('load',function(ev){me.handleNewPage(this.contentWindow.location);},false);else
e.attachEvent('onload',function(){me.handleNewPage(event.srcElement.contentWindow.location);});document.body.insertBefore(this.iframe,document.body.firstChild);this.isStarted=true;}
DhtmlHistory.prototype.stop=function()
{if(!this.isStarted)
return;if(this.iframe)
{document.body.removeChild(this.iframe);this.iframe=undefined;}
this.isStarted=false;}
DhtmlHistory.prototype.clear=function(){this.history=new Array();}
DhtmlHistory.prototype.add=function(id,callback,method,args)
{if(!this.isStarted)
return;this.currentId=id;this.iframe.src=this.BLANK_PAGE+id;this.history[id]=new DhtmlHistoryItem(id,callback,method,args);}
DhtmlHistory.prototype.handleNewPage=function(newLocation)
{this.handleHashChange(newLocation.search);}
DhtmlHistory.prototype.handleHashChange=function(value)
{var hash=this.cleanHash(value);if((undefined==this.currentId)||(this.currentId==hash))
return;if(''==hash)
{window.history.back();return;}
var item=this.history[hash];if(undefined==item)
return;this.currentId=hash;item.callback[item.method](item.args);}
DhtmlHistory.prototype.cleanHash=function(value)
{if((undefined==value)||(0==value.length)||(('#'!=value.charAt(0))&&('?'!=value.charAt(0))))
return value;if(1==value.length)
return'';return value.substr(1);}
function DhtmlHistoryItem(id,callback,method,args)
{this.id=id;this.callback=callback;this.method=method;this.args=args;}

var Elements={}
Elements.addBreak=function(o,count)
{var a=document.createElement('br');o.appendChild(a);if(count&&(1<count))
for(var i=1;i<count;i++)
o.appendChild(document.createElement('br'));return a;}
Elements.addHR=function(o,className)
{this.addElem(o,'hr',className);}
Elements.addSpace=function(o)
{o.appendChild(document.createTextNode(' '));}
Elements.addSpan=function(o,className,text)
{return this.addElem(o,'span',className,text);}
Elements.addText=function(o,v)
{o.appendChild(document.createTextNode(v));}
Elements.addDiv=function(o,className,text)
{return this.addElem(o,'div',className,text);}
Elements.addElem=function(o,elemName,className,text)
{var e=document.createElement(elemName);if(className)
e.className=className;if(text)
{var t=typeof(text);if(('string'==t)||('number'==t))
e.innerHTML=Formatter.toDisplayable(text);else
e.appendChild(text);}
o.appendChild(e);return e;}
Elements.genAnchor=function(elem,onclick,css)
{var a=document.createElement('a');a.href='javascript:void(null)';a.onclick=onclick;if(elem)
{var t=typeof(elem);if(('string'==t)||('number'==t))
a.innerHTML=elem;else
a.appendChild(elem);}
if(css)
a.className=css;return a;}
Elements.genImage=function(src,title,css)
{var o=document.createElement('img');o.src=src;if(title)
o.title=title;if(css)
o.className=css;return o;}
Elements.genLink=function(elem,href,target,css)
{var a=document.createElement('a');a.href=href;if(elem)
{var t=typeof(elem);if(('string'==t)||('number'==t))
a.innerHTML=elem;else
a.appendChild(elem);}
if(target)
a.target=target;if(css)
a.className=css;return a;}
Elements.genWidget=function()
{var o=document.createElement('div');o.className='widgetPackage';return o;}
Elements.addEventListener=function(target,type,action)
{if(target.addEventListener)
target.addEventListener(type,action,false);else
target.attachEvent('on'+type,action);}

var FORMAT_DATE_INPUT='MM/DD/YYYY';function Formatter(){}
Formatter.SHORT_MONTHS=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sept','Oct','Nov','Dec'];Formatter.LONG_DAYS=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];Formatter.SHORT_DAYS=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];Formatter.CAPTION_BYTES='Bytes';Formatter.ABBR_KILOBYTE='KB';Formatter.ABBR_MEGABYTE='MB';Formatter.ABBR_GIGABYTE='GB';Formatter.KILOBYTE=1024;Formatter.MEGABYTE=1024*1024;Formatter.GIGABYTE=1024*1024*1024;Formatter.REG_CARRIAGE_RETURN=/\n\r/g;Formatter.REG_NEW_LINE=/\n/g;Formatter.toDisplayable=function(value)
{if((undefined==value)||(0==value.length))
return'';else if(typeof(value)=='boolean')
return(value)?'Yes':'No';else if(value.getTime)
return this.toDate(value);return value;}
Formatter.toLongText=function(value)
{if(!value)
return'';return value.replace(REG_CARRIAGE_RETURN,'<br />').replace(REG_NEW_LINE,'<br />');}
Formatter.truncate=function(value,maxLen)
{if(!value||(maxLen>=value.length))
return value;return value.substr(0,maxLen);}
Formatter.toMMID=function(value,advertised)
{if(!value)
return MMID_ANONYMOUS;if(!advertised)
return value;return'<b>'+value+'</b>';}
Formatter.toList=function(v)
{if(!v||(0==v.length))
return'';var a=v[0];for(var i=1;i<v.length;i++)
a+=', '+v[i];return a;}
Formatter.fromList=function(v)
{if(undefined==v)
return undefined;v=trim(v);if(0==v.length)
return undefined;v=v.split(',');var m,a=[];for(var i=0;i<v.length;i++)
{m=trim(v[i]);if(0<m.length)
a[a.length]=m;}
if(0==a.length)
return undefined;return a;}
Formatter.toWebsite=function(url,caption)
{var a=this.toWebsiteX(url,caption);if(!a)
a=document.createElement('a');return a;}
Formatter.toEmail=function(email)
{var a=this.toEmailX(email);if(!a)
a=document.createElement('a');return a;}
Formatter.toWebsiteX=function(url,caption)
{if(!url)
return;var a=document.createElement('a');url=(url.toLowerCase().substr(0,4)!='http')?'http://'+url:url;a.href=url;a.target='_blank';Elements.addText(a,(undefined!=caption?caption:url));return a;}
Formatter.toEmailX=function(email)
{if(!email)
return;var a=document.createElement('a');a.href='mailto:'+email;a.target='_blank';Elements.addText(a,email);return a;}
Formatter.appendTextNode=function(output,value)
{output.appendChild(document.createTextNode(value));output.appendChild(document.createElement('br'));}
Formatter.toLocation=function(v)
{var o=v.city;var f=function(n)
{if(o)
o+=', '+n;else
o=n;}
if(v.stateId)
f(v.stateId);if(v.country&&(COUNTRY_DEFAULT!=v.countryId))
f(v.country);return o;}
Formatter.toAddress=function(value)
{var add1=value.address1;var add2=value.address2;var add3=value.address3;var city=value.city;var state=value.stateId;var zip=value.zip;var country=value.country;var countryId=value.countryId;if(!exists(add1)&&!exists(add2)&&!exists(add3)&&!exists(city)&&!exists(state)&&!exists(zip)&&!exists(country))
return undefined;var output=document.createElement('span');output.className='address';if(exists(add1))
Formatter.appendTextNode(output,add1);if(exists(add2))
Formatter.appendTextNode(output,add2);if(exists(add3))
Formatter.appendTextNode(output,add3);if(exists(city))
{output.appendChild(document.createTextNode(city));if(state!=undefined)
output.appendChild(document.createTextNode(', '));else if(zip!=undefined)
output.appendChild(document.createTextNode(' '));else
output.appendChild(document.createElement('br'));}
if(exists(state))
Formatter.appendTextNode(output,state+' '+toDisplayable(zip));else if(exists(zip))
Formatter.appendTextNode(output,zip);if(exists(country)&&(countryId!=COUNTRY_DEFAULT))
Formatter.appendTextNode(output,country);return output;}
Formatter.fromInputDate=function(whenString)
{var values=whenString.split('/');if(2>values.length)
throw'parseInputDate: "'+whenString+'" is not a valid date (MM/DD/YYYY).';var month=parseInt(values[0],10);var day=parseInt(values[1],10);if(isNaN(month)||(1>month)||(12<month))
throw'parseInputDate: "'+whenString+'" - month part is not valid (MM/DD/YYYY).';if(isNaN(day)||(1>day)||(31<day))
throw'parseInputDate: "'+whenString+'" - day part is not valid (MM/DD/YYYY).';month--;if(3>values.length)
{return new Date((new Date()).getFullYear(),month,day);}
else
{var year=parseInt(values[2]);if(isNaN(year)||(0>year))
throw'parseInputDate: "'+whenString+'" - year part is not valid (MM/DD/YYYY).';if(51>year)
year+=2000;else if(100>year)
year+=1900;return new Date(year,month,day);}}
Formatter.fromCCDate=function(whenString)
{var values=whenString.split('/');if(2>values.length)
throw'parseInputDate: "'+whenString+'" is not a valid date (MM/YYYY).';var month=parseInt(values[0],10);var year=parseInt(values[1],10);if(isNaN(month)||(1>month)||(12<month))
throw'parseInputDate: "'+whenString+'" - month part is not valid (MM/YYYY).';if(isNaN(year)||(0>year))
throw'parseInputDate: "'+whenString+'" - year part is not valid (MM/YYYY).';if(51>year)
year+=2000;else if(100>year)
year+=1900;return new Date(year,month,-1);}
Formatter.fromInputTime=function(whenString)
{var values=whenString.split(':');var hour,minute,second;hour=minute=second=0;hour=parseInt(values[0],10);if(isNaN(hour)||(0>hour)||(23<hour))
throw'Time: "'+whenString+'" - hour part is not a valid time (HH:MM:SS).';if(values.length>1){minute=parseInt(values[1],10);if(isNaN(minute)||(0>minute)||(59<minute))
throw'Time: "'+whenString+'" - minute part is not a valid time (HH:MM:SS).';if(values.length>2){second=parseInt(values[2],10);if(isNaN(second)||(0>second)||(59<second))
throw'Time: "'+whenString+'" - second part is not a valid time (HH:MM:SS).';}}
return new Date(Date.UTC(1970,0,1,hour,minute,second,0));}
Formatter.toInputTime=function(value)
{return this.prePad(value.getUTCHours(),2)+':'+this.prePad(value.getUTCMinutes(),2)+':'+this.prePad(value.getUTCSeconds(),2);}
Formatter.toInputDate=function(date)
{return(date.getMonth()+1)+'/'+date.getDate()+'/'+date.getFullYear();}
Formatter.toUTCInputDate=function(date)
{return(date.getUTCMonth()+1)+'/'+date.getUTCDate()+'/'+date.getUTCFullYear();}
Formatter.toCCDate=function(date)
{return(date.getUTCMonth()+1)+'/'+date.getUTCFullYear();}
Formatter.prePad=function(num,digits)
{var value=num+'';for(i=value.length;i<digits;i++)
value='0'+value;return value;}
Formatter.toDate=function(date)
{if(undefined==date)
return undefined;return this.SHORT_MONTHS[date.getUTCMonth()]+' '+date.getUTCDate()+', '+date.getUTCFullYear();}
Formatter.toMonthYear=function(date)
{if(undefined==date)
return undefined;return this.SHORT_MONTHS[date.getUTCMonth()]+' '+(date.getFullYear());}
Formatter.toSimpleDate=function(date){return this.toDate(date);}
Formatter.toFullDate=function(date)
{if(undefined==date)
return undefined;return this.LONG_DAYS[date.getUTCDay()]+', '+this.SHORT_MONTHS[date.getUTCMonth()]+' '+date.getUTCDate()+', '+date.getUTCFullYear();}
Formatter.toDateTime=function(date)
{if(undefined==date)
return undefined;return this.SHORT_MONTHS[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+' '+this.prePad(date.getHours(),2)+':'+this.prePad(date.getMinutes(),2)+':'+this.prePad(date.getSeconds(),2);}
Formatter.toDateTime2=function(date)
{if(undefined==date)
return undefined;var hours=date.getHours();var hours_=(hours==0)?12:(hours>12)?hours-12:hours;return this.SHORT_MONTHS[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+' '+this.prePad(hours_,2)+':'+this.prePad(date.getMinutes(),2)+(hours<12?' AM':' PM');}
Formatter.toDateTime3=function(date)
{if(undefined==date)
return undefined;var hours=date.getHours();var hours_=(hours==0)?12:(hours>12)?hours-12:hours;return this.SHORT_MONTHS[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+' '+this.prePad(hours_,2)+':'+this.prePad(date.getMinutes(),2)+':'+this.prePad(date.getSeconds(),2)+'.'+date.getMilliseconds()+(hours<12?' AM':' PM');}
Formatter.toTimestamp=function(date)
{if(undefined==date)
return undefined;var hours=date.getHours();var hours_=(hours==0)?12:(hours>12)?hours-12:hours;return this.SHORT_DAYS[date.getDay()]+', '+this.SHORT_MONTHS[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+' '+this.prePad(hours_,2)+':'+this.prePad(date.getMinutes(),2)+':'+this.prePad(date.getSeconds(),2)+' '+(hours<12?'AM':'PM');}
Formatter.toTime=function(date)
{if(undefined==date)
return undefined;var hours=date.getHours();var hours_=(hours==0)?12:(hours>12)?hours-12:hours;return hours_+':'+this.prePad(date.getMinutes(),2)+' '+(hours<12?'AM':'PM');}
Formatter.toTime2=function(date)
{if(undefined==date)
return undefined;var hours=date.getHours();var hours_=(hours==0)?12:(hours>12)?hours-12:hours;return hours_+':'+this.prePad(date.getMinutes(),2)+':'+this.prePad(date.getSeconds(),2)+'.'+date.getMilliseconds()+' '+(hours<12?'AM':'PM');}
Formatter.toTime3=function(date)
{if(undefined==date)
return undefined;var hours=date.getHours();var hours_=(hours==0)?12:(hours>12)?hours-12:hours;return hours_+':'+this.prePad(date.getMinutes(),2)+':'+this.prePad(date.getSeconds(),2)+' '+(hours<12?'AM':'PM');}
Formatter.isToday=function(date)
{var today=this.getToday();return((today.getFullYear()==date.getFullYear())&&(today.getMonth()==date.getMonth())&&(today.getDate()==date.getDate()));}
Formatter.toDateOrTime=function(date)
{if(this.isToday(date))
return this.toTime3(date);return this.toDate(date);}
Formatter.toQuoteTime=function(date)
{if((undefined==date)||(18000000>=date.getTime()))
return CAPTION_NA;if((1980>date.getFullYear())||this.isToday(date))
return this.toTime(date);return this.toDate(date);}
Formatter.toDuration=function(date)
{if(undefined==date)
return undefined;return date.getUTCHours()+':'+this.prePad(date.getUTCMinutes(),2)+':'+this.prePad(date.getUTCSeconds(),2)+'.'+date.getUTCMilliseconds();}
Formatter.toNumber=function(value,places)
{if(undefined==value)
return undefined;return this.toNumber_(value,places);}
Formatter.toNumber_=function(value,places,maxPlaces)
{value+='';x=value.split('.');x1=x[0];x2=x.length>1?x[1]:'';if(places)
{if(maxPlaces)
{var l=x2.length;if(l>maxPlaces)
{places=maxPlaces;x2=x2.substr(0,places);}
else if(l>places)
places=l;}
while(x2.length<places)
x2+='0';}
if(0<x2.length)
x2='.'+x2;var rgx=/(\d+)(\d{3})/;while(rgx.test(x1))
x1=x1.replace(rgx,'$1'+','+'$2');return x1+x2;}
Formatter.toRoundedNumber=function(value,places)
{if(undefined==value)
return undefined;return this.toRoundedNumber_(value,places);}
Formatter.toRoundedNumber_=function(value,places)
{var div=Math.pow(10,places);return this.toNumber_(Math.round(value*div)/div,places)}
Formatter.toPercent=function(value)
{if(undefined==value)
return undefined;return this.toRoundedNumber_(value,2);}
Formatter.toPercentX=function(value)
{if(undefined==value)
return undefined;return this.toRoundedNumber_(value*100,2);}
Formatter.toPrice=function(value)
{if(undefined==value)
return undefined;return this.toNumber_(value,2,5);}
Formatter.toVolume=function(value)
{if(undefined==value)
return undefined;return this.toNumber_(Math.round(value));}
Formatter.toQuote=function(price,size)
{if(!price||!size)
return'';return this.toPrice(price)+' x '+this.toVolume(size);}
Formatter.toFileSize=function(size)
{var _size=parseFloat(size),unit;if(this.KILOBYTE>size)
unit=this.CAPTION_BYTES;else if(this.MEGABYTE>size)
{_size/=this.KILOBYTE;unit=this.ABBR_KILOBYTE;}
else if(this.GIGABYTE>size)
{_size/=this.MEGABYTE;unit=this.ABBR_MEGABYTE;}
else
{_size/=this.GIGABYTE;unit=this.ABBR_GIGABYTE;}
return this.toRoundedNumber(_size,1)+' '+unit;}
Formatter.getToday=function()
{if(this.today)
return this.today;var o=this.today=new Date();o.setHours(0,0,0,0);return o;}

function InputField(doc)
{this.doc=(undefined==doc)?window.document:doc;}
InputField.doc=window.document;InputField.prototype.generate=InputField.generate=function(name,type,isChecked)
{if(this.doc.all)
{var checked=isChecked?' checked':'';return this.doc.createElement('<input name="'+name+'" type="'+type+'"'+checked+' />');}
var output=this.doc.createElement('input');if(window.isSafari)output.id=name;output.name=name;output.type=type;output.checked=isChecked;return output;}
InputField.prototype.genButton=InputField.genButton=function(name,caption,onclick)
{var output=this.generate(name,'button');output.value=caption;if(undefined!=onclick)
output.onclick=onclick;return output;}
InputField.prototype.genButtonX=InputField.genButtonX=function(name,caption,onclick,cssClass)
{var output=this.genButton(name,'',onclick);output.className=cssClass;return output;}
InputField.prototype.genCheckBox=InputField.genCheckBox=function(name,value,isChecked)
{var output=this.generate(name,'checkbox',isChecked);output.value=value;return output;}
InputField.prototype.genFileInput=InputField.genFileInput=function(name,maxLength,size)
{var output=this.generate(name,'file');if(undefined!=maxLength)
{output.maxLength=maxLength;output.size=size;}
return output;}
InputField.prototype.genHidden=InputField.genHidden=function(name,value)
{var output=this.generate(name,'hidden');if(undefined!=value)
output.value=value;return output;}
InputField.prototype.genImage=InputField.genImage=function(name,src,onclick){var output=this.generate(name,'image');output.src=src;if(undefined!=onclick)
output.onclick=onclick;return output;}
InputField.prototype.genMultiPartForm=InputField.genMultiPartForm=function(action,target)
{var output;if(document.all)
output=document.createElement('<form method="post" enctype="multipart/form-data" />');else
{output=document.createElement('form');output.method='post';output.enctype='multipart/form-data';}
output.action=action;if(undefined!=target)
output.target=target;return output;}
InputField.prototype.genPassword=InputField.genPassword=function(name,maxLength,size)
{var output=this.generate(name,'password');output.maxLength=maxLength;output.size=size;return output;}
InputField.prototype.genRadio=InputField.genRadio=function(name,value,isChecked)
{var output=this.generate(name,'radio',isChecked);output.value=value;return output;}
InputField.prototype.genReset=InputField.genReset=function(name,caption)
{var output=this.generate(name,'reset');output.value=caption;return output;}
InputField.prototype.genSubmit=InputField.genSubmit=function(name,caption)
{var output=this.generate(name,'submit');output.value=caption;return output;}
InputField.prototype.genSubmitX=InputField.genSubmitX=function(name,caption,cssClass)
{var output=this.genSubmit(name,'');output.className=cssClass;return output;}
InputField.prototype.genTextArea=InputField.genTextArea=function(name,cols,rows)
{var output=undefined;if(this.doc.all)
{output=this.doc.createElement('<textarea name="'+name+'" />');}
else
{var output=this.doc.createElement('textarea');if(window.isSafari)output.id=name;output.name=name;}
if(undefined!=cols)output.cols=cols;if(undefined!=rows)output.rows=rows;return output;}
InputField.prototype.genTextBox=InputField.genTextBox=function(name,maxLength,size)
{var o=this.generate(name,'text');if(maxLength)
o.maxLength=maxLength;if(size)
o.size=size;return o;}
InputField.getFirstSelectedValue=function(elem)
{if(!elem.length)
return(elem.checked?elem.value:undefined);var a;for(var i=0;i<elem.length;i++)
if((a=elem[i]).checked)
return a.value;return undefined;}

var KEY_NULL=0;var KEY_BACKSPACE=8;var KEY_TAB=9;var KEY_ENTER=13;var KEY_ESCAPE=27;var KEY_SPACE=32;var KEY_PAGE_UP=33;var KEY_PAGE_DOWN=34;var KEY_END=35;var KEY_HOME=36;var KEY_LEFT=37;var KEY_UP=38;var KEY_RIGHT=39;var KEY_DOWN=40;var KEY_PAREN_OPEN=40;var KEY_PAREN_CLOSED=41;var KEY_PLUS=43;var KEY_HYPHEN=45;var KEY_ZERO=48;var KEY_NINE=57;var KEY_COLON=58;var KeyCode=new Object();function getKeyCode(ev)
{if(window.event)
return window.event.keyCode;if(ev)
return ev.keyCode;return undefined;}
KeyCode.getDown=getKeyCode;KeyCode.getUp=getKeyCode;KeyCode.getPress=function(ev)
{if(window.event)
return window.event.keyCode;if(ev)
return ev.which;return undefined;}
KeyCode.isPhoneCode=function(keyCode)
{return((KEY_SPACE==keyCode)||(KEY_PAREN_OPEN==keyCode)||(KEY_PAREN_CLOSED==keyCode)||(KEY_HYPHEN==keyCode)||(KEY_PLUS==keyCode)||((KEY_ZERO<=keyCode)&&(KEY_NINE>=keyCode))||(KEY_ENTER==keyCode)||(KEY_BACKSPACE==keyCode)||(KEY_NULL==keyCode))}
KeyCode.isTimeCode=function(keyCode)
{return((KEY_COLON==keyCode)||((KEY_ZERO<=keyCode)&&(KEY_NINE>=keyCode))||(KEY_ENTER==keyCode)||(KEY_BACKSPACE==keyCode)||(KEY_NULL==keyCode));}

function LoginFormDOM(callback)
{this.callback=callback;this.hasUserToken=false;this.isNextTokenMode=false;}
LoginFormDOM.prototype.open=function(userName,offset)
{var canRegisterUser=(undefined!=this.callback.handleRegisterUser);var canForgotPassword=(undefined!=this.callback.handleForgotPassword);var value={userName:userName,canRegisterUser:canRegisterUser,canForgotPassword:canForgotPassword};if(undefined==this.body)
{this.body=document.createElement('div');this.body.style.padding='0px';this.body.style.position='absolute';this.body.style.zIndex=200;this.body.appendChild(this.generate(value,this));document.body.insertBefore(this.body,document.body.firstChild);if(this.callback.handlePostGenerate)
this.callback.handlePostGenerate(this);}
this.body.style.display='block';if(undefined==offset)
centerElement(this.body);else
positionBelowElement(this.body,offset);this.passwordField.value='';this.tokenCodeField.value='';this.nextTokenCodeField.value='';this.handleUserNameChange(userName);this.userNameField.focus();}
LoginFormDOM.prototype.close=function()
{if(undefined!=this.body)
this.body.style.display='none';}
LoginFormDOM.prototype.handleSubmit=function(ev)
{try
{var me=this.myCallback;var userName=this.userName.value;var password=this.password.value;if(!me.callback.doLogin(userName,password))
{window.alert('Invalid '+CAPTION_USER_NAME+' or '+CAPTION_PASSWORD+'.');this.userName.focus();return false;}
if(!me.hasUserToken)
{me.callback.handlePostLogin();me.close();return false;}
var nextTokenCode=me.isNextTokenMode?this.nextTokenCode.value:undefined;if(me.callback.doToken(userName,password,this.tokenCode.value,nextTokenCode))
{me.callback.handlePostLogin();me.close();if(me.isNextTokenMode)
{me.trNextTokenCode.style.display='none';me.isNextTokenMode=false;}}
else
{window.alert('Invalid '+CAPTION_TOKEN_CODE+'.');this.tokenCode.focus();}}
catch(error)
{if(error.isNextCodeRequired)
{window.alert(MESSAGE_TOKEN_SUSPECT);me.isNextTokenMode=true;me.trNextTokenCode.style.display=trDisplayValue;this.tokenCode.value='';this.tokenCode.focus();}
else
{if(error.message)error=error.message;window.alert(error);}}
return false;}
LoginFormDOM.prototype.handleCancel=function(ev){this.myCallback.close();}
LoginFormDOM.prototype.handleRegisterUser=function(ev){this.myCallback.callback.handleRegisterUser();}
LoginFormDOM.prototype.handleForgotPassword=function(ev)
{var me=this.myCallback;var value=me.userNameField.value;if(0==value.length)
{window.alert('Please provide your '+CAPTION_LOGIN_NAME+'.');me.userNameField.focus();return false;}
this.myCallback.callback.handleForgotPassword(value);}
LoginFormDOM.prototype.handleUserNameChange=function(userName)
{if(undefined==userName)
return;this.hasUserToken=((0<userName.length)&&(this.callback.hasUserToken(userName)));this.trTokenCode.style.display=this.hasUserToken?trDisplayValue:'none';}
LoginFormDOM.prototype.userName_onBlur=function(ev)
{var me=this.myCallback;if(me.callback.hasUserToken)
me.handleUserNameChange(this.value);}
LoginFormDOM.prototype.generate=function(value,callback)
{var inputField=new InputField();var output=document.createElement('form');output.className='widgetPackage';output.onsubmit=callback.handleSubmit;output.myCallback=callback;output.myRecord=value;var table=this.bodyContainer=document.createElement('table');table.cellSpacing=0;table.className='loginForm';var tr,td,input,rows=0;tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='detailCaption';td.appendChild(document.createTextNode(CAPTION_USER_NAME));td=tr.insertCell(1);td.className='detailValue';td.appendChild(this.userNameField=inputField.genTextBox('userName',MAX_LEN_LOGIN_NAME,20));this.userNameField.myCallback=callback;this.userNameField.onblur=callback.userName_onBlur;if(undefined!=value.userName)
this.userNameField.value=value.userName;tr=table.insertRow(rows++);td=tr.insertCell(0);td.className='detailCaption';td.appendChild(document.createTextNode(CAPTION_PASSWORD));td=tr.insertCell(1);td.className='detailValue';td.appendChild(this.passwordField=inputField.genPassword('password',MAX_LEN_PASSWORD,MAX_LEN_PASSWORD));this.trTokenCode=tr=table.insertRow(rows++);tr.style.display='none';td=tr.insertCell(0);td.className='detailCaption';td.appendChild(document.createTextNode(CAPTION_TOKEN_CODE));td=tr.insertCell(1);td.className='detailValue';td.appendChild(this.tokenCodeField=inputField.genTextBox('tokenCode',MAX_LEN_TOKEN_CODE,MAX_LEN_TOKEN_CODE));this.trNextTokenCode=tr=table.insertRow(rows++);tr.style.display='none';td=tr.insertCell(0);td.className='detailCaption';td.appendChild(document.createTextNode(CAPTION_NEXT_TOKEN_CODE));td=tr.insertCell(1);td.className='detailValue';td.appendChild(this.nextTokenCodeField=inputField.genTextBox('nextTokenCode',MAX_LEN_TOKEN_CODE,MAX_LEN_TOKEN_CODE));tr=table.insertRow(rows++)
td=tr.insertCell(0);td.colSpan=2;var button=inputField.genSubmit('ok','OK');td.appendChild(button);td.appendChild(document.createTextNode('  '));button=inputField.genButton('cancel',CAPTION_CANCEL,callback.handleCancel);button.myCallback=callback;button.myRecord=value;td.appendChild(button);if(value.canRegisterUser||value.canForgotPassword)
{tr=table.insertRow(rows++);td=tr.insertCell(0);td.colSpan=2;td.style.textAlign='center';if(value.canRegisterUser)
{button=document.createElement('a');button.myCallback=callback;button.myRecord=value;button.onclick=callback.handleRegisterUser;button.href='javascript:void(null)';button.appendChild(document.createTextNode(TITLE_REGISTER_USER));td.appendChild(button);td.appendChild(document.createTextNode('  '));}
if(value.canForgotPassword)
{button=document.createElement('a');button.myCallback=callback;button.myRecord=value;button.onclick=callback.handleForgotPassword;button.href='javascript:void(null)';button.appendChild(document.createTextNode(TITLE_FORGOT_PASSWORD));td.appendChild(button);}}
output.appendChild(table);return output;}

var ModalDialog=new Object();ModalDialog.CSS_SHIELD='modalShield';ModalDialog.CSS_POPUP='modalDialog';ModalDialog.shield=undefined;ModalDialog.popup=new Array();ModalDialog.ZINDEX=100;ModalDialog.open=function(caption,body)
{this.genShield();this.altSelectLists(true);this.run(new ModalDialogCriteria(caption),body);}
ModalDialog.close=function()
{if(undefined==this.shield)
return;document.body.removeChild(this.popup.pop());if(0==this.popup.length)
{this.shield.style.display='none';this.altSelectLists(false);}}
ModalDialog.run=function(criteria,body)
{var output=this.getPopup();var table=document.createElement('table');table.className=this.CSS_POPUP;table.cellSpacing=0;var tr=table.insertRow(0);tr.className='modalDialogHeader';var td=tr.insertCell(0);td.className='modalDialogCaption';td.appendChild(document.createTextNode(criteria.caption));td=tr.insertCell(1);td.className='modalDialogActions';var a=document.createElement('a');a.href='javascript:void(null);';a.myCallback=this;a.onclick=this.close_onClick;a.appendChild(document.createTextNode('X'));td.appendChild(a);tr=table.insertRow(1);td=tr.insertCell(0);td.className='modalDialogContainer';td.colSpan=2;td.appendChild(body);output.innerHTML='';output.appendChild(table);output.style.display='block';centerElement(output);return output;}
ModalDialog.genShield=function()
{if(undefined==this.shield)
{var coords=getDocumentBodySize();this.shield=this.genBody(this.CSS_SHIELD);this.shield.style.width=coords.x+'px';this.shield.style.height=coords.y+'px';}
this.shield.style.display='block';}
ModalDialog.getPopup=function()
{var output=this.genBody(this.CSS_POPUP);output.style.zIndex=this.ZINDEX+this.popup.length;this.popup.push(output);return output;}
ModalDialog.genBody=function(className)
{var output=document.createElement('div');output.className=className;document.body.insertBefore(output,document.body.firstChild);return output;}
ModalDialog.altSelectLists=function(hide)
{if(!document.all)
return;var items=document.body.getElementsByTagName('select');var newValue=(hide)?'hidden':'visible';for(var i=0;i<items.length;i++)
items[i].style.visibility=newValue;}
ModalDialog.close_onClick=function(ev)
{this.myCallback.close();}
function ModalDialogCriteria(caption){this.caption=caption;}

function PagingListDOM(imagesPath,cssAnchor)
{this.imagesPath=imagesPath;this.cssAnchor=cssAnchor;}
PagingListDOM.prototype.DEFAULT_ANCHOR_CSS='listingPaging';PagingListDOM.prototype.generate=function(value,callback)
{var output=document.createElement('span');output.style.padding='0px';output.textAlign='right';var pageNavInfo=this.toPageNavInfo(value);if(1>=pageNavInfo.totalPages)
return output;var anchorCss=(undefined!=this.cssAnchor)?this.cssAnchor:this.DEFAULT_ANCHOR_CSS;output.appendChild(document.createTextNode('Page: '));if(1<pageNavInfo.currentPage)
{output.appendChild(this.createAnchor('prev',-1,callback,anchorCss,value));output.appendChild(document.createTextNode(' '));}
var select=document.createElement('select');select.onchange=callback.handlePaging;select.myCallback=callback;select.myRecord=value;for(i=1;i<=pageNavInfo.totalPages;i++)
{var option=new Option(i,i,(i==pageNavInfo.currentPage));select.options[i-1]=option;}
select.selectedIndex=(pageNavInfo.currentPage-1);output.appendChild(select);if(pageNavInfo.totalPages>pageNavInfo.currentPage)
{output.appendChild(document.createTextNode(' '));output.appendChild(this.createAnchor('next',1,callback,anchorCss,value));}
return output;}
PagingListDOM.prototype.toPageNavInfo=PagingListDOM.toPageNavInfo=function(value)
{if(undefined!=value.pageNavInfo)
return value.pageNavInfo;return new PageNavInfo(value.totalRecords,value.pages,value.currentPage,value.pageSize);}
PagingListDOM.prototype.createAnchor=function(caption,direction,callback,css,value)
{var output=document.createElement('a');output.appendChild(document.createTextNode(caption));output.href='javascript:void(null);';output.pagingDir=direction;output.className=css;output.onclick=callback.handlePaging;output.style.fontWeight='bold';output.myCallback=callback;output.myRecord=value;return output;}

function PagingLinksDOM(imagesPath,cssAnchor,maxLinks)
{this.imagesPath=imagesPath;this.cssAnchor=cssAnchor;this.maxLinks=maxLinks;}
PagingLinksDOM.prototype.DEFAULT_ANCHOR_CSS='paging';PagingLinksDOM.prototype.DEFAULT_MAX_LINKS=8;PagingLinksDOM.prototype.generate2=function(value,callback){if(value.pages<=8)
return this.generate(value,callback);var output=document.createElement('div');var anchorCss=(undefined!=this.cssAnchor)?this.cssAnchor:this.DEFAULT_ANCHOR_CSS;var maxLinks=(undefined!=this.maxLinks)?this.maxLinks:this.DEFAULT_MAX_LINKS;output.className=anchorCss;var pageNavInfo=this.toPageNavInfo(value);if(1>=pageNavInfo.totalPages)
return output;var ul=document.createElement('ul');ul.className='pageList';var start=1;var end=pageNavInfo.totalPages;var middle=Math.round(pageNavInfo.totalPages/2);if(1<start)
ul.appendChild(this.createAnchor('<< first',undefined,callback,value,0));if(1<pageNavInfo.currentPage)
ul.appendChild(this.createAnchor('< prev',-1,callback,value));var prev=0;for(var i=start;i<=end;i++)
{if((i!=start)&&(i!=end)&&(i!=start+1)&&(i!=end-1)&&(i!=pageNavInfo.currentPage)&&(i!=pageNavInfo.currentPage+1)&&(i!=pageNavInfo.currentPage-1)&&(i!=middle)&&(i!=middle+1)&&(i!=middle-1))
continue;var li;if(i!=(prev+1)){li=document.createElement('li');var span=document.createElement('span');span.innerHTML=' ... ';li.appendChild(span);ul.appendChild(li);}
prev=i;if(i==pageNavInfo.currentPage)
{li=document.createElement('li');var span=document.createElement('span');span.className='curr';span.innerHTML=i;li.appendChild(span);}
else
li=this.createAnchor(i,undefined,callback,value,i-1);ul.appendChild(li);}
if(pageNavInfo.totalPages>pageNavInfo.currentPage)
ul.appendChild(this.createAnchor('next >',1,callback,value));if(pageNavInfo.totalPages>end)
ul.appendChild(this.createAnchor('last >>',undefined,callback,value,pageNavInfo.totalPages-1));output.appendChild(ul);return output;}
PagingLinksDOM.prototype.generate=function(value,callback)
{var output=document.createElement('div');var anchorCss=(undefined!=this.cssAnchor)?this.cssAnchor:this.DEFAULT_ANCHOR_CSS;var maxLinks=(undefined!=this.maxLinks)?this.maxLinks:this.DEFAULT_MAX_LINKS;output.className=anchorCss;var pageNavInfo=this.toPageNavInfo(value);if(1>=pageNavInfo.totalPages)
return output;var ul=document.createElement('ul');ul.className='pageList';var start=1;var end=pageNavInfo.totalPages;if(maxLinks<pageNavInfo.totalPages)
{start=pageNavInfo.currentPage-Math.floor(maxLinks/2);if(1>start)
start=1;end=start+maxLinks-1;if(end>pageNavInfo.totalPages)
{end=pageNavInfo.totalPages;start=end-maxLinks+1;}}
if(1<start)
ul.appendChild(this.createAnchor('<< first',undefined,callback,value,0));if(1<pageNavInfo.currentPage)
ul.appendChild(this.createAnchor('< prev',-1,callback,value));for(var i=start;i<=end;i++)
{var li;if(i==pageNavInfo.currentPage)
{li=document.createElement('li');var span=document.createElement('span');span.className='curr';span.innerHTML=i;li.appendChild(span);}
else
li=this.createAnchor(i,undefined,callback,value,i-1);ul.appendChild(li);}
if(pageNavInfo.totalPages>pageNavInfo.currentPage)
ul.appendChild(this.createAnchor('next >',1,callback,value));if(pageNavInfo.totalPages>end)
ul.appendChild(this.createAnchor('last >>',undefined,callback,value,pageNavInfo.totalPages-1));output.appendChild(ul);return output;}
PagingLinksDOM.prototype.toPageNavInfo=function(value)
{if(undefined!=value.pageNavInfo)
return value.pageNavInfo;return new PageNavInfo(value.totalRecords,value.pages,value.currentPage,value.pageSize);}
PagingLinksDOM.prototype.createAnchor=function(caption,direction,callback,value,selectedIndex)
{var anchor=document.createElement('a');anchor.appendChild(document.createTextNode(caption));anchor.href='javascript:void(null);';anchor.pagingDir=direction;anchor.onclick=callback.handlePaging;anchor.myCallback=callback;anchor.myRecord=value;anchor.selectedIndex=selectedIndex;var output=document.createElement('li');output.appendChild(anchor);return output;}

var PreLoader=new Object();PreLoader.TIMEOUT=10000;PreLoader.start=function(data)
{var me=this;setTimeout(function(){me.load(data)},this.TIMEOUT);}
PreLoader.load=function(sources)
{var head=this.getHead();var buildNo='?b='+(new PinkCommonCalls()).getBuildNo();for(var i=0;i<sources.length;i++)
head.appendChild(this.createScript(sources[i]+buildNo));}
PreLoader.getHead=function()
{if(undefined!=this.head_)
return this.head_;var heads=document.getElementsByTagName('head');if((undefined==heads)||(0==heads.length))
throw'Could not find document head to load scripts.';return(this.head_=heads[0]);}
PreLoader.createScript=function(src)
{var elem=document.createElement('script');elem.type='text/javascript';elem.language='JavaScript';elem.src=src;elem.async=elem.defer=true;return elem;}

function ProgressBar(caption)
{this.caption=caption;}
ProgressBar.prototype.INTERVAL=2000;ProgressBar.prototype.MAX_INTERVALS=20;ProgressBar.prototype.run=function(criteria)
{var me=this;criteria.progressBarBody=document.createElement('blockquote');criteria.progressBarBody.innerHTML=this.caption+' ...'+'<span class="loadingImage"></span>';criteria.body.innerHTML='';criteria.body.appendChild(criteria.progressBarBody);criteria.progressBarOn=true;criteria.progressBarCount=0;criteria.progressBarIntervalId=window.setInterval(function(){me.handleInterval(criteria);},this.INTERVAL);}
ProgressBar.prototype.turnOff=function(criteria)
{if(!criteria.progressBarOn)
return;window.clearInterval(criteria.progressBarIntervalId);criteria.progressBarIntervalId=undefined;criteria.progressBarOn=false;}
ProgressBar.prototype.handleInterval=function(criteria)
{if(!criteria.progressBarOn)
return;if(this.MAX_INTERVALS<=criteria.progressBarCount)
{this.turnOff(criteria);return;}
criteria.progressBarBody.innerHTML=criteria.progressBarBody.innerHTML+'.';criteria.progressBarCount++;}

function RSAAuthValue(userName,pin,code,newPin)
{this.userName=userName;this.pin=pin;this.code=code;this.newPin=newPin;}
function RSAAuthException(message,isAccessDenied,isNewPinRequired,isNextCodeRequired,isPinRejected)
{this.message=message;this.isAccessDenied=isAccessDenied;this.isNewPinRequired=isNewPinRequired;this.isNextCodeRequired=isNextCodeRequired;this.isPinRejected=isPinRejected;}
RSAAuthException.prototype.toString=function(){this.message;}

function SelectListDOM(){}
SelectListDOM.create=function(name,id)
{if(document.all)
return document.createElement('<select name="'+name+'" />');var output=document.createElement('select');if(window.isSafari&&(undefined==id))
output.id=name;output.name=name;return output;}
SelectListDOM.populate=function(options,value)
{for(var i=0;i<value.ids.length;i++)
options[options.length]=new Option(value.values[i],value.ids[i]);}
SelectListDOM.prototype.generate=function(name,value,header,id,onChange,css)
{var output=SelectListDOM.create(name,id);if(undefined!=id)output.id=id;if(undefined!=onChange)output.onchange=onChange;if(undefined!=css)output.className=css;var options=output.options;if(undefined!=header)
options[0]=new Option(header,'');SelectListDOM.populate(options,value);return output;}
var SelectList={};SelectList.create=SelectListDOM.create;SelectList.generate=function(name,value,header,id,onChange,css)
{var o=SelectListDOM.create(name,id);if(id)o.id=id;if(onChange)o.onchange=onChange;if(css)o.className=css;var options=o.options;if(undefined!=header)
options[0]=new Option(header,'');if(!value.records)
throw'No SelectList values supplied for dropdown - "'+name+'".';this.populate(options,value);return o;}
SelectList.populate=function(options,value)
{var r=value.records;for(var i=0;i<r.length;i++)
options[options.length]=new Option(r[i].caption,r[i].id);}

function Tabbers(args){this.init(args);}
Tabbers.prototype.init=function(args)
{for(var arg in args){this[arg]=args[arg];}
if(this.body)
this.run(this.body);}
Tabbers.prototype.CSS_MAIN="tabber";Tabbers.prototype.CSS_ACTIVE='active';Tabbers.prototype.CSS_BODY="tabberBody";Tabbers.prototype.run=function(body)
{if(!document.getElementsByTagName){return false;}
if(undefined==body)
body=this.body;var defaultTab=(undefined==this.defaultTab)?0:this.defaultTab;var url=undefined;if(this.tabParam)
{var l=window.location;url=l.pathname+l.search+'&'+this.tabParam+'=';}
if(body.id)
this.id=body.id;this.tabs=new Array();var ul=document.createElement("div");ul.className=this.CSS_MAIN;body.appendChild(ul);for(var i=0;i<this.titles.length;i++)
{var t=new Object();t.body=document.createElement('div');t.body.className=this.CSS_BODY;t.body.style.display='none';t.headingText=this.titles[i];t.isAvailable=((undefined!=t.headingText)&&(0<t.headingText.length));t.li=document.createElement("span");t.isEmpty=true;this.tabs[i]=t;var anchor=document.createElement("a");anchor.appendChild(document.createTextNode(t.headingText));anchor.href=(url?url+i:'javascript:void(null);');if(this.tooltips&&this.tooltips[i])
anchor.title=this.tooltips[i];else
anchor.title=t.headingText;anchor.onclick=this.navClick;anchor.tabber=this;anchor.tabberIndex=i;if(this.ids)
anchor.id=this.ids[i];t.li.appendChild(anchor);ul.appendChild(t.li);body.appendChild(t.body);}
if(typeof this.onLoad=='function'){this.onLoad({tabber:this,index:defaultTab,tab:this.tabs[defaultTab]});}
this.setActiveTab(defaultTab);return this;};Tabbers.prototype.navClick=function(ev)
{var a=this;var self=a.tabber;var index=a.tabberIndex;if(!self){return false;}
a.blur();return self.doTab(index);};Tabbers.prototype.hideContents=function()
{for(var i=0;i<this.tabs.length;i++)
this.tabs[i].body.style.display='none';}
Tabbers.prototype.hideContent=function(index){this.tabs[index].body.style.display='none';}
Tabbers.prototype.showContent=function(index){this.tabs[index].body.style.display='block';}
Tabbers.prototype.hideTab=function(index)
{if(this.activeTab==index)
{var newIndex=(0==index)?index+1:index-1;this.doTab(newIndex);}
else
this.hideContent(index);this.tabs[index].li.style.display='none';}
Tabbers.prototype.showTab=function(index){this.tabs[index].li.style.display='inline';}
Tabbers.prototype.deactivateTabs=function()
{for(var i=0;i<this.tabs.length;i++)
this.tabs[i].li.className='';}
Tabbers.prototype.deactivateTab=function(index){this.tabs[index].li.className='';}
Tabbers.prototype.activateTab=function(index){this.tabs[index].li.className=this.CSS_ACTIVE;}
Tabbers.prototype.markEmpty=function(index)
{if(this.tabs[index])
this.tabs[index].isEmpty=true;}
Tabbers.prototype.markAllEmpty=function()
{for(var i=0;i<this.tabs.length;i++)
this.markEmpty(i);}
Tabbers.prototype.doTab=function(index)
{if(!this.tabs[index].isAvailable){return false;}
if(typeof this.onClick=='function')
{var theTab=this.tabs[index];if(index==this.activeTab)
theTab.isEmpty=true;var onClickArgs={'tabber':this,'index':index,'tab':theTab};this.onClick(onClickArgs);}
this.setActiveTab(index);return false;}
Tabbers.prototype.setActiveTab=function(index)
{if(undefined!=this.activeTab)
{this.deactivateTab(this.activeTab);this.hideContent(this.activeTab);}
this.activateTab(index);this.showContent(index);this.activeTab=index;}

function TimeEntryDOM()
{this.selectList=new SelectListDOM();this.fields=new Array();}
TimeEntryDOM.prototype.HOURS={'ids':[0,1,2,3,4,5,6,7,8,9,10,11],'values':['12','01','02','03','04','05','06','07','08','09','10','11']};TimeEntryDOM.prototype.MINUTES={'ids':[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],'values':['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59']};TimeEntryDOM.prototype.AM_PM={'ids':[0,1],'values':['AM','PM']};TimeEntryDOM.prototype.generate=function(model)
{var hour=0;var minute=0;var amPm=0;if(undefined!=model.value)
{hour=model.value.getHours();if(11<hour)
{hour-=12;amPm=1;}
minute=model.value.getMinutes();}
var items=this.fields[model.name]=new Array();var elem,output=document.createElement('span');output.className='widgetPackage';output.appendChild(elem=items['hour']=this.selectList.generate(model.name+'Hour',this.HOURS));elem.value=hour;elem.disabled=model.disabled;output.appendChild(document.createTextNode(' : '));output.appendChild(elem=items['minute']=this.selectList.generate(model.name+'Minute',this.MINUTES));elem.value=minute;elem.disabled=model.disabled;output.appendChild(document.createTextNode(' '));output.appendChild(elem=items['amPm']=this.selectList.generate(model.name+'AmPm',this.AM_PM));elem.value=amPm;elem.disabled=model.disabled;output.appendChild(document.createTextNode(' EST'));return output;}
TimeEntryDOM.prototype.get=function(name)
{var items=this.fields[name];if(undefined==items)
return undefined;var hour=parseInt(items['hour'].value);var minute=parseInt(items['minute'].value);var amPm=parseInt(items['amPm'].value);hour=(amPm*12)+hour;return new Date(0,0,0,hour,minute,0,0);}
function TimeEntryValue(name,value,disabled)
{this.name=name;this.value=value;this.disabled=(undefined==disabled)?false:disabled;}

function DropdownAnchors()
{}
DropdownAnchors.prototype.CLOSE_WAIT=500;DropdownAnchors.prototype.CSS_MAIN='dropdownAnchors';DropdownAnchors.prototype.run=function(criteria,body)
{criteria.body=body;body.innerHTML='';body.appendChild(criteria.myCaption=this.generate(criteria));}
DropdownAnchors.prototype.generate=function(value)
{var output=document.createElement('div');var caption=value.defaultValue;output.className=this.CSS_MAIN;output.innerHTML=caption;output.onmouseover=this.caption_onMouseOver;output.onmouseout=this.caption_onMouseOut;output.myValue=value;output.myCallback=this;return output;}
DropdownAnchors.prototype.open=function(value)
{if(this.cancelClose(value))
return;var popup=this.getPopup(value);ModalDialog.altSelectLists(true);popup.style.display='block';positionBelowElement(popup,value.myCaption);value.isOpened=true;}
DropdownAnchors.prototype.close=function(value)
{value.closeTimeoutId=undefined;value.isOpened=false;this.getPopup().style.display='none';ModalDialog.altSelectLists(false);}
DropdownAnchors.prototype.scheduleClose=function(value)
{if(!value.isOpened||(undefined!=value.closeTimeoutId))
return;var me=this;value.closeTimeoutId=window.setTimeout(function(){me.close(value);},this.CLOSE_WAIT);}
DropdownAnchors.prototype.cancelClose=function(value)
{if(undefined==value.closeTimeoutId)
return false;window.clearTimeout(value.closeTimeoutId);value.closeTimeoutId=undefined;return true;}
DropdownAnchors.prototype.handleSelect=function(li)
{var value=li.myValue;if(undefined!=value.lastSelectedItem)
value.lastSelectedItem.className='';li.className='selected';value.lastSelectedItem=li;value.callback.handleAnchorSelect(li.myId,li.myCaption,value);value.myCaption.innerHTML=li.myCaption;this.close(value);}
DropdownAnchors.prototype.getPopup=function(value)
{if(undefined==this.popup)
{var popup=this.popup=document.createElement('ul');popup.className=this.CSS_MAIN;popup.myValue=value;popup.myCallback=this;popup.onmouseover=this.ul_onMouseOver;popup.onmouseout=this.ul_onMouseOut;var listItems=value.listItems;for(var i=0;i<listItems.ids.length;i++)
{var id=listItems.ids[i];var caption=listItems.values[i];var li=document.createElement('li');li.innerHTML=caption;li.myId=id;li.myCaption=caption;li.myValue=value;li.myCallback=this;li.onmouseover=this.listItem_onMouseOver;li.onmouseout=this.listItem_onMouseOut;li.onmousedown=this.listItem_onMouseDown;if(value.selectedItem==id)
{li.className='selected';value.lastSelectedItem=li;}
popup.appendChild(li);}
document.body.insertBefore(popup,document.body.firstChild);}
else if(undefined!=value)
value.lastSelectedItem.className='selected';return this.popup;}
DropdownAnchors.prototype.caption_onMouseOver=function(ev)
{this.myCallback.open(this.myValue);}
DropdownAnchors.prototype.caption_onMouseOut=function(ev)
{this.myCallback.scheduleClose(this.myValue);}
DropdownAnchors.prototype.ul_onMouseOver=function(ev)
{this.myCallback.cancelClose(this.myValue);}
DropdownAnchors.prototype.ul_onMouseOut=function(ev)
{this.myCallback.scheduleClose(this.myValue);}
DropdownAnchors.prototype.listItem_onMouseOver=function(ev)
{this.myPriorClassName=this.className;this.className='over';}
DropdownAnchors.prototype.listItem_onMouseOut=function(ev)
{this.className=this.myPriorClassName;this.myPriorClassName=undefined;}
DropdownAnchors.prototype.listItem_onMouseDown=function(ev)
{this.myCallback.handleSelect(this);}

function FancyAnchorList(body)
{this.body=body;}
FancyAnchorList.prototype.CSS_MAIN='fancyAnchorList';FancyAnchorList.prototype.CSS_ACTIVE='selected';FancyAnchorList.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;var ids=criteria.listItems.ids;var values=criteria.listItems.values;var li,output=document.createElement('div');output.className=this.CSS_MAIN;if(undefined!=criteria.defaultValue)
{li=document.createElement('span');li.appendChild(this.outputItem(undefined,criteria.defaultValue,criteria));output.appendChild(li);}
for(var i=0;i<ids.length;i++)
{var id=ids[i];li=document.createElement('span');if(criteria.selectedItem==id)
li.className=this.CSS_ACTIVE;li.appendChild(this.outputItem(id,values[i],criteria));output.appendChild(li);}
criteria.body.innerHTML='';criteria.body.appendChild(output);}
FancyAnchorList.prototype.setSelectedItem=function(criteria,newValue)
{criteria.callback.handleAnchorSelect(newValue,undefined,criteria);criteria.selectedItem=newValue;this.run(criteria);}
FancyAnchorList.prototype.onClick=function(ev)
{var me=this.myCallback;var criteria=this.myCriteria;var id=this.myId;var value=this.myValue;criteria.callback.handleAnchorSelect(id,value,criteria);criteria.selectedItem=id;me.run(criteria);return false;}
FancyAnchorList.prototype.outputItem=function(id,value,criteria)
{var output;output=document.createElement('a');output.href='javascript:void(null);';output.myCallback=this;output.myCriteria=criteria;output.myId=id;output.myValue=value;output.onclick=this.onClick;output.appendChild(document.createTextNode(value));return output;}

function CascadingAnchorList(body)
{this.body=body;}
CascadingAnchorList.prototype.CSS_MAIN='cascadingAnchorList';CascadingAnchorList.prototype.CSS_SUB='cascadingAnchorListSubmenu'
CascadingAnchorList.prototype.CSS_ACTIVE='selected';CascadingAnchorList.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;var ids=criteria.listItems.ids;var values=criteria.listItems.values;var submenus=criteria.submenus;var li,output=document.createElement('div');output.className=this.CSS_MAIN;this.subLists=new Object();for(var i=0;i<ids.length;i++)
{var id=ids[i];var submenu=submenus[id];li=document.createElement('span');if(criteria.selectedItem==id)
li.className=this.CSS_ACTIVE;var result=this.outputItem(id,values[i],submenu,criteria)
li.appendChild(result);if(result.subList!=undefined){this.subLists[id]=result.subList;var submenuBody=result.submenuBody;li.appendChild(submenuBody);var subCriteria={'listItems':submenu,'callback':this,'parent':result,'selectedItem':criteria.subMenuId};result.subList.run(subCriteria,submenuBody);if(criteria.selectedItem!=id)submenuBody.style.display='none';}
output.appendChild(li);}
criteria.body.innerHTML='';criteria.body.appendChild(output);}
CascadingAnchorList.prototype.setSelectedItem=function(criteria,newValue,caption)
{criteria.callback.handleAnchorSelect(newValue,caption,criteria);criteria.selectedItem=newValue;this.run(criteria);}
CascadingAnchorList.prototype.onClick=function(ev)
{var me=this.myCallback;var criteria=this.myCriteria;var id=this.myId;var value=this.myValue;criteria.subMenuId=undefined;criteria.subMenuValue=undefined;if(this.submenuBody!=undefined){this.submenuBody.style.display='block';}
criteria.callback.handleAnchorSelect(id,value,criteria);criteria.selectedItem=id;me.run(criteria);return false;}
CascadingAnchorList.prototype.handleAnchorSelect=function(id,value,criteria){var parent=criteria.parent;var callback=parent.myCriteria.callback;parent.myCriteria.subMenuId=id;parent.myCriteria.subMenuValue=value;parent.myCriteria.selectedValue=parent.myValue;callback.handleAnchorSelect(id,value,criteria);}
CascadingAnchorList.prototype.outputItem=function(id,value,submenu,criteria)
{var output;output=document.createElement('a');output.href='javascript:void(null);';output.myCallback=this;output.myCriteria=criteria;output.myId=id;output.myValue=value;output.onclick=this.onClick;output.appendChild(document.createTextNode(value));var submenuBody=output.submenuBody=document.createElement('div');if(submenu!=undefined){output.subList=new FancyAnchorList(submenuBody);output.subList.CSS_MAIN=this.CSS_SUB;}
return output;}

function DetailDOM(){}
DetailDOM.prototype.createForm=function(criteria,callback)
{var o=document.createElement('form');if(callback)
{o.onsubmit=function(ev){callback.handleSubmit(criteria,this);if(o.myActions)
{o.myActions.style.display='none';o.myWaitMessage.style.display='block';}
return false;};o.toActions=function()
{this.myWaitMessage.style.display='none';this.myActions.style.display='block';};}
return o;}
DetailDOM.prototype.createTable=function()
{var o=document.createElement('table');o.className='detail';return o;}
DetailDOM.prototype.createRow=function(t){return t.insertRow(t.rows.length);}
DetailDOM.prototype.createHeader=function(t,caption,colSpan)
{var r=this.createRow(t);var o=r.insertCell(r.cells.length);r.className=o.className='detailHeader';o.innerHTML=caption+':';if(colSpan)
o.colSpan=colSpan;return o;}
DetailDOM.prototype.createCaption=function(r,caption)
{var o=r.insertCell(r.cells.length);o.className='detailCaption';o.innerHTML=caption;return o;}
DetailDOM.prototype.createValue=function(r,value)
{var o=r.insertCell(r.cells.length);o.className='detailValue';if(value)
o.innerHTML=value;return o;}
DetailDOM.prototype.createField=function(r,elem,value)
{var o=r.insertCell(r.cells.length);o.className='detailValue';o.appendChild(elem);if(value)
elem.value=value;return o;}
DetailDOM.prototype.createBlankRow=function(t,colSpan)
{var c,o=this.createRow(t);c=o.insertCell(0);c.colSpan=(colSpan?colSpan:2);c.innerHTML='&nbsp;';return o;}
DetailDOM.prototype.createAction=function(t,form,colSpan)
{var e,c,o=this.createRow(t);c=o.insertCell(0);c.colSpan=(colSpan?colSpan:2);c.className='detailAction';form.myActions=Elements.addDiv(c);e=form.myWaitMessage=Elements.addDiv(c);e.innerHTML=CAPTION_SUBMITTING;e.style.display='none';return o;}

function WorklistDOM(){}
WorklistDOM.prototype.CSS_TABLE='listing';WorklistDOM.prototype.CSS_CAPTION='listingCaption';WorklistDOM.prototype.CSS_HEADER='listingHeader';WorklistDOM.prototype.CSS_TOTALS='listingTotals';WorklistDOM.prototype.COLOR_FLICKER='#F03B6D';WorklistDOM.prototype.NO_DATA_FOUND='No data found';WorklistDOM.prototype.createSymbolAnchor=function(record,callback)
{var output=document.createElement('a');output.href='javascript:void(null);';output.innerHTML=(undefined!=record.symbol)?record.symbol:record.securityId;output.onclick=callback.gotoQuote;output.myRecord=record;output.myCallback=callback;return output;}
WorklistDOM.prototype.createHeaderCell=function(row,index,caption,sortOn,sortDefaultDir,value,callback)
{var output=row.insertCell(index);output.className=this.CSS_HEADER;output.style.whiteSpace='nowrap';if(undefined==sortOn)
{output.innerHTML=caption;return output;}
var anchor=document.createElement('a');anchor.className=this.CSS_HEADER;anchor.myCallback=callback;anchor.myValue=value;anchor.mySortOn=sortOn;anchor.mySortDefaultDir=sortDefaultDir;anchor.innerHTML=caption;anchor.onclick=callback.handleSort;anchor.href='javascript:void(null);';output.appendChild(anchor);if(value.sortOn==sortOn)
{output.appendChild(document.createTextNode(' '));var elem=document.createElement('span');elem.className=(FIELD_ASCENDING==value.sortDir)?'ascendingIcon':'descendingIcon';elem.innerHTML='&nbsp;&nbsp;&nbsp;';output.appendChild(elem);}
return output;}
WorklistDOM.prototype.createHeaderNum=function(row,index,caption,sortOn,sortDefaultDir,value,callback)
{var o=this.createHeaderCell(row,index,caption,sortOn,sortDefaultDir,value,callback);o.style.textAlign='right';return o;}
WorklistDOM.prototype.createDetailCell=function(row,index,value)
{var output=row.insertCell(index);output.className=row.className;output.innerHTML=value;return output;}
WorklistDOM.prototype.createDetailNum=function(row,index,value)
{var o=this.createDetailCell(row,index,value);o.style.textAlign='right';return o;}
WorklistDOM.prototype.createNoDataFound=function(value,callback)
{var o=document.createElement('div');o.className='widgetSection noDataFoundTableWithFiltersContent';o.innerHTML=this.NO_DATA_FOUND;return o;}
WorklistDOM.prototype.getRowCss=function(index)
{return alternateCssParentListingClasses(index);}
WorklistDOM.prototype.getTitle=function(value)
{return outputWorklistTitle(value);}
WorklistDOM.prototype.flicker=function(elem)
{var bgcolor=elem.style.backgroundColor;elem.style.backgroundColor=this.COLOR_FLICKER;window.setTimeout(function(){elem.style.backgroundColor=bgcolor;},500);}
WorklistDOM.prototype.toSub=function()
{this.CSS_TABLE='subListing';this.CSS_CAPTION='subListingCaption';this.CSS_HEADER='subListingHeader';this.getRowCss=function(index){return alternateCssListingClasses(index);};}
WorklistDOM.prototype.createTotalsCell=function(row,value,num)
{var o=row.insertCell(row.cells.length);o.className=row.className;if(value)
o.innerHTML=value;if(num)
o.style.textAlign='right';return o;}

function WorklistSimple(captionLoading)
{if(undefined!=captionLoading)
this.CAPTION_LOADING=captionLoading;this.progressBar=new ProgressBar(this.CAPTION_LOADING);}
WorklistSimple.prototype.CAPTION_LOADING='Loading';WorklistSimple.prototype.filter=function(filter,body){this.run({filter:filter},body);}
WorklistSimple.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;this.progressBar.run(criteria);var filter=criteria.filter?criteria.filter:criteria;if(!filter.pageSize&&this.pageSize)
filter.pageSize=this.pageSize;this.makeCall(filter,new AjaxDataHandler(this,criteria));}
WorklistSimple.prototype.doValue=function(value)
{var filter;var criteria=filter=value.criteria;this.progressBar.turnOff(criteria);if(criteria.filter)
filter=criteria.filter;filter.sortOn=value.sortOn;filter.sortDir=value.sortDir;criteria.body.innerHTML='';var output=this.viewer.generate(value,this);criteria.body.appendChild(output);this.lastCriteria=criteria;if(this.callback&&this.callback.handlePostLoad)
this.callback.handlePostLoad(value,output);}
WorklistSimple.prototype.handlePaging=function(ev)
{var filter,me=this.myCallback;var criteria=filter=this.myRecord.criteria;if(criteria.filter)
filter=criteria.filter;if(!filter.page)
filter.page=1;if(this.pagingDir)
filter.page+=this.pagingDir;else
filter.page=this.selectedIndex+1;me.run(criteria);}
WorklistSimple.prototype.handleSort=function(ev)
{var filter,me=this.myCallback;var criteria=filter=this.myValue.criteria;if(criteria.filter)
filter=criteria.filter;var sortOn=this.mySortOn;var sortDir=this.mySortDefaultDir;if((sortOn==filter.sortOn)&&filter.sortDir)
filter.sortDir=(FIELD_DESCENDING==filter.sortDir)?FIELD_ASCENDING:FIELD_DESCENDING;else
{filter.sortOn=sortOn;filter.sortDir=sortDir;}
me.run(criteria);}
WorklistSimple.prototype.handlePageSize=function(ev)
{var filter,me=this.myCallback;var criteria=filter=this.myValue.criteria;if(criteria.filter)
filter=criteria.filter;var pagesize=this.value;filter.pageSize=pagesize;me.run(criteria);}


var CAPTION_CONTENTS='Contents';var CAPTION_DOCUMENT='Document';var CAPTION_LABEL='Label';var CAPTION_PREVIEW='Preview';var FIELD_CONTENTS='contents';var FIELD_NAMES='names';var MAX_LEN_ID=32;var MAX_LEN_NAME=128;

function PageTextContent(elementId,contentName,contentId,editorHeight)
{this.elementId=elementId;this.contentName=contentName;this.editorHeight=editorHeight;this.contentId=contentId;}
function PageTextValue(id,name,revision,contents,creatorId,createdDate,lastModifierId,lastModifiedDate)
{this.id=id;this.name=name;this.revision=revision;this.contents=contents;this.creatorId=creatorId;this.createdDate=createdDate;this.lastModifierId=lastModifierId;this.lastModifiedDate=lastModifiedDate;}

function PinkContentCalls(rootPath)
{if(undefined==rootPath)
this.rootPath='/content';else
this.rootPath=rootPath;this.cdataElements=new Array();this.cdataElements[FIELD_NAME]=FIELD_NAME;this.cdataElements[FIELD_CONTENTS]=FIELD_CONTENTS;this.modules=new Array();}
PinkContentCalls.prototype=new AjaxHelper();PinkContentCalls.prototype.accessRSA=function(userName,password,tokenCode,nextTokenCode)
{var value={userName:userName,password:password,tokenCode:tokenCode,nextTokenCode:nextTokenCode};return this.synchPostMap(this.rootPath+'/accessRSA',value);}
PinkContentCalls.prototype.addAppDestination=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/addAppDestination.json',value,callback);}
PinkContentCalls.prototype.canAuthor=function()
{return this.synchCall(this.rootPath+'/canAuthor.json').payload;}
PinkContentCalls.prototype.deleteAppDestination=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/deleteAppDestination.json',value,callback);}
PinkContentCalls.prototype.getAppDestinations=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/author/getAppDestinations.json',filter,callback);}
PinkContentCalls.prototype.getAuditPageDocUrl=function(id)
{var queryString='';queryString=this.toQueryString(queryString,FIELD_ID,id);return this.rootPath+'/author/viewAuditPageDoc'+queryString;}
PinkContentCalls.prototype.getAuditPageDocWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/author/getAuditPageDocWorklist.json',filter,callback);}
PinkContentCalls.prototype.getAuditPageText=function(id,callback)
{this.asynchPostMap(this.rootPath+'/author/getAuditPageText.json',{id:id},callback);}
PinkContentCalls.prototype.getAuditPageTextWorklist=function(criteria,callback)
{this.asynchPostMap(this.rootPath+'/author/getAuditPageTextWorklist.json',criteria,callback);}
PinkContentCalls.prototype.getGlossaryItem=function(id,callback)
{var url=this.rootPath+'/getGlossaryItem.json';var params={id:id};if(undefined==callback)
return this.synchPostMap(url,params);this.asynchPostMap(url,params,callback);}
PinkContentCalls.prototype.getGlossaryList=function(callback)
{this.asynchCall(this.rootPath+'/getGlossaryList.json',callback);}
PinkContentCalls.prototype.getGlossaryWorklist=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/getGlossaryWorklist.json',filter,callback);}
PinkContentCalls.prototype.getPageDoc=function(id,name,callback)
{var url=this.rootPath+'/getPageDoc.json';var params={id:id,name:name};if(undefined==callback)
return this.synchPostMap(url,params);this.asynchPostMap(url,params,callback);}
PinkContentCalls.prototype.getPageDocUrl=function(id,name)
{var queryString='';queryString=this.toQueryString(queryString,FIELD_ID,id);queryString=this.toQueryString(queryString,FIELD_NAME,name);return this.rootPath+'/doc'+queryString;}
PinkContentCalls.prototype.getPageDocNames=function(name,pageSize,callback)
{var url=this.rootPath+'/author/getPageDocNames.json';var params={name:name,pageSize:pageSize};if(undefined==callback)
return this.synchPostMap(url,params);this.asynchPostMap(url,params,callback);}
PinkContentCalls.prototype.getPageText=function(id,name,callback)
{var url=this.rootPath+'/getPageText.json';var params={id:id,name:name};if(undefined==callback)
return this.synchPostMap(url,params);this.asynchPostMap(url,params,callback);}
PinkContentCalls.prototype.getPageTextNames=function(name,pageSize,callback)
{var url=this.rootPath+'/author/getPageTextNames.json';var params={name:name,pageSize:pageSize};if(undefined==callback)
return this.synchPostMap(url,params);this.asynchPostMap(url,params,callback);}
PinkContentCalls.prototype.getPublicationOptions=function(filter,callback)
{this.asynchPostMap(this.rootPath+'/author/getPublicationOptions.json',filter,callback);}
PinkContentCalls.prototype.loadAdminModule=function()
{this.loadModule('/common/scripts/dropdown.js');this.loadModule(this.rootPath+'/scripts/admin.js');}
PinkContentCalls.prototype.loadModule=function(url)
{if(this.modules[url])
return false;;var head=document.getElementsByTagName('head')[0];var elem=document.createElement('script');elem.type='text/javascript';elem.src=url;head.appendChild(elem);return(this.modules[url]=true);}
PinkContentCalls.prototype.publishResources=function(value,callback)
{this.asynchPostMap(this.rootPath+'/author/publishResources.json',value,callback);}
PinkContentCalls.prototype.rollbackDoc=function(id)
{return this.synchPostMap(this.rootPath+'/author/rollbackDoc.json',{id:id});}
PinkContentCalls.prototype.setGlossary=function(value,callback)
{this.asynchPostMap(this.rootPath+'/author/setGlossary.json',this.convertAll(value),callback);}
PinkContentCalls.prototype.setPageDocUrl=function()
{return this.rootPath+'/author/setPageDoc.txt';}
PinkContentCalls.prototype.setPageText=function(value,callback)
{this.asynchPostMap(this.rootPath+'/author/setPageText.json',this.convertAll(value),callback);}
PinkContentCalls.prototype.swapGlossaryOrder=function(firstId,secondId)
{return this.synchPostMap(this.rootPath+'/author/swapGlossaryOrder.json',{firstId:firstId,secondId:secondId});}
PinkContentCalls.prototype.updateAppDestination=function(value,callback)
{this.asynchPostMap(this.rootPath+'/admin/updateAppDestination.json',value,callback);}
function PinkContentDataHandler(body){this.body=body;}
PinkContentDataHandler.prototype.handleRequestData=function(value)
{if((undefined!=value)&&(undefined!=value.contents))
this.body.innerHTML=value.contents;}

function ContentInlineEditor(caller,context)
{this.caller=caller;this.context=context;this.document=window.document;this.inputField=new InputField();this.itemsById=undefined;}
ContentInlineEditor.prototype.DEFAULT_HEIGHT='100%';ContentInlineEditor.prototype.EDIT='Edit';ContentInlineEditor.prototype.PREVIEW='Preview';ContentInlineEditor.prototype.ROLLBACK='Rollback';ContentInlineEditor.prototype.getRevisionList=function()
{if(undefined==this.revisionList)
this.revisionList=new RevisionManager(this.caller,new TextRevisionsDOM(),undefined,this);return this.revisionList;}
ContentInlineEditor.prototype.getDocManager=function()
{if(undefined==this.docManager)
this.docManager=new DocManagerSimple(this.caller,new PageManagerDOM(),undefined,this);return this.docManager;}
ContentInlineEditor.prototype.init=function(context)
{if(undefined==context)
{if(undefined==this.context)
return;context=this.context;}
this.canAuthor=this.caller.canAuthor();if(this.canAuthor)
this.caller.loadAdminModule();this.itemsById=new Array();for(var i=0;i<context.length;i++)
{var item=context[i];item.element=(item.elementId.tagName)?item.elementId:this.document.getElementById(item.elementId);this.caller.getPageText(item.contentId,item.contentName,new ContentInlineEditorInit(this,item));}}
ContentInlineEditor.prototype.initElement=function(item,content)
{var element=item.element;if(undefined==content)
{var innerContent=item.innerContent;var _contents=(undefined!=innerContent)?innerContent.innerHTML:element.innerHTML;content=new PageTextValue(item.contentId,item.contentName,0,_contents);}
else
this.itemsById[content.id]=item;if(undefined==item.editorHeight)
item.editorHeight=this.DEFAULT_HEIGHT;item.record=content;element.innerHTML='';item.innerContent=document.createElement('div');item.innerContent.className='widgetPackage';element.appendChild(item.innerContent);if(this.canAuthor)
{item.myActions=document.createElement('div');item.myActions.className='widgetPackage';element.appendChild(item.myActions);}
this.toReadonly(item);this.decorate(element,item);}
ContentInlineEditor.prototype.handleEdit=function(ev)
{var me=this.myCallback;me.toWritable(this.myItem,true,this.PREVIEW,CAPTION_PREVIEW,me.handlePreview);}
ContentInlineEditor.prototype.getTextValue=function(theForm)
{var contents=theForm.contents;if(undefined==contents)
throw'Not editable';return contents.value;}
ContentInlineEditor.prototype.handlePreview=function(ev)
{var me=this.myCallback;var item=this.myItem;item.record.contents=me.getTextValue(this.form);me.toWritable(item,false,this.EDIT,CAPTION_EDIT,me.handleEdit);}
ContentInlineEditor.prototype.handleSubmit=function(ev)
{var me=this.myCallback;var item=this.myItem;var form=this.form;var record=item.record;var value=new PageTextValue(record.id,record.name,record.revision,me.getTextValue(form));me.caller.setPageText(value,{handleRequestData:function(status){record.contents=value.contents;record.revision++;me.toReadonly(item);},handleRequestError:function(error){window.alert(error.message?error.message:error);form.contents.focus();}});}
ContentInlineEditor.prototype.handleCancel=function(ev)
{var me=this.myCallback;var item=this.myItem;item.record.contents=item.origContents;me.toReadonly(item);}
ContentInlineEditor.prototype.handleRollback=function(ev)
{var me=this.myCallback;var item=this.myItem;var record=item.record;me.getRevisionList().byId(record.id);}
ContentInlineEditor.prototype.handleDocuments=function(ev)
{this.myCallback.getDocManager().open();}
ContentInlineEditor.prototype.handleRollbackSelection=function(id,name,contents)
{var item=this.itemsById[id];item.record.contents=contents;this.toWritable(item,false,this.EDIT,CAPTION_EDIT,this.handleEdit);}
ContentInlineEditor.prototype.toReadonly=function(item)
{var contentBlock=item.innerContent;contentBlock.innerHTML=item.record.contents;item.origContents=item.record.contents;contentBlock.style.display='block';if(this.canAuthor)
{var output=document.createElement('form');output.className='widgetPackage';var button=this.inputField.genButton('edit',CAPTION_EDIT,this.handleEdit);this.decorate(button,item);output.appendChild(button);if(undefined!=item.record.id)
{output.appendChild(this.createSpan('&nbsp;'));button=this.inputField.genButton('rollback',this.ROLLBACK,this.handleRollback);this.decorate(button,item);output.appendChild(button);}
output.appendChild(this.createSpan('&nbsp;'));button=this.inputField.genButton('docs','Docs',this.handleDocuments);this.decorate(button,item);output.appendChild(button);item.myActions.innerHTML='';item.myActions.appendChild(output);}}
ContentInlineEditor.prototype.toWritable=function(item,isEditable,mainActionId,mainActionCaption,mainActionOnClick)
{var contentBody=item.innerContent;var output=document.createElement('form');output.className='widgetPackage';output.appendChild(document.createElement('br'));output.appendChild(document.createElement('br'));var elem,value=item.record.contents;if(isEditable)
{elem=this.inputField.genTextArea('contents');elem.style.width='100%';elem.style.height=item.editorHeight;elem.value=value;contentBody.style.display='none';}
else
{elem=this.inputField.genHidden('contents',item.record.contents);contentBody.innerHTML=value;contentBody.style.display='block';}
output.appendChild(elem);elem=this.inputField.genButton(mainActionId,mainActionCaption,mainActionOnClick);this.decorate(elem,item);output.appendChild(elem);output.appendChild(this.createSpan('&nbsp;'));elem=this.inputField.genButton('submit',CAPTION_SUBMIT,this.handleSubmit);this.decorate(elem,item);output.appendChild(elem);output.appendChild(this.createSpan('&nbsp;'));elem=this.inputField.genButton('cancel',CAPTION_CANCEL,this.handleCancel);this.decorate(elem,item);output.appendChild(elem);item.myActions.innerHTML='';item.myActions.appendChild(output);}
ContentInlineEditor.prototype.createSpan=function(value)
{var output=document.createElement('span');output.innerHTML=value;return output;}
ContentInlineEditor.prototype.decorate=function(elem,item)
{elem.myCallback=this;elem.myItem=item;}
function ContentInlineEditorInit(callback,contextItem)
{this.callback=callback;this.contextItem=contextItem;}
ContentInlineEditorInit.prototype.handleRequestData=function(value)
{this.callback.initElement(this.contextItem,value);}

function GlossaryDecorator(caller,doc)
{this.caller=caller;this.doc=(undefined==doc)?window.document:doc;this.cache=new Array();}
GlossaryDecorator.prototype.CSS_POPUP_ACTIVE='tooltipActive';GlossaryDecorator.prototype.CSS_POPUP_HIDDEN='tooltipHidden';GlossaryDecorator.prototype.MAX_WIDTH=200;GlossaryDecorator.prototype.doAll=function(){this.run(undefined,this.doc.body);}
GlossaryDecorator.prototype.doSection=function(body){this.run(undefined,body);}
GlossaryDecorator.prototype.run=function(criteria,body)
{this.doItem(body);}
GlossaryDecorator.prototype.doItem=function(elem)
{if(elem.psGlossaryId)
{var me=this;elem.myCallback=this;elem.onmouseout=this.handleMouseOut;elem.onmouseover=this.handleMouseOver;}
var children=elem.childNodes;for(var i=0;i<children.length;i++)
this.doItem(children[i]);}
GlossaryDecorator.prototype.doPopup=function(elem,value)
{if(!elem.psMouseOver)
return;if(undefined==this.popup)
{this.popup=this.doc.createElement('div');this.popup.className=this.CSS_POPUP_HIDDEN;this.doc.body.appendChild(this.popup);}
this.popup.innerHTML=value.contents;this.popup.className=this.CSS_POPUP_ACTIVE;if(this.popup.offsetWidth>this.MAX_WIDTH)
this.popup.style.width=this.MAX_WIDTH;positionBelowElement(this.popup,elem);}
GlossaryDecorator.prototype.cacheValue=function(value){this.cache[value.id]=value;}
GlossaryDecorator.prototype.handleMouseOver=function(ev)
{this.psMouseOver=true;this.style.cursor='pointer';var me=this.myCallback;var value=me.cache[this.psGlossaryId];if(undefined!=value)
me.doPopup(this,value);else
me.caller.getGlossaryItem(this.psGlossaryId,new GlossaryDecoratorCallback(me,this));}
GlossaryDecorator.prototype.handleMouseOut=function(ev)
{this.psMouseOver=false;this.style.cursor='default';var me=this.myCallback;if(undefined!=me.popup)
me.popup.className=me.CSS_POPUP_HIDDEN;}
GlossaryDecorator.prototype.handleRequestData=function(value,elem)
{this.cacheValue(value);this.doPopup(elem,value);}
function GlossaryDecoratorCallback(callback,elem)
{this.callback=callback;this.elem=elem;}
GlossaryDecoratorCallback.prototype.handleRequestData=function(value)
{this.callback.handleRequestData(value,this.elem);}


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_RSS_FEED='RSS Feed';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 ROLE_BLUE_SKY='BLUE';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 CompanyReportItem(id,companyId,name,isActive)
{this.id=id;this.companyId=companyId;this.name=name;this.isActive=isActive;}
function EditFinancialReportCriteria(id,companyId,type)
{this.id=id;this.companyId=companyId;this.type=type;}
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,type)
{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;this.includeTypes=type;}
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 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,typeId)
{this.applicationId=applicationId;this.statusId=statusId;this.isHomePage=isHomePage;this.typeId=typeId;}
function QuoteCriteria(symbol,securityId,applicationId)
{this.symbol=symbol;this.securityId=securityId;this.applicationId=applicationId;}
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 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,symbol)
{return this.synchCall(this.servicePath+'/member/deleteNewsRelease?'+FIELD_ID+'='+id+'&symbol='+symbol);}
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.getGlobalInfo=function(id,callback)
{this.asynchPostMap(this.servicePath+'/admin/getGlobalInfo.json',{id:id},callback);}
OtcIQCalls.prototype.getInside=function(symbol,securityId,applicationId,callback)
{this.asynchPostMap(this.servicePath+'/getInside.json',{symbol:symbol,securityId:securityId,applicationId:applicationId},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.synchPostMap(this.servicePath+'/getMarketMaker.json',{mmid:mmid});}
OtcIQCalls.prototype.getMontage=function(symbol,securityId,applicationId,showMMInfo,callback)
{this.asynchPostMap(this.servicePath+'/getMontage.json',{symbol:symbol,securityId:securityId,applicationId:applicationId,showMMInfo:showMMInfo},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.synchPostMap(this.servicePath+'/getTrader.json',{id:id});}
OtcIQCalls.prototype.getUserBean=function()
{return this.synchPostMap(this.servicePath+'/getUserBean.json');}
OtcIQCalls.prototype.getTradeInfo=function(symbol,applicationId,callback)
{this.asynchPostMap(this.servicePath+'/getTradeInfo.json',{symbol:symbol,applicationId:applicationId},callback);}
OtcIQCalls.prototype.getTradeAndInside=function(symbol,applicationId,callback)
{if(isNaN(symbol))
this.asynchPostMap(this.servicePath+'/getTradeAndInside.json',{symbol:symbol,applicationId:applicationId},callback);else{this.asynchPostMap(this.servicePath+'/getTradeAndInside.json',{id:symbol,applicationId:applicationId},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.setGlobalInfo=function(value,callback)
{this.asynchPostMap(this.servicePath+'/admin/setGlobalInfo.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,callback)
{this.asynchPostMap(this.servicePath+'/member/getCompanyLogo.json',{id:companyId},callback);}
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.txt';}
OtcIQCalls.prototype.showFinancialReportUrl=function(id)
{return this.servicePath+'/showFinancialReportById.pdf?id='+id;}
OtcIQCalls.prototype.showSessionFinancialReportUrl=function()
{return this.servicePath+'/showSessionFinancialReport.pdf';}
OtcIQCalls.prototype.sendContactInfo=function(value,callback)
{this.convertAll(value);this.asynchPostMap(this.servicePath+'/sendContactInfo.json',value,callback);}

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.gotoPinkSheets=function(){window.location.href='http://www.pinksheets.com';}
OtcIQAppNav.prototype.gotoGetStarted=function(){window.location.href=this.rootPath+'/getStarted';}
OtcIQAppNav.prototype.gotoConfirmationPage=function(){window.location.href=this.rootPath+'/confirmationPage';}
OtcIQAppNav.prototype.gotoConfirmationErrorPage=function(){window.location.href=this.rootPath+'/confirmationErrorPage';}
OtcIQAppNav.prototype.gotoLogin=function(){this.gotoHome();}
OtcIQAppNav.prototype.gotoQuotes=function(){window.location.href=this.rootPath+'/quotes';}
OtcIQAppNav.prototype.gotoContact=function(){window.location.href=this.rootPath+'/contact';}
OtcIQAppNav.prototype.gotoFees=function(){window.location.href=this.rootPath+'/fees';}
OtcIQAppNav.prototype.gotoAboutus=function(){window.location.href=this.rootPath+'/aboutus';}
OtcIQAppNav.prototype.gotoContactUs=function(){window.location.href=this.rootPath+'/contactUs';}
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.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/tm'+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/tos'+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/privacy'+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/risk'+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.gotoForgotPassword=function(){window.location.href=this.rootPath+'/forgotPassword';}
OtcIQAppNav.prototype.gotoServices=function(){this.gotoServicesPre();}
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.openIssuerAgreement=function(){window.open('https://www.otciq.com/content/doc/iq/subscription_agreement.doc');}
OtcIQAppNav.prototype.openQXListingAgreement=function(){window.open('https://www.otciq.com/content/doc/qx/Agreement/Listing/OTCQX.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,'&');}
OtcIQAppNav.prototype.gotoAdmin=function(){this.gotoAccountDir();}
OtcIQAppNav.prototype.gotoAccountDir=function(){window.location.href=this.rootPath+'/admin/accountDir';}
OtcIQAppNav.prototype.gotoAccountDetails=function(companyId,symbol){window.location.href=this.rootPath+'/admin/accountDetails'+toHttpParameter(FIELD_COMPANY_ID,companyId,'?')+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoAddCustomer=function(){window.location.href=this.rootPath+'/admin/addCustomer';}
OtcIQAppNav.prototype.gotoViewPinkNews=function(){window.location.href=this.rootPath+'/admin/viewPinkNews';}
OtcIQAppNav.prototype.gotoAddPinkNews=function(){window.location.href=this.rootPath+'/admin/addPinkNews';}
OtcIQAppNav.prototype.gotoGlobalInfo=function(){window.location.href=this.rootPath+'/admin/globalInfo';}
OtcIQAppNav.prototype.gotoUserDir=function(){window.location.href=this.rootPath+'/admin/userDir';}
OtcIQAppNav.prototype.gotoAdminOtcMarketReport=function(companyId,symbol){window.location.href=this.rootPath+'/admin/otcMarketReport'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoAdminAddAnnouncement=function(companyId,symbol){window.location.href=this.rootPath+'/admin/addAnnouncement'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoAdminAddTempSuspension=function(companyId,symbol){window.location.href=this.rootPath+'/admin/addTempSuspension'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoCurrentMarket=function(){window.location.href=this.rootPath+'/member/currentMarket';}
OtcIQAppNav.prototype.gotoRealTimeTradeStats=function(){this.gotoCurrentMarket();}
OtcIQAppNav.prototype.gotoClosingSummary=function(){window.location.href=this.rootPath+'/member/closingSummary';}
OtcIQAppNav.prototype.gotoMarketMakerData=function(){window.location.href=this.rootPath+'/member/marketMakerData';}
OtcIQAppNav.prototype.gotoNewsAndReports=function(companyId,symbol){window.location.href=this.rootPath+'/member/newsAndReports'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoFilings=function(companyId,symbol){window.location.href=this.rootPath+'/member/newsAndReports?tab=1'+toHttpParameter(FIELD_SYMBOL,symbol,'&');}
OtcIQAppNav.prototype.gotoCorporateActions=function(){window.location.href=this.rootPath+'/member/corporateActions';}
OtcIQAppNav.prototype.gotoPinkOtcMarketsNews=function(){window.location.href=this.rootPath+'/member/pinkOtcMarketsNews';}
OtcIQAppNav.prototype.gotoDashboard=function(companyId,symbol){window.location.href=this.rootPath+'/member/dashboard'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoOtcMarketReport=function(companyId,symbol){window.location.href=this.rootPath+'/member/otcMarketReport'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoBlueSky=function(companyId,symbol){window.location.href=this.rootPath+((currentUser.isAdmin)?'/admin/blueSky':((commonCaller.userBelongsToCompany(companyId).payload)?'/member/blueSky':''))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoUpdateCompanyInfo=function(companyId,symbol){window.location.href=this.rootPath+'/member/updateCompanyInfo'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoSubmitCompanyLogo=function(companyId,symbol){window.location.href=this.rootPath+((currentUser.isAdmin)?'/admin/companyLogo':((commonCaller.userBelongsToCompany(companyId).payload)?'/member/submitCompanyLogo':''))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoSymbolLookUp=function(){window.location.href=this.rootPath+'/member/symbolLookUp';}
OtcIQAppNav.prototype.gotoOTCSecuritiesDir=function(){window.location.href=this.rootPath+'/member/otcSecuritiesDir';}
OtcIQAppNav.prototype.gotoMarketMakerDir=function(){window.location.href=this.rootPath+'/member/marketMakerDir';}
OtcIQAppNav.prototype.gotoMarketActivity=function(){this.gotoCurrentMarket();}
OtcIQAppNav.prototype.gotoCompanySearch=function(compSearchType){window.location.href=this.rootPath+'/member/companySearch'+toHttpParameter(FIELD_COMP_SEARCH_TYPE,compSearchType,'?');}
OtcIQAppNav.prototype.gotoMyProfile=function(companyId,symbol){window.location.href=this.rootPath+'/member/myProfile'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoServicesQX=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesQX'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoServicesIQ=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesIQ'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoServicesNews=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesNews'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoServicesRealTime=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesRealTime'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoServicesBlueSky=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesBlueSky'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoServicesFees=function(companyId,symbol){window.location.href=this.rootPath+'/member/servicesFees'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoServicesPre=function(){window.location.href=this.rootPath+'/servicesOverview';}
OtcIQAppNav.prototype.gotoServicesIQPre=function(){window.location.href=this.rootPath+'/servicesIQ';}
OtcIQAppNav.prototype.gotoServicesQXPre=function(){window.location.href=this.rootPath+'/servicesQX';}
OtcIQAppNav.prototype.gotoServicesNewsPre=function(){window.location.href=this.rootPath+'/servicesNews';}
OtcIQAppNav.prototype.gotoServicesRealTimePre=function(){window.location.href=this.rootPath+'/servicesRealTime';}
OtcIQAppNav.prototype.gotoServicesBlueSkyPre=function(){window.location.href=this.rootPath+'/servicesBlueSky';}
OtcIQAppNav.prototype.gotoQuotes2=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/quote':'/member/quote'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myQuote':'/member/quote'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoQuotes2_=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?'/member/quote':((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myQuote':'/member/quote'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoTrade=function(companyId,symbol,tabIndex){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/trade':'/member/trade'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myTrade':'/member/trade'))+toHttpParameter(FIELD_SYMBOL,symbol,'?')+toHttpParameter('tabIndex',tabIndex,'&');}
OtcIQAppNav.prototype.gotoCharts=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/charts':'/member/charts'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myCharts':'/member/charts'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoCompanyInfo2=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/companyInfo':'/member/companyInfo2'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myCompanyInfo':'/member/companyInfo2'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoNews=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/news':'/member/news'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myNews':'/member/news'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoFinancials=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/financials':'/member/financials'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myFinancials':'/member/financials'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoShortSales=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/shortSales':'/member/shortSales'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myShortSales':'/member/shortSales'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoInsiderTrans=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/insiderTrans':'/member/insiderTrans'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myInsiderTrans':'/member/insiderTrans'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoResearch=function(companyId,symbol){if(symbol==undefined){this.gotoSymbolLookUp();return;}
window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/research':'/member/research'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/myResearch':'/member/research'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoAdminQuote=function(companyId,symbol){window.location.href=this.rootPath+'/admin/quote'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoMyQuote=function(companyId,symbol){window.location.href=this.rootPath+'/member/myQuote'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoQuoteSimple=function(companyId,symbol){window.location.href=this.rootPath+'/member/quote'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoAddNews=function(companyId,symbol){window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/addNews':'/member/news'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/addNews':'/member/news'))+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoAddReports=function(companyId,symbol,type){window.location.href=this.rootPath+((currentUser.isAdmin)?((inAccountDir)?'/admin/addReports':'/member/reports'):((commonCaller.userBelongsToCompany(companyId).payload)?'/member/addReports':'/member/reports'))+((type!=undefined)?toHttpParameter('type',type,'?'):'')+toHttpParameter(FIELD_SYMBOL,symbol,((type!=undefined)?'&':'?'));}
OtcIQAppNav.prototype.gotoVenueChanges=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/venueChanges?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoSymbolChanges=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/symbolChanges?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoCompanyNameChanges=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/companyNameChanges?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoSymbolAndNameChanges=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/symbolAndNameChanges?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoSplits=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/splits?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoDeletedSymbols=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/deletedSymbols?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoSuspended=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/suspended?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoPiggybackQualified=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/piggybackQualified?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoAnticipatedPiggybacks=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/anticipatedPiggybacks?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoExDividends=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/exDividends?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoSchedExDividends=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/schedExDividends?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoTierChanges=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/tierChanges?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoCaveatEmptor=function(search,startDate,endDate,searchType){window.location.href=this.rootPath+'/member/caveatEmptor?'
+toHttpParameter('search',search,'&')+toHttpParameter('startDate',startDate,'&')+toHttpParameter('endDate',endDate,'&')+toHttpParameter('searchType',searchType,'&');}
OtcIQAppNav.prototype.gotoContactUsAuth=function(companyId,symbol){window.location.href=this.rootPath+'/member/contactUsAuth'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoSitemap=function(companyId,symbol){window.location.href=this.rootPath+'/member/siteMap'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoLinkingAndFramingTerms=function(companyId,symbol){window.location.href=this.rootPath+'/member/linkingAndFramingTerms'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}
OtcIQAppNav.prototype.gotoQXCompanyList=function(companyId,symbol){window.location.href=this.rootPath+'/member/otcqxList'+toHttpParameter(FIELD_SYMBOL,symbol,'?');}

function TopStatsWorklistSimple(){}
TopStatsWorklistSimple.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;if(undefined==criteria.pageSize)
criteria.pageSize=this.pageSize;this.makeCall(criteria,new AjaxDataHandler(this,criteria));}
TopStatsWorklistSimple.prototype.doValue=function(value)
{var criteria=value.criteria;if(value.isRealTime)
value.footnotes=this.FOOTNOTES_REAL_TIME;else
value.footnotes=this.FOOTNOTES_DELAYED;criteria.body.innerHTML='';criteria.body.appendChild(this.viewer.generate(value,this));if((undefined!=this.callback)&&(undefined!=this.callback.handlePostLoad))
this.callback.handlePostLoad(value);}
TopStatsWorklistSimple.prototype.handlePaging=function(ev)
{var me=this.myCallback;var criteria=this.myRecord.criteria;if(undefined==criteria.page)
criteria.page=1;if(undefined!=this.pagingDir)
criteria.page+=this.pagingDir;else
criteria.page=this.selectedIndex+1;me.run(criteria);}
TopStatsWorklistSimple.prototype.gotoQuote=function(ev)
{var record=this.myRecord;this.myCallback.callback.gotoQuote(record.item);return false;}

function DecorateTradeInfo(caller,body){this.caller=caller;this.body=body;}
DecorateTradeInfo.prototype.run=function(criteria,body){body=(body==undefined)?this.body:body;var elements=body.getElementsByTagName(criteria.tagName);for(var i=0;i<elements.length;i++){var elem=elements[i];var record=elem.myRecord;if((record==undefined)||(undefined==record.symbol))
continue;var me=this;this.caller.getTradeInfo(record.symbol,APPLICATION_ID_PINKSHEETS,{handleRequestData:function(value){me.generate(value,this.elem);},elem:elem,handleRequestError:function(error){if(window.console)console.log(error);}});}}
DecorateTradeInfo.prototype.generate=function(value,criteria){var dollarSign='$';if(criteria.myLastTrade){var lastTradeAmount=(value.lastSale==undefined)?toDisplayable(value.lastSale):dollarSign+value.lastSale;criteria.myLastTrade.appendChild(document.createTextNode(lastTradeAmount));}
if(criteria.myVolume)
criteria.myVolume.appendChild(document.createTextNode(toDisplayable(value.volumeFormatted)));}

function SearchBar(name,caller,commonCaller,appNav,body,classCriteria)
{this.name=name;this.caller=caller;this.commonCaller=commonCaller;this.appNav=appNav;this.body=body;this.classCriteria=classCriteria;}
SearchBar.prototype.paint=function(body)
{if(body==undefined)
body=this.body;this.generate(body);}
SearchBar.prototype.generate=function(body)
{var output,ul,li,a,h4,elem,left;output=document.createElement('span');left=document.createElement('div');left.className='left';h4=document.createElement('h4');h4.appendChild(document.createTextNode('GET QUOTE'));var inputField=new InputField();var form=document.createElement('form');form.className='getQuoteForm';form.onsubmit=function(ev){doQuotePage(this.quoteBox);return false;};form.appendChild(elem=inputField.genTextBox('quoteBox',15,15));elem.className='quiet textBox';elem.autocomplete='off';elem.onfocus=function(ev){toggleFormValue(this,'Enter a Symbol','');};elem.onblur=function(ev){toggleFormValue(this,'','Enter a Symbol');};form.appendChild(document.createTextNode(' '));form.appendChild(inputField.genSubmitX('submit','GO','searchButtonX'));left.appendChild(h4);left.appendChild(form);ul=document.createElement('ul');ul.id='directories';ul.className='right';ul.appendChild(li=document.createElement('li'));li.className=this.classCriteria.symLookUpClass;li.appendChild(a=document.createElement('a'));a.href='javascript:appNav.gotoSymbolLookUp();';a.appendChild(document.createTextNode('Symbol Lookup'));ul.appendChild(li=document.createElement('li'));li.className=this.classCriteria.otcSecDirClass;li.appendChild(a=document.createElement('a'));a.href='javascript:appNav.gotoOTCSecuritiesDir();';a.appendChild(document.createTextNode('OTC Securities Directory'));ul.appendChild(li=document.createElement('li'));li.className=this.classCriteria.mmDirClass;li.appendChild(a=document.createElement('a'));a.href='javascript:appNav.gotoMarketMakerDir();';a.appendChild(document.createTextNode('Market Maker Directory'));output.appendChild(left);output.appendChild(ul);body.innerHTML='';body.appendChild(output);}
SearchBar.prototype.createAnchor=function(appNav,caption)
{var output=document.createElement('a');output.href='javascript:void(null);';output.innerHTML=(undefined!=caption)?caption:'';output.onclick=appNav.doSearchSymbol;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 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 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:issuers@pinkotc.com">issuers@pinkotc.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');var body=value.criteria.body;if(body.reportTypes&&!this.noUserPermission){output.appendChild(elem=new SelectListDOM().generate('finReportType',body.reportTypes,'Show All Report Types','finReportType',callback.callback.onSelectFinReport))
elem.myCallback=callback.callback;elem.value=value.criteria.includeTypes;}
if((this.noUserPermission)||(undefined==records)||(0==records.length))
{output.className='note';if(this.noUserPermission)
output.innerHTML=this.NO_USER_PERMISSION;else if(value.criteria.includeTypes)
output.appendChild(document.createTextNode('No Data Found.'));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;}

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:issuers@pinkotc.com">issuers@pinkotc.com.</a> <br />';ListNewsReleaseHtml.prototype.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,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 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';if(criteria.hideCaption==undefined||criteria.hideCaption==false){elem=output.createCaption();var caption=CAPTION_MONTAGE_HEADER;if(!value.isOtc)
caption+="<sup>1</sup>";elem.innerHTML=caption;elem.appendChild(Elements.genAnchor(CAPTION_REFRESH,function(ev){callback.doRefresh(criteria);return false;},'right'));}
var rows=0;var row=output.insertRow(rows++);elem=row.insertCell(0);elem.style.verticalAlign='top';elem.style.width='50%';elem.appendChild(this.genList(criteria.limitRecords==undefined?value.buyList:value.buyList.slice(0,criteria.limitRecords),CAPTION_BID_PRICE,'OW','offerWanted',value,callback));elem=row.insertCell(1);elem.style.verticalAlign='top';elem.style.width='50%';elem.appendChild(this.genList(criteria.limitRecords==undefined?value.sellList:value.sellList.slice(0,criteria.limitRecords),CAPTION_ASK_PRICE,'BW','bidWanted',value,callback));if(criteria.hideFootnote==undefined||criteria.hideFootnote==false){row=output.insertRow(rows++);elem=row.insertCell(0);elem.className='footnote';elem.innerHTML='Real time as of '+Formatter.toTimestamp(new Date());}
return output;}
MontageDOM.prototype.genList=function(list,priceCaption,priceWanted,wantedName,value,callback)
{var output=document.createElement('table');output.border=0;output.className='montage';var rows=0;var row=output.insertRow(rows++);this.createHeaderCell(row,CAPTION_MMID);this.createHeaderCell(row,priceCaption);this.createHeaderCell(row,CAPTION_SHARES);this.createHeaderCell(row,CAPTION_DATE_TIME);var cell,elem;if(undefined!=list)
{for(var i=0;i<list.length;i++)
{var item=list[i];row=output.insertRow(rows++);row.className=((i%2)==0)?'montageEven':'montageOdd';cell=this.createDetailCell(row,item,'');cell.style.fontWeight='bold';cell.myCallback=callback;cell.myValue=value;cell.myRecord=item;if(callback.handleMMOnMouseOver!=undefined)cell.onmouseover=callback.handleMMOnMouseOver;if(callback.handleMMOnMouseOut!=undefined)cell.onmouseout=callback.handleMMOnMouseOut;if(callback.gotoMarketMaker)
{cell.appendChild(elem=Elements.genAnchor(item.mmIdDisplay,function(ev){callback.gotoMarketMaker(this);return false;}));elem.myRecord=item;}
else
cell.innerHTML=Formatter.toDisplayable(item.mmIdDisplay);var price=item.price;var size=item.size;if(item[wantedName])
{price=priceWanted;size=undefined;}
else if(0==price)
{price=CAPTION_UNPRICED;size='';}
else
{price=Formatter.toPrice(price);size=Formatter.toVolume(size);}
this.createDetailCell(row,item,price);this.createDetailCell(row,item,size);this.createDetailCell(row,item,Formatter.toDateOrTime(item.transTime));}}
return output;}
MontageDOM.prototype.createHeaderCell=function(row,caption)
{var o=row.insertCell(row.cells.length);o.className='detailCaptionMin captionMontage';o.innerHTML=caption;return o;}
MontageDOM.prototype.createDetailCell=function(row,item,caption)
{var o=row.insertCell(row.cells.length);o.className=item.tdColor+' '+item.textColor;if(caption)
o.innerHTML=caption;return o;}

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(!value)
this.createCell(tr,'Unavailable',cssClass).colSpan=3;else
{this.createCellX(tr,value.bidPrice,value.bidSize,cssClass);this.createCellX(tr,value.askPrice,value.askSize,cssClass);this.createCell(tr,(value.transTime?Formatter.toDateOrTime(value.transTime):CAPTION_NA),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.createCellX=function(row,price,size,cssClass)
{if((undefined==price)||(0==price))
return this.createCell(row,'No Inside',cssClass);return this.createCell(row,Formatter.toPrice(price)+' x '+Formatter.toVolume(size)+' shares',cssClass);}
InsideDOM.prototype.createCell=function(row,caption,cssClass)
{var o=row.insertCell(row.cells.length);o.className=cssClass;o.innerHTML=caption;return o;}

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=this.createRow(output);this.createHeader(tr,CAPTION_LAST_SALE,'lastsale');this.createCell(tr,Formatter.toPrice(value.lastSale)+' &mdash; '+Formatter.toQuoteTime(value.quoteTime)).style.width='250px';this.createHeader(tr,'Daily Range','dailyhigh');this.createCellX(tr,value.dailyLow,value.dailyHigh);var tr=this.createRow(output);this.createHeader(tr,CAPTION_CHANGE,'change');if(undefined!=value.change)
{var cssClass,change=value.change;var pchange=value.percentChange;if(change<0)
{cssClass='tradePercentageDown';change=Formatter.toPrice(change);pchange=Formatter.toPercent(pchange);}
else
{cssClass='tradePercentageUp';change='+'+Formatter.toPrice(change);pchange='+'+Formatter.toPercent(pchange);}
this.createCell(tr,change+' ('+pchange+'%)',cssClass);}
else
this.createCell(tr);this.createHeader(tr,'52wk Range','annualhigh');this.createCellX(tr,value.annualLow,value.annualHigh);var tr=this.createRow(output);this.createHeader(tr,CAPTION_PREVIOUS_CLOSE,'previousclose');this.createCell(tr,Formatter.toPrice(value.previousClose));this.createHeader(tr,CAPTION_VOLUME,'volume');this.createCell(tr,Formatter.toVolume(value.volume));var tr=this.createRow(output);this.createHeader(tr,CAPTION_OPENING_PRICE,'openprice');this.createCellNA(tr,value.openingPrice);this.createHeader(tr,'Dividend (Yield)','dividend');this.createCell(tr,this.toPrice(value.dividend)+' ('+this.toPrice(value.yield)+')');tr=output.insertRow(output.rows.length).insertCell(0);tr.colSpan=4;var div=Elements.addDiv(tr,'footnote');Elements.addElem(div,'sup',undefined,'1');Elements.addText(div,'Trade data delayed '+value.delay+' minutes.');return output;}
TradeDOM.prototype.createRow=function(t)
{var o=t.insertRow(t.rows.length);o.className=((0==(t.rows.length%2))?'tradeEven':'tradeOdd');return o;}
TradeDOM.prototype.createHeader=function(row,caption,glossaryId)
{var o=row.insertCell(row.cells.length);o.psGlossaryId=glossaryId;o.style.fontWeight='bold';o.innerHTML=caption;return o;}
TradeDOM.prototype.toPrice=function(value)
{if(!value)
return CAPTION_NA;return Formatter.toPrice(value);}
TradeDOM.prototype.createCellNA=function(row,price,css)
{return this.createCell(row,this.toPrice(price),css);}
TradeDOM.prototype.createCellX=function(row,fromPrice,toPrice,css)
{return this.createCell(row,this.toPrice(fromPrice)+' &mdash; '+this.toPrice(toPrice),css);}
TradeDOM.prototype.createCell=function(row,caption,css)
{var o=row.insertCell(row.cells.length);if(caption)
o.innerHTML=caption;if(css)
o.className=css;return o;}

function SnapshotTradeHtml(){}
SnapshotTradeHtml.prototype.generate=function(value,callback)
{var row,output=document.createElement('table');output.style.width='100%';output.className='sectional snapshotTradeData';output.createCaption();row=this.createRow(output);this.createHeader(row,CAPTION_LAST_SALE,'lastsale');this.createCellX(row,value.lastSale);this.createHeader(row,CAPTION_PREVIOUS_CLOSE,'previousclose');this.createCellX(row,value.previousClose);row=this.createRow(output);this.createHeader(row,CAPTION_CHANGE,'change');if(undefined!=value.change)
{var cssClass,change=value.change;if(change<0)
{cssClass='tradePercentageDown';change=Formatter.toPrice(change);}
else
{cssClass='tradePercentageUp';change='+'+Formatter.toPrice(change);}
this.createCell(row,change,cssClass);}
else
this.createCell(row);this.createHeader(row,CAPTION_PERCENT_CHANGE,'change');if(undefined!=value.percentChange)
{var cssClass,change=value.percentChange;if(change<0)
{cssClass='tradePercentageDown';change=Formatter.toPercent(change);}
else
{cssClass='tradePercentageUp';change='+'+Formatter.toPercent(change);}
this.createCell(row,change,cssClass);}
else
this.createCell(row);row=this.createRow(output);this.createHeader(row,CAPTION_DAILY_HIGH,'dailyhigh');this.createCellX(row,value.dailyHigh);this.createHeader(row,CAPTION_DAILY_LOW,'dailylow');this.createCellX(row,value.dailyLow);row=this.createRow(output);this.createHeader(row,CAPTION_VOLUME,'volume');this.createCell(row,Formatter.toVolume(value.volume));this.createHeader(row,CAPTION_LAST_TRADE_DATE_TIME);this.createCell(row,Formatter.toQuoteTime(value.quoteTime));return output;}
SnapshotTradeHtml.prototype.createRow=function(t)
{return t.insertRow(t.rows.length);}
SnapshotTradeHtml.prototype.createHeader=function(row,caption,glossaryId)
{var o=row.insertCell(row.cells.length);o.psGlossaryId=glossaryId;o.style.fontWeight='bold';o.innerHTML=caption;return o;}
SnapshotTradeHtml.prototype.createCellX=function(row,price,css)
{return this.createCell(row,Formatter.toPrice(price),css);}
SnapshotTradeHtml.prototype.createCell=function(row,caption,css)
{var o=row.insertCell(row.cells.length);if(caption)
o.innerHTML=caption;if(css)
o.className=css;return o;}

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 TradeAggregateDOM(){}
TradeAggregateDOM.prototype.generate=function(value,callback)
{var output=document.createElement('table');output.className='mergedCells';var tr=output.insertRow(0);tr.className='heading';var td=tr.insertCell(0);var txt=document.createElement('strong');txt.appendChild(document.createTextNode('$ Volume'));td.appendChild(txt);td=tr.insertCell(1);txt=document.createElement('strong');txt.appendChild(document.createTextNode('Share Volume'));td.appendChild(txt);td=tr.insertCell(2);txt=document.createElement('strong');txt.appendChild(document.createTextNode('Trades'));td.appendChild(txt);td=tr.insertCell(3);txt=document.createElement('strong');txt.appendChild(document.createTextNode('Advancers'));td.appendChild(txt);td=tr.insertCell(4);txt=document.createElement('strong');txt.appendChild(document.createTextNode('Decliners'));td.appendChild(txt);tr=output.insertRow(1);td=tr.insertCell(0);td.innerHTML=(value.dollarVolume==undefined)?0:Formatter.toVolume(value.dollarVolume);td=tr.insertCell(1);td.innerHTML=(value.volume==undefined)?0:Formatter.toVolume(value.volume);td=tr.insertCell(2);td.innerHTML=(value.trades==undefined)?0:Formatter.toNumber(value.trades);td=tr.insertCell(3);td.innerHTML=(value.advancers==undefined)?0:Formatter.toNumber(value.advancers);td=tr.insertCell(4);td.innerHTML=(value.decliners==undefined)?0:Formatter.toNumber(value.decliners);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 RTTradeStatsSnapshotDOM2(hasPaging)
{this.hasPaging=(undefined==hasPaging)?false:hasPaging;}
RTTradeStatsSnapshotDOM2.prototype.generate=function(value,callback)
{value.latest=undefined;var output=document.createElement('div');output.className='widgetPackage';var records=value.records;if((undefined==records)||(0==records.length))
{var elem=document.createElement('div');elem.className='tabNoData';elem.appendChild(document.createTextNode('Trade data is not currently available.'));output.appendChild(elem);return output;}
var criteria=value.criteria;var itemCaption=CAPTION_SYMBOL;var latest=records[0];var table=document.createElement('table');table.className='listing';table.cellSpacing=0;var cellIndex=0;var row=table.insertRow(0);row.className='listingHeader';this.createHeaderCell(row,cellIndex++,itemCaption);if(criteria.showQuoted)
this.toRight(this.createHeaderCell(row,cellIndex++,CAPTION_UPDATES));this.toRight(this.createHeaderCell(row,cellIndex++,'Price'));this.toRight(this.createHeaderCell(row,cellIndex++,'% Change'));if((value.sortOn!='dollarVolume')&&(value.sortOn!='trade'))
this.toRight(this.createHeaderCell(row,cellIndex++,'Share Volume'));if(value.sortOn=='dollarVolume')
this.toRight(this.createHeaderCell(row,cellIndex++,'$ Vol'));if(value.sortOn=='trade')
this.toRight(this.createHeaderCell(row,cellIndex++,'# Trades'));for(var i=0;i<records.length;i++)
{cellIndex=0;row=table.insertRow(i+1);row.className=alternateCssParentListingClasses(i)+((value.bySymbol)?'':' topMMRealTime');var record=records[i];if(record.calcTime.getTime()>latest.calcTime.getTime())
latest=record;var td=row.insertCell(cellIndex++);td.className=row.className;if(callback.gotoQuote)
{var a=document.createElement('a');a.href='javascript:void(null);';a.appendChild(document.createTextNode(record.item));a.onclick=callback.gotoQuote;a.myRecord=record;a.myCallback=callback;td.appendChild(a);}
else
td.appendChild(document.createTextNode(record.itemDesc));if(criteria.showQuoted)
this.toRight(this.createDetailCell(row,cellIndex++,this.toDisplayable(Formatter.toNumber(record.numOfQuotes))));if(value.bySymbol)
{if(0==record.price)
{this.toRight(this.createDetailCell(row,cellIndex++,CAPTION_NA));this.toRight(this.createDetailCell(row,cellIndex++,CAPTION_NA));}
else
{var isPositive=(0<record.pricePct);var color=isPositive?COLOR_POSITIVE:COLOR_NEGATIVE;var sign=isPositive?'+':'';this.toRight(this.createDetailCell(row,cellIndex++,Formatter.toPrice(record.price)));this.enhancePriceCell(this.createDetailCell(row,cellIndex++,sign+Formatter.toPercent(record.pricePct)),color);}}
if((value.sortOn!='dollarVolume')&&(value.sortOn!='trade'))
this.toRight(this.createDetailCell(row,cellIndex++,Formatter.toVolume(record.volume)));if(value.sortOn=='dollarVolume')
this.toRight(this.createDetailCell(row,cellIndex++,Formatter.toVolume(record.dollarVolume)));if(value.sortOn=='trade')
this.toRight(this.createDetailCell(row,cellIndex++,this.toDisplayable(Formatter.toNumber(record.numOfTrades))));}
output.appendChild(table);value.latest=latest;if(undefined!=value.footnotes)
{output.appendChild(document.createElement('hr'));var footnote=document.createElement('div');footnote.className='footnote';for(var i=0;i<value.footnotes.length;i++)
{if(0<i)
footnote.appendChild(document.createElement('br'));var sup=document.createElement('sup');sup.appendChild(document.createTextNode((i+1)));footnote.appendChild(sup);footnote.appendChild(document.createTextNode(value.footnotes[i]));}
output.appendChild(footnote);}
if(this.hasPaging&&(PAGE_SIZE_WORKLIST<=criteria.pageSize))
output.appendChild((new PagingLinksDOM()).generate(value,callback));return output;}
RTTradeStatsSnapshotDOM2.prototype.toDisplayable=function(value)
{if(undefined==value)
return CAPTION_NA;return value;}
RTTradeStatsSnapshotDOM2.prototype.createHeaderCell=function(row,index,caption)
{var output=row.insertCell(index);output.className='listingHeader';output.style.whiteSpace='nowrap';output.appendChild(document.createTextNode(caption));return output;}
RTTradeStatsSnapshotDOM2.prototype.createDetailCell=function(row,index,value)
{var output=row.insertCell(index);output.className=row.className;output.innerHTML=value;return output;}
RTTradeStatsSnapshotDOM2.prototype.toRight=function(elem)
{elem.style.textAlign='right';return elem;}
RTTradeStatsSnapshotDOM2.prototype.enhancePriceCell=function(cell,color)
{this.toRight(cell).style.color=color;}

function RTTradeStatsSnapshotDOM(hasPaging)
{this.hasPaging=(undefined==hasPaging)?false:hasPaging;}
RTTradeStatsSnapshotDOM.prototype.CAPTIONS=['Price','Pct Chg','$ Volume','Share Volume','# Trades'];RTTradeStatsSnapshotDOM.prototype.generate=function(value,callback)
{value.latest=undefined;var output=document.createElement('div');output.className='widgetPackage';var records=value.records;if((undefined==records)||(0==records.length))
{var elem=document.createElement('div');elem.className='tabNoData';elem.appendChild(document.createTextNode('Trade data is not currently available.'));output.appendChild(elem);return output;}
var criteria=value.criteria;var itemCaption=(value.bySymbol)?CAPTION_SYMBOL:CAPTION_MARKET_MAKER;var latest=records[0];var container=document.createElement('div');container.className='listingContainer';output.appendChild(container);var table=document.createElement('table');table.className='listing';table.cellSpacing=0;var cellIndex=0;var row=table.insertRow(0);row.className='listingHeader';this.createHeaderCell(row,cellIndex++,itemCaption);if(criteria.showQuoted)
this.toRight(this.createHeaderCell(row,cellIndex++,CAPTION_UPDATES));if(value.bySymbol)
{this.toRight(this.createHeaderCell(row,cellIndex++,this.CAPTIONS[0]));this.toRight(this.createHeaderCell(row,cellIndex++,this.CAPTIONS[1]));}
this.toRight(this.createHeaderCell(row,cellIndex++,this.CAPTIONS[2]));this.toRight(this.createHeaderCell(row,cellIndex++,this.CAPTIONS[3]));this.toRight(this.createHeaderCell(row,cellIndex++,this.CAPTIONS[4]));for(var i=0;i<records.length;i++)
{cellIndex=0;row=table.insertRow(i+1);row.className=alternateCssParentListingClasses(i)+((value.bySymbol)?'':' topMMRealTime');var record=records[i];if(record.calcTime.getTime()>latest.calcTime.getTime())
latest=record;var td=row.insertCell(cellIndex++);td.className=row.className;if(callback.gotoQuote)
{var a=document.createElement('a');a.href='javascript:void(null);';a.appendChild(document.createTextNode(record.item));a.onclick=callback.gotoQuote;a.myRecord=record;a.myCallback=callback;td.appendChild(a);}
else
td.appendChild(document.createTextNode(record.itemDesc));if(criteria.showQuoted)
this.toRight(this.createDetailCell(row,cellIndex++,this.toDisplayable(Formatter.toNumber(record.numOfQuotes))));if(value.bySymbol)
{if(0==record.price)
{this.toRight(this.createDetailCell(row,cellIndex++,CAPTION_NA));this.toRight(this.createDetailCell(row,cellIndex++,CAPTION_NA));}
else
{var isPositive=(0<record.pricePct);var color=isPositive?COLOR_POSITIVE:COLOR_NEGATIVE;var sign=isPositive?'+':'';this.toRight(this.createDetailCell(row,cellIndex++,Formatter.toPrice(record.price)));this.enhancePriceCell(this.createDetailCell(row,cellIndex++,sign+Formatter.toPercent(record.pricePct)),color);}}
this.toRight(this.createDetailCell(row,cellIndex++,Formatter.toVolume(record.dollarVolume)));this.toRight(this.createDetailCell(row,cellIndex++,Formatter.toVolume(record.volume)));this.toRight(this.createDetailCell(row,cellIndex++,this.toDisplayable(Formatter.toNumber(record.numOfTrades))));}
container.appendChild(table);value.latest=latest;if(undefined!=value.footnotes)
{output.appendChild(document.createElement('hr'));var footnote=document.createElement('div');footnote.className='footnote';for(var i=0;i<value.footnotes.length;i++)
{if(0<i)
footnote.appendChild(document.createElement('br'));var sup=document.createElement('sup');sup.appendChild(document.createTextNode((i+1)));footnote.appendChild(sup);footnote.appendChild(document.createTextNode(value.footnotes[i]));}
output.appendChild(footnote);}
if(this.hasPaging&&(PAGE_SIZE_WORKLIST<=criteria.pageSize))
output.appendChild((new PagingLinksDOM()).generate(value,callback));return output;}
RTTradeStatsSnapshotDOM.prototype.toDisplayable=function(value)
{if(undefined==value)
return CAPTION_NA;return value;}
RTTradeStatsSnapshotDOM.prototype.createHeaderCell=function(row,index,caption)
{var output=row.insertCell(index);output.className='listingHeader';output.style.whiteSpace='nowrap';output.appendChild(document.createTextNode(caption));return output;}
RTTradeStatsSnapshotDOM.prototype.createDetailCell=function(row,index,value)
{var output=row.insertCell(index);output.className=row.className;output.innerHTML=value;return output;}
RTTradeStatsSnapshotDOM.prototype.toRight=function(elem)
{elem.style.textAlign='right';return elem;}
RTTradeStatsSnapshotDOM.prototype.enhancePriceCell=function(cell,color)
{this.toRight(cell).style.color=color;}

function RTTradeStatsHandler2(body,timeStampBody,pageSize,appid,callback,tierGroupId)
{this.body=body;this.timeStampBody=timeStampBody;this.pageSize=(pageSize==undefined)?PAGE_SIZE_WORKLIST:pageSize;var caller=new OtcIQCalls();var viewer=new RTTradeStatsSnapshotDOM();this.wombatHandler=new TopWombatTradesSimple(caller,viewer,undefined,this,this.pageSize,appid);this.quotedHandler=new TopQuotedSimple(caller,viewer,undefined,this,this.pageSize,appid);this.anchorList=new FancyAnchorList();this.callback=callback;this.tierGroupId=tierGroupId;}
RTTradeStatsHandler2.prototype.TAB_CAPTIONS=['Most Active','Advancers','Decliners','Most Updated'];RTTradeStatsHandler2.prototype.TAB_CALLS=['doTopSymbols','doGainers','doLosers','doMostUpdated'];RTTradeStatsHandler2.prototype.TOP_TRADE_TITLES=['$ Volume','Share Volume','# Trades'];RTTradeStatsHandler2.prototype.TOP_TRADE_CALLS=['doDollarVolume','doVolume','doTrades'];RTTradeStatsHandler2.prototype.MOVERS_TITLES=['Over $1','Over $0.05','All'];RTTradeStatsHandler2.prototype.GAINERS_CALLS=['doGainersOverDollar','doGainersOver5Cents','doAllGainers'];RTTradeStatsHandler2.prototype.LOSERS_CALLS=['doLosersOverDollar','doLosersOver5Cents','doAllLosers'];RTTradeStatsHandler2.prototype.TOP_QUOTED_CALLS=['doQuotedOverDollar','doQuotedOver5Cents','doAllQuoted'];RTTradeStatsHandler2.prototype.MORE_TRADE_STATS='gotoRealTimeTradeStats';RTTradeStatsHandler2.prototype.CAPTION_MORE='More >>';RTTradeStatsHandler2.prototype.init=function(uriPrefix){this.tabberOptions={'ids':undefined,'defaultTab':0,'titles':this.TAB_CAPTIONS,'calls':this.TAB_CALLS,'onClick':function(args)
{var call=this.calls[args.index];this.callback.handleTabbed(call);try{this.callback[call](args.tab.body);}
catch(error){window.alert(error);return false;}
args.tab.isEmpty=false;return true;},'onLoad':function(args){this.onClick(args);},'uriPrefix':(undefined==uriPrefix)?'':uriPrefix}
this.tabberOptions.callback=this;this.tabber=new Tabbers(this.tabberOptions);}
RTTradeStatsHandler2.prototype.handlePostLoad=function(value)
{if(this.timeStampBody==undefined)
return;var elem=this.timeStampBody;if(undefined==value.latest)
elem.innerHTML='';else
elem.innerHTML=Formatter.toDateTime2(value.latest.calcTime);}
RTTradeStatsHandler2.prototype.handleTabbed=function(value)
{if((undefined!=this.callback)&&(undefined!=this.callback.handleTabbed))
this.callback.handleTabbed(value);}
RTTradeStatsHandler2.prototype.run=function()
{this.tabber.run(this.body);}
RTTradeStatsHandler2.prototype.doLast=function()
{if(undefined==this.lastCallback)
return;this.lastCallback[this.lastAction](this.lastBody);}
RTTradeStatsHandler2.prototype.setLast=function(callback,action,body)
{this.lastCallback=callback;this.lastAction=action;this.lastBody=body;}
RTTradeStatsHandler2.prototype.doTopMarketMakers=function(body)
{this.createTabBody(this.TOP_TRADE_TITLES,this.TOP_TRADE_CALLS,body,this.mmHandler,this.MORE_MARKET_MAKER_STATS);}
RTTradeStatsHandler2.prototype.doTopSymbols=function(body)
{this.createTabBody(this.TOP_TRADE_TITLES,this.TOP_TRADE_CALLS,body,this,this.MORE_TRADE_STATS);}
RTTradeStatsHandler2.prototype.doGainers=function(body)
{this.createTabBody(this.MOVERS_TITLES,this.GAINERS_CALLS,body,this,this.MORE_TRADE_STATS);}
RTTradeStatsHandler2.prototype.doLosers=function(body)
{this.createTabBody(this.MOVERS_TITLES,this.LOSERS_CALLS,body,this,this.MORE_TRADE_STATS);}
RTTradeStatsHandler2.prototype.doMostUpdated=function(body)
{this.createTabBody(this.MOVERS_TITLES,this.TOP_QUOTED_CALLS,body,this,this.MORE_TRADE_STATS);}
RTTradeStatsHandler2.prototype.handleAnchorSelect=function(action,caption,criteria)
{var me=criteria.myCallback;var body=criteria.myBody;me[action](body);this.setLast(me,action,body);}
RTTradeStatsHandler2.prototype.doGainersOverDollar=function(body){this.wombatHandler.doGainers(body,undefined,1,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doGainersOver5Cents=function(body){this.wombatHandler.doGainers(body,undefined,.05,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doAllGainers=function(body){this.wombatHandler.doGainers(body,undefined,undefined,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doLosersOverDollar=function(body){this.wombatHandler.doLosers(body,undefined,1,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doLosersOver5Cents=function(body){this.wombatHandler.doLosers(body,undefined,.05,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doAllLosers=function(body){this.wombatHandler.doLosers(body,undefined,undefined,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doQuotedOverDollar=function(body){this.quotedHandler.doFilter(body,undefined,1,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doQuotedOver5Cents=function(body){this.quotedHandler.doFilter(body,undefined,.05,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doAllQuoted=function(body){this.quotedHandler.doFilter(body,undefined,undefined,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doDollarVolume=function(body){this.wombatHandler.doDollarVolume(body,undefined,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doVolume=function(body){this.wombatHandler.doVolume(body,undefined,this.tierGroupId);}
RTTradeStatsHandler2.prototype.doTrades=function(body){this.wombatHandler.doTrades(body,undefined,this.tierGroupId);}
RTTradeStatsHandler2.prototype.gotoQuote=function(symbol,securityId)
{appNav.gotoQuotePage(symbol);}
RTTradeStatsHandler2.prototype.createTabBody=function(captions,actions,body,callback,moreAction)
{body.innerHTML='';var table=document.createElement('table');table.border=0;table.cellSpacing=0;table.cellPadding=0;table.style.width='100%';var row=table.insertRow(0);var cell=row.insertCell(0);var subBody=document.createElement('div');subBody.className='bodyContainer';var span=document.createElement('span');span.className='sortTitle';span.appendChild(document.createTextNode('sort by: '));cell.appendChild(span);cell.appendChild(this.createAnchors(captions,actions,subBody,callback));row=table.insertRow(1);cell=row.insertCell(0);cell.colSpan=2;cell.appendChild(subBody);body.appendChild(table);body.appendChild(row=document.createElement('div'));row.appendChild(cell=document.createElement('a'));row.className='more';cell.href='javascript:appNav.'+moreAction+'()';cell.innerHTML=this.CAPTION_MORE;callback[actions[0]](subBody);this.setLast(callback,actions[0],subBody);}
RTTradeStatsHandler2.prototype.createAnchors=function(captions,actions,body,callback)
{var listItems={ids:actions,values:captions};var anchorCriteria=new AnchorListCriteria(listItems,actions[0],this);anchorCriteria.myCallback=callback;anchorCriteria.myBody=body;var output=document.createElement('div');output.className='anchorContainer';this.anchorList.run(anchorCriteria,output);return output;}

function ListPinkNewsSimple(caller,viewer,pageSize,body,isOpenTab,applicationId,callback)
{this.caller=caller;this.viewer=viewer;this.pageSize=pageSize;this.body=body;this.isOpenTab=isOpenTab;this.callback=callback;if(!this.isOpenTab)
{this.storyViewer=new NewsReleaseHtml(new NewsContentHtml(false));this.contentWindow=new ContentWindow();}
this.applicationId=applicationId;}
ListPinkNewsSimple.prototype=new WorklistSimple();ListPinkNewsSimple.prototype.doQxHome=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_OTCQX,STATUS_ID_ACTIVE,true),body);}
ListPinkNewsSimple.prototype.doLatestQx=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_OTCQX,STATUS_ID_ACTIVE),body);}
ListPinkNewsSimple.prototype.doIqHome=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_OTCIQ,STATUS_ID_ACTIVE,true),body);}
ListPinkNewsSimple.prototype.doLatestIq=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_OTCIQ,STATUS_ID_ACTIVE),body);}
ListPinkNewsSimple.prototype.doPsHome=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_PINKSHEETS,STATUS_ID_ACTIVE,true),body);}
ListPinkNewsSimple.prototype.doLatestPs=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_PINKSHEETS,STATUS_ID_ACTIVE),body);}
ListPinkNewsSimple.prototype.doCorpHome=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_CORP,STATUS_ID_ACTIVE,true),body);}
ListPinkNewsSimple.prototype.doLatestCorp=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_CORP,STATUS_ID_ACTIVE),body);}
ListPinkNewsSimple.prototype.doQtHome=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_OTCQUOTE,STATUS_ID_ACTIVE,true),body);}
ListPinkNewsSimple.prototype.doLatestQt=function(body)
{this.run(new PinkNewsFilter(APPLICATION_ID_OTCQUOTE,STATUS_ID_ACTIVE),body);}
ListPinkNewsSimple.prototype.doLatestOtcm=function(body,typeId){this.run(new PinkNewsFilter(APPLICATION_ID_OTCMARKETS,STATUS_ID_ACTIVE,false,typeId),body);}
ListPinkNewsSimple.prototype.doSearch=function(filter,body)
{this.run(filter,body);}
ListPinkNewsSimple.prototype.makeCall=function(criteria,dataHandler)
{this.caller.getPinkNewsReleases(criteria,dataHandler);}
ListPinkNewsSimple.prototype.handleOpenContents=function(ev)
{var me=this.myCallback;var criteria=this.myValue.criteria;var id=this.myRecord.id;me.showContents(me.isOpenTab,id,criteria);return false;}
ListPinkNewsSimple.prototype.showContents=function(isOpenTab,id,criteria){if(isOpenTab){eval(appNav.gotoAllPinkSheetsNews())}else{var me=this;this.caller.getPinkNewsRelease(id,{handleRequestData:function(record)
{if(record.typeId==PINK_SHEETS_COVERAGE_NEWS_TYPE_ID)
{var openUrl=toHttpURLformat(record.contents)
window.open(openUrl);}
else
{var wrapper=new AjaxDataHandler(me,criteria);wrapper.reopen=me.reopen;var contents=me.storyViewer.generate(record,wrapper);me.contentWindow.runInline(new ContentWindowInfo(record.title,contents,criteria.body));}}});}}
ListPinkNewsSimple.prototype.reopen=function(ev)
{var wrapper=this.myCallback;wrapper.callback.run(wrapper.criteria);}
ListPinkNewsSimple.prototype.doNewsDetail=function(ev)
{this.myCallback.callback.doPinkNewsDetail(this.myRecord);}

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.doCompanyByStatus=function(companyId,statusId,body)
{this.run(new ListNewsReleaseCriteria(companyId,statusId),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.doLatestByTierGroup=function(body,tierGroup){var criteria=new ListNewsReleaseCriteria(undefined,STATUS_ID_ACTIVE);criteria.tierGroup=tierGroup;this.run(criteria,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;}
ListNewsReleaseSimple.prototype.handleReportStatus=function(ev)
{var filter,me=this.myCallback;var criteria=filter=this.myValue.criteria;if(criteria.filter)
filter=criteria.filter;var statusId=this.statusId;filter.statusId=statusId;filter.onlyActiveAndInactive=(this.myOnlyActiveAndInactive)?true:false;me.run(criteria);}

function ListFinancialReportSimple(caller,viewer,pageSize,body,statementViewer,pager,callback)
{this.caller=caller;this.viewer=viewer;this.pageSize=pageSize;this.body=body;this.statementViewer=statementViewer;this.pager=pager;this.callback=callback;}
ListFinancialReportSimple.prototype=new WorklistSimple();ListFinancialReportSimple.prototype.doSearch=function(company,statusId,body,type)
{this.run(new ListFinancialReportCriteria(company.getId(),statusId,undefined,undefined,undefined,undefined,type),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.doResearchReportsByStatus=function(companyId,status,body)
{var filter=new ListFinancialReportCriteria(companyId,status);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.doLatestByTierGroup=function(body,tierGroup){var criteria=new ListFinancialReportCriteria(undefined,STATUS_ID_ACTIVE);criteria.tierGroup=tierGroup;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;}
ListFinancialReportSimple.prototype.handleReportStatus=function(ev)
{var filter,me=this.myCallback;var criteria=filter=this.myValue.criteria;if(criteria.filter)
filter=criteria.filter;var statusId=this.statusId;filter.statusId=statusId;filter.onlyActiveAndInactive=(this.myOnlyActiveAndInactive)?true:false;me.run(criteria);}

function TopWombatTradesSimple(caller,viewer,body,callback,pageSize,appId)
{this.caller=caller;this.viewer=viewer;this.body=body;this.callback=callback;this.pageSize=pageSize;this.appId=appId;}
TopWombatTradesSimple.prototype=new TopStatsWorklistSimple();TopWombatTradesSimple.prototype.FOOTNOTES_DELAYED=['Intraday activity delayed 15 minutes.'];TopWombatTradesSimple.prototype.doTrades=function(body,pageSize,tierGroupId)
{var filter=new QtServTradeStatFilter(this.appId,pageSize,FIELD_TRADE,undefined,tierGroupId);filter.tableName='Most Active';this.doFilter(filter,body);}
TopWombatTradesSimple.prototype.doVolume=function(body,pageSize,tierGroupId)
{var filter=new QtServTradeStatFilter(this.appId,pageSize,FIELD_VOLUME,undefined,tierGroupId);filter.tableName='Most Active';this.doFilter(filter,body);}
TopWombatTradesSimple.prototype.doDollarVolume=function(body,pageSize,tierGroupId)
{var filter=new QtServTradeStatFilter(this.appId,pageSize,FIELD_DOLLAR_VOLUME,undefined,tierGroupId);filter.tableName='Most Active';this.doFilter(filter,body);}
TopWombatTradesSimple.prototype.doGainers=function(body,pageSize,priceMin,tierGroupId)
{var filter=new QtServTradeStatFilter(this.appId,pageSize,FIELD_GAIN,priceMin,tierGroupId);filter.tableName='Advancers';this.doFilter(filter,body);}
TopWombatTradesSimple.prototype.doLosers=function(body,pageSize,priceMin,tierGroupId)
{var filter=new QtServTradeStatFilter(this.appId,pageSize,FIELD_LOSS,priceMin,tierGroupId);filter.tableName='Decliners';this.doFilter(filter,body);}
TopWombatTradesSimple.prototype.doFilter=function(filter,body)
{this.run(filter,body);}
TopWombatTradesSimple.prototype.makeCall=function(criteria,dataHandler)
{this.caller.getTopWombatTrades(criteria,dataHandler);}

function TopQuotedSimple(caller,viewer,body,callback,pageSize,appId)
{this.caller=caller;this.viewer=viewer;this.body=body;this.callback=callback;this.pageSize=pageSize;this.appId=appId;}
TopQuotedSimple.prototype=new TopStatsWorklistSimple();TopQuotedSimple.prototype.FOOTNOTES_DELAYED=['Intraday activity delayed 15 minutes.'];TopQuotedSimple.prototype.doFilter=function(body,pageSize,priceMin,tierGroupId)
{this.run(new QtServTradeStatFilter(this.appId,pageSize,FIELD_GAIN,priceMin,tierGroupId),body);}
TopQuotedSimple.prototype.makeCall=function(criteria,dataHandler)
{criteria.showQuoted=true;this.caller.getTopQuoted(criteria,dataHandler);}

function TopStatsWorklistSimple(){}
TopStatsWorklistSimple.prototype.run=function(criteria,body)
{if(undefined!=body)
criteria.body=body;else if(undefined==criteria.body)
criteria.body=this.body;if(undefined==criteria.pageSize)
criteria.pageSize=this.pageSize;this.makeCall(criteria,new AjaxDataHandler(this,criteria));}
TopStatsWorklistSimple.prototype.doValue=function(value)
{var criteria=value.criteria;if(value.isRealTime)
value.footnotes=this.FOOTNOTES_REAL_TIME;else
value.footnotes=this.FOOTNOTES_DELAYED;criteria.body.innerHTML='';criteria.body.appendChild(this.viewer.generate(value,this));if((undefined!=this.callback)&&(undefined!=this.callback.handlePostLoad))
this.callback.handlePostLoad(value);}
TopStatsWorklistSimple.prototype.handlePaging=function(ev)
{var me=this.myCallback;var criteria=this.myRecord.criteria;if(undefined==criteria.page)
criteria.page=1;if(undefined!=this.pagingDir)
criteria.page+=this.pagingDir;else
criteria.page=this.selectedIndex+1;me.run(criteria);}
TopStatsWorklistSimple.prototype.gotoQuote=function(ev)
{var record=this.myRecord;this.myCallback.callback.gotoQuote(record.item);return false;}

function TopMarketMakersSimple(caller,viewer,body,callback,pageSize,appId)
{this.caller=caller;this.viewer=viewer;this.body=body;this.callback=callback;this.pageSize=pageSize;this.appId=appId;}
TopMarketMakersSimple.prototype=new TopStatsWorklistSimple();TopMarketMakersSimple.prototype.gotoQuote=undefined;TopMarketMakersSimple.prototype.FOOTNOTES_REAL_TIME=['Market Maker data only includes Pink Link transactions.'];TopMarketMakersSimple.prototype.doTrades=function(body,pageSize,tierGroupId)
{this.doFilter(new QtServTradeStatFilter(this.appId,pageSize,FIELD_TRADE,undefined,tierGroupId),body);}
TopMarketMakersSimple.prototype.doVolume=function(body,pageSize,tierGroupId)
{this.doFilter(new QtServTradeStatFilter(this.appId,pageSize,FIELD_VOLUME,undefined,tierGroupId),body);}
TopMarketMakersSimple.prototype.doDollarVolume=function(body,pageSize,tierGroupId)
{this.doFilter(new QtServTradeStatFilter(this.appId,pageSize,FIELD_DOLLAR_VOLUME,undefined,tierGroupId),body);}
TopMarketMakersSimple.prototype.doFilter=function(filter,body)
{this.run(filter,body);}
TopMarketMakersSimple.prototype.makeCall=function(criteria,dataHandler)
{this.caller.getTopMarketMakers(criteria,dataHandler);}

function QuoteSimple(caller,edgarCaller,commonCaller,viewer,body,insideViewer,montageViewer,tradeViewer,snapshotTradeViewer,appId,callback)
{this.caller=caller;this.edgarCaller=edgarCaller;this.commonCaller=commonCaller;this.contentCaller=new PinkContentCalls();this.viewer=viewer;this.body=body;this.callback=callback;this.insideViewer=insideViewer;this.montageViewer=montageViewer;this.tradeViewer=tradeViewer;this.snapshotTradeViewer=snapshotTradeViewer;this.ratingViewer=MotleyFoolRatingDOM;this.appId=appId;this.hasBB=(appId==APPLICATION_ID_OTCIQ)?true:false;this.showMMInfo=false;this.showMotleyFool=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.CMS_REALTIME_AD_URI='/pink/realtimeAd';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(elem)
{this.getMMInfo().close();this.callback.callback.gotoMarketMaker(elem.myRecord.mmId);}
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(output.myRealtimeAd&&value.showRealtimeAd)
{me.contentCaller.getPageText(undefined,me.CMS_REALTIME_AD_URI,{handleRequestData:function(text){if(text&&text.contents)
output.myRealtimeAd.innerHTML=text.contents.replace(/\[companyName\]/g,value.companyName);else
output.myRealtimeAd.innerHTML='<p>Real-Time Level 2 quotes are available for '+value.companyName+'.<br /><a href="http://www.otcmarkets.com/products/realtime.jsp">Find out how '+value.companyName+' can make these quotes available - <b>at no cost</b> - to investors like you.</a></p>';}});}}
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 o=output.myTrade;if(undefined==value.symbol)
output.myTrade.innerHTML='<div>No Trade data available.</div>';else
{output.myTrade.appendChild(o=me.tradeViewer.generate(value,me));me.popSnapshot(criteria);if(me.showMotleyFool)
{me.commonCaller.getMotleyFool(criteria.securityId,criteria.symbol,{handleRequestData:function(motley){if(motley)
{var r=o.rows[0];var c=r.insertCell(r.cells.length);c.rowSpan=o.rows.length;c.className='motleyFool';Elements.addDiv(c,'motleyFool').appendChild(me.ratingViewer.generate(motley,me));}},handleRequestError:function(error){Elements.addDiv(c,'motleyFool',(error.message?error.message:error));}});}}
if((undefined!=me.callback)&&(undefined!=me.callback.handleTradeInfo))
me.callback.handleTradeInfo(value,o);}
QuoteSimpleTradeHandler.prototype.handleRequestError=QuoteSimpleMontageHandler.prototype.handleRequestError=QuoteSimpleInsideHandler.prototype.handleRequestError=function(error)
{this.errorBody.innerHTML=(error.message?error.message:error);}

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';}

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 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 NewsWorklistDOM(isNewsRelease,isFR){this.isNewsRelease=(isNewsRelease==undefined)?true:isNewsRelease;this.isFR=(isFR==undefined)?false:isFR;}
NewsWorklistDOM.prototype=new WorklistDOM();NewsWorklistDOM.prototype.MAX_TITLE_CHARACTERS_PR=80;NewsWorklistDOM.prototype.MAX_TITLE_CHARACTERS_NR=26;NewsWorklistDOM.prototype.MAX_TITLE_CHARACTERS_DETAIL=70;NewsWorklistDOM.prototype.generate=function(value,callback){var records=value.records;callback.value=value;var output=document.createElement('table');output.className='listing';output.isNewsRelease=this.isNewsRelease;var row,cell,elem;var rowNum=0;var cellNum=0;var record;var maxTitle=(callback.isHome)?((this.isNewsRelease||this.isFR)?this.MAX_TITLE_CHARACTERS_NR:this.MAX_TITLE_CHARACTERS_PR):this.MAX_TITLE_CHARACTERS_DETAIL;if(!callback.isHome){row=output.insertRow(rowNum++);row.className='listingHeader';if(!value.criteria.isHomePage){cell=this.createHeaderCell(row,cellNum++,'Release Date');cell.className='listingHeader';}
if(this.isNewsRelease){cell=this.createHeaderCell(row,cellNum++,CAPTION_SYMBOL);cell.className='listingHeader';}
cell=this.createHeaderCell(row,cellNum++,'Title');cell.className='listingHeader';}
var title;for(var i=0;i<records.length;i++){record=records[i];row=output.insertRow(rowNum++);row.className=alternateCssParentListingClasses(i);cellNum=0;if(!value.criteria.isHomePage){cell=this.createDetailCell(row,cellNum++,(record.releaseDate.getMonth)?Formatter.toDate(record.releaseDate):record.releaseDate);cell.className=cell.className+' newsDate';}
if(record.symbol!=undefined){cell=row.insertCell(cellNum++);var anchor=this.createSymbolAnchor(record,callback);cell.appendChild(anchor);cell.className=row.className+' symbol';cell.style.width='0.75%';}
cell=row.insertCell(cellNum++)
elem=document.createElement('a');elem.myRecord=record;elem.myCallback=callback;elem.myValue=value;if(record.isCoverage)
{elem.href=record.contents;elem.target='_new';}else{elem.href='javascript:void(null);';elem.onclick=callback.doNewsDetail;}
elem.psDecorated=true;title=toDisplayable(record.title);elem.innerHTML=(value.criteria.isHomePage||value.criteria.isHome)?title.substring(0,maxTitle-1)+((title.length>maxTitle)?' ...':''):title;if(record.journalName)elem.appendChild(document.createTextNode('--- '+record.journalName));cell.appendChild(elem);cell.className=row.className;}
if(callback.isHome){row=output.insertRow(rowNum++);cell=row.insertCell(0);cell.colSpan=cellNum;cell.className='more';var a=document.createElement('a');a.href=(this.isNewsRelease)?((this.isFR)?'javascript:appNav.gotoFilings();':'javascript:appNav.gotoNewsRelease();'):'javascript:appNav.gotoPinkNews();';a.innerHTML='More <img src="/otcqx/images/icon-arrow-more.png"/>';cell.style.textAlign='right';cell.appendChild(a);}
if(callback.pageSize==PAGE_SIZE_WORKLIST){row=output.insertRow(rowNum++);cell=row.insertCell(0);cell.colSpan=cellNum;var pager=new PagingLinksDOM();var pagingElem=pager.generate(value,callback);cell.appendChild(pagingElem);}
return output;}

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

function OtcqxAppNav(rootPath)
{this.rootPath=(rootPath?rootPath:'/otcqx');}
OtcqxAppNav.prototype.go=function(url){window.location.href=this.rootPath+url;}
OtcqxAppNav.prototype.gotoQuote=function(search,tab){this.go('/market/quote?symbol='+search+'&tab='+(tab?tab:0));}
OtcqxAppNav.prototype.gotoQuotePage=function(symbol){this.gotoQuote(symbol);}
OtcqxAppNav.prototype.gotoNewsInQuote=function(symbol){this.gotoQuote(symbol,3);}
OtcqxAppNav.prototype.gotoFilingsInQuote=function(symbol){this.gotoQuote(symbol,4);}
OtcqxAppNav.prototype.gotoNewsRelease=function(){this.go('/market/issuerNews?tab='+0);}
OtcqxAppNav.prototype.gotoFilings=function(){this.go('/market/issuerNews?tab='+1);}
OtcqxAppNav.prototype.gotoPinkNews=function(id){this.go('/about/news'+(!id?'':'?id='+id));}
OtcqxAppNav.prototype.gotoQuoteAndCompany=function(search){this.go('/market/securitySearch?search='+search);}
OtcqxAppNav.prototype.gotoRealTimeTradeStats=function(){this.go('/market/current');}
OtcqxAppNav.prototype.gotoLinkingTermsConfirm=function(){this.go('/linkingConfirm');}
OtcqxAppNav.prototype.gotoSecurityList=function(){this.go('/market/otcqxList');}

var pageTracker=_gat._getTracker("UA-1758556-3");var commonCaller=new PinkCommonCalls();var inlineEditor;var CMS_EDITOR_SIZE='400px';var CMS_FOOTER=new PageTextContent('footer','/otcqx/footer',undefined,CMS_EDITOR_SIZE);var decorateSymbols=new DecorateSymbols(commonCaller);decorateSymbols.URL_GUIDE='#';window.decorateRSSLink=new DecorateRSSLink(commonCaller);window.onajaxcall=function(callback,value)
{if(value&&value.criteria&&value.criteria.body)
window.decorateSymbols.doSection(value.criteria.body);}
function startThePage()
{logThisPageHit();if(navigator.platform=="Win32"&&navigator.appName=="Microsoft Internet Explorer"){fixPngImages();}
if(undefined!=window.contentContext)
contentContext[contentContext.length]=CMS_FOOTER;else
contentContext=[CMS_FOOTER];if(undefined==window.contentContext)
contentContext=[];inlineEditor=new ContentInlineEditor(new PinkContentCalls(),contentContext);inlineEditor.init();setupPageLogin();}
function logThisPageHit(actionUri,symbol)
{pageTracker._trackPageview(actionUri);if(undefined==actionUri)
actionUri=window.location.pathname+window.location.search;commonCaller.logRequest(APPLICATION_ID_OTCQX,actionUri,symbol);}
function submitForm(form){doSearch();return false;}
function toggleFieldValue(field,oldValue,newValue)
{if(field.value==oldValue)
field.value=newValue;}
function resetFavicon()
{var elem=document.getElementById('favicon');var link=document.createElement('link');link.id='favicon';link.href='/otcqx/images/favicon.ico';link.rel='shortcut icon';var parent=elem.parentNode;parent.removeChild(elem);parent.appendChild(link);}
function fixPngImages(){var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);if((version>=5.5)&&(version<7)&&(document.body.filters))
{for(var i=0;i<document.images.length;i++)
{var img=document.images[i];var imgName=img.src.toUpperCase();if(imgName.substring(imgName.length-3,imgName.length)=="PNG")
{var imgID=(img.id)?"id='"+img.id+"' ":""
var imgClass=(img.className)?"class='"+img.className+"' ":""
var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' "
var imgStyle="display:inline-block;"+img.style.cssText
if(img.align=="left")imgStyle="float:left;"+imgStyle
if(img.align=="right")imgStyle="float:right;"+imgStyle
if(img.parentElement.href)imgStyle="cursor:hand;"+imgStyle
var strNewHTML="<span "+imgID+imgClass+imgTitle
+" style=\""+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"
+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+img.src+"\', sizingMethod='scale');\"></span>"
img.outerHTML=strNewHTML
i=i-1}}}}

var loginHandler=undefined;function setupPageLogin()
{var caller=new PinkCommonCalls();if(caller.isExternalUser())
return true;var span=document.getElementById('loginAnchor');if(undefined==span)
return false;var elem=document.createElement('a');elem.href='javascript:void(null)';span.innerHTML='&nbsp;|&nbsp;';span.appendChild(elem);loginHandler=new LoginHandler();loginHandler.init(elem);window.onerror=loginHandler.authException;return true;}
function LoginHandler()
{this.caller=new PinkContentCalls();this.loginForm=new LoginFormDOM(this);}
LoginHandler.prototype.init=function(elem)
{this.anchor=elem;this.anchor.myCallback=this;var canAuthor=this.caller.canAuthor();var caption=canAuthor?CAPTION_LOGOUT:CAPTION_LOGIN;var action=canAuthor?this.doPageLogout:this.doPageLogin;elem.innerHTML=caption;elem.onclick=action;}
LoginHandler.prototype.authException=function(msg,url,line)
{if((undefined==window.lastPinkException)||!window.lastPinkException.isNotAuthenticatedException)
return;window.lastPinkException=undefined;loginHandler.openLogin();}
LoginHandler.prototype.openLogin=function(){this.loginForm.open();}
LoginHandler.prototype.handlePostLogin=function()
{this.anchor.innerHTML=CAPTION_LOGOUT;this.anchor.onclick=this.doPageLogout;if(undefined!=window.inlineEditor)
inlineEditor.init();}
LoginHandler.prototype.doLogin=function(userName,password)
{return this.caller.login(userName,password).isSuccess;}
LoginHandler.prototype.doLogout=function()
{this.caller.logout();this.anchor.innerHTML=CAPTION_LOGIN;this.anchor.onclick=this.doPageLogin;if(undefined!=window.inlineEditor)
inlineEditor.init();}
LoginHandler.prototype.doPageLogin=function(ev)
{this.myCallback.openLogin();}
LoginHandler.prototype.doPageLogout=function(ev)
{this.myCallback.doLogout();}
LoginHandler.prototype.doToken=function(userName,password,tokenCode,nextTokenCode)
{return this.caller.accessRSA(userName,password,tokenCode,nextTokenCode);}
LoginHandler.prototype.hasUserToken=function(userName)
{if(undefined==this.commonCaller)
this.commonCaller=new PinkCommonCalls();return this.commonCaller.hasUserToken(userName);}
