var timerID = null;
var timerRunning = false;
var hasLoaded = true;
var fullclock =true;

function stopclock ()
	{
	if(timerRunning)
	clearTimeout(timerID);
	timerRunning = false;
	}

function showtime ()
	{
	var now = new Date();
var Jnow = new Date();
var hours = now.getHours();
var mese = now.getMonth();
var minutes = now.getMinutes();
	var seconds = now.getSeconds();
var TimeLocal = "";
		
GMTOffset = Jnow.getTimezoneOffset();
Jnow.setTime(Jnow.getTime() + GMTOffset*60*1000);
Jnow.setTime(Jnow.getTime() + 9*60*60*1000);
var JHours = Jnow.getHours(); 
		if ((navigator.appVersion.indexOf("MSIE 5.0; Macintosh") != -1) && (navigator.userAgent.indexOf("MSIE 5.1") == -1))
			{
			if (mese <= 11 && mese >= 4) { hours = hours + 1}
			}
		if (hours >= 24) hours = hours - 24;
TimeLocal += ((hours < 10) ? "0" : "") + hours;	
TimeLocal += ((minutes < 10) ? ":0" : ":") + minutes;
TimeLocal += ((seconds < 10) ? ":0" : ":") + seconds;
		if (hasLoaded == true)
			{
			document.clock.timeloaded.value = TimeLocal;
			hasLoaded =  false;
			}
			if (fullclock == true)
			{
			document.clock.locale.value = TimeLocal;
			}		
		timerID = setTimeout("showtime()",1000);
timerRunning = true;
			}
function startclock()
	{
	stopclock();
	showtime();
	}


function apriMessenger(url){
	var ah=screen.availHeight;
	var h=ah-200-52-257;  
	var aw=screen.availWidth;
	var w=aw-300-35;
  var wind=window.open(url,"helpmx","width=300,height=220,left=" + w + ",top=" + h + ",directories=no,location=no,status=no,statusbar=no,toolbar=no,resizable=no,menubar=no,scrollbars=no");
  if(!wind.opener) wind.opener=self;
  if(wind.focus!=null) wind.focus();
}

