imageOn = new Array();

imageOn[0] = "images/authgy.jpg";
imageOn[1] = "images/kwgy.jpg";
imageOn[2] = "images/bsgy.jpg";
imageOn[3] = "images/clgy.jpg";
imageOn[4] = "images/etgy.jpg";
imageOn[5] = "images/emtgy.jpg";

imageOff = new Array();

imageOff[0] = "images/authwt.jpg";
imageOff[1] = "images/kwwt.jpg";
imageOff[2] = "images/bswt.jpg";
imageOff[3] = "images/clwt.jpg";
imageOff[4] = "images/etwt.jpg";
imageOff[5] = "images/emtwt.jpg";

imageStay = new Array();

imageStay[0] = "images/authgn.jpg";
imageStay[1] = "images/kwgn.jpg";
imageStay[2] = "images/bsbu.jpg";
imageStay[3] = "images/clbu.jpg";
imageStay[4] = "images/etbu.jpg";
imageStay[5] = "images/emtbu.jpg";

imageNames = new Array();

imageNames[0] = "auth";
imageNames[1] = "key";
imageNames[2] = "bs";
imageNames[3] = "clin";
imageNames[4] = "est";
imageNames[5] = "eme";

exitover = "images/backover.jpg";
exitout1 = "images/back.jpg";

preload = new Image();
preload.src = exitover;
preload = new Image();
preload.src = exitout1;

for (i=0; i < imageOn.length; i++)
{
	preload = new Image();
	preload.src = imageOn[i];
	preload = new Image();
	preload.src = imageOff[i];
	preload = new Image();
	preload.src = imageStay[i];
}

function exiton()
{
	document.exit.src = exitover;
}
function exitout()
{
	document.exit.src = exitout1;
}
function rollon(item)
{
	if(item != top.scriptWin.document.buttons.highlighted.value)
	{
		document[imageNames[item]].src = imageOn[item];
	}
}

function rolloff(item)
{
    if(item != -1)
    {
		if(item != top.scriptWin.document.buttons.highlighted.value)
		{
			document[imageNames[item]].src = imageOff[item];
		}
	}
}

function stay(item)
{
	previous = top.scriptWin.document.buttons.highlighted.value;

	top.scriptWin.document.buttons.highlighted.value = item;
	
	if (item != -1)
	{
		document[imageNames[item]].src = imageStay[item];
	}
	if (item != previous)
	{
		rolloff(previous);
	}
}
