function radarMap ( ) {
	this.map = new _map( 'map' );
	this.loader = new ajaxLoader();
	this.timeMgr = 0;
	this.tripMgr = 0;
	this.updateTimer = 0;
	this.userBoxes = 'users';

	this.zoom = function ( level ) { return this.map.zoom ( level ); };

	this.newData = function ( data ) {
		if ( this.tripMgr ) {
			this.tripMgr.newData ( data );
		}
		else {
			this.tripMgr = new _tripMgr ( data, this.map, this.userBoxes );
			this.timeMgr.startUpdates(this.nextStep.bind(this));
			this.timeMgr.tripsAreCreated();
		}
	}
	
	this.setCurrentLocation = function(atTime) {
		this.tripMgr.initializeCurrentLocation(atTime);
		this.tripMgr.redrawPath();
	}
	this.nextStep = function() {
		if ( this.timeMgr.beginUpdate() ) {
			var atTime = this.timeMgr.updateTime();
			this.map.displayTimeline(atTime);
			this.tripMgr.update(atTime);
			delete atTime;
			this.timeMgr.endUpdate();
		}
	}
	
	this.showTrakLogLink = function() {
		this.map.showTrakLogLink();
	}
	this.stopTracking = function() {
		this.loader.wait = 0;
	}
	this.initTracking = function ( delay ) {
		this.loader.initTracking(this);
		this.timeMgr = new playTimeMgr( this );
		this.timeMgr.initTracking(delay);
		this.loader.sendRequest(true);
	}
	
	this.initUseriFrameTracking = function ( user, from, delay ) {
		this.userBoxes = '';
		this.loader.initUseriFrameTracking( this, user, from );
		this.timeMgr = new playTimeMgr( this );
		this.timeMgr.initTracking(delay);
		this.loader.sendRequest(true);
	}
	
	this.initGroupiFrameTracking = function ( group, from, delay ) {
		this.userBoxes = '';
		this.loader.initGroupiFrameTracking( this, group, from );
		this.timeMgr = new playTimeMgr( this );
		this.timeMgr.initTracking(delay);
	}

	this.initUserTracking = function ( delay ) {
		this.timeMgr = new playTimeMgr( this );
		this.timeMgr.initTracking(delay);
		this.timeMgr.center = true;
	}

	this.stopUserTracking = function ( ) {
		if ( this.tripMgr ) {
			this.timeMgr.cancelTimer();
			this.tripMgr.destruct();
			delete this.tripMgr;
			this.tripMgr = 0;
		}
	}
	this.startUserTracking = function ( url, param ) {
		this.stopUserTracking();
		this.loader.initUserTracking(this, url, param);
		this.loader.sendRequest(true);
	}
	
	this.initPlayback = function ( speed ) {
		this.timeMgr = new playTimeMgr( this );
		this.timeMgr.initPlayback(speed);
		this.timeMgr.center = true;
	}
	this.startPlayback = function ( url, param ) {
		if ( this.tripMgr ) {
			this.timeMgr.cancelTimer();
			this.tripMgr.destruct();
			delete this.tripMgr;
			this.tripMgr = 0;
		}
		this.loader.initPlayback( this, url, param );
		this.loader.sendRequest(true);
	}
	this.switchURL = function ( url ) {
		window.location.href = url + "&" + this.map.getMapParameters();
	}
	this.destruct = function() {
		this.tripMgr.destruct();
		delete this.tripMgr;
		delete this.loader;
		delete this.timeMgr;
		this.map.destruct();
		delete this.map;
	}
}
