var state = 'none';
function start()  {
	// set the font size value to enable the A+ and A- icons
	document.body.style.fontSize = ".8em";			  		

    // preload rollover image to stop the once-off menu jiggle.
	
	if (document.images) {
	  pic1= new Image(8,14); 
	  pic1.src="/nreta/images/bullet-dark.gif"; 
	}
	// this section of the script sets the vertical height of the three page sections to the same height.
	// it was previously done by a tricky piece of coding, but it was very difficult to read and debug

	var d=document;
	h1 = d.getElementById('menuLeft').offsetHeight;   	// get the height of the left margin
	height = h1;
	h2 = d.getElementById('main').offsetHeight;			// get the height of the middle area
	if (h2 > height) height = h2;						// is it bigger?  Set the maximum.

	h3 = d.getElementById('menuRight').offsetHeight;	// get the height of the right margin
	if (h3 > height) height = h3;						// is it bigger?  Set the maximum.

	Bc = d.getElementById('breadcrumbs').offsetHeight;	// get the height of the right margin
	// for each of the respective areas, set to the maximum height (found above).
//	if (height > h1) 	d.getElementById('leftMenu').style.height = height + 'px';
//	if (height > h2)    d.getElementById('main').style.height = height + 'px';

	if (height > h1) {
		
		h1_total =  height - h1;

		if (h1_total>0){ d.getElementById('menuLeft').style.paddingBottom = h1_total + 'px'; }
		else { d.getElementById('menuLeft').style.paddingBottom = '0px'; }
	}
	else{
		if (height > h2)    {
			h2_total = height - h2;

			if (h2_total>0){ d.getElementById('main').style.paddingBottom =h2_total + 'px'; }
			else { d.getElementById('main').style.paddingBottom = '0px'; }
		}
	}
	h3adjust = h3 - Bc;
	if (height > h3adjust)	{
		h3_total =   height - h3 + Bc;
		if (h3_total>0){ d.getElementById('menuRight').style.paddingBottom = h3_total + 'px'; }
		else { d.getElementById('menuRight').style.paddingBottom = '0px'; }		
	}
}

function changeFontSize(adjustment)  {
	currentVal = document.body.style.fontSize;   			// get the current font size
	currentLen = currentVal.length - 2;          			// strip off the "em" suffix
	current = parseFloat(currentVal.substr(0,currentLen));  //  turn the value into a Float
	newSize = current + adjustment;                  		//   calculate the new font size
	document.body.style.fontSize = newSize + "em";          //  apply the new size
}

function printMe () {
	window.open(location.href+'?print=yes','_blank','','false');
}

function printThis() {
/*	window.print();  */
setTimeout("window.print()",3000)
}

function showhide(layer_ref) {

if (state == 'block') {
state = 'none';
}
else {
state = 'block';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById &&!document.all) {
	hza = document.getElementById(layer_ref);
	hza.style.display = state;
}
}




