/*function MyFunction(){
	var f;
	var t=window.innerHeight;
	if(t==null) {
		t=document.documentElement.clientHeight;
		t-=500;
	}
	if (t>=400){
		f=t+112;
		t=t+'px';
		f=f+'px';
		document.getElementById("innerTable").height=t;
		
	}
	else if (t<400){
		t=400;
		f=t+10;
		t=t+'px';	
		f=f+'px';
		document.getElementById("innerTable").height=t;
	
	}  
		document.getElementById("innerTable").height=4000;
}
function out() {
	MyFunction();
	var timeout1 = setTimeout('out()',1000);
	document.getElementById("innerTable").height=400;

	}
out();
*/
function edit_hide(){  
	window.parent.document.getElementById("hideLayer").style.display='none';
	window.parent.location="index.php?p=220";

}
function edit_show(id_wein){	
	document.getElementById("hideLayer").style.display='block';
	document.getElementById("weinframe_edit").src="intern.weine.frame.edit.php?id_wein="+id_wein;

}
function show_lager_inhalt(id_lagerort){	
	document.getElementById("lager_inhalt").style.display='block';
	new Ajax.Updater(
		'edit_layer', 'intern.lagerinhalt.ajax.php?id_lagerort='+id_lagerort, {
			asynchronous:true,  
			evalScripts:true, 
			onComplete:function(request) {
			}, 
			requestHeaders:['X-Update', 'edit_layer'] 
		 }
		);
}
function show_bestand(id_wein, id_lagerort){
		document.getElementById("bestandLayer").style.display='block';

	new Ajax.Updater(
		'editbestand', 'intern.bestand.ajax.php?id_wein='+id_wein+'&id_lagerort='+id_lagerort, {
			asynchronous:true,  
			evalScripts:true, 
			onComplete:function(request) {
			}, 
			requestHeaders:['X-Update', 'editbestand'] 
		 }
		);
}
function hide_bestand(id_wein){
		document.getElementById("bestandLayer").style.display='none';

}
        		function setze_bestand(id_lagerort, id_wein) {
					var anzahl=document.getElementById("anzahl").value;
					var soll=document.getElementById("soll").value;
					
					
					new Ajax.Updater(
					'editbestand', 'intern.bestand.ajax.php?action=update&id_wein='+id_wein+'&id_lagerort='+id_lagerort+'&anzahl='+anzahl+'&soll='+soll, {
						asynchronous:true,  
						evalScripts:true, 
						onComplete:function(request) {
						}, 
						requestHeaders:['X-Update', 'editbestand'] 
					 }
					);
				} 
		function updateDiv(id_wein) {
				new Ajax.Updater(
					'bestandDiv'+id_wein, 'intern.aktuellerbestand.ajax.php?&id_wein='+id_wein, {
						asynchronous:true,  
						evalScripts:true, 
						onComplete:function(request) {
						}, 
						requestHeaders:['X-Update', 'bestandDiv'+id_wein] 
					 }
					);
				}
				
				
function lagerort_edit_hide(){  
	window.parent.document.getElementById("hideLayerLagerort").style.display='none';
	window.parent.location="index.php?p=210";

}
function lagerort_edit_show(id_lagerort){	
	document.getElementById("hideLayerLagerort").style.display='block';
	document.getElementById("intern_lagerort_edit").src="intern.lagerort.frame.edit.php?id_lagerort="+id_lagerort;

}				
function lager_tr(id_lagerort) {
	var lager = "lager_tr"+id_lagerort;
	var div1 = "lager_div_1_"+id_lagerort;
	var div2 = "lager_div_2_"+id_lagerort
	
	document.getElementById(lager).style.display="";	// tr
	
	document.getElementById(div1).style.display="none";		// UP
	document.getElementById(div2).style.display="block";	 // DOWN
}
function lager_tr_up(id_lagerort) {
	var lager = "lager_tr"+id_lagerort;
	var div1 = "lager_div_1_"+id_lagerort;
	var div2 = "lager_div_2_"+id_lagerort
	
	document.getElementById(lager).style.display="none";	
	
	document.getElementById(div1).style.display="block";	
	document.getElementById(div2).style.display="none";	
}


