// ClockItem class
ClockItem.prototype.UpdateClock		= UpdateClock;

function ClockItem(name, timeZone, category)
{
	this.Name		= name;
	this.TimeZone	= timeZone;
	this.Category	= category;
}

function UpdateClock(time)
{
	localTime		= new Date(time);
	localTime.setHours(localTime.getHours() + this.TimeZone);
	clock			= document.getElementById(this.Name);
	hours			= localTime.getHours() >= 10 ? localTime.getHours() : "0" + localTime.getHours();
	minutes			= localTime.getMinutes() >= 10 ? localTime.getMinutes() : "0" + localTime.getMinutes();
	seconds			= localTime.getSeconds() >= 10 ? localTime.getSeconds() : "0" + localTime.getSeconds();
	switch (this.Category.toUpperCase())
	{
		case "COUNTRY":
			clock.innerHTML	= hours + ":" + minutes + ":" + seconds;
			break;
		default:
			clock.innerHTML	= hours + ":" + minutes;
			break;
	}
}

// ClockList class
ClockList.prototype.Refresh		= Refresh;
ClockList.prototype.Add			= Add;

function ClockList(today)
{
	this.Items	= new Array();
	this.Today	= today;
}

function Add(clock)
{
	this.Items.push(clock);
}

function Refresh()
{
	this.Today.setSeconds(this.Today.getSeconds() + 1);
	for	(index = 0; index < this.Items.length; index++)
		this.Items[index].UpdateClock(this.Today);
}