<!--
function preloadImages() {
	var doc = document;
	//-- If the browser recognizes images
	//--
	if (doc.images){
		//-- If the Pics Array doesn't exist, create it
		//--
		if (!doc.Pics) {
			doc.Pics = new Array();
		}
		var i;
		//-- Gets Length of the Array = 0
		//--
		j = doc.Pics.length;

		//-- Set a to an array of the arguments passed in, the pictures
		//--
		var a = preloadImages.arguments;

		//-- Loop through the Array(a)
		//--
		for ( i = 0; i < a.length; i++ ) {
			//-- If some characters are found in the array item
			//-- Add the Image to the Preloaded Pics Array
			//--
			if ( a[i].indexOf("#")!=0 ) {
				doc.Pics[j] = new Image;
				doc.Pics[j++].src = a[i];
			}
		}

	}
}

function swapImgRestore() {
	var doc = document;
	var i;
	var x;
	//-- Get the swapRestore Array
	//--
	var a = doc.swapRestore;

	//-- Loop through the array, and set the .src back to the original
	//--
	for ( i = 0; a && i < a.length &&  ( x = a[i] ) && x.oSrc ; i++ ) {
		x.src = x.oSrc;
	}
}

function findObj( name, doc ) {
	var p;
	var i;
	var x;

	//-- If doc is nothing, set it to document
	//--
	if ( !doc ) {
		doc = document;
	}

	//-- Frames?
	//--
	if ( ( p = name.indexOf("?") ) > 0 && parent.frames.length ) {
		doc = parent.frames[n.substring( p + 1)].document;
		name = name.substring( 0, p );
	}

	if ( ! ( x = doc[name] ) && doc.all ) {
		x = doc.all[name];
	}

	//-- Form Object?
	//--
	for ( i = 0; !x && i < doc.forms.length; i++ ) {
		x = doc.forms[i][name];
	}

	for ( i = 0; !x && doc.layers && i < doc.layers.length; i++ ) {
		x = findObj( name, doc.layers[i].document);
	}

	return x;
}

function swapImage() {
	var i;
	var j = 0;
	var x;

	//-- Create an Array of arguments passed in;
	//--
	var a = swapImage.arguments;

	//alert ( a[0]+'.'+a[1]+'.'+a[2]+'.'+a[3])
	var doc = document;

	//-- Create a New Array to store the swapped images
	//--
	doc.swapRestore = new Array;

	for ( i = 0; i < ( a.length - 1 ); i+=2 ) {
		//-- If the Image Name passed in is an object Then...
		//--
		if ( ( x = findObj( a[i] ) ) != null ) {
			doc.swapRestore[j++] = x;

			if ( ! x.oSrc ) {
				x.oSrc = x.src;
			}
			x.src = a[i+1];
		}
	}
}
//-->