function open_voorwaarden() {
    var width  = 600;
    var height = 550;

    var left = ((screen.width - width) / 2);
    var top  = ((screen.height - height) / 2);

    window.open("general_conditions.html","Algemene_voorwaarden","scrollbars=1menubar=0,resizable=1,width=" +width+ ",height=" +height+ ",left=" + left + ",top=" + top + "");
}

var validator;
addLoadEvent(
    function () {
        if ($('submit')) {
            $('submit').form.onsubmit = function () {
                validator = new Validator(this);
                validator.reset();
                validator.check({rule:Validator.REQUIRED, field:'user_email', message:'Je hebt een ongeldig e-mailadres ingevuld.'});
                validator.check({rule:Validator.EMAIL, field:'user_email', message:'Je hebt een ongeldig e-mailadres ingevuld.'});
                validator.check({rule:Validator.REQUIRED, field:'conditions', message:'Je dient akkoord te gaan met de algemene voorwaarden.'});
                if (validator.handleErrors()) {
                    return false;
                }
            }
        }
    }
);
