// JavaScript Document

function show_hide_accommodation(obj)
{
	acc = document.getElementById('span_accommodation_needed');
	if (obj.chk_accommodation.checked)
	{		
		acc.style.display = '';
	}
	else
	{
		acc.style.display = 'none';
		accommodation = document.getElementById('accommodation_needed');
		accommodation.value = '';		
	}
}
function show_hide_position_other(obj)
{
	position = obj.position;
	
	position_other = document.getElementById('span_position_other');
	txt_position_other = document.getElementById('position_other');
	if (position.options[position.selectedIndex].value == 'Other')
	{
		position_other.style.display = '';
	}
	else
	{
		position_other.style.display = 'none';
		txt_position_other.value = '';
	}
}

function show_hide_grade_other(obj)
{
	grade = obj.grade;
	
	grade_other = document.getElementById('span_grade_other');
	txt_grade_other = document.getElementById('grade_other');
	if (grade.options[grade.selectedIndex].value == 'Other')
	{
		grade_other.style.display = '';
	}
	else
	{
		grade_other.style.display = 'none';
		txt_grade_other.value = '';
	}
}


function setup_form(obj)
{
	show_hide_accommodation(obj);
	show_hide_grade_other(obj);
	show_hide_position_other(obj);
}