I think Ray's and Reb's advice is perfectly good. It pays to know a few openings well, because you can then reach a position where both players are on their own and you are at least equal, maybe better in the position.
It is more important to be able to play middlegame and endgame, but you need to know to avoid certain things in your chosen opening.
If you find yourself thrown by an opening move by your opponent, think of this: either it is a mistake (slight maybe) or an opening novelty. If your opponent is not very strong, it is probably a mistake. In order to take advantage, it helps to know the general ideas behind the opening you play, not just the learnt moves. You get this feel by playing games with your opening (experience) and playing through master/expert games. A good way is to play a slightly better player at blitz games OTB and then analyse them straight away. Also , learn the opening traps in your opening repertoire. You can avoid traps for you and maybe see what to do against a 'wrong' move. If stuck for a move, play a standard move unless there is a tactical reason not to. Ask yourself what the non-book move does that is different from the book. It has to strengthen his position somewhere, and weaken it elsewhere. Find the weakness and see if you can exploit it.
There are two main reasons for playing a specific opening:
1. It saves time in OTB games
2. You choose an opening that leads to positions you like
There is no particular reason to learn lots of different openings, although this can help with transpositions.
My advice is learn a few openings well and concentrate your effort on the middlegame they usually lead to. Also learn how to play endgames well, the most common first I.e. K+P[s] and K+R[s](+P[s])
Hope that helps, good luck.
To Mr Raybrooks:
Mr Raybrooks is quite an odd "persounage", argues about the number of posts in the threads when himself contributes to the tally..says he surrenders, but comes back to the charge...and finally seems to worry more fore others chess skills than for his own.Double Personality!hall i surrender?shall i keep boring other people?shall i complain about the number of posts...no no no..i ll make some of my own...very funny guys appear here