window.addEventListener?window.addEventListener('load',function () { ray.changeShowImage(); },false): window.attachEvent('onload',function () { ray.changeShowImage(); }); // FF : IE var ray = { // Create a unique object. Let me name it "ray" changeShowImage : function () { // Initialize changeShowImage function /*** Feel free to edit this part ***/ var baseImg = 'daily_shows/'; // The base folder of our images var shows = [ ['Sunday', [ [5,7,'Angel','Sunday Morning Inspiration','morning-inspiration.jpg'], [7,8,'Catherine "Cat" & Attorney John Molloy ','The Mircale Hour','the-miracle-hour.jpg'], [8,9,'Min. Louis Farrakhan','Hour of Power','hour-of-power.jpg'], [9,10,'Kevin (The Big Motivator) Thomas','Substance Summit','substance-summit.jpg'], [10,12,'L Soul Brown','The Griot House','the-griot-house.jpg'], [12,14,'Lady B Rite','The Boston Beat','the-boston-beat.jpg'], [14,18,'Erick "Dr. Feel Good" Lawson ','Soul Touch','soul-touch.jpg'], [18,22,'Dave "Jazzman" Johnson','The Ivory Coast Smooth Jazz Show','the-ivory-coast-smooth.jpg'], [22,2,'The Conductor','The Love Train','the-love-train.jpg'], [2,5,'Venus Love','Blue light in the basement','blue-light-in.jpg'] ] ], ['Monday-Thursday', [ [5,6,'Angel','Sunday Morning Inspiration','morning-inspiration.jpg'], [6,10,'AJ The Super Producer, Cat, Big Motivator & Brother Charles','Morning Touch','the-morning-touch.jpg'], [10,14,'Courtney B','TOUCH in the Midday','touch-in-the-midday.jpg'], [14,18,'Darkness Brother #1','The Afternoon Thing','the-afternoon-thing.jpg'], [18,22,'The Evening Rush','The Evening Rush','evening-rush.jpg'], [22,2,'The Conductor','The Love Train','the-love-train.jpg'], [2,5,'Venus Love','Blue light in the basement','blue-light-in.jpg'] ] ], ['Friday', [ [5,6,'Angel','Sunday Morning Inspiration','morning-inspiration.jpg'], [6,10,'AJ The Super Producer, Cat, Big Motivator & Brother Charles','Morning Touch','the-morning-touch.jpg'], [10,14,'Courtney B','TOUCH in the Midday','touch-in-the-midday.jpg'], [14,18,'Darkness Brother #1','The Afternoon Thing','the-afternoon-thing.jpg'], [18,22,'DJ T.Lawson','The Ultimate Mix Show','the-ultimate-mix-show.jpg'], [22,3,'Mr.Funky Fresh','Funky Fresh Radio','funky-fresh-radio.jpg'], [3,5,'Venus Love','Blue light in the basement','blue-light-in.jpg'] ] ], ['Saturday', [ [5,6,'Angel','Sunday Morning Inspiration','morning-inspiration.jpg'], [6,8,'Sis. Yvette, Sis. Sandra & Bro. Humza','The Nation Speaks','the-nation-speaks.jpg'], [8,12,'Skippy White','The Time Tunnel','the-time-tunnel.jpg'], [12,13,'Skippy White','Live Concert','live-concert.jpg'], [13,14,'"Great Lakes Playar" DJ O.C. ','Now That\'s Music! ','now-thats-music.jpg'], [14,15,'"Great Lakes Playar" DJ O.C. ','Roll Bounce Mix','roll-bounce.jpg'], [15,16,'"Great Lakes Playar" DJ O.C. ','Club Bean','club-bean.jpg'], [16,18,'"Great Lakes Playar" DJ O.C. ','The Saturday Afternoon House Party ','the-sat-after-house-party.jpg'], [18,22,'DJ T.Lawson','Soup Saturdays','soup-saturdays.jpg'], [22,3,'Mr.Funky Fresh','Funky Fresh Radio','funky-fresh-radio.jpg'], [3,5,'Venus Love','Blue light in the basement','blue-light-in.jpg'] ] ], ]; /*** End of the free edit area ***/ var imgEl = document.getElementById('image_holder'); // Get the image element var Day = 'Wednesday'; var Hour = parseInt(00); // Get current hour if (Hour == 0) // If its the midnight Hour = 24; var arrDate = (Day=='Sunday'||Day=='Friday'||Day=='Saturday')?Day:'Monday-Thursday'; // Rectify date for array's date var dateArr = shows[i][0] == arrDate; // Get into the array that was previously defined per date for(var c = 0; c < (shows[i][1]).length; c++) { var startShowTime = shows[i][1][c][0]; // Start show time var endShowTime = shows[i][1][c][1]; // End show time if (Hour == 1 && (Day != 'Friday' || Day !='Saturday')) // If it is past midnight for Sunday - Thursday Hour = 25; if (Hour > 0 && Hour < 5 && (Day == 'Friday' || Day == 'Saturday')) // If it is past midnight for Friday - Saturday Hour = Hour + 24; if (startShowTime >= 20 && endShowTime <=5) // If the show is overnight endShowTime = endShowTime+25; // Add 25 to the time if (startShowTime <= Hour && endShowTime > Hour) { var imageSrc = baseImg+shows[i][1][c][4]; // Returns the image defined in the array var imageCaption = shows[i][1][c][2]+' on '+shows[i][1][c][3]; // Set the caption } } } imgEl.src = imageSrc; imgEl.alt = imageCaption; imgEl.title = imageCaption; setTimeout(function () { ray.changeShowImage(); },2000); // Check every 2 seconds }