////////////////////////////////////////////
//
// Erosic Web Services
// Script: E-Time
// Version: 1.0
// Date: 9 Nov 2000
// Author: eric418
// WebSite: http://erosic.uhome.net
//
// Copyright (c) 2000 Erosic Web Services. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
//
////////////////////////////////////////////

function etime(){

	var Time	= new Date()
	var Hours	= Time.getHours()
	var Minutes	= Time.getMinutes()
	var Seconds	= Time.getSeconds()
	var Ap		= "AM"

	if (Hours>12){
		Ap="PM"
		Hours=Hours-12
	}

	if (Hours==0)
		Hours=12
	if (Minutes<=9)
		Minutes="0"+Minutes
	if (Seconds<=9)
		Seconds="0"+Seconds

	var newtime=Hours+":"+Minutes+":"+Seconds+" "+Ap+" "

	if (!document.all)
		document.write(newtime)
	else
		ETime.innerHTML=newtime
}

function loadetime(){

	if (document.all)
	setInterval("etime()",1000)
}

if (!document.all)
	etime()
	window.onload=loadetime