///////////////////////////////////////////////////////////
// "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_id3 = "Arial";
	var myfont_size_id3 = "9";
	var myfont_color_id3 = "";
	var myback_color_id3 = "";
	var mywidth_id3 = 80;
	var my12_hour_id3 = 1;

	var dn_id3 = ""; var old_id3 = "";

	if (document.all||document.getElementById) { document.write('<span id="LiveClockIE_id3" style="width:'+mywidth_id3+'px; background-color:'+myback_color_id3+'"></span>'); }
	else if (document.layers) { document.write('<ilayer bgColor="'+myback_color_id3+'" id="ClockPosNS_id3"><layer width="'+mywidth_id3+'" id="LiveClockNS_id3"></layer></ilayer>'); }
	else { old_id3 = "true"; show_clock_id3(); }

	function show_clock_id3() {

		//show clock in NS 4
		if (document.layers)
                document.ClockPosNS_id3.visibility="show"
		if (old_id3 == "die") { return; }

		var Digital_id3 = new Date();
		var hours_id3 = Digital_id3.getHours()+7;
		var minutes_id3 = Digital_id3.getMinutes();
		var seconds_id3 = Digital_id3.getSeconds();

		if (my12_hour_id3) {
			dn_id3 = "AM";
			if (hours_id3 > 12) { dn_id3 = "PM"; hours_id3 = hours_id3 - 12; }
			if (hours_id3 == 0) { hours_id3 = 12; }
		} else {
			dn_id3 = "";
		}
		if (minutes_id3 <= 9) { minutes_id3 = "0"+minutes_id3; }
		if (seconds_id3 <= 9) { seconds_id3 = "0"+seconds_id3; }

		myclock_id3 = '';
		myclock_id3 += '<font style="color:'+myfont_color_id3+'; font-family:'+myfont_face_id3+'; font-size:'+myfont_size_id3+'pt;">';
		myclock_id3 += hours_id3+':'+minutes_id3+':'+seconds_id3+' '+dn_id3;
		myclock_id3 += '</font>';

		if (old_id3 == "true") {
			document.write(myclock_id3);
			old_id3 = "die"; return;
		}

		if (document.layers) {
			clockpos_id3 = document.ClockPosNS_id3;
			liveclock_id3 = clockpos_id3.document.LiveClockNS_id3;
			liveclock_id3.document.write(myclock_id3);
			liveclock_id3.document.close();
		} else if (document.all) {
			LiveClockIE_id3.innerHTML = myclock_id3;
		} else if (document.getElementById) {
			document.getElementById("LiveClockIE_id3").innerHTML = myclock_id3;
		}

		setTimeout("show_clock_id3()",1000);
}
