Testing for operating system


I would like to know the operating system, Windows or android ?
Because I can't have the event WebFormClose on android web browser and I would use another event.

Thanks for your help.

This is sample OS detection code in JavaScript you could link from a WEB Core app