function chkMerk(keuze){
		
		//document.getElementById('id_tblArtikel_groep').options[0] = new Option('Kies artikelgroep','0');
		document.getElementById('id_tblArtikel_groep').options.length = 1;
		j=1;
		for (i=0;i<keuze_Groep.length;i++){
				document.getElementById('id_tblArtikel_groep').options[j] = new Option(keuze_Groep[i+1],keuze_Groep[i]);
				i++;
				j++;
		
		}

		switch(keuze.value){
	
		//brother
		case '1':
 	
		break;
		
		//kyocera (alleen printers en mfc)
		case '2':
		document.getElementById('id_tblArtikel_groep').options[4] = null;
		document.getElementById('id_tblArtikel_groep').options[3] = null;
		break;
		
		//panasonic (mfc en faxen)
		case '3':
		document.getElementById('id_tblArtikel_groep').options[4] = null;
		document.getElementById('id_tblArtikel_groep').options[1] = null;
		break;	
		}
	
	
}

function chkArtgroep(keuze){
		
		//document.getElementById('id_tblArtikel_groep').options[0] = new Option('Kies artikelgroep','0');
		document.getElementById('id_tblArtikel_soort').options.length = 1;
		//alert (keuze_Soort.length);
		//for (i=1;i<keuze_Soort.length;i++){				
		//		document.getElementById('id_tblArtikel_soort').options[j] = new Option(keuze_Soort[i+1],keuze_Soort[i]);
		//		i++;
		//		j++;
		
		//}

		switch(keuze.value){
	
		//printer
		case '1':
		j=1;
		for (i=0;i<keuze_Soort.length;i++){	
			if (keuze_Soort[i] == 1){
					document.getElementById('id_tblArtikel_soort').options[j] = new Option(keuze_Soort[i+2],keuze_Soort[i+1]);
					i++;
					i++;
					j++;	
			}
				
		}
		break;
		//mfc
		case '2':
		j=1;
		for (i=0;i<keuze_Soort.length;i++){	
			if (keuze_Soort[i] == 2){
					document.getElementById('id_tblArtikel_soort').options[j] = new Option(keuze_Soort[i+2],keuze_Soort[i+1]);
					i++;
					i++;
					j++;	
			}
				
		}
		break;
		
		//fax
		case '3':
		j=1;
		for (i=0;i<keuze_Soort.length;i++){	
			if (keuze_Soort[i] == 3){
					document.getElementById('id_tblArtikel_soort').options[j] = new Option(keuze_Soort[i+2],keuze_Soort[i+1]);
					i++;
					i++;
					j++;	
			}
				
		}
		break;	

		//belettering
		case '4':
		j=1;
		for (i=0;i<keuze_Soort.length;i++){	
			if (keuze_Soort[i] == 4){
					document.getElementById('id_tblArtikel_soort').options[j] = new Option(keuze_Soort[i+2],keuze_Soort[i+1]);
					i++;
					i++;
					j++;	
			}
				
		}
		break;	
		}
	
	
}

function showArtSoort(){
	
		var artGroep = document.forms['nav_zoek'].artGroepSelect.value;

		if(artGroep == 0){
					
			alert ('Kies eerst uw artikelgroep');
			return false;
			
		}else{	

			var selectSoort = document.getElementById('id_tblArtikel_soort');

				while (selectSoort.hasChildNodes()){

					  	selectSoort.removeChild(selectSoort.lastChild);
				}

			
			selectSoort.appendChild(createOption(0, 'Kies artikelsoort'));
			
			for (i=0;i<keuze_Soort.length;i++){
	
				
	
				if (keuze_Soort[i] == artGroep){
					
					selectSoort.appendChild(createOption(keuze_Soort[i+2], keuze_Soort[i+1]));
					i++;
					i++;

				}					
			}

		}
}

function createOption(value, text) {
  var nOption = document.createElement('option');
	var isText = document.createTextNode(text);
	nOption.setAttribute('value', value);
	nOption.appendChild(isText);
	
	return nOption;
}

function addFunctionaliteiten() {

var x = document.getElementById('id_functionaliteiten');
var aantal = x.value;

var okButton = document.getElementById('id_okFunctionaliteiten');


	if (aantal != 'Kies aantal'){
	
		for(i=0;i<aantal;i++){
			
			currentElement1 = document.createElement('label');
			currentElement1.setAttribute("value", "functionaliteit");
			
			currentElement2 = document.createElement("input");
			currentElement2.setAttribute("value", "spec" + (i+1));
			currentElement2.setAttribute("name", "functionaliteit[]");
			
			currentElement3 = document.createElement("br");
			
			document.forms['frm_getData'].appendChild(currentElement1);
			document.forms['frm_getData'].appendChild(currentElement2);
			document.forms['frm_getData'].appendChild(currentElement3);

		}	
	
			currentElement4 = document.createElement("input");
			currentElement4.setAttribute("name", "submit");
			currentElement4.setAttribute("type", "submit");
			currentElement4.setAttribute("value", "versturen");
			document.forms['frm_getData'].appendChild(currentElement4);
			
			okButton.style.display = 'none';
			x.style.display = 'none';
		
	}
}


function checkFormFields() {
var art_nr = document.forms['nav_zoek'].artikelnr.value;
var btn_opslaan = document.forms['nav_zoek'].opslaan.value;

if (btn_opslaan=='opslaan') {
		if (art_nr == ''){

		alert ('Het veld artikelnr moet uniek zijn en mag niet leeg zijn.');
		return false;
		exit;
		}
	}

}

function keuzeMerk() {
var keuze_artGroep = document.forms['nav_zoek'].artGroepSelect.value;	
	
	//alert (keuze_artGroep); //this.value;	
	
	
}

function showBP(){
	
	var roundCont = document.getElementById('roundCont');
	alert(roundCont);
//	okButton.style.display = 'none';
	
	
}

function showInfo(){

	document.getElementById('roundCont').style.display='inline';

}

function stopInfo(){

	document.getElementById('roundCont').style.display='none';

}