function ScriptCaps()
{
	this.dom = (document.getElementById ? true : false);
	this.ns = navigator.appName == 'Netscape';
	this.ie = navigator.appName == 'Microsoft Internet Explorer';
	this.lyr = (document.layers ? true : false);
	this.all = (document.all ? true : false);
	this.ns4 = this.ns && (parseInt(navigator.appVersion) == 4);
	return this;
}
var caps = new ScriptCaps;

function nsResize()
{
	if (caps.ns4)
	{
		window.location.href = window.location.href;
	}
}

function findImage(id, pfx)
{
	var obj = null;
	eval('var len = ' + pfx + '.images.length');
	for (var i = 0; i < len; ++i)
	{
		eval('var img = ' + pfx + '.images[' + i + '];');
		if (img.name == id)
		{
			obj = img;
			break;
		}
	}
	if (obj == null && caps.lyr)
	{
		eval('var len = ' + pfx + '.layers.length;');
		for (var i = 0; i < len; ++i)
		{
			obj = findImage(id, pfx + '.layers[' + i + '].document');
			if (obj != null)
			{
				break;
			}
		}
	}
	return obj;
}

function loadImage(id, src)
{
	var img = findImage(id, 'window.document');
	if (img != null)
	{
		img.src = src;
	}
}
