if (document.images) 
{
	var red_hilite = new Image(); red_hilite.src = "images/red-hilite.gif";
}

function rollOn(img) 
{
  	if (document.images) 
  	{
		document[img].src = eval(img + '_on.src');
	}
}

function rollOff(img) 
{
  	if (document.images)
  	{
		document[img].src = eval(img + '_off.src');
	}
}


if (document.layers) document.captureEvents(Event.RESIZE);

function reloadPage(init) 
{  //reloads the window if Nav4 resized
	if (init==true) 
	{
		if (document.layers) {
			document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=reloadPage; 
		}
		else onresize=resizeContent;
	}
  	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
	{		
		location.reload();
	}
}
reloadPage(true);


function resizeContent(doit)
{
	if (doit)
	{
		// adjust the spacer gif to make sure that the bottom bar hugs the bottom of the window
		// if there is less content than a window full, otherwise it sits at the bottom of the 
		// content
		if (document.all) 
		{
			document.heightener.height = document.body.clientHeight - non_content_height;
		}
		else if (document.getElementById) 
		{
			document.heightener.height = window.innerHeight - non_content_height;
		}
	}
}


function hiliteRed(which)
{
	if (document.all) 
	{
        document.all['grey' + which + 'b'].style.backgroundColor= '999999';
	//	document.all['grey' + which + 'b'].style.backgroundImage= 'url(images/blue-bar.gif)';
      
	}
	else if (document.getElementById) 
	{
       document.getElementById('grey' + which + 'b').style.backgroundColor= '999999';
	//	document.getElementById('grey' + which + 'b').style.backgroundImage= 'url(images/blue-bar.gif)';
	}
}
function normalGrey(which)
{
	if (document.all) 
	{
        document.all['grey' + which + 'b'].style.backgroundColor= '';
		//document.all['grey' + which + 'b'].style.backgroundImage= 'url(images/spacer.gif)';
	}
	else if (document.getElementById) 
	{
       document.getElementById('grey' + which + 'b').style.backgroundColor= '';

		document.getElementById('grey' + which + 'b').style.backgroundImage= 'url(images/spacer.gif)';
	}
}

function setColor(which)
{
	var colour = "fff61d";
	if (which < 8)
	{
		colour = "ffd21a";
	}
	else if (which < 13)
	{
		colour = "ffe519";
	}

	if (document.all)
	{
		document.all['cat' + which + 'a'].style.backgroundColor= colour;
		document.all['cat' + which + 'b'].style.backgroundColor= colour;
	}
	else if (document.getElementById) 
	{
		document.getElementById('cat' + which + 'a').style.backgroundColor= colour;
		document.getElementById('cat' + which + 'b').style.backgroundColor= colour;
	}
}
function clearColor(which)
{
	if (document.all) 
	{
		document.all['cat' + which + 'a'].style.backgroundColor='';
		document.all['cat' + which + 'b'].style.backgroundColor='';
	}
	else if (document.getElementById) 
	{
		document.getElementById('cat' + which + 'a').style.backgroundColor='';
		document.getElementById('cat' + which + 'b').style.backgroundColor='';
	}
}



