// alte sachen aus dbsachen.js

DB.loadLetzteBeladung = function(ofenname) {
	myJSON = { func: "letzteBeladung", ofenname: ofenname };
	letzteBeladungJSON = $.ajax({
		url: DBSACHEN, 
		data: { json: JSON.stringify(myJSON) }, 
		async: false, 
		method: "POST" 
	});
	var cnt = 0;
	var arr = $.parseJSON(letzteBeladungJSON.responseText);
	if (arr[1] != "-")  {tmparr =  arr[1].split("-");$("#tbE01" + ofenname).val(getNextPart(tmparr[0]));$("#SON01" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[2] != "-")  {tmparr =  arr[2].split("-");$("#tbE02" + ofenname).val(getNextPart(tmparr[0]));$("#SON02" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[3] != "-")  {tmparr =  arr[3].split("-");$("#tbE03" + ofenname).val(getNextPart(tmparr[0]));$("#SON03" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[4] != "-")  {tmparr =  arr[4].split("-");$("#tbE04" + ofenname).val(getNextPart(tmparr[0]));$("#SON04" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[5] != "-")  {tmparr =  arr[5].split("-");$("#tbE05" + ofenname).val(getNextPart(tmparr[0]));$("#SON05" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[6] != "-")  {tmparr =  arr[6].split("-");$("#tbE06" + ofenname).val(getNextPart(tmparr[0]));$("#SON06" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[7] != "-")  {tmparr =  arr[7].split("-");$("#tbE07" + ofenname).val(getNextPart(tmparr[0]));$("#SON07" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[8] != "-")  {tmparr =  arr[8].split("-");$("#tbE08" + ofenname).val(getNextPart(tmparr[0]));$("#SON08" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[9] != "-")  {tmparr =  arr[9].split("-");$("#tbE09" + ofenname).val(getNextPart(tmparr[0]));$("#SON09" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[10] != "-") {tmparr = arr[10].split("-");$("#tbE10" + ofenname).val(getNextPart(tmparr[0]));$("#SON10" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[11] != "-") {tmparr = arr[11].split("-");$("#tbE11" + ofenname).val(getNextPart(tmparr[0]));$("#SON11" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[12] != "-") {tmparr = arr[12].split("-");$("#tbE12" + ofenname).val(getNextPart(tmparr[0]));$("#SON12" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[13] != "-") {tmparr = arr[13].split("-");$("#tbE13" + ofenname).val(getNextPart(tmparr[0]));$("#SON13" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[14] != "-") {tmparr = arr[14].split("-");$("#tbE14" + ofenname).val(getNextPart(tmparr[0]));$("#SON14" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[15] != "-") {tmparr = arr[15].split("-");$("#tbE15" + ofenname).val(getNextPart(tmparr[0]));$("#SON15" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[16] != "-") {tmparr = arr[16].split("-");$("#tbE16" + ofenname).val(getNextPart(tmparr[0]));$("#SON16" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[17] != "-") {tmparr = arr[17].split("-");$("#tbE17" + ofenname).val(getNextPart(tmparr[0]));$("#SON17" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[18] != "-") {tmparr = arr[18].split("-");$("#tbE18" + ofenname).val(getNextPart(tmparr[0]));$("#SON18" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[19] != "-") {tmparr = arr[19].split("-");$("#tbE19" + ofenname).val(getNextPart(tmparr[0]));$("#SON19" + ofenname).val(tmparr[1]); cnt += 1;}
	if (arr[20] != "-") {tmparr = arr[20].split("-");$("#tbE20" + ofenname).val(getNextPart(tmparr[0]));$("#SON20" + ofenname).val(tmparr[1]); cnt += 1;}
	return cnt;
}


DB.loadLetzteBeladungKF480 = function() {
	myJSON = { func: "letzteBeladung", ofenname: "KF480" };
	letzteBeladungJSON = $.ajax({
		url: DBSACHEN, 
		data: { json: JSON.stringify(myJSON) }, 
		async: false, 
		method: "POST" 
	});
	var cnt = 0;
	var arr = $.parseJSON(letzteBeladungJSON.responseText);
	if (arr[1] != "-")  {tmparr =  arr[1].split("-");$("#tbE01KF480").val(getNextPart(tmparr[0]));$("#SON01KF480").val(tmparr[1]); cnt += 1;}
	if (arr[2] != "-")  {tmparr =  arr[2].split("-");$("#tbE02KF480").val(getNextPart(tmparr[0]));$("#SON02KF480").val(tmparr[1]); cnt += 1;}
	if (arr[3] != "-")  {tmparr =  arr[3].split("-");$("#tbE03KF480").val(getNextPart(tmparr[0]));$("#SON03KF480").val(tmparr[1]); cnt += 1;}
	if (arr[4] != "-")  {tmparr =  arr[4].split("-");$("#tbE04KF480").val(getNextPart(tmparr[0]));$("#SON04KF480").val(tmparr[1]); cnt += 1;}
	if (arr[5] != "-")  {tmparr =  arr[5].split("-");$("#tbE05KF480").val(getNextPart(tmparr[0]));$("#SON05KF480").val(tmparr[1]); cnt += 1;}
	if (arr[6] != "-")  {tmparr =  arr[6].split("-");$("#tbE06KF480").val(getNextPart(tmparr[0]));$("#SON06KF480").val(tmparr[1]); cnt += 1;}
	if (arr[7] != "-")  {tmparr =  arr[7].split("-");$("#tbE07KF480").val(getNextPart(tmparr[0]));$("#SON07KF480").val(tmparr[1]); cnt += 1;}
	if (arr[8] != "-")  {tmparr =  arr[8].split("-");$("#tbE08KF480").val(getNextPart(tmparr[0]));$("#SON08KF480").val(tmparr[1]); cnt += 1;}
	if (arr[9] != "-")  {tmparr =  arr[9].split("-");$("#tbE09KF480").val(getNextPart(tmparr[0]));$("#SON09KF480").val(tmparr[1]); cnt += 1;}
	if (arr[10] != "-") {tmparr = arr[10].split("-");$("#tbE10KF480").val(getNextPart(tmparr[0]));$("#SON10KF480").val(tmparr[1]); cnt += 1;}
	if (arr[11] != "-") {tmparr = arr[11].split("-");$("#tbE11KF480").val(getNextPart(tmparr[0]));$("#SON11KF480").val(tmparr[1]); cnt += 1;}
	if (arr[12] != "-") {tmparr = arr[12].split("-");$("#tbE12KF480").val(getNextPart(tmparr[0]));$("#SON12KF480").val(tmparr[1]); cnt += 1;}
	if (arr[13] != "-") {tmparr = arr[13].split("-");$("#tbE13KF480").val(getNextPart(tmparr[0]));$("#SON13KF480").val(tmparr[1]); cnt += 1;}
	if (arr[14] != "-") {tmparr = arr[14].split("-");$("#tbE14KF480").val(getNextPart(tmparr[0]));$("#SON14KF480").val(tmparr[1]); cnt += 1;}
	if (arr[15] != "-") {tmparr = arr[15].split("-");$("#tbE15KF480").val(getNextPart(tmparr[0]));$("#SON15KF480").val(tmparr[1]); cnt += 1;}
	if (arr[16] != "-") {tmparr = arr[16].split("-");$("#tbE16KF480").val(getNextPart(tmparr[0]));$("#SON16KF480").val(tmparr[1]); cnt += 1;}
	if (arr[17] != "-") {tmparr = arr[17].split("-");$("#tbE17KF480").val(getNextPart(tmparr[0]));$("#SON17KF480").val(tmparr[1]); cnt += 1;}
	if (arr[18] != "-") {tmparr = arr[18].split("-");$("#tbE18KF480").val(getNextPart(tmparr[0]));$("#SON18KF480").val(tmparr[1]); cnt += 1;}
	if (arr[19] != "-") {tmparr = arr[19].split("-");$("#tbE19KF480").val(getNextPart(tmparr[0]));$("#SON19KF480").val(tmparr[1]); cnt += 1;}
	if (arr[20] != "-") {tmparr = arr[20].split("-");$("#tbE20KF480").val(getNextPart(tmparr[0]));$("#SON20KF480").val(tmparr[1]); cnt += 1;}
	return cnt;
}

DB.loadLetzteBeladungKF80 = function() {
	myJSON = { func: "letzteBeladung", ofenname: "KF80" };
	letzteBeladungJSON = $.ajax({
		url: DBSACHEN, 
		data: { json: JSON.stringify(myJSON) }, 
		async: false, 
		method: "POST" 
	});
	var cnt = 0;
	var arr = $.parseJSON(letzteBeladungJSON.responseText);
	if (arr[1] != "-")  {tmparr =  arr[1].split("-");$("#tbE01KF80").val(getNextPart(tmparr[0]));$("#SON01KF80").val(tmparr[1]); cnt += 1;}
	if (arr[2] != "-")  {tmparr =  arr[2].split("-");$("#tbE02KF80").val(getNextPart(tmparr[0]));$("#SON02KF80").val(tmparr[1]); cnt += 1;}
	if (arr[3] != "-")  {tmparr =  arr[3].split("-");$("#tbE03KF80").val(getNextPart(tmparr[0]));$("#SON03KF80").val(tmparr[1]); cnt += 1;}
	if (arr[4] != "-")  {tmparr =  arr[4].split("-");$("#tbE04KF80").val(getNextPart(tmparr[0]));$("#SON04KF80").val(tmparr[1]); cnt += 1;}
	if (arr[5] != "-")  {tmparr =  arr[5].split("-");$("#tbE05KF80").val(getNextPart(tmparr[0]));$("#SON05KF80").val(tmparr[1]); cnt += 1;}
	if (arr[6] != "-")  {tmparr =  arr[6].split("-");$("#tbE06KF80").val(getNextPart(tmparr[0]));$("#SON06KF80").val(tmparr[1]); cnt += 1;}
	if (arr[7] != "-")  {tmparr =  arr[7].split("-");$("#tbE07KF80").val(getNextPart(tmparr[0]));$("#SON07KF80").val(tmparr[1]); cnt += 1;}
	if (arr[8] != "-")  {tmparr =  arr[8].split("-");$("#tbE08KF80").val(getNextPart(tmparr[0]));$("#SON08KF80").val(tmparr[1]); cnt += 1;}
	if (arr[9] != "-")  {tmparr =  arr[9].split("-");$("#tbE09KF80").val(getNextPart(tmparr[0]));$("#SON09KF80").val(tmparr[1]); cnt += 1;}
	if (arr[10] != "-") {tmparr = arr[10].split("-");$("#tbE10KF80").val(getNextPart(tmparr[0]));$("#SON10KF80").val(tmparr[1]); cnt += 1;}
/*
	if (arr[11] != "-") {tmparr = arr[11].split("-");$("#tbE11KF480").val(getNextPart(tmparr[0]));$("#SON11KF480").val(tmparr[1]); cnt += 1;}
	if (arr[12] != "-") {tmparr = arr[12].split("-");$("#tbE12KF480").val(getNextPart(tmparr[0]));$("#SON12KF480").val(tmparr[1]); cnt += 1;}
	if (arr[13] != "-") {tmparr = arr[13].split("-");$("#tbE13KF480").val(getNextPart(tmparr[0]));$("#SON13KF480").val(tmparr[1]); cnt += 1;}
	if (arr[14] != "-") {tmparr = arr[14].split("-");$("#tbE14KF480").val(getNextPart(tmparr[0]));$("#SON14KF480").val(tmparr[1]); cnt += 1;}
	if (arr[15] != "-") {tmparr = arr[15].split("-");$("#tbE15KF480").val(getNextPart(tmparr[0]));$("#SON15KF480").val(tmparr[1]); cnt += 1;}
	if (arr[16] != "-") {tmparr = arr[16].split("-");$("#tbE16KF480").val(getNextPart(tmparr[0]));$("#SON16KF480").val(tmparr[1]); cnt += 1;}
	if (arr[17] != "-") {tmparr = arr[17].split("-");$("#tbE17KF480").val(getNextPart(tmparr[0]));$("#SON17KF480").val(tmparr[1]); cnt += 1;}
	if (arr[18] != "-") {tmparr = arr[18].split("-");$("#tbE18KF480").val(getNextPart(tmparr[0]));$("#SON18KF480").val(tmparr[1]); cnt += 1;}
	if (arr[19] != "-") {tmparr = arr[19].split("-");$("#tbE19KF480").val(getNextPart(tmparr[0]));$("#SON19KF480").val(tmparr[1]); cnt += 1;}
	if (arr[20] != "-") {tmparr = arr[20].split("-");$("#tbE20KF480").val(getNextPart(tmparr[0]));$("#SON20KF480").val(tmparr[1]); cnt += 1;}
	*/
	return cnt;
}