//Assemble the lock tags and the replacement HTML.
var replCode = start + ' depFiles="' + depFiles + '"';
replCode = replCode + ' orig="%3Ckent%3E">\n';
replCode = replCode + imgTag;
replCode = replCode + end;
return replCode;
}
/******************************************************************
* The getImage() function determines which image to display
* based on the day of the week, the time of day and the
* user's platform. The day and time are figured based on UTC
* time (Greenwich Mean Time) minus 8 hours, which gives
* Pacific Standard Time (PST). No allowance is made for Daylight *
* Savings Time in this routine.
******************************************************************/
function getImage(){
var today = new Date();
var day = today.getUTCDay();
zone.
var hour = today.getUTCHours();
the
var SFhour = hour - 8;
on the
var platform = navigator.platform; // User's platform. All Windows
machines
"Win32",
var imageRef;
// If SFhour is negative, you have two adjustments to make.
// First, subtract one from the day count because it is already the
wee
// hours of the next day in GMT. Second, add SFhour to 24 to
// give a valid hour in the 24-hour clock.
if (SFhour < 0){
day = day - 1;
// The day count back one would make it negative, and it's
Saturday,
// so set the count to 6.
if (day < 0){
day = 6;
}
SFhour = SFhour + 24;
}
450
Data Translators
// Today's date & time.
// Day of the week in the GMT time
// 0=Sunday, 1=Monday, and so on.
// The current hour in GMT, based on
// 24-hour clock.
// The time in San Francisco, based
// 24-hour clock.
// are identified by Dreamweaver as
// all Macs as "MacPPC".
// The image reference to be returned.
*
*
*
*
*
Need help?
Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?
Questions and answers