
function fillCategory(){ 
	 // this function is used to fill the category list on load
	addOption(document.Subscribe.Verzending, "Brievenbuspost", "Brievenbuspost E 2,00", "");
	addOption(document.Subscribe.Verzending, "Aangetekend pakket", "Aangetekend pakket E6,95", "");
	addOption(document.Subscribe.Verzending, "afhalen in Capelle aan den IJssel - geen kosten", "afhalen in Capelle aan den IJssel - geen kosten", "");
	addOption(document.Subscribe.Verzending, "Rembours - Contant aan postbode of op het postkantoor", "Rembours E 15,00", "");
	addOption(document.Subscribe.Verzending, "Pakketpost buiten Nederland", "Pakket buiten Nederland E 6,50", "");
	addOption(document.Subscribe.Verzending, "Aangetekend pakket buiten Nederland", "Aangetekend pakket buiten Nederland E 10,00", "");
}

function SelectSubCat(){
	// ON selection of category this function will work

	removeAllOptions(document.Subscribe.Betaling);

	if(document.Subscribe.Verzending.value == 'Brievenbuspost'){
		addOption(document.Subscribe.Betaling, "", "Kies een betaalwijze", "");
		addOption(document.Subscribe.Betaling,"Bank of giro overschrijving", "Bank of giro overschrijving");
		addOption(document.Subscribe.Betaling,"Credit card -  Paypal", "Credit card -  Paypal");
	}
	if(document.Subscribe.Verzending.value == 'Aangetekend pakket'){
		addOption(document.Subscribe.Betaling, "", "Kies een betaalwijze", "");
		addOption(document.Subscribe.Betaling,"Bank of giro overschrijving", "Bank of giro overschrijving");
		addOption(document.Subscribe.Betaling,"Credit card -  Paypal", "Credit card -  Paypal");
	}
	if(document.Subscribe.Verzending.value == 'afhalen in Capelle aan den IJssel - geen kosten'){
		addOption(document.Subscribe.Betaling,"Contant", "Contant bij afhalen - op afspraak");
	}
	if(document.Subscribe.Verzending.value == 'Rembours - Contant aan postbode of op het postkantoor'){
		addOption(document.Subscribe.Betaling,"Contant Rembours", "Contant aan postbode of op het postkantoor");
	}
	if(document.Subscribe.Verzending.value == 'Pakketpost buiten Nederland'){
		addOption(document.Subscribe.Betaling, "", "Kies een betaalwijze", "");
		addOption(document.Subscribe.Betaling,"Bank of giro overschrijving", "Bank of giro overschrijving");
		addOption(document.Subscribe.Betaling,"Credit card -  Paypal", "Credit card -  Paypal");
	}
	if(document.Subscribe.Verzending.value == 'Aangetekend pakket buiten Nederland'){
		addOption(document.Subscribe.Betaling, "", "Kies een betaalwijze", "");
		addOption(document.Subscribe.Betaling,"Bank of giro overschrijving", "Bank of giro overschrijving");
		addOption(document.Subscribe.Betaling,"Credit card -  Paypal", "Credit card -  Paypal");
	}

}
////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}
