function buttonNo() {
	self.close();
}

// Do the things that need to be done on page load.
$(document).ready( function() {
	//Hide 'other' boxes.
	//Keep showing the ones that are in an error state and the ones
	//that actually have stuff in.
	$('li.other').not('.error').filter( function(index) {
		return $(':text', this).val() == '';
	} ).find(':text').attr('disabled', true);
	
	//Add change handlers to select boxes
	//First do the role select box.
	$('li#role select').change( function() {
		if ($(this).val() == 'other') {
			$('li#role_other :text').removeAttr('disabled');
		} else {
			$('li#role_other :text').val('').attr('disabled', true);
		}
	} );
	
	//Then the reason selection box
	$('li#reason select').change( function() {
		if ($(this).val() == 'other') {
			$('li#reason_other :text').removeAttr('disabled');
		} else {
			$('li#reason_other :text').val('').attr('disabled', true);
		}
	} );
	
	//Add click handlers to the pre survey buttons
	$('#survey_no').click( buttonNo );
} );

