// fireCommand
function fireCommand(formname, command, commandId) 
{	
	eval('document.'+formname+'.fldCommand.value=command');
	eval('document.'+formname+'.fldCommandId.value=commandId');
	eval('document.'+formname+'.submit()');
}


function validate(formname)
{
	var single_min;
	var single_med;
	var single_max;
	var multi_min;
	var multi_med;
	var multi_max;
	
	
	eval('single_min = document.'+formname+'.fldAantal_mini_single.value');
	eval('single_med = document.'+formname+'.fldAantal_medium_single.value');
	eval('single_max = document.'+formname+'.fldAantal_maxi_single.value');
	eval('multi_min = document.'+formname+'.fldAantal_mini_multi.value');
	eval('multi_med = document.'+formname+'.fldAantal_medium_multi.value');
	eval('multi_max = document.'+formname+'.fldAantal_maxi_multi.value');
	
	if( (single_min > 0) || (single_med > 0) || (single_max > 0) || 
		(multi_min > 0) || (multi_med > 0) || (multi_max > 0) )
		{
			
			total = single_min + single_med + single_max + multi_min + multi_med + multi_max;
			
			if(total > 1)
			{
				fireCommand('frmBestellen','bestellen','');
				return true;
			}
			else
			{
				alert("Minimale afname van 2 items. ");	
				return false; 
			}
		}
		else
		{
			alert("U moet eerst iets bestellen voordat u verder kunt gaan. ");	
			return false; 
		}
}

function confirmCommand(formname, command, id) 
{
	if (confirm('Weet u het zeker?')) 
	{
		eval('document.'+formname+'.fldCommand.value=command');
		eval('document.'+formname+'.fldCommandId.value=id');
		eval('document.'+formname+'.submit()');
	}
}
