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

function enableElement(element_id){
	var element = $(element_id);
	if(element){
		element.disabled = false;
	}
}

function disableElement(element_id){
	var element = $(element_id);
	if(element){
		element.disabled = "disabled";
	}
}

function removeElement(element_id){
	var element = $(element_id);
	if(element){
		element.remove();
	}
}

function removeElements(identifier){
	var elements = $$(identifier);
	if(elements){
		elements.each(function(el){el.remove();});
	}
}