Javascript applet for tic tac toe