Javascript form processor program