<!--

var netscapeDOM		= ( document.layers ) ? true : false;
var microsoftDOM	= ( document.all ) ? true : false;

var	container		= ( netscapeDOM ) ? "document.layers['container']." : "";
var collection		= ( microsoftDOM ) ? "all." : "";
var	styleObject		= ( microsoftDOM ) ? ".style" : "";

var HIDDEN			= ( netscapeDOM ) ? "hide" : "hidden";
var VISIBLE			= ( netscapeDOM ) ? "show" : "visible";

var browserName				= navigator.appName;
var browserVersion			= parseInt( navigator.appVersion );
var browserSupportsDHTML	= ( ( browserVersion >= 4 ) && ( netscapeDOM || microsoftDOM ) ) ? true : false;

var currentMenu		= "";
var currentParent	= "";

/* ************************************************************************* */
if ( document.images ) {
	markerOff	= new Image(5,5);	markerOff.src	= "pic/spacer.blank.gif";
	markerOn	= new Image(5,5);	markerOn.src	= "pic/empty.gif";
}

//	________________________________________________________ determineMenuLayer
function determineMenuLayer( object ) {
	var menuLayer = "document.menuContainer.";
	
	if ( object.indexOf( "red" ) != -1 ) {
		menuLayer			+= "document.stockistMenu";
	} else if ( object.indexOf( "pwp" ) != -1 ) {
		menuLayer			+= "redempctrMenu";
	}
	
	menuLayer = eval( menuLayer + ".document.images['" + object + "']" );
	return ( menuLayer );
}

//	_______________________________________________________________ setMarkerOn
function setMarkerOn( imageName ) {
	if ( document.images ) {
		if ( microsoftDOM ) {
			document.images[imageName].src = markerOn.src;
		}
/*
		if ( netscapeDOM ) {

	//		obj = document.layers['content'].document.layers['stockistMenu'].document.layers;
			obj = document.menuContainer.document.stockistMenu.document.images;
	//		obj = document.layers['content'].layers;
			msg = "";
			for ( var i in obj ) {
				msg += i + "=" + obj[i] + "\n";
			}
			alert( msg );

			
//			indicator		= determineMenuLayer( imageName );
//			indicator.src	= markerOn.src;
		} else {
			document.images[imageName].src = markerOn.src;
		}
*/
	}
}

//	______________________________________________________________ setMarkerOff
function setMarkerOff( imageName ) {
	if ( document.images ) {
		if ( microsoftDOM ) {
			document.images[imageName].src = markerOff.src;
		}
/*
		if ( netscapeDOM ) {
			indicator		= determineMenuLayer( imageName );
			indicator.src	= markerOff.src;
		} else {
			document.images[imageName].src = markerOff.src;
		}
*/
	}
}

/* ************************************************************************* */

//	___________________________________________________ getObjectStyleReference
function getObjectStyleReference( object ) {
	var objectStyleReference;
	
	if ( typeof object == "string" ) {
		objectStyleReference = eval( container + "document." + collection + object + styleObject );
	} else {
		objectStyleReference = object;
	}
	
	return ( objectStyleReference );
}

//	________________________________________________________________ showObject
function showObject( object ) {
	var theObject = getObjectStyleReference( object );
	
	theObject.visibility = VISIBLE;
}

//	______________________________________________________________________ show
function show( object, parent ) {
	if ( browserSupportsDHTML ) {
		if ( object != currentMenu ) {
			if ( currentMenu != "" ) {
				hide( currentMenu, currentParent );
			}
			
			container = ( parent && netscapeDOM ) ? parent : "";
			showObject( object );
			currentMenu = object;
			currentParent = ( parent ) ? parent : "";
		}
//	} else {
//		document.location.hash = ( object.substring( 0, object.indexOf( "Layer" ) ) );
	}
}

//	________________________________________________________________ hideObject
function hideObject( object ) {
	var theObject = getObjectStyleReference( object );
	
	theObject.visibility = HIDDEN;
}

//	______________________________________________________________________ hide
function hide( object, parent ) {
	if ( browserSupportsDHTML ) {
		container = ( parent && netscapeDOM ) ? parent : "";
		hideObject( object );
	}
}

//-->