How to check Caps Lock is ON

Hi all,

can u plz tell me how to check caps lock is on for a password field. i have a script which shows an alert message for each key pressing with Caps Lock ON , but which i want is somewhat different. u might have seen in windows , when caps lock is on it shows a message but if u ignore and start typing , it allows without throwing any alert.