///////////////////////////////////////////////////////////
// "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_id2 = "Arial";
	var myfont_size_id2 = "9";
	var myfont_color_id2 = "";
	var myback_color_id2 = "";
	var mywidth_id2 = 80;
	var my12_hour_id2 = 1;

	var dn_id2 = ""; var old_id2 = "";

	if (document.all||document.getElementById) { document.write('<span id="LiveClockIE_id2" style="width:'+mywidth_id2+'px; background-color:'+myback_color_id2+'"></span>'); }
	else if (document.layers) { document.write('<ilayer bgColor="'+myback_color_id2+'" id="ClockPosNS_id2"><layer width="'+mywidth_id2+'" id="LiveClockNS_id2"></layer></ilayer>'); }
	else { old_id2 = "true"; show_clock_id2(); }

	function show_clock_id2() {

		//show clock in NS 4
		if (document.layers)
                document.ClockPosNS_id2.visibility="show"
		if (old_id2 == "die") { return; }

		var Digital_id2 = new Date();
		var hours_id2 = Digital_id2.getHours()+3;
		var minutes_id2 = Digital_id2.getMinutes();
		var seconds_id2 = Digital_id2.getSeconds();

		if (my12_hour_id2) {
			dn_id2 = "AM";
			if (hours_id2 > 12) { dn_id2 = "PM"; hours_id2 = hours_id2 - 12; }
			if (hours_id2 == 0) { hours_id2 = 12; }
		} else {
			dn_id2 = "";
		}
		if (minutes_id2 <= 9) { minutes_id2 = "0"+minutes_id2; }
		if (seconds_id2 <= 9) { seconds_id2 = "0"+seconds_id2; }

		myclock_id2 = '';
		myclock_id2 += '<font style="color:'+myfont_color_id2+'; font-family:'+myfont_face_id2+'; font-size:'+myfont_size_id2+'pt;">';
		myclock_id2 += hours_id2+':'+minutes_id2+':'+seconds_id2+' '+dn_id2;
		myclock_id2 += '</font>';

		if (old_id2 == "true") {
			document.write(myclock_id2);
			old_id2 = "die"; return;
		}

		if (document.layers) {
			clockpos_id2 = document.ClockPosNS_id2;
			liveclock_id2 = clockpos_id2.document.LiveClockNS_id2;
			liveclock_id2.document.write(myclock_id2);
			liveclock_id2.document.close();
		} else if (document.all) {
			LiveClockIE_id2.innerHTML = myclock_id2;
		} else if (document.getElementById) {
			document.getElementById("LiveClockIE_id2").innerHTML = myclock_id2;
		}

		setTimeout("show_clock_id2()",1000);
}
