shown = '';
nosub = false;
menutimeout = null;

function ShowMenu( m, x ) {
	if( x == undefined ) x = false;
	if( menutimeout ) {
		clearTimeout( menutimeout );
		menutimeout = null;
	}
	if (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >=5) {
		if( shown != '' ) {
			if( !nosub ) {
				document.getElementById( shown ).style.display = "none";
			}
			document.getElementById( "a" + shown ).style.color = "rgb( 0, 128, 0 )";
			document.getElementById( "a" + shown ).style.backgroundColor = "";
		}
		if( !x ) {
			document.getElementById( m ).style.display = "block";
			nosub = false;
		}
		else {
			nosub = true;
		}
		document.getElementById( "a" + m ).style.color = "white";
		document.getElementById( "a" + m ).style.backgroundColor = "rgb( 0, 128, 0 )";
		shown = m;
	}
	else if (navigator.appName == "Netscape") {
	} else {
		if( shown != '' ) {
			if( !nosub ) {
				document.all[ shown ].style.display = "none";
			}
			document.all[ "a" + shown ].style.color = "rgb( 0, 128, 0 )";
			document.all[ "a" + shown ].style.backgroundColor = "";
		}
		if( !x ) {
			document.all[ m ].style.display = "block";
			nosub = false;
		}
		else {
			nosub = true;
		}
		document.all[ "a" + m ].style.color = "white";
		document.all[ "a" + m ].style.backgroundColor = "rgb( 0, 128, 0 )";
		shown = m;
	}
}

function HideIt() {
	if( nosub ) {
		HideMenu( null );
	}
	else {
		menutimeout = setTimeout( "HideMenu( null );", 1000 );
	}
}

function HideMenu( m ) {
	if (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >=5) {
		if( shown != '' ) {
			if( !nosub ) {
				document.getElementById( shown ).style.display = "none";
			}
			document.getElementById( "a" + shown ).style.color = "rgb( 0, 128, 0 )";
			document.getElementById( "a" + shown ).style.backgroundColor = "";
		}
		shown = '';
	}
	else if (navigator.appName == "Netscape") {
	} else {
		if( shown != '' ) {
			if( !nosub ) {
				document.all[ shown ].style.display = "none";
			}
			document.all[ "a" + shown ].style.color = "rgb( 0, 128, 0 )";
			document.all[ "a" + shown ].style.backgroundColor = "";
		}
		shown = '';
	}
}

function SearchIcon( state ) {
	if (navigator.appName == "Netscape" && navigator.appVersion.charAt(0) >=5) {
		if( state ) {
			document.getElementById( 'search' ).src = "images/search2.jpg";
			document.getElementById( 'searchbg' ).style.visibility = "visible";
			document.getElementById( 'amenu4' ).style.color = "white";
		}
		else {
			document.getElementById( 'search' ).src = "images/search.jpg";
			document.getElementById( 'searchbg' ).style.visibility = "hidden";
			document.getElementById( 'amenu4' ).style.color = "rgb( 0, 128, 0 )";
		}
	}
	else if (navigator.appName == "Netscape") {
	} else {
		if( state ) {
			document.all[ 'search' ].src = "images/search2.jpg";
			document.all[ 'searchbg' ].style.visibility = "visible";
			document.all[ 'amenu4' ].style.color = "white";
		}
		else {
			document.all[ 'search' ].src = "images/search.jpg";
			document.all[ 'searchbg' ].style.visibility = "hidden";
			document.all[ 'amenu4' ].style.color = "rgb( 0, 128, 0 )";
		}
	}
}

