
// Set the BaseURL to the url of your camera
// Note: Since this file is located inside the unit itself, no base url is specified here
// Example:  var BaseURL = "http://172.21.1.122/";
var BaseURL = "http://www.jb.man.ac.uk/";

// This is the filepath to the image generating file inside the camera itself
var File = "common/camera30sec.jpg";
 
// Force an immediate image load
var theTimer = setTimeout("reloadImage()",2);

function reloadImage() {
	theDate = new Date();
	var url = BaseURL;
	url += File;
	url += "?dummy=";
	url += theDate.getTime().toString(10);
	// The above dummy cgi-parameter enforce a bypass of the browser image cache.
	// Here we actually load the image
	document.theImage.src = url;

	// Reload the image every 30 seconds (30000 ms)
	theTimer = setTimeout("reloadImage()",30000);   
}

