oh the good old 1.8tdci starting issues. famous for bad cold start and occasionally warm start.
My mum's focus started with the cold start and we replaced a few bits which did nothing and then we got the warm start problem. only parts we didn't get round to replacing (before my brother wrote the car off) were the crank possition sensor and the starter motor.
Good luck finding the problem as they are damn near impossible to fix!