///////////////////////////////////////////////////////////

// "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 = "";

	var myfont_size = "";

	var myfont_color = "";

	var myback_color = "";

	var mywidth = 170;

	var my12_hour = 1;



	var dn = ""; var old = "";



	if (document.all||document.getElementById) { document.write('<span id="LiveClockIENY" style="width:'+mywidth+'px; background-color:'+myback_color+'"></span>'); }

	else if (document.layers) { document.write('<ilayer bgColor="'+myback_color+'" id="ClockPosNY"><layer width="'+mywidth+'" id="LiveClockNY"></layer></ilayer>'); }

	else { old = "true"; show_clockNY(); }



	function show_clockNY() {



		//show clock in NS 4

		if (document.layers)

                document.ClockPosNY.visibility="show"

		if (old == "die") { return; }



		var DigitalNY = new Date();

		var hoursNY = DigitalNY.getHours() - 5;

		var minutesNY = DigitalNY.getMinutes();

		var secondsNY = DigitalNY.getSeconds();
		
		if (hoursNY < 0) {hoursNY = (24 + hoursNY);}
		
		if (hoursNY <=9) { hoursNY = "0"+hoursNY; }

		if (minutesNY <= 9) { minutesNY = "0"+minutesNY; }

		if (secondsNY <= 9) { secondsNY = "0"+secondsNY; }



		myclockNY = '';

		myclockNY += '<font style="color:'+myfont_color+'; font-family:'+myfont_face+'; font-size:'+myfont_size+'pt;">';

		myclockNY += hoursNY+':'+minutesNY;

		myclockNY += '</font>';



		if (old == "true") {

			document.write(myclockNY);

			old = "die"; return;

		}



		if (document.layers) {

			clockposNY = document.ClockPosNY;

			liveclockNY = clockposNY.document.LiveClockNY;

			liveclockNY.document.write(myclockNY);

			liveclockNY.document.close();

		} else if (document.all) {

			LiveClockIENY.innerHTML = myclockNY;

		} else if (document.getElementById) {

			document.getElementById("LiveClockIENY").innerHTML = myclockNY;

		}



		setTimeout("show_clockNY()",1000);

}

