
	
	var dtEventStart = new Date('Saturday, 28 June 2009 8:00:00 AM');
	function myPopup_high() {
		window.open( "high.html", "myWindow", "status = 1, height = 480, width = 480, resizable = 0" )
	}
	function myPopup_low() {
		window.open( "low.html", "myWindow", "status = 1, height = 480, width = 480, resizable = 0" )
	}
	function toSt(n){
		s=""
		if(n<10) s+="0"
		return s+n.toString();
	}
	var update = function() {

		var aMonth = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
		var d = new Date();
		d=new Date(d.getUTCDate() + ' ' + aMonth[d.getUTCMonth()] + ' ' + d.getUTCFullYear() + ' ' + d.getUTCHours() + ':' + d.getUTCMinutes() + ':' + d.getUTCSeconds());
		count=Math.floor((dtEventStart.getTime()-d.getTime())/1000);
		if (count <= 0)  {
			$('#counter').text(' -- days -- hours -- minutes -- seconds to go!');
			return;
		}
		text = '';
		text = toSt(count%60) + '  seconds to go! ' + text;
		count=Math.floor(count/60);
		text = toSt(count%60) + ' minutes ' + text;
		count=Math.floor(count/60);
		text = toSt(count%24) + ' hours ' + text;
		count=Math.floor(count/24);
		text = toSt(count) + ' days ' + text;
		$('#counter').text(text);
		
	}
	
	$(function() {
		update();
		setInterval(update, 500);
	});