Moved form javascript to new file