Javascript global objects visibility