What is the alogorithm used to compute the QB rating?

Click on the 'QB Rating' link on this page to see what all goes into determining a quarterback's rating.