addEvent(window, 'load', addBehaviour, false);

function addBehaviour()
{
	if (document.getElementById)
	{
		var objOther = document.getElementById('ifother');
		var objProfession = document.getElementById('profession');
		
		if (objProfession.value != "other")
			objOther.style.visibility = 'hidden';

		addEvent(objProfession, 'change', checkOther, false);
	}
}

function checkOther()
{
	var objOther = document.getElementById('ifother');
	var objProfession = document.getElementById('profession');

	if (objProfession.value == "other")
		objOther.style.visibility = 'visible';
	else
		objOther.style.visibility = 'hidden';
}

// Cross browser event handling from Scott Andrew LePera
// http://www.scottandrew.com/weblog/articles/cbs-events
function addEvent(objElement, strEventType, objFunction, bCapture)
{
	if (objElement.addEventListener)
	{
		objElement.addEventListener(strEventType, objFunction, bCapture);
		return true;
	}
	else if (objElement.attachEvent)
	{
		var bResult = objElement.attachEvent('on' + strEventType, objFunction);
		return bResult;
	}
	else
		objElement['on' + strEventType] = objFunction;
}