
var Days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
var MonthName = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');

var today = new Date( );
//var today = new Date( );

var Year = takeYear(today);
var Month = leadingZero(today.getMonth() + 1);
var DayName = Days[today.getDay()];
var Day = leadingZero(today.getDate());
var Hours = leadingZero(today.getHours());
var Minutes = leadingZero(today.getMinutes());
var Seconds = leadingZero(today.getSeconds());
var month = today.getMonth();
var month_name = MonthName[month];
var tick;

function takeYear(theDate)
{
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}

function leadingZero(nr)
{
	if (nr < 10) nr = "0" + nr;
	return nr;
}

 function stop() {
 clearTimeout(tick);
 }

var h,m,s;
var time="      ";
var date1="      ";
var ampm = "AM";

h = today.getHours();
m = today.getMinutes();
s = today.getSeconds();

function usnotime()
{
	s++;
	if (s==60)
	{
		s=0;
		m++;
	}
	if (m==60)
	{
		m=0;
		h++;
	}
	
	if (h == 0) Hours = 12;
	if (h > 11)
		ampm = "PM";
	if (h > 12)
		h -= 12;

	var mm;
	var hh;
	mm=m;
	hh=h;
	if(s<=9) s="0"+s;
	if(m<=9) mm="0"+m;
	if(h<=9) hh="0"+h;
	
	time =  hh+":"+mm+":"+s +" "+ampm;
	date1 = month_name + " " + Day + ", " +Year;
	//time = month_name + " " + Day + ", " +Year+" "+ Hours+":"+mm+":"+s;
	if( document.form1 )
	{
		if( document.form1.end_time )
			document.form1.end_time.value = Month + "/" + Day + "/" + Year + " " + Hours + ":" + mm + ":" + s;
			
		if( document.form1.start_time )
			document.form1.start_time.value = Month + "/" + Day + "/" + Year + " " + Hours + ":" + mm + ":" + s;
	}
	var timediv;
	var datediv;
	
	if( document.getElementById( "time" ) )
	   {
		timediv = document.getElementById( "time" );
		datediv = document.getElementById( "date1" );
	   }
	else
		timediv = document.getElementById( "time2" );

	timediv.childNodes[0].data = time;
	datediv.childNodes[0].data = date1;

tick=setTimeout("usnotime();",1000);
}

function cpset( FN ) {	eval( FN );  }

//-->
