function berekening(aantal,id){
	//alert(aantal);
	//var  prijs = document.getElementById("bedrag"+id).value;
	//var totaal = document.getElementById("totaal"+id);
	
	//totaal.value = (aantal * prijs).toFixed(2);

	var totalprice =0.00;
	var prod;
	
	for(var i = 0; (prod = document.getElementById("bedrag"+i)); i++){
		prod.value = prod.value.replace(',','.');
		if(prod.value==""){
			t =0.00;
			prod.value=t.toFixed(2);
		}
		totalprice += parseFloat(prod.value); 
	}
	document.getElementById("totaalprijs").value = totalprice.toFixed(2);
}

function clearInput(input){
	input.value='';
}

function deleteProduct(id){
	$type = confirm("Wilt u dit product verwijderen?");
	if($type==true){
		
		window.location.href = 'product_delete.php?action=verwijderen&id='+id;
	}
	
}

function editProduct(id){
	//alert("Wilt u dit product aanpassen?");	
	
	window.open('product_edit.php?id='+id,'Edit_Product', 'width=330,height=300,top=100,left=100,resizable=yes');
}
function newProduct(id){	
	//alert("Wilt u dit product aanpassen?");
	window.open('product_edit.php','New_Product', 'width=330,height=300,top=100,left=100,resizable=yes');
}
function submitForm(type){
		document.getElementById(type).submit();
}

function logout(){
		window.location.href = 'logout.php';
}

function checkMenuItem(menuitem){
	alert(menuItem);	

}