Omg, isn't that petrifying!
I'm so glad that Sam's ok. We had a similar experience last year. My heart was racing for like an hour afterwards, I can imagine how you felt!
I had brought my car in for an oil change, and nearby they have a railtrail(those paved biking/walking paths), so I brought Tenchi along with me to walk with while waiting for the car to be done. The garage was on the corner of a busy intersection, so I rolled up the windows a bit before going in to give them the keys. Mind you, Tenchi had never jumped over anything in his life...
I go in and shut the door behind me, all of a sudden the guy at the register shouts, "Look at that huge dog!!!" I turn around and Tenchi(who is deaf) had lept out of one of the rolled up windows and luckily had ran right to the door where he had seen his mommy enter. I grabbed him quickly, thanking God that he was a mommy's boy and had run to me instead of exploring or going behind the car RIGHT INTO TRAFFIC! Yikes.