﻿function focusClientLogin() {
    if (aspnetForm.ctl00$Content2$ClientLoginUsername.value == "") {
        aspnetForm.ctl00$Content2$ClientLoginUsername.focus();
    }
    else {
        aspnetForm.ctl00$Content2$ClientLoginPassword.focus();
    }
}
function setServeraction(action) { }

function berekenPrijs() {
    var prijs = 0;
    var prijsOrg = 0;
    var korting = 0;
    var aantal = document.getElementById("aantalZoekopdrachten").value;
    if (isNaN(aantal)) {
        alert("U heeft geen geldig getal ingevoerd!")
    }
    else {
        for (var x = 1; x <= aantal; x++) {
            if (x >= 1 && x <= 4) prijs += 20;
            if (x >= 5 && x <= 9) prijs += 18;
            if (x >= 10 && x <= 19) prijs += 16;
            if (x >= 20 && x <= 49) prijs += 14;
            if (x >= 50 && x <= 99) prijs += 12;
            if (x >= 100) prijs += 10;
        }
        prijsOrg = aantal * 20;
        korting = Math.round(((1.0-(prijs / prijsOrg)) * 100),1)
    }
    document.getElementById("Price").innerText = prijs;
    document.getElementById("korting").innerText = korting;
}
function CheckboxValidator(sender, args) {
    args.IsValid = (document.getElementById("ctl00_Content1_voorwaarden").checked);
}