codice:
if (theForm.GiornoNascita.value > <? echo $giorno_adesso ?> && theForm.MeseNascita.value >= <? echo $mese_adesso ?> && (<? echo $anno_adesso ?> - theForm.AnnoNascita.value <= 18))
  {
    alert("Non sei maggiorenne");
    theForm.GiornoNascita.focus();
    return (false);
  }
Così va, era errato il confronto.