﻿function toggleLayer( whichLayer )
{
	if(whichLayer == 'top5')
	{
		var elem, vis;
		if( document.getElementById ) // this is the way the standards work
			elem = document.getElementById( whichLayer );
		else if( document.all ) // this is the way old msie versions work
			elem = document.all[whichLayer];
		else if( document.layers ) // this is the way nn4 works
			elem = document.layers[whichLayer];
		
		vis = elem.style;
		vis.display = 'block';
		
		
		whichLayer = 'top10';
		
		var elem2, vis2;
		if( document.getElementById ) // this is the way the standards work
			elem2 = document.getElementById( whichLayer );
		else if( document.all ) // this is the way old msie versions work
			elem2 = document.all[whichLayer];
		else if( document.layers ) // this is the way nn4 works
			elem2 = document.layers[whichLayer];
		
		vis2 = elem2.style;
		vis2.display = 'none';
		
		
		document.getElementById("top_menu").style.backgroundImage = "url(./images/top_menu_5.jpg)";
	}
	else
	{
		var elem, vis;
		if( document.getElementById ) // this is the way the standards work
			elem = document.getElementById( whichLayer );
		else if( document.all ) // this is the way old msie versions work
			elem = document.all[whichLayer];
		else if( document.layers ) // this is the way nn4 works
			elem = document.layers[whichLayer];
		
		vis = elem.style;
		vis.display = 'block';
		
		
		whichLayer = 'top5';
		
		var elem2, vis2;
		if( document.getElementById ) // this is the way the standards work
			elem2 = document.getElementById( whichLayer );
		else if( document.all ) // this is the way old msie versions work
			elem2 = document.all[whichLayer];
		else if( document.layers ) // this is the way nn4 works
			elem2 = document.layers[whichLayer];
		
		vis2 = elem2.style;
		vis2.display = 'none';
		
		document.getElementById("top_menu").style.backgroundImage = "url(./images/top_menu_10.jpg)";
	}
}


