function deleteProduct(pr_id) {	
	pars = 'ajax=winkelmand&action=delete&pr_id=' + pr_id;
	var myAjax = new Ajax.Updater('prodtable', 'addons/addon.winkelmand/class.php', {method: 'post', parameters: pars, evalScripts: true});
	updateWinkelMandRightTop();
}

function changeProductDtl(pr_id, stype, newvalue) {
	pars = 'ajax=winkelmand&action='+stype+'&pr_id=' + pr_id+'&newvalue='+newvalue;
	var myAjax = new Ajax.Updater('prodtable', 'addons/addon.winkelmand/class.php', {method: 'post', parameters: pars, evalScripts: true});	
}

function updateWinkelMandRightTop() {	
	pars = 'ajax=updatewinkelwagentop';
	var myAjax = new Ajax.Updater('ajaxwinkelwagentop', 'addons/addon.winkelmand/class.php', {method: 'post', parameters: pars, evalScripts: true});	
}

function ValidNumber(thestring)	{	
	for (i = 0; i < thestring.length; i++) {		
		ch = thestring.substring(i, i+1);		    
		if ((ch < "0" || ch > "9")) {          
			alert("Nummers mogen alleen uit de cijfers van 0 t/m 9 bestaan!");   
			return false;
		}
	}		
	return true;
}

function roundup(val) {
	if ((val % 2) == 1) {
		val++;
	}
	return val;
}
