// OBJ-ORIENTED ROLLOVER SCRIPT:
var totalGraphics=0;         // TOTAL NUMBER OF GRAPHIC OBJECTS CREATED
var graphic = new Array();   // ARRAY OF IMAGE OBJECTS

var imageSubdirectory = "/images/"
var offSuffix         = "_btn.gif";
var onSuffix          = "_btn_roll.gif";
var selSuffix         = "_btn_sel.gif";

// CREATE NEW GRAPHIC OBJECT
function ctrl_graphic (name, width, height, statusText) {
  this.name     = name;
  this.height   = height;
  this.width    = width;

  this.off         = new Image (width, height);
  this.off.src     = imageSubdirectory + name + offSuffix;

  this.on         = new Image (width, height);
  this.on.src     = imageSubdirectory + name + onSuffix;
  
  this.sel         = new Image (width, height);
  this.sel.src     = imageSubdirectory + name + selSuffix;

  this.statusText = statusText;
}
// BUILD ARRAY OF GRAPHIC OBJECTS (OFF, ON, PICK)
function create_ctrl (name, width, height, statusText) {
  graphic[totalGraphics] = new ctrl_graphic(name, width, height, statusText);
  totalGraphics++; 
}
function doMouseOver(num) {
	document.images[graphic[num].name].src = graphic[num].on.src;
    self.status = graphic[num].statusText;
}
function doMouseOut (num) {
	document.images[graphic[num].name].src = graphic[num].off.src;
	self.status = '';
}
function doClick (num) {
	document.images[graphic[num].name].src = graphic[num].sel.src;
}


//IMAGE OBJECT ARRAY INSTANTIATION STRINGS
create_ctrl("resource", 156, 19, ": Resource List");
create_ctrl("gallery", 156, 19, ": Gallery");
create_ctrl("culture", 156, 19, ": Culture / Insights");
create_ctrl("care", 156, 19, ": Bamboo Care");
create_ctrl("events", 156, 19, ": Events");
create_ctrl("sightings", 156, 19, ": Sightings");
create_ctrl("haiku", 156, 19, ": Haiku");
create_ctrl("kitsch", 156, 19, ": Kitsch");
create_ctrl("bulletin", 156, 19, ": Bulliten Board");
create_ctrl("classifieds", 156, 19, ": Classifieds");
create_ctrl("contact", 156, 19, ": Questions / Contact");
create_ctrl("submit", 156, 19, ": Submit Your Link");