// JavaScript Document
var speed = 2;
	 
	function cam_show()
	{
	        var imac = document.getElementById('camimage');
	        var time = now();
	        imac.onload = function()
	        {
	        start_show(imac, now()-time);
	        document.getElementById('speed').innerHTML = ((now()-time)*(speed+5))/1000;
	        };
	        imac.src = "http://62.141.120.196:90/record/current.jpg?rand=989678&r=" + Math.random();
}
	function now(){
	    return (new Date).getTime();
	}
	 
	function start_show(img, time)
	{
	     
	    setTimeout(function()
	    {
	        var ctime = now();
	        img.onload = function()
	        {
	            start_show(img, now()-ctime)
	            document.getElementById('speed').innerHTML = ((now()-ctime)*(speed+5))/1000;
	        };
	        img.src = "http://62.141.120.196:90/record/current.jpg?rand=989678&r=" + Math.random();
	    }, time*(speed+5));
	}
