Java script function "document.getElementById" is not working for the pages which are using MASTERPAGES in VS 2005.

when iam trying to check a condion below is not working for the pages which were using MASTERPAGES.

document.getElementById("controlname").checked==true

Hope anyone can help me

Thnaks

Arunlal