Access to the site from PC or mobile

Hi,
Is there a way to distinguish via javascript if access to the site is done from the PC or from a mobile terminal?

Thank you
Claudio