function getCookie(name) {
	var re = new RegExp(name + "=([^;]+)");
	var value = re.exec(document.cookie);
	return (value != null) ? unescape(value[1]) : null;
}
function setCookie(name, value) {
	document.cookie=name + "=" + escape(value) + "; path=/;";
}
if (!getCookie('georgesFeatureStart')) {
	now = new Date();
	featureStart = now.getTime();
	setCookie('georgesFeatureStart',featureStart);
} else {
	featureStart = getCookie('georgesFeatureStart');
}
killRate = 4.5; // birds per second
function initSlaughterCount() {
	birdCounter = setInterval('countBirds()',10);
}
function countBirds() {
	now = new Date();
	slaughterTime = (now.getTime() - featureStart)/1000;
	birdCount = Math.ceil(killRate*slaughterTime);
	el = document.getElementById('killometer');
	el.innerHTML = birdCount+'&nbsp';
}
onload = initSlaughterCount;


function streamVideo() {
	el = document.getElementById('streamBox');
	el.style.display = (el.style.display=='none') ? 'block' : 'none';
}

function selectNav(navId) {
	el = document.getElementById('nav'+navId);
	el.className = 'nav_selected';
}
