// getstats.js // // Unobtrustively and transparently collect client-side statistics // that aren't captured in server logs // // Copyright (c) 2001 Keith M. Swartz, kswartz26@yahoo.com // Updates: 25 Apr 2001 16:41:47 // Added Netscape 6 support // 15 Jun 2001 15:53:03 // Now uses cookies so stats are per-user i/o per-visit. function getCookie() { var dc=document.cookie; var cookieStart=document.cookie.indexOf("oneroadvisit="); if (cookieStart<0) { // Cookie not set (we'll set it on the way out) return false; } else { // Cookie is set -- return true and exit out of entire script return true; } var cookieEnd=document.cookie.indexOf(";",cookieStart); if (cookieEnd==-1) cookieEnd=dc.length; return document.cookie.substring(cookieStart,cookieEnd); } function swapLinks() { if (getCookie()) { return true; } var i,olink,omo; for (i=0; i