var _Clock = function()
{
	this.interval = 1;
	this.placeholder = null;
	this.timer = null;
	this.offset = 0;
			
	this.tick = function()
	{
		if (this.placeholder == null)
		{
			return;
		}
		
		var time_obj = new Date();
		
		//var offset = (time_obj.getTimezoneOffset() / 60) + this.offset;
		//hr = time_obj.getHours();
		//time_obj.setHours(hr - offset);		
		var utc = time_obj.getTime() + (time_obj.getTimezoneOffset() * 60000);
		var nd = new Date(utc + (3600000*this.offset));
		
		var time_string = nd.getHours() + ':' + ((nd.getMinutes() < 10) ? '0' + nd.getMinutes() : nd.getMinutes())
		this.placeholder.innerHTML = time_string;		
	}
	
	this.init_clock = function(placeholder_name)
	{
		this.placeholder = document.getElementById(placeholder_name);
		this.tick();
		var scope = this;
		window.setInterval(function(){
			scope.tick();
		},1000);
	}
	return this;
}

var Clock = new _Clock();