Código PHP:
<? $minyear=date('o')-13;?>
var day=trim(document.form1.day.value);
var month=trim(document.form1.month.value);
var year=trim(document.form1.year.value);
if(day==0 || month==0 || year==0 )
{
alert("Please enter your date of birth!");
document.form1.day.focus();
return false;
}
if(year > <?=$minyear?>)
{
alert("Debes tener mas de 13 años!");
document.form1.year.focus();
return false;
}