function toggle( id ) {
	var status;

	status = document.getElementById( id ).style.display;
	if (status == 'none') {
		document.getElementById( id ).style.display = '';
	}else{
		document.getElementById( id ).style.display = 'none';
	}
}

function hideDiv( id ){
	document.getElementById( id ).style.display = 'none';
}

function showDiv( id ){
	document.getElementById( id ).style.display = '';
}

function setIDChecked( id ){
	document.getElementById( id ).checked = true;
}

function setValue( id, val ){
	try{
		document.getElementById(id).value = val;
	}catch(exception){
		// Do nothing, ignore it.
	}
}

function confirm_del (url, msg) {
   var return_value = confirm("Wollen Sie " + msg + " wirklich löschen?\n");
   if (return_value == true) {
      var location=(url);
      this.location.href = location;
   }
}

function confirm_del_msg (url, msg) {
   var return_value = confirm( msg );
   if (return_value == true) {
      var location=(url);
      this.location.href = location;
   }
}

function reload (url) {
	var location=(url);
	this.location.href = location;
}

function redirect( formularname, neueaktion ){
	document.getElementById(formularname).action = neueaktion;
	document.getElementById(formularname).submit();
}

