// function to calculate local time
// in a different city
// given the city's UTC offset
function calcTime(offset) {

    // create Date object for current location
    d = new Date();
	   
    // convert to msec
    // add local time zone offset 
    // get UTC time in msec
    utc = d.getTime() + (d.getTimezoneOffset() * 60000);
    
    // create new Date object for different city
    // using supplied offset
    nd = new Date(utc + (3600000*offset));
    
	var hours = nd.getHours()
  	var minutes = nd.getMinutes()

  	var suffix = "AM";
  	if (hours >= 12) {
  		suffix = "PM";
  		hours = hours - 12;
  	}
	
  	if (hours == 0) {
  		hours = 12;
  	}

  	if (minutes < 10)
  		minutes = "0" + minutes
				
    // return time as a string
    //return "The local time in " + city + " is " + nd.toLocaleString();
	document.write(hours + ":" + minutes + " " + suffix);
}

// used for displaying copyright year
function getCurrentYear() {
	
	var d = new Date();
	var curr_year = d.getFullYear();
	
	document.write(curr_year);	
}
