// OBJ-ORIENTED ROLLOVER SCRIPT:


var menuItems = new Array();   // ARRAY OF IMAGE OBJECTS

var imageSubdirectory = "images/menu_";
var offSuffix         = ".jpg";
var onSuffix          = "_on.jpg";
var selSuffix         = "_sel.jpg";

// CREATE NEW GRAPHIC OBJECT
function menu_item(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.txt = statusText;

}
// BUILD ARRAY OF GRAPHIC OBJECTS (OFF, ON, PICK)
function create_menu_item (name, width, height, statusText) {
  menuItems[name] = new menu_item(name, width, height, statusText);
}
function domouseover(ref) {
	document.images[menuItems[ref].name].src = menuItems[ref].on.src;
	self.status = menuItems[ref].txt;
}
function domouseout (ref) {
	document.images[menuItems[ref].name].src = menuItems[ref].off.src;
	self.status = "";
}
function domouseclick (ref) {
	document.images[menuItems[ref].name].src = menuItems[ref].sel.src;
}

//IMAGE OBJECT ARRAY INSTANTIATION STRINGS
create_menu_item("1050pine", 126, 18, ": 1050pine");
create_menu_item("1801turk", 126, 24, ": 1801turk");
create_menu_item("2085hayes", 126, 21, ": 2085hayes");
create_menu_item("2185hayes", 126, 21, ": 2185hayes");
create_menu_item("automobile", 126, 20, ": automobile");
create_menu_item("motorcycle", 126, 22, ": motorcycle");
create_menu_item("artistspace", 126, 20, ": artistspace");
create_menu_item("officespace", 126, 21, ": officespace");
