// ON Air DJ function and settings

eventImage = '';

eventLink = '';



function simpleArray() {

        this.length = 0;

        this.active = '';

}



function event(type, start, finish, image, link) {

        this.type = type;

        this.start = start;

        this.finish = finish;

        this.image = image;

        this.link = link;

}



events = new simpleArray();



function addEvent(type, start, finish, image, link) {

        events.length++;

        if (finish == 000) {

                finish = 2400;

        }

        events[events.length] = new event(type, start, finish, image, link);

}



function setImage() {

        today = new Date();

        day = today.getDay();

        hour =today.getHours();

        minute = today.getMinutes();



        now = (hour * 100) + minute;



        type = 'week';

        if (day == 0) {

                type = 'sun';

        } else if (day == 6) {

                type = 'sat';

        }



        for (i=1; i<=events.length; i++) {

                if ( (events[i].type == type) && (events[i].start <= now) &&  (events[i].finish > now) ) {

                        events.active = i;

                        eventImage = imageCode + events[i].image + '.gif>';

                        if (events[events.active].link != null) {

                                eventImage = '<A HREF=\"' + events[events.active].link + '\">' + eventImage + '</A>';

                        }

                }

        }

}

imageCode = '<IMG BORDER=0 WIDTH=249 HEIGHT=61 SRC=';

addEvent('week',000,600,'/graphics/onair_overnight','/djs.shtml');
addEvent('week',600,1000,'/graphics/onair','/djs.shtml');
addEvent('week',1000,1400,'/graphics/onair_midday','/djs.shtml');
addEvent('week',1400,1900,'/graphics/onair_mikebradley','/djs.shtml');
addEvent('week',1900,2400,'/graphics/onair_nights','/djs.shtml');

addEvent('sat',000,2400,'/graphics/onair_80sweekend','/djs.shtml');

addEvent('sun',000,2200,'/graphics/onair_80sweekend','/djs.shtml');
addEvent('sun',2200,2400,'/graphics/onair_sunday_vh1','/djs.shtml');


setImage();

<!-- hide this script from non-javascript-enabled browsers
if (document.images) {
}
function di(id,name){
  if (document.images) {document.images[id].src=eval(name+".src"); }
}

// function that displays status bar message

function dm(msgStr) {
  document.returnValue = false;
  if (document.images) { 
     window.status = msgStr;
     document.returnValue = true;
  }
}
var showMsg = navigator.userAgent != "Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)";
function dmim(msgStr) {
  document.returnValue = false;
  if (showMsg) { 
    window.status = msgStr;
    document.returnValue = true;
  }
}
