var NN4 = document.layers? true : false;
var IE4 = document.all? true : false;
var menuOn = false ;

function toggle(layerName) {
	//alert( "begin " + menuOn ) ;
	menuOn = !menuOn ;
	if( menuOn == false ) 
		hide();
	else 
		display( layerName ) ;
	//alert( "end " +menuOn ) ;
}
function pop(layer) {
	// alert( menuOn ) ;
	if( menuOn ) {
		hide() ;
		display( "menu_drop_" + layer ) ;
	}
	switch( layer ) {
		case 1 :
			window.status="Main menu" ; break ;
		case 2 :
			window.status="The Tarquin Brushbuilder pack" ; break ;
		case 3 :
			window.status="The Extended Brushbuilder pack" ; break ;
		case 4 :
			window.status="The Extruder Brushbuilder" ; break ;
		default :
	}
	StatusTimerID = setTimeout('statusreset()',5000) ;
}
function display(layerName) {
	if (IE4) {
		document.all[layerName].style.visibility = "visible";
	}
	else if(NN4) {
		document.layers["menu_para"].layers[layerName].visibility = "show";
	}
}
function statusreset()
{
	window.status = window.defaultStatus ;
}
function hide() {
	if (IE4) {
		document.all['menu_drop_1'].style.visibility = "hidden";
		document.all['menu_drop_2'].style.visibility = "hidden";
		document.all['menu_drop_3'].style.visibility = "hidden";
		document.all['menu_drop_4'].style.visibility = "hidden";
	}
	else if(NN4) {
		document.layers["menu_para"].layers["menu_drop_1"].visibility = "hidden";
		document.layers["menu_para"].layers["menu_drop_2"].visibility = "hidden";
		document.layers["menu_para"].layers["menu_drop_3"].visibility = "hidden";
		document.layers["menu_para"].layers["menu_drop_4"].visibility = "hidden";
	}
	return;
}
