var currentWindow;
var highlight;

var      overColor = "rgb( 255, 120, 120 )";
var       outColor = "rgb( 161, 146, 103 )";
/* bgcolor = "rgb( 204, 185, 126 )"; */
var highlightColor = "rgb(   0,   0,   0 )";

var  naviOverColor = "rgb( 204, 204, 204 )";
var   naviOutColor = "rgb( 204, 204, 204 )";

/* Three state buttons for the windows */
function windowOver( windowNum )
 {
 	currentWindow = windowNum;

	if( highlight == 1 )
		changeColor( currentWindow, highlightColor );
	 else
		changeColor( currentWindow, overColor );		 	
 }

function windowOut()
 {
	changeColor( currentWindow, outColor );
	currentWindow = -1;
 }

function windowHighlightOver()
 {
	highlight = 1;
 }

function windowHighlightOut()
 {
	highlight = 0;
 }
 
function changeColor( windowNum, windowColor )
 {
	document.getElementById( windowNum ).style.background =	windowColor;
 }
 
 

/* Three state buttons for the navigation bar */ 
function naviOver()
 {
	if( highlight == 1 )
		changeNaviColor( highlightColor, false );
	 else
		changeNaviColor( naviOverColor, true );
 }

function naviOut()
 {
	changeNaviColor( naviOutColor, true );
 }

function naviHighlightOver()
 {
	highlight = 1;
 }

function naviHighlightOut()
 {
	highlight = 0;
 }
 
function changeNaviColor( windowColor, bgWhite )
 {
	document.getElementById( "naviLeft"   ).style.background 	= windowColor;
 	document.getElementById( "naviCenter" ).style.background 	= windowColor;
 	document.getElementById( "naviRight"  ).style.background 	= windowColor;

	/*
	if( bgWhite )
	 	bgColor = "rgb( 255, 255, 255 )";
	 else
		bgColor = "rgb( 235, 235, 235 )";
		
	document.getElementById( "contentLeft" ).style.background = bgColor;	
	document.getElementById( "contentRight" ).style.background = bgColor;			
	document.getElementById( "contentCenter" ).style.background = bgColor;				
	document.getElementById( "naviVerticalSpace" ).style.background = bgColor;				
	*/
}
 

 

		