// JavaScript Document

function ModularGarden() {

}

var tmp = new ModularGarden();	// to make sure this Buttons class exists in all browsers



ModularGarden.onButton = "contact";
ModularGarden.middleClass = "middle2";


ModularGarden.init = function() {
	// ===================================================
	// Switch on the appropriate navigation menu button
	// ===================================================
	var button = ModularGarden.onButton;
	// button is the class name of the button that we want to turn on
	
	var menu = document.getElementById("menuBar");
	
	for (child = menu.firstChild; child != null; child = child.nextSibling) {
		if (child.nodeName == "A") {
			if (child.className == button) {
				// we found the button to turn on - we do this by moving the background image
				child.style.backgroundPosition = "0px 0px";
			}
		}
	}
	
	
	// ===================================================
	// set the class of the middle section of the page
	// to set the correct background image
	// ===================================================
	if (document.getElementById("middle")) {
		document.getElementById("middle").className = ModularGarden.middleClass;
	}
	
	
	if (typeof(window["scroller"]) != "undefined") {
		scroller.init();
	}

	
}	
