function XtraStats() { this.screenX = screen.width; this.screenY = screen.height; this.browser = "Default Browser"; this.browserVersion = "0.0"; this.platform = "unknown"; this.ismobiledevice = ""; this.siteId = 151; this.sessid = ""; this.tracePage = function() { if( !Cookie.read('xtraStatsStored') ) { var req = new Request.JSON({ url:'/exec/clientStats.php', onRequest: function(){ }, onSuccess: function(result) { var xtraStatsCookie = Cookie.write('xtraStatsStored', true, 30); }, onFailure: function() { $('debug').set('text', 'The request failed.'); } }); req.send(this.propertiesToUrl()); } } this.propertiesToUrl = function() { var url = ''; url += 'screenX=' + this.screenX; url += '&screenY=' + this.screenY; url += '&siteId=' + this.siteId; url += '&browser=' + this.browser; url += '&browserVersion=' + this.browserVersion; url += '&platform=' + this.platform; url += '&ismobiledevice=' + this.ismobiledevice; url += '&sessid=' + this.sessid; return url; } } //var stats = new XtraStats(); //stats.tracePage();