Global variable after window onload