The symptoms you describe are often caused by a lid switch malfunction. It may be loose or not making good contact. hence, the reason why you can get it to work sometimes by lifting and closing the lid. As you open and close the lid, you should hear a "clicking" sound as the lid switch is activated. If you do not hear the switch, check to make sure the lid strike in still intact. This is a small plastic piece mounted on the lid that pushes down on the switch through a slot on the wash tub opening on the right hand side. If this piece breaks off, it will give the same symptoms of a broken lid switch. Next, check the two mounting screws on the right side of the wash tub opening to make sure they are tight. These are the mounting screws for the lid switch. Sometimes they come loose and the switch does not make proper contact. If you attempt all these preliminaries, and the switch still does not seem to be working properly, replace it. A replacement can be found at searspartsdirect.com. Just type in your model number and the part will be located under the "Top and Cabinet" heading. For instructions on how to replace a lid switch, click on the following link:
http://www.fixya.com/support/r385198-replacing_lid_switchThis is a simple and inexpensive
repair if you wish to accomplish this on your own. A replacement switch usually cost between $25 and $35. I hope this helps you. Let me know if you require further assistance.
NOTE: For future reference, it is strongly recommended that you do not slam the washer lid or place heavy objects on the lid. This can cause damage to the lid switch.