To enter this website you must be over 18 years old
document.getElementById("dateofbirthsubmit").addEventListener('click',function ()
{
var dateString = document.getElementById('form-field-dateofbirth').value;
if(dateString !=='')
{
var today = new Date();
var birthDate = new Date(dateString);
var age = today.getFullYear() - birthDate.getFullYear();
if(age < 18 || age > Infinity)
{
elementorProFrontend.modules.popup.showPopup( {id:50}, event);
event.preventDefault();
}
}
else
{
alert("You must provide your date of birth!");
}
} );