Stamp = new Date();
document.write( (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getYear()+" ");
	var Hours;
	var Mins;
	var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
	Time = " PM.";
}else {
	Time = " AM.";
}
					
if (Hours > 12) {
	Hours -= 12;
}
					
if (Hours == 0) {
	Hours = 12;
}
					
Mins = Stamp.getMinutes();
if (Mins < 10) {
	Mins = "0" + Mins;
}



//-------------------------------------------------------


if (document.layers){
	document.write('<ilayer id="clockmain"><layer id="clock" width="100%"></layer></ilayer>');
}else{
	document.write("<span id='clock'></span>");
	var now,hours,minutes,seconds,timeValue;
					
					
	function showtime(){
		if (!document.layers&&!document.all) return;
		now = new Date();
		hours = now.getHours();
		minutes = now.getMinutes();
	    seconds = now.getSeconds();
		timeValue = (hours >= 12) ? "PM " : "AM ";
		timeValue += ((hours > 12) ? hours - 12 : hours) + ":";
		timeValue += ((minutes < 10) ? " 0" : " ") + minutes + ":";
		timeValue += ((seconds < 10) ? " 0" : " ") + seconds + "";
		if (document.layers){
			document.clockmain.document.clock.document.write(timeValue);
			document.clockmain.document.clock.document.close();
		}else if (document.all){
			clock.innerHTML = timeValue;
			setTimeout("showtime()",100);
		}
	}
		window.onload=showtime;
}
