Local vars are vars that have been created insinde the function.
Move 'var momentun=0;' before your function main() and it'll work. (This way you'll make it a global var)


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201