function Init()
{
	InitFocus();
}

function InitFocus()
{
	//document.body.attachEvent("onfocusin", OnFocusIn);
	//document.body.attachEvent("onfocusout", OnFocusOut);
}

function OnFocusIn()
{
	if(IsFocusEnhancedElement(event.srcElement))
	{
		event.srcElement.className += "Focus";
	}
}

function OnFocusOut()
{
	if(IsFocusEnhancedElement(event.srcElement))
	{
		event.srcElement.className = event.srcElement.className.substring(0, event.srcElement.className.length - 5);
	}
}

function IsFocusEnhancedElement(obj)
{
	if(obj == null) return false;
	if(obj.tagName == "INPUT")
	{
		if(obj.type == "text" || obj.type == "password")
		{
			return true;
		}
	}
	if(obj.tagName == "SELECT")
	{
		return true;
	}
	if(obj.tagName == "TEXTAREA")
	{
		return true;
	}
	return false;
}
