function ChangeImage(img_name, img_src)
	{ document.all[img_name].src = img_src; }

function ChangeBackground(obj, bg_color)
	{ obj.style.backgroundColor = bg_color; }

function SetStatus(tip)
{
	status = tip;
	return true;
}

function ClearStatus()
{
	status = '';
	return true;
}

function SetVisibility(name, value)
{
	obj = document.all[name];
	obj.style.visibility = value;
	return obj;
}

function FindPos(obj)
{
	var curleft = curtop = 0;
	if (obj.offsetParent)
	{
		do
		{
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
	}
	return [curleft, curtop];
}

function GoToPage(form, page)
{
	form.result_offset.value = page;
	form.action.value = 'list';
	form.submit();
}

function OrderBy(form, column)
{
	form.order_by.value = column;
	form.action.value = 'reorder';
	form.submit();
}

function OpenWindow(the_url, the_width, the_height)
{
	var the_left = (screen.availWidth - the_width) / 2;
	var the_top = (screen.availHeight - the_height + 100) / 2;
	var the_properties = "width=" + the_width + ",height=" + the_height +
		",top=" + the_top + ",left=" + the_left + ",resizable=yes,toolbars=no,scrollbars=yes";
	var the_window = open(the_url, '', the_properties);
}