function subTotaal() {
	var subtotaal = 0.00;
	var subporto = 0.00;
	for (var i in prijs) {
		var aantal = document.getElementById('aantal['+i+']').value;
		if (aantal>0) {
			subtotaal = subtotaal + aantal * prijs[i];
			subporto = subporto + aantal * porto[i];
		}
	}
	totaal = subtotaal+subporto;
	if (totaal>0) {
		subtotaal = subtotaal.toFixed(2);
		subporto = subporto.toFixed(2);
		totaal = totaal.toFixed(2);
		document.getElementById('subtotaal').innerHTML = "<span class='totaal'>&euro "+subtotaal.replace(".",",")+"</span>";
		document.getElementById('subporto').innerHTML = "<span class='totaal'>&euro "+subporto.replace(".",",")+"</span>";
		document.getElementById('totaal').innerHTML = "<span class='totaal'>&euro "+totaal.replace(".",",")+"</span>";
//		document.getElementById('bestel').disabled = false;
	} else {
		subtotaal = subtotaal.toFixed(2);
		subporto = subporto.toFixed(2);
		totaal = totaal.toFixed(2);
		document.getElementById('subtotaal').innerHTML = "&euro "+subtotaal.replace(".",",");
		document.getElementById('subporto').innerHTML = "&euro "+subporto.replace(".",",");
		document.getElementById('totaal').innerHTML = "&euro "+totaal.replace(".",",");
//		document.getElementById('bestel').disabled = true;
	}
}

function uploadstate(element) {
    var name = element.value;
    if (name != "") {
        var meld_el = document.getElementById("melding");
        if (meld_el) {
            meld_el.className = "notification"
            meld_el.innerHTML = "Momentje, afbeelding wordt nu verwerkt";
        }
        return true;
    } else {
        return false;
    }
}
function toggleVis(element, toggleID) {
    var toggle_el = document.getElementById(toggleID);
    if (toggle_el) {
        if (element.checked) {
            toggle_el.style.visibility = "visible";
        } else {
            toggle_el.style.visibility = "hidden";
        }
    }
}
