function prepareHomePage () {
	if (document.getElementById) {
	//	var imgObj = document.getElementById ("canes1");
	//	imgObj.style.width = "52%";
	//	imgObj.style.maxWidth = "400px";
	}
}

function prepareAboutPage () {
}

function prepareProductsPage () {

	if (!document.getElementById) return false;
	
	var ivObj = document.getElementById ("imageViewer");
	var h3Array = ivObj.getElementsByTagName ("h3");
	
//	h3Array [0].style.visibility = "hidden";	// Hide first element, but keep it in the flow
	for (var i = 0; i < h3Array.length; i++) {
		h3Array [i].style.display = "none";		// Take all others h3 titles out of the flow
	}
	
	var imgArray = ivObj.getElementsByTagName ("img");
	
	for (var i = 0; i < imgArray.length; i++) {
		imgArray [i].style.display = "none";	// Hide all images
	}
	
	var pn = document.getElementById ("pageNavigation");
	var aArray = document.getElementsByTagName ("a");
	
	for (var i = 0; i < aArray.length; i++) {
		if (aArray [i].className == "noLink") {
			aArray [i].className = "";	// Remove noLink class from all menu title anchors
		}
	}

//	menu.hide ("menu2", "menu3", "menu4");
	menu.hide ("menu3", "menu4");
	menu.show ("menu1");
}

function prepareContactPage () {
}

function prepareSizingPage () {
}

// ==[ Projector Class ]================================================

function Projector (instanceName) {
	this.instanceName = instanceName;
	this.currentImage = null;
}

Projector.prototype.init = function () {
}

Projector.prototype.show = function (imgId) {
	if (this.currentImage != null) this.currentImage.style.display = "none";
	this.currentImage = document.getElementById (imgId);
	if (this.currentImage) {
		this.currentImage.style.display = "block";	// Show image
		return false;
	} else {
		alert (this.instanceName + ".show (), Error: unable to locate image [" + imgId + "] in html page");
		return true;
	}
}

// ==[ Menu Class ]=====================================================

function Menu (instanceName) {
	this.instanceName = instanceName;
	this.currentMenu = null;
	this.currentMenuItem = null;
}

Menu.prototype.init = function () {
}

Menu.prototype.hide = function () {	// Hides an arbitrary number of menus
	if (arguments.length > 0) {
		for (var a = 0; a < arguments.length; a++) {
			document.getElementById (arguments [a]).style.display = "none";
		}
	}
}

Menu.prototype.show = function (menuId) {
	if (this.currentMenu != null) this.currentMenu.style.display = "none";	// Hide last selected menu
	this.currentMenu = document.getElementById (menuId);
	if (this.currentMenu) {
		this.currentMenu.style.display = "block";	// Show menu
		var newMenuItem = this.currentMenu.getElementsByTagName ("a")[0];	// Default to first menu item
		newMenuItem.onclick ();			// Execute the default menu item
	} else {
		alert (this.instanceName + ".show (), Error: unable to locate menu [" + menuId + "] in html page");
	}
}

Menu.prototype.select = function (menuItem) {
	if (this.currentMenuItem != null) this.currentMenuItem.className = "";
	this.currentMenuItem = menuItem;
	this.currentMenuItem.className = "selected";
}


