// Function to update the product div on the order pagefunction updateproduct(){	var div = document.getElementById( 'pakketkeuze' );	var select = document.getElementById( 'pakket' );	if ((div) && (select))	{		div.innerHTML = 'Loading...';		if ((select.value) && (pakketarray[select.value]))		{			// Ugly JSON to JS eval, but eliminates the possible need of using a JS lib			//var product = eval('(' + pakketarray[select.value] + ')');			// JSON is a subset of JS, the "string" is parsed to an object			var product = pakketarray[select.value];			var type = 'Consumenten';			if (product.type == 'business')			{				type = 'Zakelijk';			}			var email = product.email;			if (email <= 0)			{				email = 'Onbp.';			}			var subdomain = product.subdomain;			if (subdomain <= 0)			{				subdomain = 'Onbp.';			}			var database = '';			if (product.database == 'yes')			{				database = 'MySQL database<br />';			}			var php = '';			if (product.php == 'yes')			{				php = 'PHP 5, safe mode<br />';			}			var backup = '';			if (product.backup == 'yes')			{				backup = 'Volledige backup per week<br /><br />';			}			var domain = '';			if (product.domain == 'nl')			{				domain = 'Gratis .nl domein<br />';			}			else if (product.domain == 'any')			{				domain = 'Gratis domein naar keuze<br />';			}			var temp = '\				<p style="color: #000;">\					Uw pakketkeuze:<br />\					<strong>'+type+' '+product.name+'</strong>\				</p><br />';			temp += '\				<div class="pakketkeuze">\					<div class="zakelijk zak5" title="Klik om het '+type+' '+product.name+'-pakket te bestellen">\						<h2><img src="/ext/img/'+product.name.toLowerCase()+'.png" alt="'+product.name+'" title="'+type+' '+product.name+'-pakket" /></h2>\						<p>\							'+number_format(product.data, 0, '', '.')+' MB verkeer p/m<br />\							'+number_format(product.space, 0, '', '.')+' MB webruimte<br />\							<br />\							'+email+' e-mail inboxen<br />\							'+subdomain+' subdomeinen<br />\							'+database+'\							'+php+'\							<br />\							'+backup+'\							'+domain+'\						</p>\						<table cellpadding="0" cellspacing="0" style="padding: 0; margin: 0; margin-left: 5px; margin-bottom: 5px;">\							<tr>\								<td width="60">Per jaar</td>\								<td>&euro; '+number_format(product.price_year, 2, '.', ',')+'</td>\							</tr>\							<tr>\								<td></td>\								<td><span class="huuphuupbarbatruuk">&euro; '+number_format(product.price_year*1.19, 2, '.', ',')+' inc btw</span></td>\							</tr>\						</table>\					</div>\				</div>';			div.innerHTML = temp;		}	}}/* Made by Mathias Bynens <http://mathiasbynens.be/> */function number_format(a, b, c, d) { a = Math.round(a * Math.pow(10, b)) / Math.pow(10, b); e = a + ''; f = e.split('.'); if (!f[0]) {  f[0] = '0'; } if (!f[1]) {  f[1] = ''; } if (f[1].length < b) {  g = f[1];  for (i=f[1].length + 1; i <= b; i++) {   g += '0';  }  f[1] = g; } if(d != '' && f[0].length > 3) {  h = f[0];  f[0] = '';  for(j = 3; j < h.length; j+=3) {   i = h.slice(h.length - j, h.length - j + 3);   f[0] = d + i +  f[0] + '';  }  j = h.substr(0, (h.length % 3 == 0) ? 3 : (h.length % 3));  f[0] = j + f[0]; } c = (b <= 0) ? '' : c; return f[0] + c + f[1];}