var ProxSeed = function(){ this.typeBlender = function( tstr ){ if( tstr == 'link' ){ return 1; } else if( tstr == 'hotspot' ){ return 2; } else if( tstr == 'preroll' ){ return 3; } else if( tstr == 'play' ){ return 4; } return tstr; }; this.seed = function( type, vars, callback ){ var send = []; send['p'] = 10000; send['t'] = this.typeBlender( type ); send['d'] = Ext.util.JSON.encode( vars ); var stp = new Ext.data.ScriptTagProxy({ url: 'http://lftrack.launchfire.com/cgi-bin/lftrack', timeout: 5, nocache: false, callbackParam: 'z' }); stp.load( send, null, function( record, arg, success ){ if( callback ) setTimeout( callback, 1000 ); }, this ); }; this.trackLink = function( link, callback ){ this.seed( 'link', { 'spec' : link }, callback ); }; } Tracker = new ProxSeed();