	function P80_Simulation_add(object)
	{
		this.objects[this.n]=object;
		this.n++;
	}

	function P80_Simulation_start()
	{

		var i;
		for (var i=0;i<this.n;i++)
		{
			this.objects[i].init();
		}
		this.run();

	}

	function P80_Simulation_run()
	{
		var i;
		for (var i=0;i<this.n;i++)
		{
			this.objects[i].moveNext();
		}
		this.timeout=setTimeout(this.name+".run()",this.dtshow);
		this.running=true;
	}

	function P80_Simulation_stop()
	{
		if (this.running)
		{
			clearTimeout(this.timeout);
			this.running=false;
		}
	}

	function P80_Simulation(name,dtshow)
	{
		var n=0;
		this.name=name;
		this.running=false;
		this.timeout=0;
		this.n=n;
		this.dtshow=dtshow;
		this.objects=new Array();
		this.add=P80_Simulation_add;
		this.start=P80_Simulation_start;
		this.stop=P80_Simulation_stop;
		this.run=P80_Simulation_run;
	}
