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 toggleLayer2(whichLayer, whichLayer2, whichLayer3) {
	if (document.getElementById) {
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"none";
		var style3 = document.getElementById(whichLayer2).style;
		style3.display = style3.display? "":"block";
		var style4 = document.getElementById(whichLayer3).style;
		style4.display = style4.display? "":"none";
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"none";
		var style3 = document.all[whichLayer2].style;
		style3.display = style3.display? "":"block";
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"none";
		var style3 = document.layers[whichLayer2].style;
		style3.display = style3.display? "":"block";
	}
}

function toggleItineraries(thisLayer,numLayers) {
	if (document.getElementById) {		
		// this is the way the standards work
		// first turn them all off
		var i = 0;
		for(i=0;i<numLayers;i++) {
			var itineraryLayer = 'itin'+i;
			if(itineraryLayer != thisLayer) {
				var turnOff = document.getElementById("itin"+i).style;
				turnOff.display = turnOff.display? "":"none";
			}
		}
		var style2 = document.getElementById(thisLayer).style;
		style2.display = style2.display? "":"block";
	}	
}

function toggleTwoLayers(layerOn, layerOff) {
	// this is the way the standards work
	var styleOn = document.getElementById(layerOn).style;
	styleOn.display = styleOn.display? "":"block";
	var styleOff = document.getElementById(layerOff).style;
	styleOff.display = styleOff.display? "":"none";

}
