/////////////// CONFIGURATION /////////////////////////////

	// Set any extra HTML to go either side the clock here:
	var LC_OpenTags = "";
	var LC_CloseTags = " UTC";

	// Set the width of the clock (in pixels):
	var LC_Width = 149;

	// How often do you want the clock updated?
	// 0 = Never, 1 = Every Second, 2 = Every Minute
	// If you pick 0 or 2, the seconds will not be displayed
	var LC_Update = 1;

	// Your GMT Offset: Set to "" to disable this feature.
	var LC_GMT = "1";
	// Note that this does not take into account daylight savings.

/////////////// END CONFIGURATION /////////////////////////
// Globals:
	var LC_HTML;

// This array controls how often the clock is updated,
// based on your selection in the configuration.
	var LC_ClockUpdate = new Array(3);
		LC_ClockUpdate[0] = 0;
		LC_ClockUpdate[1] = 1000;
		LC_ClockUpdate[2] = 60000;

// Basic browser detection:
	var LC_IE = (document.all) ? 1 : 0;
	var LC_NS = (document.layers) ? 1 : 0;
	var LC_N6 = (window.sidebar) ? 1 : 0;
	var LC_Old = (!LC_IE && !LC_NS && !LC_N6) ? 1 : 0;

// For Version 4+ browsers, write the appropriate HTML to the
// page for the clock, otherwise, attempt to write a static
// date to the page.
	var LC_StartTags = (LC_NS) ? '<table cellpadding="0" cellspacing="0" border="0" width="'+LC_Width+'"><tr><td>' : '';
	if (LC_IE || LC_N6) { LC_ClockTags = '<div id="LiveClockIE" style="width:'+LC_Width+'px;"></div>'; }
	else if (LC_NS) { LC_ClockTags = '<ilayer width="'+LC_Width+'" id="ClockPosNS"><layer id="LiveClockNS"></layer></ilayer>'; }
	var LC_EndTags = (LC_NS) ? '</td></tr></table>' : '';

	if (!LC_Old) { document.write(LC_StartTags+LC_ClockTags+LC_EndTags); }
	else { show_clock(); }

	onload = init;
	function init() {
		if (!LC_Old) { show_clock(); }
// If you have any other scripts which use the "onload" event,
// call them here:

	}

// The main part of the script:
	function show_clock() {

	// Get all our date variables:
		var time = new Date();
	if (LC_GMT) {
		var offset = time.getTimezoneOffset();
			if (parseInt(navigator.appVersion) == 4 && LC_NS) { offset += 60; }
			if (navigator.appVersion.indexOf('MSIE 3') != -1) { offset = offset * (-1); }
			time.setTime(time.getTime() + offset*60000);
			time.setTime(time.getTime() + LC_GMT*3600000);
	}
		var hours = time.getHours();
		var minutes = time.getMinutes();
		var seconds = time.getSeconds();

		if (minutes <= 9) { minutes = "0"+minutes; }
		if (seconds <= 9) { seconds = "0"+seconds; }

	// This is the actual HTML of the clock. If you're going to play around
	// with this, be careful to keep all your quotations in tact.
		LC_HTML = LC_OpenTags;
		LC_HTML += hours+':'+minutes+':'+seconds;
		LC_HTML += LC_CloseTags;
		
		if (LC_Old) {
			document.write(LC_HTML);
			return;
		}

	// Write the clock to the layer:
		if (LC_NS) {
			clockpos = document.layers["ClockPosNS"];
			liveclock = clockpos.document.layers["LiveClockNS"];
			liveclock.document.write(LC_HTML);
			liveclock.document.close();
		} else if (LC_IE) {
			LiveClockIE.innerHTML = LC_HTML;
		} else if (LC_N6) {
			document.getElementById("LiveClockIE").innerHTML = LC_HTML;
		}
	if (LC_Update != 0) { setTimeout("show_clock()",LC_ClockUpdate[LC_Update]); }
}
