JSREF
ononline Event
Execute a JavaScript when the browser starts to work online: