well, perhpas the slashes are a problem, but the main thing is you need to translate everything into javascript.
You don't use the $character for javascript.
I believe what you meant to do was:
onClick="return lastCheck('<?php echo $maxa;?>');"
This would output the VALUE of $maxa to the javascript line.
Alternately, if a variable has been declared, and you know it's maxa, you can do this:
onClick='return lastCheck(<?php echo 'maxa';?>);'
in the one case you pass a string, in the second you pass a variable.
Sam Fullman
Compass Point Media