well, you have to make sure that your anti-virus software is updated regularly.yours wasn't up to date, that’s probably what was causing your problems.
but i'm quite careful when i'm browsing the internet, i have no idea how i could have picked a virus.