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

function mark_for_destroy (element) {
	$(element).next('.should_destroy').value = 1;
	$(element).up('.price').hide();
}
/**
 * @author axel
 */
function toggleVisiblity(a) {
	B= a+"_legend";
    if (document.getElementById(a).style.visibility == "visible"){
   		document.getElementById(a).style.visibility = "hidden";
   		document.getElementById(a).style.display = "none";
		document.getElementById(B).style.backgroundImage = "url('/images/icons/plus.png')";
   	}
   	else {
   		document.getElementById(a).style.visibility = "visible";
		document.getElementById(a).style.display = "inline";
		document.getElementById(B).style.backgroundImage = "url('/images/icons/minus.png')";
   	}
}

function togglediv(div) {
	$(div).toggle()
}

function toggleTabs(divToShow,cssclass){
	$$('div.'+cssclass).each(function(item){
		  item.hide();
 	});
	$(divToShow).show(); 
}
  function enable_submit(){
    if (($('participation_user_data_correct').checked) &&
      ($('participation_data_forward').checked) &&
      ($('participation_agb').checked)){
      $('submit_part_button').disabled = false;
    }
    else {
      $('submit_part_button').disabled = true;
    }
  }