How to alter hosts file on Windows Vista SP2

Hi All,
I got a minor issue with my desktop computer. It is running on Vista operating system and is on Service Pack 2. I want to alter my hosts file, so that I can have some of the sites inaccessible as well as to put a stop to some of the advertisements, commercial ads to keep on popping up.
Now, after entering all those sites necessary, while I am saving it, there is a pop up that tells me that I do not have permission to do these changes. In short, my access is denied. But, how come it is, when in fact my login is considered to be administrator as well.
I really need help.
Thanks.
