document.observe('dom:loaded', function() {
	function checkQuestionOptionsForMatchingQuestions(element) {
		var selected_option = element.options[element.selectedIndex].value;
		var dom_id = element.id
		$$('.questions').each(function(element) {
			if (element.id != dom_id && element.options[element.selectedIndex].value == selected_option) {
				element.selectedIndex = (element.options.length > (element.selectedIndex + 1)) ? element.selectedIndex + 1 : 0;
			}
		})
	}

	$$('.questions').each(function(element) {
		element.onchange = checkQuestionOptionsForMatchingQuestions.bind(element, element);
		checkQuestionOptionsForMatchingQuestions(element);
	})

});


