l recently installed Ubuntu 12 and on first start on Firefox everytime l type google.com on the address bar l am redireted to some funny websites.
The websites seem random and this only happens when l type google.com if l type for example daniweb.com it works fine.
Could you be a bit more specific please, what website does it go to? Are you able to Ping Google Servers, try running a traceroute?
I also recommend installing something called ClamAV, which is an Anti-Virus tool. Run freshclam from the terminal and then clamscan -r / to run an anti-virus check, this should report any problems. Be warned though, as this is scanning the entire computer so may be resource intensive.
Are you sure it is your computer, and not an issue with the router, maybe someone is playing a prank on you and re-directing your traffic through a proxy?