// ============================================================================== 
// Script Name: Buttons.js                                                   
// Application: VRDB
// Purpose: Does the mouseovers for the side buttons and tabs.
// ============================================================================== 
// Date       Modified By          Comments                                       
// --------   ---------------      ---------------------------------------------- 
//  1/2004   Marj Kelly           Created.                                   	    
// ============================================================================== 

var FormButton = "" ;

function makeArray (n) { this.length = n; return this; }

function setButtonOff (buttonName) { 
	if (document.images) document[buttonName].src = buttons[buttonName].imgOff.src;
}

function setButtonOn (buttonName) {
	if (document.images) document[buttonName].src = buttons[buttonName].imgOn.src;
}

function tab (grname) {
	if (document.images) {
		this.imgOff = new Image();
		this.imgOff.src = "/VisualResources/Images/" + grname + "off.gif";
		this.imgOn = new Image();
		this.imgOn.src = "/VisualResources/Images/" + grname + "on.gif";
	}
}

if (document.images) {
	buttons = new makeArray(1);
	buttons["search"] = new tab ("search");
	buttons["advanced"] = new tab ("advanced");
	buttons["about"] = new tab ("about");
	buttons["whatsnew"] = new tab("whatsnew") ;
	buttons["photocollection"] = new tab("photocollection") ;
	buttons["galleries"] = new tab("galleries") ;
	buttons["conservation"] = new tab("conservation") ;
	buttons["ordering"] = new tab("ordering") ;
	buttons["comments"] = new tab("comments");
	buttons["libraryhome"] = new tab("libraryhome");
	buttons["photographers"] = new tab("photographers");
}
	
