/********************************************************************
* Copyright ©  Acsys, Inc.  All rights reserved.
* 
* This material contains the valuable properties and trade secrets of
* Acsys, Inc. embodying substantial creative efforts and confidential 
* information, ideas, and expressions, no part of which may be 
* reproduced or transmitted in any form or by any means, electronic, 
* mechanical, or otherwise, including photocopying and recording or 
* in connection with any information storage or retrieval system 
* without the permission in writing of Acsys, Inc.
*/

/********************************************************************
* This library defines classes and functions for doing image mouse 
* overs.
* 
* Dependencies: 
*	AcsysMain.js - relies on globals browser capabilities object.
*/


function PreloadImage(imgName, imgSrc, imgSrcOn)
{
	//create global image objects
	window["img_" + imgName] = new Image();
	window["img_" + imgName].src = imgSrc;
	window["imgOn_" + imgName] = new Image();
	window["imgOn_" + imgName].src = imgSrcOn;
}

function ImageSwap(imgName)
{
	if (!window["img_" + imgName])
	{
		return;
	}
	
	var image = (browser.IsDOM)
		? document.getElementById(imgName)
		: document[imgName];

	if (image && image.src)
	{
		image.src = (image.src == window["img_" + imgName].src)
			? window["imgOn_" + imgName].src
			: window["img_" + imgName].src;
	}
}