fixing javascript hidden tree item problem