// JavaScript Document
var timerID = 0;
var which = 0;
var rotate_time = 3250;
function write_buttons()
{
document.getElementById('buttons').innerHTML = '';
}
function start(type) {
if(type == 'click' && timerID < 1)
{
which += 1;
rotate_story();
timerID = setTimeout('start("continue")', rotate_time);
//write the stop button
document.getElementById('stop_play').innerHTML = '
';
}
else if(type == 'start' || type == 'continue' )
{
if(type == 'continue')
{
which += 1;
}
rotate_story();
timerID = setTimeout('start("continue")', rotate_time);
//write the play button
//document.getElementById('stop_play').innerHTML = '
';
}
}
function stop() {
if(timerID) {
clearTimeout(timerID);
timerID = 0;
}
//write the play button
document.getElementById('stop_play').innerHTML = '
';
}
function next(){
stop();
which += 1;
rotate_story();
}
function previous(){
stop();
//which = which - 1;
which -= 1;
rotate_story();
}
function rotate_story() {
var story = new Array();
// the stories
story[0] = '
Bethel will host the second lecture in the Colloquia Lecture Series on December 11 at 3 p.m. in the Academic Center...
'; story[1] = 'Bethel College students involved in the Invisible Children’s Schools for Schools program are putting on a charity...
'; story[2] = 'Christopher Stackowicz, chair of the department of visual art, has spent the past three summers in Greece doing archeological...
'; story[3] = 'The Bethel College Music Department will present this year’s Christmas concert “The Whole World Rejoices”...
'; story[4] = 'The Bethel College Jazz & Percussion Ensembles will perform a free concert Friday, Nov. 20 at 7:30 p.m....
'; story[5] = 'High school math groups can now sign up for the annual Blaise Pascal High School Math Competition to take place at...
'; if(which > (story.length - 1) ) { which = 0; } else if(which < 0) { which = (story.length - 1); } document.getElementById('NewsScroll').innerHTML = story[which]; }