sfFocus = function() {
	var sfin = document.getElementsByTagName("INPUT");
	var sfte = document.getElementsByTagName("TEXTAREA");
	for (var i=0; i<sfin.length; i++) {
		sfin[i].onfocus=function() {
			this.className+=" focus";
		}
		sfin[i].onblur=function() {
			this.className=this.className.replace(new RegExp(" focus\\b"), "");
		}
	}
	for (var i=0; i<sfte.length; i++) {
		sfte[i].onfocus=function() {
			this.className+=" focus";
		}
		sfte[i].onblur=function() {
			this.className=this.className.replace(new RegExp(" focus\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfFocus);
