got info window working correctly

makes clear though don't totally understand javascript function
scoping...