I lived in Augsburg, Germany for four years and did the Oktoberfest three times. It is great fun.
Consider going to the beginning of the fest when they have a parade with the horses pulling the beer wagon and people are wearing the traditional German clothing. If you do that get to the parade route about two hours before so you can see it well.
You need about 4 days minimum in Munich if you go to the fest. Probably two days would be enough for you, the two days to see the sites. Also, if you go to Garmish/Fussen you need a couple more days there. Be sure and do the Zugspitze, the highest mountain in Germany and still has a glacier in the Summer.
You need minimum of three days in Prague and four in Vienna. Salzburg/Berchtesgaden suggest 3 days.
This all adds up to a minimum of 16 days, but there is some travel time involved.
Other great places to visit in Southern Bavaria are Regensburg and Augsburg (do this city on a day trip from Munich).
Also, when drinking at the fest, remember that German beer has a higher alcohol content than American beer.
Pace yourself with drinking and be sure and eat while at the tent. The traditional food to eat at the fest is roasted chicken.