Seems like everyone and their mother smokes pot nowadays, but in this country we live in I wouldn't be surprised if most judges would rule against a pot-smoking dad.
Chances are they're going to do a NIDA-5 urine test - that's a screening for marijuana, opiates, cocaine, amphetamines, and PCP, of all things... the NIDA-10 test does all those plus alcohol (which will show up 12 hours, tops, afterwards), barbituates, benzodiazepines, methadone, and propoxyphene (Darvocet and Darvon). They can test for all of those with a blood sample, as well.
Cannabanoids should stay in your freind's system for 1-7 days with light use, or around 30 with frequent/chronic use (hey, it's in the book, not trying to be funny).
There should be some better info on hair tests than anything I can provide, but they're supposed to be effective for 90 days - there's not much you can do against those, as they'll test body hair if you do out and shave your head.
Best way to help all the nasty drug residuals get out of your body is to keep yourself hydrated, and eat well. Don't try to dilute your urine by drinking excessive amounts of water, or drink vinegar - the people doing the drug tests are trained professionals, and they're not stupid.
Other advice - get any paraphrenalia out of his house. Not just smoking devices, but anything that could suggest that he smokes pot, or approves of such things. And in general, keep his house/apartment/whatever clean and child-freindly, as the inspectors look for this. I'm sure he wants to make his soon to be-ex-wife's claims as groundless as possible, so this will aid in his "hardworking, responsible father who doesn't occasionally smoke pot" image.
Good luck...