// This module contains only one function: LIInitialFocus.
// It will look for the control IDs as specified either in
// "initialIds" parameter or window.LIInitialFocusIds
// expando-property (if initialIds is not specified).
// As soon as a control is found, it will be focused
// and the function will return. If no control is found,
// no focus will be set.
//
// Function arguments:
// initialIds (optional): array of strings that specify
// IDs of page controls that should be focused when this
// function is run. Note that only the first found control
// will receive focus (not the remaining ones).
function LIInitialFocus(initialIds)
{
	var ids = ("object" == typeof(initialIds)
		? initialIds
		: "object" == typeof(window.LIInitialFocusIds)
			? window.LIInitialFocus
			: null
	);
	if (null == ids) {
		return;
	}
	for (var i in ids) {
		var control = document.getElementById(ids[i]);
		if ("object" == typeof(control) && null != control) {
			control.focus();
			break;
		}
	}
}
