var oldElement = null;

function focusID(id)
{
	element = document.getElementById(id);
	
	if(null != element)
	{
		element.focus();
	}	
}

function changeToFocusState(id)
{
	if(null != oldElement)
	{
		oldElement.style.backgroundColor = '#777';
		oldElement.style.color = '#EEE';
		oldElement.style.borderColor = '#999';
	}
	element = document.getElementById(id);
	element.style.backgroundColor = '#999';
	element.style.color = '#FFF';
	element.style.borderColor = '#EEE';
	  
	oldElement = element;
}