function load(u, id) { $.get(u, function(data){ $("#"+ id).html(data); Cufon.refresh(); $("input:text[title!='']").coolinput(); }); } function product(id, type){ document.location = 'default.asp?id=15&product='+id+'&type='+type; } function goPage(id){ document.location = 'default.asp?id='+id; } function download(id){ document.location='/download.asp?id='+id; } function openImage(id){ var leftPos = (screen.availWidth-100) / 2; var topPos = (screen.availHeight-100) / 2; window.open('/image-preview.asp?id='+id,'', 'scrollbars=no,resizable=yes,status=no,toolbar=no,width=100,height=100,top=' + topPos + ',left=' + leftPos); } function toggleCart(d){ document.getElementById('cart').style.display = d; } function goCart(){ document.location = '/cart.asp?u='+escape(document.location); } function addToCart(pid){ var aantal = document.getElementById('aantal').value document.location = '/cart.asp?action=add&pid='+pid+'&aantal='+aantal+'&u='+escape(document.location); } function emptyCart(){ if (confirm('Weet u zeker dat u uw winkelwagen wilt legen?')) { document.location = '/cart.asp?action=empty&u='+escape(document.location); } } function login(){ document.location = '/account.asp?action=login'; } function removeFromCart(pid){ if (confirm('Weet u zeker dat u dit artikel uit de winkelwagen wilt verwijderen?')){ window.location = 'cart.asp?action=remove&pid='+pid+'&u='+escape(document.getElementById('u').value); } } function changeNumber(c, id, pid){ min = 1; var aantal = document.getElementById(id); if (isNaN(parseFloat(aantal.value))) { alert('Aantal moet een numerieke waarde zijn.'); } else { newValue = parseFloat(aantal.value) + c; if (newValue < min) { if (confirm('Weet u zeker dat u dit artikel uit de winkelwagen wilt verwijderen?')){ window.location = 'cart.asp?action=remove&pid='+pid+'&u='+escape(document.getElementById('u').value); } else { aantal.value = min; modified = true; } } else if (newValue > 0) { aantal.value = newValue; modified = true; } } } function changeNumberV(o, v, min, max){ var aantal = document.getElementById(o); if (aantal) { if (isNaN(parseFloat(aantal.value))) { alert('Dit is geen numerieke waarde.'); } else { newValue = aantal.value.replace(",", ".") newValue = parseFloat(newValue) + v; if (newValue < min) { aantal.value = min; } else if (newValue > max) { aantal.value = max; } else { aantal.value = newValue.toString().replace(".", ","); } } } } function recalcCart(){ document.cart.order.value = 'false'; document.cart.submit(); } function orderCart(){ if (modified) { document.cart.order.value = 'true'; document.cart.submit(); } else { document.location = 'order.asp'; } } function showImage(img){ var leftPos = (screen.availWidth-100) / 2; var topPos = (screen.availHeight-100) / 2; window.open('/image-preview.asp?img='+escape(img),'', 'scrollbars=no,resizable=yes,status=no,toolbar=no,width=100,height=100,top=' + topPos + ',left=' + leftPos); } function Password(){ $.colorbox({iframe:true, innerWidth:550, innerHeight:300, href:"/password.asp", transition:"none"}); } function SendPage(t, id){ $.colorbox({iframe:true, innerWidth:550, innerHeight:500, href:"/sendpage.asp?t="+ t +"&id="+ id, transition:"none"}); } function Subscribe(){ $.colorbox({iframe:true, innerWidth:550, innerHeight:400, href:"/subscribe.asp", transition:"none"}); } function Unsubscribe(){ $.colorbox({iframe:true, innerWidth:550, innerHeight:300, href:"/unsubscribe.asp", transition:"none"}); }