function Find(item)
{
	if (document.all) {
		return (document.all[item]);
	};

	if (document.getElementById) {
		return (document.getElementById(item));
	};

	return false;
}

if (document.layers) lrs = 1;
else lrs = 0;

function OpenNewWindow(href, width, height, options)
{
	var left_position = (screen.width - width) / 2;
	var top_position = (screen.height - height) / 2 - 20;

 	if (left_position < 40) {
		left_position = 40;
		width = screen.width - 80;
	};

	if (top_position < 20) {
		top_position = 20;
		height = screen.height - 80;
	};

	if (String(options).length > 0) {
		options = "," + options;
	};
	
	var result = window.open(href, "Window", "width=" + width + ",height=" + height + ",left=" + left_position + ",top=" + top_position + options);
	result.focus();
}

pictures = new Array();
var picCount = 0;

function PreLoad(name, first, second)
{
	pictures[picCount] = new Array(3);
	pictures[picCount][0] = new Image();
	pictures[picCount][0].src = first;
	pictures[picCount][1] = new Image();
	pictures[picCount][1].src = second;
	pictures[picCount][2] = name;
	picCount++;
}

