Issue 506 adding documentation for javascript function