function setDateAndTime () {

	varMonths = new Array();
	varMonths[0] = "January"
	varMonths[1] = "February"
	varMonths[2] = "March"
	varMonths[3] = "April"
	varMonths[4] = "May"
	varMonths[5] = "June"
	varMonths[6] = "July"
	varMonths[7] = "August"
	varMonths[8] = "September"
	varMonths[9] = "October"
	varMonths[10] = "November"
	varMonths[11] = "December"
	
	varDays = new Array();
	varDays[0] = "Sunday"
	varDays[1] = "Monday"
	varDays[2] = "Tuesday"
	varDays[3] = "Wednesday"
	varDays[4] = "Thursday"
	varDays[5] = "Friday"
	varDays[6] = "Saturday"
	
	varDateObj = new Date();
	varMonth = varMonths[varDateObj.getMonth()];
	varDate = varDateObj.getDate();
	varDate = String(varDate)
	lastDigit = varDate.substr(varDate.length - 1, 1);
	if(lastDigit == "1"){
		if(varDate != "11"){
			varDate = varDate + "st"
		}else{
			varDate = varDate + "th"
		}
	}else if(lastDigit == "2"){
		if(varDate != "12"){
			varDate = varDate + "nd"
		}else{
			varDate = varDate + "th"
		}
	}else if(lastDigit == "3"){
		if(varDate != "13"){
			varDate = varDate + "rd"
		}else{
			varDate = varDate + "th"
		}
	}else{
		varDate = varDate + "th"
	}
	varYear = varDateObj.getFullYear();
	
	varHours = varDateObj.getHours();
	varMinutes = varDateObj.getMinutes();
	varSeconds = varDateObj.getSeconds();
	
	// add 0 to secs
	strSeconds = String(varSeconds);
	if(strSeconds.length < 2){
		varSeconds = "0" + strSeconds
	}
	
	// add 0 to mins
	strMinutes = String(varMinutes);
	if(strMinutes.length < 2){
		varMinutes = "0" + strMinutes
	}
	
	// add 0 to hrs
	strHours = String(varHours);
	if(strHours.length < 2){
		varHours = "0" + strHours
	}
	
	text = "<SPAN class='bodyWhite'><P align='right'>" + varDate + " " + varMonth + " " + varYear + " | " + varHours + ":" + varMinutes + "&nbsp;&nbsp;</P></SPAN>"
	
	if(document.layers){
		lyr = document.layers['time'].document
		lyr.open()
		lyr.write(text)
		lyr.close()
	}else{
		document.all['time'].innerHTML = text
	}
}

setInterval('setDateAndTime()',30000)
