function tick()
{
	document.getElementById('CET').innerHTML = getFormatedDate(new Date());
	document.getElementById('GMT').innerHTML = getFormatedDate(new Date(), 1);
	document.getElementById('PST').innerHTML = getFormatedDate(new Date(), 6);
	window.setTimeout("tick();", 2000);
	
}

window.onload = tick;

function getFormatedDate(today, hours)
{
	if(hours)
	{
		today.setTime(today.getTime()-(3600000*hours));
	}

	intHours = today.getHours();
	intMinutes = today.getMinutes();
	intSeconds = today.getSeconds();

	if (intHours == 0) {
		hours = "00:";
	}
	else if(intHours > 0 && intHours < 10) {
		hours = "0" + intHours + ":";
	}
	else {
		hours = intHours + ":";
	}

	if (intMinutes < 10) {
		minutes = "0"+intMinutes;
	} else {
		minutes = intMinutes;
	}
	return hours+minutes;
}

function popup(link, width, height)
{
	if (! window.focus)return true;
	var href;
	if (typeof(link) == 'string')
   		href=link;
	else
	   href=link.href;
	
	window.open(href, "", 'width='+width+', height='+height+', scrollbars=no, resizable=1');
	return false;
}

function bookmark()
{
	var agt = navigator.userAgent.toLowerCase(); 
	var app = navigator.appName.toLowerCase(); 
	var ieAgent = agt.indexOf('msie'); 
	var nsAgent = app.indexOf('netscape'); 
	var opAgent = app.indexOf('opera');
	if(ieAgent != -1) {
		window.external.AddFavorite('http://www.spelapoker.se','Spela Poker - Din pokerguide på nätet');
	}
	else if (nsAgent!= -1) {
		alert("Tryck ner tangenterna CTRL och D samtidigt för att lägga till Spela Poker i Bokmärken");
	}
	else if(opAgent!= -1) {
		alert("Tryck ner tangenterna CTRL och T samtidigt för att lägga till Spela Poker i Bokmärken");
	}
}

function popImageWindow(page, width, height) {
	mywindow = window.open(page+"&amp;width="+width+"&amp;height="+height, "imageWindow"+width+"_"+height, 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width='+(width)+', height='+height+'');
}