One of the ways to describe this that makes it a bit easier to understand is to assign a "level" to objects, depending on what they orbit. You start with the Sun, which has a value of zero. Being in orbit around an object adds 1 to the value, so an object in solar orbit would have a value of 1 (0+1=1). Therefore, the Earth has a value of 1. If you are in orbit around Earth, add 1, so a vessel (or moon) would have a value of 2 (0+1+1). If you are orbiting the Moon, you have a value of 3, 0 (sun) + 1 (Earth) + 1 (Moon) + 1 (orbiting Moon).
So, for instance, if you are in Earth Orbit, and want to get to the Moon, you and your target have the same value (2). If you are in Earth orbit and want to go to Mars, you and your target have different values (you are a 2, and Mars is a 1).
In IMFD's Target Intercept, the Source and the Target must both have the same value, one level higher than the Reference, and both must be orbiting the same reference (you can't have a Source = Moon and Target = Phobos even though both have the same value - each is orbiting a different level 1 body).
Orbit Eject and Slingshot programs can be used to lower the value of your vessel. In both programs, the Reference will be the body you are orbiting (or slinging off of).
So, for our Moon trip, the Reference would be Earth (value 1), the the Source would be yourself (value of 2) and the Target would be Moon (value 2).
For the Mars trip, it's a bit more complex. We start out at a value of 2, and Mars has a value of 1. Since our Target's value is 1, we need a Reference of zero value, the Sun. We also need a source with the same value as the Target. In this case, our vessel has a value of 2, so it won't work. Earth, the planet we are orbiting, has a value of 1, so it is the Source. Once Target Intercept is set up, we use Orbit Eject (reference Earth, set to "plan") to lower the value of our ship by leaving the Earth's SOI, which leaves us in orbit around the Sun. Our vessel's value now matches our Target's value, so we change the Source (in Target Intercept) to "Self".
To get from orbiting the Moon (value of 3) to Mars, once again our Source will be Earth, since it has the same value as our Target, Mars. Reference is the Sun again, of course. Once our course is plotted in Target Intercept, we use Orbit Eject (reference Moon, set to "slingshot") to leave the Moon, lowering our value to 2. Then we can use Slingshot (reference Earth, set to "plan") to leave Earth's SOI and lower our value to 1. Then we can change the Source in Target Intercept to "Self".
Going from the Moon to Phobos you would use the same method as above, and once in a Mars orbit, Target Intercept would be set up with Reference = Mars (1), Source = Self (2), and Target = Phobos (2).
I recommend (shameless plug) IMFD Full Manual:
[ame="http://www.orbithangar.com/searchid.php?ID=4142"]IMFD Full Manual/Playbacks[/ame]
This contains a PDF manual with instructions on how to get from anywhere to anywhere, and includes charst's listing Reference, Source, and Target for most trips.
Mark and I have been working on an update to this tutorial. Unfortunately, neither of us has had much time to spend on it, so it's taking much longer than we would like. I'm trying very hard to finish the last section (KSC to Titan via Jupiter) this week. Even then, there will be some time to put everything together and check for errors, etc. I hope we can have it up at the Hanger sometime later next month.
Version 1 of this Manual is still usable and contains a wealth of information - including a simple process to find launch windows and set up Target Intercept, although I'd skip the sections on Target Offsetting and Slingshot - both contain errors. This will be corrected and expanded upon in version 2, and a new section on Delta Velocity program is included.
For my part of this update, four new flight recording/ manual sections will be included. One is a "fix" for the original (incorrect) slingshot tutorial. Second is setting up a lunar free return with Target Offsetting. Third is an Off-Plane transfer using Delta-Velocity program. This flight takes you from the ISS to the Moon - with no plane change and a direct insertion into a lunar orbit that passes over Brighton Beach. Last is the "Advanced Concepts" tutorial, which uses the techniques learned in the other sections to travel from KSC to a landing on Titan (via Jupiter Slingshot) in a stock DG, with over 1/3 fuel remaining at touchdown. Titan is targeted directly after the sling - no Saturn insertion is used.