This is more of a client Side issue. I dont believe PHP can actually go into the clients browser to check.. Try javascript.. Im not sure who can help you to do this. Im not good at Javascript..
Theres a forum thats really put to people working on client side stuff.
htmlforums.com
im sure someone there may be able to help you on this. Cos im no good at javascript yet