﻿
var serverYear =  new Date().getFullYear();

function UsrAge(theYear)
{
    if (isNaN(parseInt(theYear)))
    {
        return(false);
    }
    else
    {
        var ageDiff = serverYear - parseInt(theYear);
        if (ageDiff < 16)
        {
	        alert("We are sorry but due to marketing and legal requirements we are unable to allow anyone under the age of 16 to register with us.");
	        return false;
        }
        else
        {
	        return true;
        }   
    }
}

function checkdob(dropYearCtrl)
{
    dropYear = document.getElementById(dropYearCtrl);
    var x = UsrAge(dropYear.options[dropYear.selectedIndex].value);			    
}
