Might help if you told us what machine you have & which programs 4 & 5 actually are. I suspect your heater element may have an earth fault & when it kicks in it trips your rcd. But without more details it's only a best guess.
Mike, October 2009
edit
I can answer this question...
why does my washer trip off the electricity between programs 4 and 5?