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)
	{
		
		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 + 'a'].style.backgroundImage= 'url(../images/red-hilite.gif)';
		document.all['grey' + which + 'b'].style.backgroundImage= 'url(../images/red-hilite.gif)';
		document.all['grey' + which + 'c'].style.backgroundImage= 'url(../images/red-hilite.gif)';
	}
	else if (document.getElementById)
	{
		document.getElementById('grey' + which + 'a').style.backgroundImage= 'url(../images/red-hilite.gif)';
		document.getElementById('grey' + which + 'b').style.backgroundImage= 'url(../images/red-hilite.gif)';
		document.getElementById('grey' + which + 'c').style.backgroundImage= 'url(../images/red-hilite.gif)';
	}
}
function normalGrey(which)
{
	if (document.all)
	{
		document.all['grey' + which + 'a'].style.backgroundImage= 'url(../images/grey-item-back.gif)';
		document.all['grey' + which + 'b'].style.backgroundImage= 'url(../images/grey-item-back.gif)';
		document.all['grey' + which + 'c'].style.backgroundImage= 'url(../images/grey-item-back.gif)';
	}
	else if (document.getElementById)
	{
		document.getElementById('grey' + which + 'a').style.backgroundImage= 'url(../images/grey-item-back.gif)';
		document.getElementById('grey' + which + 'b').style.backgroundImage= 'url(../images/grey-item-back.gif)';
		document.getElementById('grey' + which + 'c').style.backgroundImage= 'url(../images/grey-item-back.gif)';
	}
}

function setColor(which)
{
	var colour = "#FD77E2";
	if (which < 7)
	{
		colour = "FFF9FE";
	}
	else if (which < 15)
	{
		colour = "FEA9ED";
	}
	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='';
	}
}



