http://itxt.vibrantmedia.com/intellitxt/func.js formatted and hilited 25 July 2004.
/* This source code is Copyright (c) Vibrant Media 2001-2004 and forms part of the
  patent-pending Vibrant Media product "IntelliTXT" (sm). */



var iTT=0, Yc, Xc,Xt, Xb, gdB,dS, aOv=new Array(), goR=document.createElement('div'), gsT, gsL, goE, cc='',server='', aSME=0, bTtl=1, ipartid=0, ibid=0, ipid=0, mk=0, ts='', cId=0, iAID=0, iCF=0, aKW=null, aAD=null, gAR=1.7778, ulS='', hS='', gTU='', gTTV=0, gDBL=0, gMM=null, gBSS=0, gTI='', gDI=0,gSpitTimer=0, gSpitCheck=0;

function init(){
  if(document.all('intelliTxt')==null)
   return;
  gdB=document.body;
  dS=(document.documentElement&&document.documentElement.scrollTop)?document.documentElement:gdB;
  goR.style.position='absolute';
  gdB.appendChild(goR);
  aKW=new Array();
  aAD=new Array();
  if(document.all('iTt')==null)
   gdB.appendChild(document.createElement('<span id=iTt onpropertychange="return ttV();" class=iTt style="visibility:hidden;position:absolute;"></span>'));
  iTt.onmouseover=ttE;
  iTt.onmouseout=ttL;
  gMM=(document.onmousemove)?document.onmousemove:new Function;
  document.onmousemove=ttM;
  doIt();
  dbM('server='+server+'\ncc='+cc+'\nipid='+ipid+'\niAID='+iAID+'\niCF='+iCF,0);
  if((ipid==20)||(ipid==7)||(ipartid==31))
   gBSS=1;
}
;
function prepSpit(d){
  if(d.length){
   var e=document.createElement('SCRIPT');
   gSpitTimer=window.setInterval('checkSpit();',2000);
    e.setAttribute('src','http://'+server+'/intellitxt/spit.asp?ipid='+ipid+'&ts='+ts+'&cc='+cc+'&cf='+iCF+'&mk='+mk+'&k='+escape(d));
   gdB.appendChild(e);
  }
  ;
}
;
function checkSpit(){
  dbM('<font color=green>checkSpit()</font>',0);
  if(++gSpitCheck>=3){
   window.clearInterval(gSpitTimer);
   gSpitTimer=0;
   dbM('<font color=red>checkSpit() fail</font>',0);
   var e=document.createElement('IMG'),s='http://'+server+'/al.asp?ipid='+ipid+'&ts='+ts+'&mt=13&mv=1&cf='+iCF;
   e.setAttribute('width',1);
   e.setAttribute('height',1);
   e.setAttribute('src',s);
  }
  ;
}
;
function spitHere(){
  dbM('<b>spitHere</b>',0);
  if(gSpitTimer>=0){
   window.clearInterval(gSpitTimer);
   gSpitTimer=0;
  }
  ;
}
;
function bx(x,y,w,h){
  this.l=x;
   this.r=x+w;
  this.t=y;
   this.b=y+h;
}
;
function cBB(o){
  var b=new bx(0,0,0,0);
  if(!o)
   return b;
  var x=0,y=0,p=o;
   while(p){
   x+=p.offsetLeft;
   y+=p.offsetTop;
   p=p.offsetParent;
  }
  ;
  b.l=x;
  b.t=y;
   b.r=x+o.offsetWidth;
  b.b=y+o.offsetHeight;
  return b;
}
;
function ttV(){
   if(event.srcElement.id=='iTt')
   if(event.propertyName=='style.visibility'){
     gTTV=(event.srcElement.style.visibility=='visible');
      if(gTTV){
        var a=fABDID(aAD,gDI);
        if(a!=null)
          if(!a.v){
            var e=document.createElement('IMG');
           e.setAttribute('width',1);
           e.setAttribute('height',1);
            e.setAttribute('src','http://'+server+'/al.asp?ipid='+ipid+'&di='+gDI+'&av=1&ts='+ts);
           a.v=1;
           dbM('<b>View</b>',1);
         }
        ;
     }
     ;
   }
  ;
  return true;
}
;
function kwC(){
  if((gTTV)||(gBSS))
   if(gTU.length>0)
     window.open(gTU,'_blank');
  return false;
}
;
function ttS(d){
  iTt.style.visibility='hidden';
  var a=fABDID(aAD,d);
  if(a==null)
   return;
  iTT=1;
  var cW,cH=gdB.clientHeight,sT=dS.scrollTop;
  Yc+=sT;
  iTt.style.width=500;
  iTt.style.height=5;
  iTt.style.width='auto';
  iTt.style.height='auto';
  var sHREF='http://'+server+'/al.asp?ipid='+ipid+'&cc='+cc;
  if(a.co.length)
   sHREF+='&co='+a.co;
  if(iCF)
   sHREF+=('&cf='+iCF);
  if(iAID>0)
   sHREF+='&ai='+iAID;
  sHREF+='&di='+a.did+'&ts='+ts;
  if(a.c.length)
   sHREF+='&redir='+a.c;
  gTU=sHREF;
  dbM(d+'='+a.k+'-><font color=green>'+sHREF+'</font>',1);
  var sHTML='<nobr><a href="" onclick="return false;">';
  sHTML+=(bTtl?'<b>'+a.t+'</b>':a.t)+'</a></nobr>';
  iTt.innerHTML=sHTML;
  var nWW=iTt.clientWidth,sHTML2='<table class=iTt style="border-style: none; cursor: pointer;" onclick="kwC();" oncontextmenu="return false;" onmouseover="kwM('+d+');" onmousemove="kwM('+d+');" width=100% cellpadding=0 cellspacing=0 border=0>';
  if(aSme)
   sHTML2+='<tr><td align=middle><font color=gray size=-2>SPONSORED LINK</font></td></tr>';
   sHTML2+='<tr><td>'+sHTML+'</td></tr>';
  sHTML2+='<tr><td>'+a.tt+'</td></tr>';
  sHTML2+='<tr><td align=left><a href="" onclick="return false;">'+a.a+'</a></td></tr>';
  sHTML2+='</table>';
  iTt.innerHTML=sHTML2;
  iTt.style.width=parseInt(iTt.clientWidth)+10;
  while((parseInt(iTt.style.width)>(nWW+20))&&((iTt.clientWidth/iTt.clientHeight)>gAR))
   iTt.style.width=w(iTt)-3;
  iTt.style.width=w(iTt)+3;
  goE=cBB(event.srcElement);
  fR();
  gDI=a.did;
  window.setTimeout("iTt.style.visibility='visible';",50);
}
;
function ttM(){
  Xc=event.x;
  Yc=event.y;
  if(!iTT)
   return gMM();
  return false;
}
;
function ttE(){
  iTT=1;
}
;
function ttL(){
  iTT=0;
  setTimeout('ttH()',1000);
}
;
function ttH(){
  if(iTT!=1){
   iTt.style.visibility='hidden';
   gTU='';
   gDI=0;
   window.status='';
  }
  ;
}
;
function kwE(e,d){
  e.srcElement.style.cssText=hS;
  ttE();
  ttS(d);
}
;
function kwM(d){
  window.status=fABDID(aAD,d).t.replace(/\&pound\;/,'?');
}
;
function kwL(e){
  if(e.srcElement.className=='iAs')
   e.srcElement.style.cssText=ulS;
  ttL();
}
;
function ue(s){
  var rE=/\&\#39\;/gi;
  s=s.replace(rE,"'");
  return s;
}
;
function fR(){
  try{
    var oT=document.all('iAD');
   if(oT.length>0)
     for(var i=0;i<oT.length;i++){
       aOv[i]=cBB(oT[i]);
     }
   else{
     aOv[0]=cBB(oT);
   }
   ;
  }
  catch(ex){
   }
  ;
  gsT=dS.scrollTop;
  gsL=dS.scrollLeft;
  goR.style.visibility='visible';
  goR.style.left=goE.l;
  goR.style.top=goE.t;
  goR.style.width=1;
  goR.style.height=1;
  goR.style.top=t(goR)-10;
  goR.style.height=iTt.clientHeight+10;
  goR.style.width=iTt.clientWidth+10;
  goR.style.top=goE.t-iTt.clientHeight-10;
  if(!iOV()&&cTT()){
  }
   else{
   goR.style.left=goE.l;
   goR.style.top=goE.t+24;
   if(!iOV()&&cTT()){
   }
   else{
     pD();
   }
   ;
  }
  ;
  goR.style.visibility='hidden';
}
;
function cTT(){
  var wX,wY;
  if((goE.l+10+iTt.clientWidth)>r(goR))
   wX=r(goR)-iTt.clientWidth;
  else wX=goE.l+10;
   if(Math.abs(goE.t-t(goR))>Math.abs(goE.t-b(goR)))
   wY=t(goR)+h(goR)-parseInt(iTt.clientHeight);
  else wY=t(goR);
  if((wX>0)&&(wX>gsL)&&(wX<(gdB.clientWidth+gsL))&&(wY>0)&&(wY>gsT)&&(wY<(gdB.clientHeight+gsT))){
   iTt.style.left=wX;
   iTt.style.top=wY;
   return true;
  }
  ;
  return false;
}
;
function pD(){
  if((goE.l+10+iTt.clientWidth+gsL)<gdB.clientWidth)
   iTt.style.left=goE.l+10;
   else if((goE.l+10-iTt.clientWidth)<0)iTt.style.left=0;
  else iTt.style.left=goE.l+10-iTt.clientWidth;
  if((goE.t-10-iTt.clientHeight-gsT)<5)
   iTt.style.top=goE.b+10;
   else iTt.style.top=goE.t-10-iTt.clientHeight;
}
;
function iOV(){
  try{
   var tR=cBB(goR);
   if(tR.r>=(gdB.clientWidth+gsL)){
     goR.style.left=l(goR)-(tR.r-(gdB.clientWidth+gsL)+10);
     tR=cBB(goR);
   }
   ;
   if((tR.l<=(gsL+10))||(tR.t<=(gsT+10))||(tR.r>=(gdB.clientWidth+gsL))||(tR.b>=(gdB.clientHeight+gsT))){
     return true;
   }
   ;
   for(var i=0;i<aOv.length;i++){
     if(iO(aOv[i],tR)){
       goR.style.left=l(goR)-(tR.r-aOv[i].l+10);
       tR=cBB(goR);
       if(iO(aOv[i],tR)){
          return true;
       }
       ;
     }
     ;
   }
   ;
   return false;
  }
  catch(ex){
  }
  ;
}
;
function iO(b1,b2){
  if(b1.b>=b2.t)
   if(b1.t<=b2.b)
     if(b1.r>=b2.l)
       if(b1.l<=b2.r)
         return true;
  return false;
}
;
function l(o){
  return parseInt(o.style.left);
}
;
function t(o){
  return parseInt(o.style.top);
}
;
function w(o){
  return parseInt(o.style.width);
}
;
function h(o){
  return parseInt(o.style.height);
}
;
function r(o){
  return l(o)+w(o);
}
;
function b(o){
  return t(o)+h(o);
}
;
function iH(i,k,s,e){
  this.i=i;
  this.k=ue(k).toLowerCase();
  this.s=s;
  this.e=e;
}
;
function iA(d,k,t,tt,c,a,co){
  this.did=d;
  this.k=ue(k).toLowerCase();
  this.t=(t.length<1?'Click Here':ue(t));
  this.tt=ue(tt);
  this.c=c;
  this.a=a.replace(/\%2e/g,'.');
  this.co=co;
  this.v=0;
}
;
function iHK(i,h,s,e){
  for(var j=0;j<h.length;j++)
   if(h[j].i==i)
     if((s>=h[j].s)&&(s<=h[j].e))
       return true;
  else if((e>=h[j].s)&&(e<=h[j].e))return true;
  else if((s<=h[j].s)&&(e>=h[j].e))return true;
  return false;
}
;
function dbM(m,l){
  if(gDBL<1)
   return;
  itxtFeedback(m,l);
}
;
function fH(r,i,kw,b,m){
  var ver=(typeof(ScriptEngineMajorVersion)=="function"?Number(ScriptEngineMajorVersion()+'.'+ScriptEngineMinorVersion()):5.5),body=b.innerHTML;
  for(var f=0;f<kw.length;f++){
   if(fABK(r,kw[f])!=null)
     continue;
   var kwl,r1=new RegExp('\\b'+kw[f].replace(/\+/g,'\\+')+(ver>=5.5?'(?:\x27s)?':'')+'\\b','gi'+(ver>=5.5?'m':'')),r2=new RegExp('(</A>)|(<A )','i'),r3=new RegExp('(</?[A-Z]+)|([^#]>)','i'),bFound=0,s1,s2,s3,pE,pF,t=body;
   while((s1=r1.exec(t))&&!bFound){
     bFound=1;
     pE=lI(r1,s1);
     kwl=s1[0].length;
     pF=pE-kwl;
     if(s2=r2.exec(t.substring(pE,pE+3000)))
       if(s2[0]=='</A>'){
          bFound=0;
         pE+=lI(r2,s2);
       }
     ;
      if(bFound)
       if(s3=r3.exec(t.substring(pE-1,pE+3000)))
          if(s3[0].substring(0,1)!='<'){
           bFound=0;
           pE+=lI(r3,s3);
          }
     ;
     if(bFound){
        var lc=t.substring(pE-kwl-1,pE-kwl),rc=t.substring(pE,pE+1);
       if((lc=='-')||(lc.charCodeAt(0)==92)||(lc=='/')||(lc=='.')||(rc=='-'))
         bFound=0;
     }
     ;
     if(bFound){
        pF+=(body.length-t.length);
       bFound=!iHK(i,r,pF,pF+kwl);
     }
     ;
     t=t.substring(pE);
     r1.lastIndex=0;
   }
   ;
   if(bFound)
      r[r.length]=new iH(i,kw[f],pF,pF+kwl);
  }
  ;
  return r;
}
;
function lI(r,a){
  return(typeof(a.lastIndex)=='undefined'?r.lastIndex:a.lastIndex)
}
;
function fABK(a,k){
  for(var i=0;i<a.length;i++)
   if(a[i].k==k)
     return a[i];
  return null;
}
;
function fABDID(a,d){
  for(var i=0;i<a.length;i++)
   if(a[i].did==d)
     return a[i];
  return null;
}
;
function ng(a,i,s,v){
  for(var f=0;f<a.length;f++)
   if(a[f].i==i)
     if(a[f].s>s){
        a[f].s+=v;
       a[f].e+=v;
     }
  ;
}
;
function hIT(a,r){
  var iTxt=document.all('intelliTxt'),c=0;
   if(iTxt==null)
   return;
  var aH=new Array(iTxt.length);
  for(var i=0;i<aH.length;i++)
   aH[i]=null;
  for(var i=0;i<a.length;i++){
   var ad=a[i],hk=fABK(r,ad.k);
   if(hk!=null){
     var h=aH[hk.i];
     if(h==null)
        if(iTxt.length>1)
         h=iTxt[hk.i].innerHTML;
      else h=iTxt.innerHTML;
     var targetK=h.substring(hk.s,hk.e),s='http://'+server+'/al.asp?ipid='+ipid+'&cc='+cc;
     if(ad.co.length)
       s+='&co='+ad.co;
     if(iCF)
        s+=('&cf='+iCF);
     if(iAID>0)
        s+='&ai='+iAID;
     s+='&di='+ad.did+'&ts='+ts;
     if(ad.c.length)
       s+='&redir='+ad.c;
     s='<nobr><a class="iAs" style="'+ulS+'" href="" onclick="return kwC();" target="_blank" oncontextmenu="return false;" onmouseover="kwE(event,'+ad.did+');" onmouseout="kwL(event);" onmousemove="kwM('+ad.did+');">'+targetK+'</a></nobr>';
     h=h.substring(0,hk.s)+s+h.substring(hk.e);
     ng(r,hk.i,hk.e,s.length-(hk.e-hk.s));
     aH[hk.i]=h;
     c++;
   }
   ;
  }
  ;
  if(c>0){
   if(aH.length==1){
     if(aH[0]!=null)
        iTxt.innerHTML=aH[0];
   }
   else for(var i=0;i<aH.length;i++)if(aH[i]!=null)iTxt[i].innerHTML=aH[i];
   if(gTI.length){
     var e=document.createElement('IMG');
     e.setAttribute('width',1);
     e.setAttribute('height',1);
     e.setAttribute('src',gTI);
   }
   ;
  }
  ;
}
;
init();