///////////////////////////////////////////////////////////
// "Live Clock Lite" script - Version 1.0
// By Mark Plachetta (astroboy@zip.com.au)
//
// Get the latest version at:
// http://www.zip.com.au/~astroboy/liveclock/
//
// Based on the original script: "Upper Corner Live Clock"
// available at:
// - Dynamic Drive (http://www.dynamicdrive.com)
// - Website Abstraction (http://www.wsabstract.com)
// ========================================================
// CHANGES TO ORIGINAL SCRIPT:
// - Gave more flexibility in positioning of clock
// - Added date construct (Advanced version only)
// - User configurable
// ========================================================
// Both "Advanced" and "Lite" versions are available free
// of charge, see the website for more information on the
// two scripts.
///////////////////////////////////////////////////////////

	var myfont_face_id4 = "Arial";
	var myfont_size_id4 = "9";
	var myfont_color_id4 = "";
	var myback_color_id4 = "";
	var mywidth_id4 = 80;
	var my12_hour_id4 = 1;

	var dn_id4 = ""; var old_id4 = "";

	if (document.all||document.getElementById) { document.write('<span id="LiveClockIE_id4" style="width:'+mywidth_id4+'px; background-color:'+myback_color_id4+'"></span>'); }
	else if (document.layers) { document.write('<ilayer bgColor="'+myback_color_id4+'" id="ClockPosNS_id4"><layer width="'+mywidth_id4+'" id="LiveClockNS_id4"></layer></ilayer>'); }
	else { old_id4 = "true"; show_clock_id4(); }

	function show_clock_id4() {

		//show clock in NS 4
		if (document.layers)
                document.ClockPosNS_id4.visibility="show"
		if (old_id4 == "die") { return; }

		var Digital_id4 = new Date();
		var hours_id4 = Digital_id4.getHours()-6;
		var minutes_id4 = Digital_id4.getMinutes();
		var seconds_id4 = Digital_id4.getSeconds();

		if (my12_hour_id4) {
			dn_id4 = "AM";
			if (hours_id4 > 12) { dn_id4 = "PM"; hours_id4 = hours_id4 - 12; }
			if (hours_id4 == 0) { hours_id4 = 12; }
		} else {
			dn_id4 = "";
		}
		if (minutes_id4 <= 9) { minutes_id4 = "0"+minutes_id4; }
		if (seconds_id4 <= 9) { seconds_id4 = "0"+seconds_id4; }

		myclock_id4 = '';
		myclock_id4 += '<font style="color:'+myfont_color_id4+'; font-family:'+myfont_face_id4+'; font-size:'+myfont_size_id4+'pt;">';
		myclock_id4 += hours_id4+':'+minutes_id4+':'+seconds_id4+' '+dn_id4;
		myclock_id4 += '</font>';

		if (old_id4 == "true") {
			document.write(myclock_id4);
			old_id4 = "die"; return;
		}

		if (document.layers) {
			clockpos_id4 = document.ClockPosNS_id4;
			liveclock_id4 = clockpos_id4.document.LiveClockNS_id4;
			liveclock_id4.document.write(myclock_id4);
			liveclock_id4.document.close();
		} else if (document.all) {
			LiveClockIE_id4.innerHTML = myclock_id4;
		} else if (document.getElementById) {
			document.getElementById("LiveClockIE_id4").innerHTML = myclock_id4;
		}

		setTimeout("show_clock_id4()",1000);
}
