Javascript Call A Function Within A Function Invocation