Frans Bouma's blog has a great article on optional parameters in SQL stored procedures.
http://weblogs.asp.net/fbouma/archive/2003/05/06/6557.aspx
Basically, you pass in NULL for any values you don't want to query against. Then you do something like the following:
Where ShipVia = IsNull(@iShipVia, ShipVia)
This method is pretty slick, but has some overhead. Another technique would be to have a master stored procedure which based on what you passed in called child stored procedures that were coded for that particular combination of parameters. Not to say there isn't any additional overhead with this method. If nothing else, it is more work for your or your SQL DBA.