i will have to draw up a schematic later as i don't have the opportunity right now but it is quite a basic circuit:
H11A1M optocoupler to detect the AC
MOC3031 optocoupler to drive the triac
BTB16-600BW Triac
the relative resistors for current limiting
the zero crossover comes in on D2 obviously, then the output on pin 3,
i will try and get the schematic drawn when i have time