Or even simpler:
<script language="javascript">
document.check_avail.month.value = <? echo $month ?> ;
</script>
The only thing that was missing in the PHP snipet within the Jscript was that you forgot the echo function -- just typing a variable identifier is useless.
The reason you had the error is that, because the PHP snipet was not outputing anything within the Jscript. So the Jscript saw it as:
document.check_avail.month.value = ;
Which, as you now know, will cause an error.