//MouseOver
var restoreArray = new Array;
var restoreCount = 0;
var restoreTimer = 0;

function  preloadImages  ()
{
 if  (preloadArray == null)  return;
 var imageObject;
 var fileName;
 count = preloadArray.length;
 for (index=0; index<count; index++)
     {
     fileName = preloadArray [index];
     imageObject = new Image;
     imageObject.src = fileName;
     preloadArray [index] = imageObject;
     }
}
function  replaceImage  (ImageName, FileName)
 {
 imageObject = eval ('document.' + ImageName);
 if  ((imageObject == null) || (FileName == null) || (FileName == ''))  return;
 if  (restoreArray != null)
     {
     restoreArray [restoreCount++] = imageObject.src;
     restoreArray [restoreCount++] = imageObject;
     }
 imageObject.src = FileName;
 }

function  clearRestoreList  ()
 {
 restoreCount = 0;
 }

function  restoreImages  (DelaySeconds)
 {
 if  (restoreTimer > 0)
     {
     clearTimeout (restoreTimer);
     restoreTimer = 0;
     }
 if  ((restoreArray == null) || (restoreCount < 1))  return;
 if  (DelaySeconds > 0)
     {
     restoreTimer = window.setTimeout ('restoreImages ();', DelaySeconds * 1000);
     return;
     }
 while (restoreCount > 0)
     {
     imageObject = restoreArray [--restoreCount];
     fileName = restoreArray [--restoreCount];
     if  ((imageObject != null) && (fileName != null) && (fileName != ''))  imageObject.src = fileName;
     }
 }

/** Standard popup window open
 * The first parameter will be the new URL.
 * Subsequent parameters will be (if supplied) the width and height.
 * If not specified the width and height will be 500 and 200 respectively.
 */
function openWin()
{
	var url, width=500, height=200, menu=""; args = arguments;
	url = args[0];
	if (args.length>1)
	{
		width=args[1];
	}
	if (args.length>2)
	{
		height=args[2];
	}
	if (args.length>3)
	{
		if (args[3])
		{
			menu=",menubar=yes,toolbar=yes";
		}
	}
	var newwin = window.open(url, 'newWin'+Math.floor(Math.random()*1000), 'width='+width+',height='+height+',scrollbars,resizable' + menu);
}