A native JavaScript example detecting a users online/offline status. Cross domain compatible!