// Images JavaScript file for solutionsciences.com
// Copyright 2002, Solution Sciences Inc., All rights reserved
//
// This file contains functions for dealing with image caching and rollovers
//
// Assumes the existence of:
//
// hiArray - array of image source links for when the mouse is over a link
// lowArray - ditto but for when the mouse is off them


function createArray(maxIndex)
{
	retArray = new Array(maxIndex);

	for (c = 0; c <= maxIndex; c++)
	{
		retArray[c] = new Image();
	}

	return retArray;
}

function msOver(index)
{
	document.images[index].src = hiArray[index].src;
}

function msOut(index)
{
	document.images[index].src = lowArray[index].src;
}

function techOver(index)
{
	document.images[index].src = hiArray[index].src;

/*	for (c = firstTechIndex; c < firstTechIndex + techLength; c++)
	{
		if (c != index)
		{
			if (document.images[c].src != lowArray[c].src)
			{
				document.images[c].src = lowArray[c].src;
			}
		}
	}

	if (document.images[index].src != hiArray[index].src)
	{
		document.images[index].src = hiArray[index].src;
	}*/
}

function techOut(index)
{
	document.images[index].src = lowArray[index].src;

/*	for (c = firstTechIndex; c < firstTechIndex + techLength; c++)
	{
		if (document.images[c].src != hiArray[c].src)
		{
			document.images[c].src = hiArray[c].src;
		}
	}*/
}

function sectionOver(i)
{
	document.images[i].src = hiArray[i].src;
	document.images[i - 1].src = hiArray[i - 1].src;
	document.images[i + 1].src = hiArray[i + 1].src;
}

function sectionOut(i)
{
	document.images[i].src = lowArray[i].src;
	document.images[i - 1].src = lowArray[i - 1].src;
	document.images[i + 1].src = lowArray[i + 1].src;
}


