// \s*\S\s*\/\/.+\.$
// WBFrameSwapnRoll.action v1.3.6 - August, 2002
// Copyright © 1999 by Walter Blady
// All rights reserved
//Main function.
function WBFrameSwapnRoll(action) {
	if (FSRVersion()) {
		var FSRisIE = navigator.appVersion.indexOf("MSIE") >= 0;
		var FSRisW3C = document.getElementById ? true : false;
		if (action[1] != "" && action[2].indexOf("Reference!") == -1) {
			if (FSRisW3C || FSRisIE) {
				if (action[3].length > 0) {
					baseImage = eval(action[3] + ".document.images." + action[1]);
				}
				else {
					baseImage = document.images[action[1]];
				}
			}
			//...else get image object for other browsers.
			else {
				if (action[3].length > 0) {
					baseImage = parseInt(navigator.appVersion.charAt(0)) > 3 ? FSRFindElement(action[1], 0, action[3]) : eval(action[3] + ".document.images[action[1]]");
				}
				else {
					baseImage = parseInt(navigator.appVersion.charAt(0)) > 3 ? FSRFindElement(action[1], 0) : document.images[action[1]];
				}
			}
			if (baseImage) {
				baseImage.src = action[2];
			}
		}
	}
	return;
}
//Locate image object.
function FSRFindElement(baseImage, thisLayer, frameName) { 
	//Try this layer object.
	if (frameName != null) {
		var thisDocument = thisLayer ? thisLayer.document : eval(frameName + ".document");
	}
	else {
		var thisDocument = thisLayer ? thisLayer.document : document;
	}
	//Is the image object on this layer.
	var imageObj = thisDocument[baseImage];
	//If not, loop through all the layer objects.
	if (imageObj) {
		return imageObj;
	}
	else {
		for (var i = 0; i < thisDocument.layers.length; i++) {
			imageObj = FSRFindElement(baseImage, thisDocument.layers[i], frameName);
			if (imageObj) {
				break;
			}
		}
	}
	return imageObj;
}
// Browser check.
function FSRVersion() {
	return true;
}
//
