i suppose you could have a BOOL (or var if you don't want to be too fancy

) called "beginning" or something. when no movement buttons are pressed, "beginning = 0". when you run, have an if statement which will run the first animation if "beginning == 0" and the second animation if "beginning != 0". within the if statement for the first animation, if you reach the end (or near the end) of the first animation, beginning = 1. then the next frame the model will continue with the second running animation.
i hope u know what i mean, i don't have time to sit down and code atm.
btw in this post i assume you're goal is for your character to have a smooth transition from not-running to running, or something similar.
julz