// See complete instructions in the article "Easy Time 
//   Zone Offset Calculator" in WillMaster Possibilities 
//   issue # 46: http://willmaster.com/possibilities/archives/

here_offset = 0;
// The above number must be changed to the number of minutes 
//   difference between your time and UT during STANDARD TIME 
//   not Daylight Savings Time. If you are in UT, (the 
//   same time zone as Greenwich, England), this number 
//   will be 0 (zero). If your time is later than UT (east 
//   of Greenwich, England), the number is negative. 
//   Otherwise, the number is positive.
// NOTE: To calculate the number automatically, go to 
//   http://willmaster.com/library/demo/eztzoffset.html

DST_month_start = 0;
// If your geographical area observes daylight savings time, 
//   the above number represents the month the period begins. 
//   Otherwise, the number is 0 (zero).

DST_day_start = 0;
// If your geographical area observes daylight savings time, 
//   the above number represents day of the month the period 
//   begins. Otherwise, the number is 0 (zero).

DST_month_end = 0;
// If your geographical area observes daylight savings time, 
//   the above number represents the month the period ends. 
//   Otherwise, the number is 0 (zero).

DST_day_end = 0;
// If your geographical area observes daylight savings time, 
//   the above number represents day of the month the period 
//   ends. Otherwise, the number is 0 (zero).

clocktype = 12;
// The above number must be either 12 or 24. Use 12 if you 
//   want a 12-hour clock with "AM" or "PM" appended to the 
//   time. Use 24 if you want a 24-hour clock.
// NOTE: What you specify here is the default. You can change 
//   this value right before you use a function.

here_appt_hour = 0;
// The hour in your time zone that you want calculated into 
//   your visitor's time zone. Use 12 for noon and 0 for midnight.
// NOTE: What you specify here is the default. You can change 
//   this value right before you use a function.

here_appt_minute = 0;
// The number of minutes after the hour in your time zone 
//   that you want calculated into your visitor's time zone.
// NOTE: What you specify here is the default. You can change 
//   this value right before you use a function.

here_appt_ampm = 'AM';
// If the above appt_hour and appt_minute is before noon, 
//   use 'AM', otherwise use 'PM'. If your clocktype 
//   variable (above) is 24, use 'AM';
// NOTE: What you specify here is the default. You can change 
//   this value right before you use a function.

// NOTE: The above appt_... variables must have values assigned 
//       to them whether or not you plan to calculate a specific 
//       time for your visitor's time zone.


// No other customizations are required.

can_use_this = false;
if(parseInt(navigator.appVersion) >= 4) { can_use_this = true; }
vtime = new Date();
if(DST_month_start > 0) {
	var b = false;
	var m = vtime.getMonth();
	var d = vtime.getDate();
	DST_month_start--;
	DST_month_end--;
	if((m > DST_month_start) && (m < DST_month_end)) { b = true; }
	else
	{
		if((m == DST_month_start) && (d >= DST_day_start)) { b = true; }
		if((m == DST_month_end) && (d <= DST_day_end)) { b = true; }
	}
	if(b == true) { here_offset -= 60; }
}
Diff = vtime.getTimezoneOffset() - here_offset;
weekdays=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
if(! weekdays) { can_use_this = 0; }
function get_future() {
	if(can_use_this == false) { return ''; }
	var apm = 'AM';
	var rs = '';
	if((clocktype == 12) && (here_appt_ampm == 'PM')) { here_appt_hour += 12; }
	b = new Date(vtime.getYear(),1,1,here_appt_hour,here_appt_minute,0);
	var t = 0;
	
	if(t != 0) { b.setTime(Number(b) + (1000 * 60 * 60 * 24 * t)); }
	b.setTime(Number(b) - (Diff * 60000));
	var nowweekday = b.getDay();
	var hr = b.getHours();
	if(clocktype == 12)
	{
		if(hr > 11) { apm = 'PM'; }
		if(hr > 12) { hr -= 12; }
	}
	rs = hr + ':';
	if(b.getMinutes() < 10) { rs += '0'; }
	rs += b.getMinutes();
	if(clocktype == 12) { rs += '&nbsp;' + apm; }

	return rs;
}


