// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function set_focus(elementId) {
  document.getElementById(elementId).focus();
  document.getElementById(elementId).select();
}


function mark_language_for_destroy(element) {
	$(element).next('.should_destroy').value = 1;
	$(element).up('.language').hide();
}

function mark_reference_for_destroy(element) {
	$(element).next('.should_destroy').value = 1;
	$(element).up('.reference').hide();
}
