<!-- Copyright 1999 Chris Nell (firehawk@sk.sympatico.ca).  All rights reserved.  Used with permission.
var ampm = null;
var now = new Date();
var x = null;
var y = null;
var z = null;
var gmt = null;
var gmx = null;

function stime (a) {

//	a = a.substring(0,(a.length - 4));
	if (a.substring(a.indexOf("P"),a.length) == "PM") ampm = 12;
	else ampm = 0;
	x = a.substring(0,a.indexOf(":")) * 1;
	y = a.substring(a.indexOf(":") * 1 + 1, a.indexOf(":") * 1 + 3);
	if (x < 12) x = x + ampm;
	else x = x + (ampm - 12);
	x = (x * 60 + y * 1);

// When daylight savings changes, comment the un-commented line and un-comment the commented one.

	gmt = x + 420;
//	gmt = x + 480;

	x = (gmt - now.getTimezoneOffset()) / 60;
	y = Math.floor(x);
	z = Math.round((x - y) * 60);
	if (z < 10) z = "0" + z;
	if (y > 12) {
		if (Math.floor(y / 12) % 2 == 0) ampm = " AM";
		else ampm = " PM";
		y = y - (Math.floor(y / 12) * 12);
	}
	else ampm = " AM";
	if (y == 12) ampm = " PM";
	if (y == 0) {
		y = 12;
		ampm = " AM";
	}
	if (y < 0) {
		y = 12 + y;
		ampm = " PM";
	}
	document.writeln(y + ":" + z + ampm);
}
//-->
