// JavaScript Document

function makeBold(whichLayer) {
	
	//makeBold is a function which all pages call to mark their top-level nav element.
	//For example, ellipsoidal.html calls this to bold and illuminate Theatrical Lighting
	//and LED/index.html to bold/illum LED Lighting.
	
	//We aready have the stuff to illuminate:
	Illuminate(whichLayer);
	
	//But there's not one to bold. So here it is:
		if (document.getElementById) {
			// this is the way the standards work
			document.getElementById(whichLayer).style.fontWeight = "bold";		  
		} else if (document.all) {
			// this is the way old msie versions work
			document.all[whichLayer].style.fontWeight = "bold";		  
		} else if (document.layers) {
			// this is the way nn4 works
			document.layers[whichLayer].style.fontWeight = "bold";		  
		}	
}

function toggleLayer(whichLayer) {
	if (document.getElementById) {
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	} else if (document.all) {
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	} else if (document.layers) {
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}

}

function Illuminate(whichLayer) {	

	if (document.getElementById) {
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.backgroundImage = style2.backgroundImage? "":"url(../gfx/lightbulb-on.gif)";		  
	} else if (document.all) {
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.backgroundImage = style2.backgroundImage? "":"url(../gfx/lightbulb-on.gif)";
	} else if (document.layers) {
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.backgroundImage = style2.backgroundImage? "":"url(../gfx/lightbulb-on.gif)";
	}

}

function checkSize ( ) {
	return(true);
}


function theSwap(toIlluminate,toToggle) {
		toggleLayer(toToggle);
		Illuminate(toIlluminate);
		checkSize();
}

function expand ( whichLayer ) { // for pages which have collapsing images
	document.getElementById(whichLayer).style.display = ( document.getElementById(whichLayer).style.display == 'none' ) ? 'block' : 'none';
}
