var imgToUpdate;
var imgUpdateInterval;
var seqNum;
seqNum = 6;

function initUpdate(whichIMG,interval) {
	imgUpdateInterval = interval;
	imgToUpdate = whichIMG;
	upDateLoop();
}

//function updateLiveImage() {
//	myImg = document.images[imgToUpdate];
//	myImg.src = "http://www.super-reload.com/super-cam/paul_bruty"+seqNum+".jpg?refresh="+Math.ceil(Math.random()*20000000000);
//	if (seqNum>0) {
//		seqNum -= 1;
//	} else {
//		seqNum = 6;
//	}
//}

function updateLiveImage() {
	myImg = document.images[imgToUpdate];
	myImg.src = "http://www.dartfordwarbler.com/birdcam/cam.jpg?refresh="+Math.ceil(Math.random()*20000);
}

function upDateLoop() {
	updateLiveImage();
	setTimeout("upDateLoop()", imgUpdateInterval);
	
}

function yyy() {
	browser = navigator.appName;
	if (browser == 'Netscape') {
	return ((window.innerHeight-480)/2);
		} else {
		return ((document.body.clientHeight-480)/2);
	}
}
function ypos() {
	if(yyy()<60) {
		return(60);
	} else {
		return(yyy());
	}
}

function xxx() {
	browser = navigator.appName;
	if (browser == 'Netscape') {
	return ((window.innerWidth-640)/2);
		} else {
		return ((document.body.clientWidth-640)/2);
	}
}
function xpos() {
	if(xxx()<6) {
		return(6);
	} else {
		return(xxx());
	}
}

function YYYpos() {
	browser = navigator.appName;
	if (browser == 'Netscape') {
		return ((window.innerHeight)-34);
		} else {
		return ((document.body.clientHeight)-34);
	}
}