var interval = 10; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 1000;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("images/quote_boyle.gif");
image_list[image_index++] = new imageItem("images/quote_colby.gif");
image_list[image_index++] = new imageItem("images/quote_hc.gif");
image_list[image_index++] = new imageItem("images/quote_middlebury.gif");
image_list[image_index++] = new imageItem("images/quote_umass.gif");
image_list[image_index++] = new imageItem("images/quote_wibby.gif");
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}

synopened=false;
//Rollovers
bname = navigator.appName;
bvers = parseInt(navigator.appVersion);
if (bname == "Netscape" && bvers >=3) {
   version = "n3";
}
else if (bname == "Microsoft Internet Explorer" && bvers >=3) {
   version = "n3";
}
else {
   version ="n2";
}

if (version == "n3") {

   home_on      = new Image;
   home_on.src  = "images/menu_home2.gif";
   home_off     = new Image;
   home_off.src = "images/menu_home.gif";

   about_on      = new Image;
   about_on.src  = "images/menu_about2.gif";
   about_off     = new Image;
   about_off.src = "images/menu_about.gif";

   schedule_on      = new Image;
   schedule_on.src  = "images/menu_schedule2.gif";
   schedule_off     = new Image;
   schedule_off.src = "images/menu_schedule.gif";

   colleges_on      = new Image;
   colleges_on.src  = "images/menu_colleges2.gif";
   colleges_off     = new Image;
   colleges_off.src = "images/menu_colleges.gif";

   states_on      = new Image;
   states_on.src  = "images/menu_states2.gif";
   states_off     = new Image;
   states_off.src = "images/menu_states.gif";

   accomodations_on      = new Image;
   accomodations_on.src  = "images/menu_accomodations2.gif";
   accomodations_off     = new Image;
   accomodations_off.src = "images/menu_accomodations.gif";

   application_on      = new Image;
   application_on.src  = "images/menu_apply2.gif";
   application_off     = new Image;
   application_off.src = "images/menu_apply.gif";

   stars_on      = new Image;
   stars_on.src  = "images/menu_star2.gif";
   stars_off     = new Image;
   stars_off.src = "images/menu_star.gif";

   faq_on      = new Image;
   faq_on.src  = "images/top_menu_faqs2.gif";
   faq_off     = new Image;
   faq_off.src = "images/top_menu_faqs.gif";

   contact_on      = new Image;
   contact_on.src  = "images/top_menu_contact2.gif";
   contact_off     = new Image;
   contact_off.src = "images/top_menu_contact.gif";

   special_on      = new Image;
   special_on.src  = "images/menu_specevent2.gif";
   special_off     = new Image;
   special_off.src = "images/menu_specevent.gif";
}

function active(iname) {
  if (version == "n3") {
     imgOn = eval(iname + "_on.src");
     document[iname].src = imgOn;
  }
}

function inactive(iname) {
  if (version == "n3") {
     imgOff = eval(iname + "_off.src");
     document[iname].src =  imgOff;
  }
}