function SwatForm(id)
{
	this.id = id;
	this.form_element = document.getElementById(id);
}

SwatForm.prototype.setDefaultFocus = function(element_id)
{
	// TODO: check if another element in this form is already focused

	var element = document.getElementById(element_id);
	
	if (element && typeof element.focus == 'function')
		element.focus();
}

function SwatForm(id)
{
	this.id = id;
	this.form_element = document.getElementById(id);
}

SwatForm.prototype.setDefaultFocus = function(element_id)
{
	// TODO: check if another element in this form is already focused

	var element = document.getElementById(element_id);

	if (element && (typeof element.focus == 'function' ||
		typeof element.focus == 'object'))
			element.focus();
}

Make this work in internet explorer.
Make this work in internet explorer.


svn commit r1709
