// 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         = ".gif";
var onSuffix          = "_o.gif";
var selSuffix         = "_o.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("smenu_facts", 70, 17, ": BARE FACTS");
create_ctrl("smenu_photography", 87, 17, ": PHOTOGRAPHY");
create_ctrl("smenu_jewels", 56, 17, ": JEWELRY");
create_ctrl("smenu_gifts", 246, 17, ": GIFTS");
create_ctrl("smenu_contact", 56, 17, ": CONTACT");
create_ctrl("smenu_artware", 109, 17, ": ARTWARE");
create_ctrl("smenu_freebies", 69, 17, ": FREEBIES");
create_ctrl("smenu_bookorder", 94, 17, ": BOOKORDER");



//add bookmark

function addBookmark() {
	bookmarkurl = "http://www.koalajopub.com";
	bookmarktitle = "Book - Koalas, Moving Portraits of Serenity";

	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite(bookmarkurl,bookmarktitle)
	} else if (navigator.appName == "Netscape") {
		var msg = "To bookmark this site hold down the CTRL key and press D.";
			alert(msg);
	}
}	


