var ikey=4464 var ticktock=0 //timestamp accumulator -- .1 second intervals var clr=0 var swdth=0 var shght=0 var java=0 var showit var xbrowser='' var ybrowser='' var rightnow=new Date() var alpha=rightnow.getTime() //var omega var ret='' //variable for first sub page query string var s='' //mouse movement accumulator var done='' //variable signaling last flush var sec=0 //do one last flushing of the system on unload; record the time on site. function saybye(){done='&done='+(ticktock/10);flush()}; function clean(str){ str = str.replace(/;|\?|&|#/g, "_"); str = str.replace(/\+/g, "_"); str = str.replace(/\s/g, "_"); return str; } //set variables for user/browser info and send it along using the img tag ret+='http://www.nsclients.com/dobug.cfm?ikey='+ikey if(navigator.appName!==undefined) {ret+='&app='+navigator.appName}else{ret+='&app=NA'} if(navigator.systemLanguage!==undefined) {ret+='&slang='+navigator.systemLanguage}else{ret+='&slang=NA'} if(navigator.appVersion!==undefined){ret+='&appver='+clean(navigator.appVersion)}else{ret+='&appver=NA'} if(navigator.userLanguage!==undefined){ret+='&usrlng='+navigator.userLanguage}else{ret+='&usrlng=NA'} if(navigator.systemLanguage!==undefined){ret+='&syslng='+navigator.systemLanguage}else{ret+='&syslng=NA'} if(navigator.platform!=undefined){ret+='&plat='+navigator.platform}else{ret+='&plat=NA'} if (navigator.appVersion.substring(0,1) > '3') {ret+='&tz=' + rightnow.getTimezoneOffset(); ret+='&clr='+ screen.colorDepth; ret+='&swdth='+screen.width; ret+='&shght='+screen.height; ret+='&jav='+(navigator.javaEnabled()?1:0); }; ret+='&date='+(rightnow.getMonth()+1)+'-'+rightnow.getDate()+'-'+rightnow.getFullYear() ret+='&time='+rightnow.getHours()+':'+rightnow.getMinutes()+':'+rightnow.getSeconds() ret+=(location.href.length == 0)?"":'&loc='+clean(location.href); ret+=(document.referrer.length == 0)?"":'&ref='+clean(document.referrer); ret+=(location.search.length == 0)?"":'&srch='+clean(location.search); ret+=(location.hostname.length==0)?"":'&hst='+clean(location.hostname); ret+=(location.pathname.length==0)?"":'&pg='+clean(location.pathname); document.write(''); //wake up old browser event capturing if(window.captureEvents){ document.captureEvents(Event.MOUSEMOVE); //for netscape 6- document.captureEvents(Event.KEYPRESS); document.captureEvents(Event.CLICK); document.captureEvents(Event.ONUNLOAD); document.captureEvents(Event.ONLOAD); } document.onmousemove = movements; document.onkeypress = keyed; document.onclick = tickled; document.onUnload=saybye; var i=document.getElementById('bug') // On each mouse movement, append the mouse movement and timestamp to a string // Check for length, and if it's getting long, go ahead and flush back to the server function movements(e){ if (navigator.appName == "Netscape"){ xbrowser = e.pageX; ybrowser = e.pageY; } else { xbrowser = event.clientX; ybrowser = event.clientY; } s+='|'+xbrowser+','+ybrowser+','+(ticktock/10); if ((s.length>500)||(sec>29)){flush()} }; // this is the function that periodically uploads data to the server function flush(){ i.src='http://www.nsclients.com/dognat.cfm?ik='+ikey+'&xy='+s+done; s='';sec=0; } //CURRENTLY DOING NOTHING WITH KEYPRESSES function keyed(){}; //CURRENTLY DOING NOTHING WITH MOUSE CLICKS function tickled(){}; //USE A TIMER FUNCTION TO PROVIDE TIMESTAMPS FOR MOUSEMOVEMENTS //tenth of a second intervals. Will execute then, providing no other //procedures are running, so it's not exact function tocktick(){ticktock++;sec++} setInterval("tocktick()",100) function doit(){alert(ikey)}