var topcount=0; var tdbgcol="#f0f0f0"; function displayTopHundred(diObj) { var stockID=diObj.diID; var midpricestr= ""; var midpricevalue=0; var decimallocation= -1; var changestr=diObj.diDiff; var bid=parseFloat(diObj.diBid); var ask=parseFloat(diObj.diOffer); midpricevalue=(bid+ask)/2; midpricestr=midpricevalue.toString(); decimallocation=midpricestr.search(/\.\d{2,10}/i); if(decimallocation>-1) { midpricestr=midpricestr.slice(0,decimallocation+2); } decimallocation=0; decimallocation=changestr.search(/\.\d{2,10}/i); if(decimallocation>-1 ) { changestr=changestr.slice(0,decimallocation+2); } topcount=topcount+1; if(topcount==2) { topcount=0; } if(topcount==0) { tdbgcol="#f0f0f0"; } if(topcount==1) { tdbgcol="#e0e0e0"; } opl("
| "); opl(""); opl(" "+diObj.diID+" | "); opl(""+midpricestr+" ("+diObj.diDirection+changestr+")"); opl(" |