imagewidth=320;
imageheight=240;
framerate = 2;
imagesize='size='+imagewidth+'x'+imageheight;
newImage = new Image();
document.onstop = document_onstop;
newImage.src="current.jpg?"+imagesize

function loadinit() {
newImage.onload=loadNewImageDelayed;
loadNewImage();
window.status = "AbelCam video started ...";
}

function startstop_onclick()
{
	if (startstop.value == "Stop")
	{
		stopLoad();
		startstop.value = "Start";
	}
	else
	{
		startstop.value = "Stop";
		newImage.onload=loadNewImageDelayed;
		loadNewImage();
		window.status = "AbelCam video started ...";
	}
}

function document_onstop()
{
	stopLoad();
	
}

function stopLoad()
{
	newImage.onload="";	
	startstop.value = "Start";
	window.status = "AbelCam Video stopped ...";
}
function loadNewImageDelayed()
{
setTimeout("loadNewImage()", 1000 / framerate);

window.status = "AbelCam";
}

function loadNewImage()
{
    uniq = new Date();
    uniq = uniq.getTime();
    document.images.LogiSphere.src=newImage.src;
    newImage.src="http://angelpage.dyndns.tv:8888/current.jpg?"+imagesize+'&u='+uniq;
    window.status = "AbelCam ..."; 
}

function OnErrorImage1()
{
    document.images.LogiSphere.src = "http://mustercam.mu.funpic.de/webcam/error.jpg" ;
}
  
function init()
{
	uniq = new Date();
	uniq = uniq.getTime();
	newImage.onload=loadNewImageDelayed;
	newImage.src="http://angelpage.dyndns.tv:8888/current.jpg?"+imagesize+'&u='+uniq;
}

