function berekenAll(){
	var totaal_opp;
	var tot_opp=0;
	var totaal;
	
	var val = new Array();

	val[0] = 0.80;
	val[1] = 1.60;
	val[2] = 2.30;
	val[3] = 3.10;
	val[4] = 3.90;
	val[5] = 4.70;
	val[6] = 5.45;
	val[7] = 6.25;
	val[8] = 7.00;
	val[9] = 7.75;
	
	for (x = 0; x < 10; x++){
	   
		var opp;
		
		
		name = new String(val[x]);
		var name = name.replace(".","");
		
		if(name.length==1){
			name = name + "00";
		}
		if(name.length==2){
			name = name + "0";
		}
		VALUE = document.getElementById('length_' + name).value;
		VALUE = new String(VALUE);
		var VALUE = VALUE.replace(",",".");
		if(parseFloat(VALUE)>0){
			opp=(parseFloat(VALUE)*val[x]);
			tot_opp=tot_opp+opp;
			oppervlakte = Math.round(opp*100)/100;
			oppervlakte = new String(oppervlakte);
			oppervlakte = oppervlakte.replace(".",",");
			document.getElementById('opp_' + name).innerHTML=oppervlakte + " m&sup2;";
		}
	}

	totaal_opp=Math.round(parseFloat(tot_opp)*100)/100;
	totaal_opp = new String(totaal_opp);
	totaal_opp = totaal_opp.replace(".",",");
	
	document.getElementById('totaal_opp').innerHTML=totaal_opp + " m&sup2;";
	
	totaal = Math.round((parseFloat(tot_opp)*document.getElementById('mioteen_price').value)*100)/100;
	totaal = new String(totaal);
	totaal = totaal.replace(".",",");
	document.getElementById('totaal').innerHTML="&euro; " + totaal;
	
	document.getElementById('fullname').value=document.getElementById('naam').value;
	
}
function fillname (VALUE,DIV){
	document.getElementById(DIV).value=VALUE;
}
function openFoto(ID,WIDTH,HEIGHT){ 
    winprops="width="+WIDTH+",height="+HEIGHT+",location=no,menubar=no,directories=no,toolbar=no,scrollbars=no,resizable=no,status=no"; 
    win=window.open("../foto.php?pic=" + ID, 'phpGroupWare',winprops ); 
    win.focus(); 
}
// JavaScript Document
function rollover(ID){
	if(document.getElementById('div_' + ID).className=="rollnormal"){
		document.getElementById('div_' + ID).className="rollover";
	}
	else {
		document.getElementById('div_' + ID).className="rollnormal";
	}
}
function delItem(URL){ 
    //<a href="delItem('page.php?act=del&id=1')">link</a>
	var vraag; 
    vraag=window.confirm("Let op:\nWeet u zeker dat u dit item wilt verwijderen?") 
    if (vraag==true){ 
        window.location=URL; 
    } 
}
function delFoto(PIC){ 
    //<a href="delItem('page.php?act=del&id=1')">link</a>
	var vraag; 
    vraag=window.confirm("Let op:\nWeet u zeker dat u deze afbeelding wilt verwijderen?") 
    if (vraag==true){ 
        window.location="index.php?view_photo&del_photo=" + PIC; 
    } 
}

