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();
}

@@ -265,17 +265,16 @@
 nt_id);%0A
-%09
 %0A%09if (el
@@ -282,16 +282,17 @@
 ment && 
+(
 typeof e
@@ -317,18 +317,58 @@
 unction'
+ %7C%7C%0A%09%09typeof element.focus == 'object')
 )%0A
+%09
 %09%09elemen

Make this work in internet explorer.