function zeigen(id) { document.getElementById(id).style.display = 'block'; }


function agreeDel(modul, id, site) {

	var agree = confirm("Wollen Sie diesen Datensatz wirklich löschen?");

	if(agree == true) {

		window.location.href = "intern,"+modul+","+site+","+id+".html";

	}
	else {

		return false;
		
	}

}


function agreeDeladmin(id, modul) {
	var agreeAdmin = confirm("Wollen Sie diesen Datensatz wirklich löschen?");

	if(agreeAdmin == true) {
		window.location.href = "admin,"+modul+",loeschen,"+id+".html";
	}
	else {
		return false;
	}
}


function agreeDeladmin2(kunde, id, modul) {
	var agreeAdmin = confirm("Wollen Sie diesen Datensatz wirklich löschen?");

	if(agreeAdmin == true) {
		window.location.href = "admin,"+modul+",loeschen,"+kunde+","+id+".html";
	}
	else {
		return false;
	}
}




function display(overID, boxID) {

	new Effect.Appear(overID, {duration: 0, from: 0.0, to: 0.6});
	Effect.Appear(boxID);

}

function displayOut(overID, boxID) {

	Element.hide(overID);
	Element.hide(boxID);

}




// Checkboxen alle auf einmal checked machen
var check = false;

function selectChecked(box) {

	if(!check) {

		for(i=0; i<box.length; i++) { box[i].checked = true; }

		check = true;
		
	}
	else {

		for(i=0; i<box.length; i++) { box[i].checked = false; }

		check = false;

	}

}











	// LAST DOWNLOAD
	
	
	function lastDL(id, kunde) {
		  var myAjax = new Ajax.Request(
		    "ajax_lastDL.php",
		    { 
		    	method: 'get', 
		    	parameters: 'id='+id+'&kunde='+kunde,
		    	onComplete: showDate 
		    }
		  );
	}
	
	
	
	function showDate(lastDL) {
		$('lastdl').innerHTML = lastDL.responseText;
	}
