function toggleDisplay(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}	
	else {
		el.style.display = 'block';
	}
	resizePageColumns();
}

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";
	}
	resizePageColumns();
}

function hideAndShow(classToHide, objToShow) {
	$('.' + classToHide).hide();
	$('#' + objToShow).show();
}			


function resizePageColumns() {
	$(document).ready(function(){
	// jQuery used to make the columns match heights except on the Home page
	if ( $("div.Home").length == 0 ) {

		// reset columns to their default heights so that any resizing because of 'display:none' is handled properly
		$('.Column2').css('height', '');
		if ( $('.Column2A').length > 0 ) { $('.Column2A').css('height', ''); }
		if ( $('.Column2B').length > 0 ) { $('.Column2B').css('height', ''); }

		// make Column2 at least as tall as Column1
		var hCol1 = $('.Column1').height();
		var hCol2 = $('.Column2').height();
		if (hCol2 < hCol1-26) { $('.Column2').height(hCol1 - 26); }

		// make Column2B and Column2A the same height as the entire Column2 (if there are two sub-columns)
		if ( $('.Column2A').length > 0 ) {
			var hCol2A = $('.Column2A').height();
			var hCol2B = $('.Column2B').height();			
			var heightC2 = $('.Column2').height();
			if (hCol2A < heightC2) { $('.Column2A').height(heightC2 - 14); }
			if (hCol2B < heightC2) { $('.Column2B').height(heightC2 - 14); }
		}
	}
	});
}	


function writit(text,id) {
	//used on the industry/industry.aspx page
	if (document.getElementById) {
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text;
	} else if (document.all) {
		x = document.all[id];
		x.innerHTML = text;
	}
}
