//
// Created on March 10, 2004
// 
// Author: Sirbu V. Dorin
// E-mail: svd@ist.ro
//
// © INDUSTRIAL SOFTWARE TECHNOLOGIES 2004. All rights reserved. 
//
//Timer functions.

function updateTime()
{
	var time, hour, minute, sec;
	var date = new Date();
	var cell;

	hour = date.getHours();
	if(hour < 10) {
		hour = "0" + hour;
	}

	min = date.getMinutes();
	if(min < 10) {
		min = "0" + min;
	}

	sec = date.getSeconds();
	if(sec < 10) {
		sec = "0" + sec;
	}

	time = "<FONT class=pageMenuText>"  + date.getDate() + " " + month_names[date.getMonth()]
		 + " " + date.getFullYear() 
		 + " " + hour 
		 + ":" + min 
		 + ":" + sec + "</FONT>";

	if (document.all || document.getElementById) {
		var wnd = document.getElementById? document.getElementById("timeCell") : document.all.timeCell;
		if(wnd) {
			wnd.innerHTML=time;
			window.setTimeout("updateTime()", 900);
		}
	}
	/* else if (document.layers)
	{
		var wnd=document.ns_timeCell.document.ns_timeCell2;
		wnd.document.write("<table border=0 cellspasing=0 cellpadding=0 width=330 height=15><tr><td align=right vAlign=center>");
		wnd.document.write(time);
		wnd.document.write("</td></tr></table>");
		wnd.document.close();
		window.setTimeout("updateTime()", 900); 
	} */
}

function startTimer() {
	updateTime();
}