<HTML>
<HEAD>
<TITLE>The Tour</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
<!--
function makeArray(len) {
if (len != null) this.length = len;
this.length = 0;
}
/* Build one stop object with talk, url, wait, and sound */
function makeStop(talk, url, wait, sound) {
this.talk = talk;
this.url = url;
this.wait = wait;
this.sound = sound;
this.show = showStop;
}
/* Show an individual stop's page, sound, and talk */
function showStop() {
if (this.talk != null) {
parent.talk.location.href = baseHREF + this.talk;
}
if (this.url != null) opener.location.href = this.url;
if (soundEnabled) {
if (this.sound != null) {
soundFrame = blankTop;
if (navigator.appName == 'Netscape') soundFrame += '<EMBED SRC = "' + this.sound + '" AUTOSTART = TRUE HIDDEN = TRUE>';
else if (navigator.appName == 'Microsoft Internet Explorer') soundFrame += '<BGSOUND SRC = "' + this.sound + '">';
soundFrame += blankBot;
}
else soundFrame = blankFrame;
parent.fgsound.document.write(soundFrame);
parent.fgsound.document.close();
}
}
function newStop(talk, url, wait, sound) {
tour.length++;
tour[tour.length] = new makeStop(talk, url, wait, sound);
}
/* functions to move to a stop */
function moveTour(n) {
if (n + curStop <= tour.length && n + curStop > 0) {
curStop += n;
tour[curStop].show();
}
}
/* Auto tour loop */
function autoTour() {
if (tourEnabled) {
moveTour(1);
holdStop = setTimeout('autoTour()', tour[curStop].wait);
}
}
/* Toggle on/off auto tour */
function toggleTour(state) {
if (state && !tourEnabled) {
tourEnabled = true;
autoTour();
}
else if (!state && tourEnabled){
tourEnabled = false;
clearTimeout(holdStop);
}
showControls();
}
/* Function to create and display control frame */
function showControls() {
controlFrame = controlTop + '<A HREF = "javascript:parent.toggleTour(false); parent.moveTour(-1)">' + controlBack + '</A>';
if (tourEnabled) controlFrame += '<A HREF = "javascript:parent.toggleTour(false)">' + controlPause + '</A>';
else controlFrame += '<A HREF = "javascript:parent.toggleTour(true)">' + controlPlay + '</A>';
controlFrame += '<A HREF = "javascript:parent.toggleTour(false); parent.moveTour(1)">' + controlForward + '</A>' + controlBot;
parent.control.document.write(controlFrame);
parent.control.document.close();
}
/* Intialize tour */
function initTour() {
tourEnabled = true;
showControls();
autoTour();
}
/* Load tour sounds */
function loadTour() {
if (soundEnabled) {
showControls();
soundFrame ='<HTML><BASE HREF = "' + baseHREF + '"><BODY BGCOLOR = "' +
controlBgColor + '" onLoad = "parent.initTour();">';
for (var i = 1; i < tour.length; i++) {
if (tour[i].sound != null) {
if (navigator.appName == 'Netscape') soundFrame += '<EMBED HIDDEN = TRUE AUTOSTART = FALSE SRC = "' + tour[i].sound + '">';
}
}
soundFrame += '</BODY></HTML>';
soundBgFrame = blankTop;
if (navigator.appName == 'Netscape') soundBgFrame += '<EMBED SRC = "' + soundBg + '" AUTOSTART = TRUE HIDDEN = TRUE>';
else if (navigator.appName == 'Microsoft Internet Explorer') soundBgFrame += '<BGSOUND SRC = "' + soundBg + '">';
soundBgFrame += blankBot;
parent.fgsound.location = 'javascript:parent.soundFrame';
parent.bgsound.location = 'javascript:parent.soundBgFrame';
}
else initTour();
}
var curStop = 0;
var tourEnabled = false;
var tour = new makeArray();
var soundEnabled = true;
/**************************************************
* The following group of variables control the
* overall look of the tour.
**************************************************/
var baseHREF = 'http://www.com/directory/'; // base url
var soundBg = 'chill.mid'; // background music
var talkDefault = 'tourwait.html';// html file to display in talk frame while tour loads
var controlBgColor = '#000000'; // bgcolor for control frame
var controlFgColor = '#FFFFFF'; // fgcolor for control frame
var controlPlay = ' Play '; // play link
var controlPause = ' Pause '; // pause link
var controlForward = ' Forward '; // forward link
var controlBack = ' Back '; // back-up link
var blankTop = '<HTML><BASE HREF = "' + baseHREF + '"><BODY BGCOLOR = "' + controlBgColor + '">';
var blankBot = '</BODY></HTML>';
var blankFrame = blankTop + blankBot;
var controlTop = '<HTML><BASE HREF = "' + baseHREF + '"><BODY BGCOLOR = "' + controlBgColor + '" LINK = "' + controlFgColor + '" VLINK = "' + controlFgColor + '"><CENTER>';
var controlBot = '</CENTER></BODY></HTML>';
/**************************************************
* These define the actual tour stops:
*
* newStop(talk, url, wait, sound);
*
* Where talk is the URL of the HTML doc you want displayed
* in the tour window, where you talk to the visitors. Where
* url is the URL of the HTML doc you want to talk about
* (the stop's url) to your visitors. Where wait is the rest
* time for the stop in milliseconds. Where sound is the
* sound file that you want played as the stop loads.
**************************************************/
newStop('tour1.html', 'http://www.yahoo.com', 10000, 'flip.au');
newStop('tour2.html', 'http://www.netscape.com', 10000, 'flip.au');
newStop('tour3.html', 'http://www.infoseek.com', 10000, 'flip.au');
newStop('tour4.html', 'http://www.webreview.com', 15000, 'flip.au');
newStop('tour5.html', 'http://www.microsoft.com', 10000, 'flip.au');
//-->
</SCRIPT>
<FRAMESET onLoad = "loadTour()" ROWS = "*, 50, 0, 0" FRAMEBORDER = 0 FRAMESPACING = 0 BORDER = 0>
<FRAME NAME = "talk" SRC = "javascript:parent.blankFrame" MARGINWIDTH = 10>
<FRAME NAME = "control" SRC = "javascript:parent.blankFrame" SCROLLING = NO>
<FRAME NAME = "fgsound" SRC = "javascript:parent.blankFrame" SCROLLING = NO>
<FRAME NAME = "bgsound" SRC = "javascript:parent.blankFrame" SCROLLING = NO>
</FRAMESET>
</HEAD>
</HTML>