function setClock() 
{ 

var dst="no";          
var myTimeZone=12;     

if (dst=="yes") myTimeZone=myTimeZone+1; 
var day=""; 
var month=""; 
var myweekday=""; 
var year=""; 
newdate = new Date(); 
mydate = new Date(); 
var myzone = newdate.getTimezoneOffset(); 
newtime=newdate.getTime(); 
var zone = (myTimeZone)*(-1); 
var newzone = (zone*60*60*1000); 
newtimea = newtime+(myzone*60*1000)-newzone; 
mydate.setTime(newtimea); 
myday = mydate.getDate();     
mymonth = mydate.getMonth();  
myweekday= mydate.getDay();   
myyear= mydate.getYear();     
year = myyear; 
if (year < 2000)              
year = year + 1900;          
myhours = mydate.getHours(); 

// Get Hours and calculate am or pm 
if (myhours >= 12) { 
myhours = (myhours == 12) ? 12 : myhours - 12; mm = "pm"; 
} 
else { 
myhours = (myhours == 0) ? 12 : myhours; mm = "am"; 
} 

// Get minutes and format correctly 
myminutes = mydate.getMinutes(); 
if (myminutes < 10){ 
mytime = ":0" + myminutes; 
} 
else { 
mytime = ":" + myminutes; 
} 

// Array to convert from month number to month name 
armonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December"); 

// Array to convert from week day number to week day name 
arday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); 

// The following line strings together the variables for your time message. You can delete some of the variables if you wish to change the information displayed. 
var displayTime = ("<b>"+myhours+mytime+mm+" on "+ arday[myweekday]+", " + armonth[mymonth]+" "+myday+", "+myyear+"</b>"); 

Clock.innerHTML = displayTime; //Updates time display on page 

// Set time/date display to update every 1 second. If you want to update the clock say, every 5 seconds then change the 1*1000 t0 1*5000. That is every 1 second = 1000. 
window.setTimeout("setClock();", 1*1000); 
} 

window.onload = setClock; // Displays clock on page load. 

// The following displays your message and the time/date variables on your page. Change the wording to your city & message. You may also change the font face, size and color. 

if ((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)) {document.write('It is currently <span id="Clock" style="font-size: 10px; font-family: verdana; color: #9C3257;"></span>&nbsp;in New Zealand.');}