Strange Washer

This washer is doing strange things! Today it flooded the floor by leaking water on a rinse fill cycle with the selector knob set to LARGE. Last week it filled up the tub and ran over the top of the washer while the TIMER knob was on OFF after completing a cycle. The only way I could cut off the water was at the cut-off valves on the wall. Any Help and Suggestions Would Be Greatly Appreciated!

[SIZE=3]The only thing that can cause this is the water valve. Replace the water valve and this should fix your problem. [/SIZE]

Thanks Applianceman for the Info! I took the old water valve out and believe this, the hot side hose connection had a sheet metal screw sticking into the screen and had a bunch of rust in the solenoid. Put a new water valve and the washer has run like a new one.