Digital Dimmer With Microcontroller
In the answers to this question is explained how you can do that complete zero-crossing detection circuit with just U1, R12 and 2 series resistors on the 220 V side. One solution uses a common optocoupler, the other one a Darlington optocoupler, which needs less current to drive the optocoupler's LED, so that's less power in the series resistors (less than 200 mW for the complete zero-crossing detector).  



This replaces the red box plus the rectifier at the left.  

edit dd. 2012-07-14
If an AC input optocoupler is too expensive, then you can use a common optocoupler with a 1N4148 in anti-parallel:  

  

You'll have the advantage of lower cost and wider offering. The LTV-817 costs only 10 cent in 1000 quantity, yet has a respectable 50 % CTR. For only 2 cent more you get the LTV-815, which has a Darlington output. Instead of 1 positive pulse every half period you'll have a positive pulse a bit longer than half a period.  

  

If the mains frequency is 50 Hz then one period is 20 ms. If then the positive pulse is 12 ms long you know that it covers two zero-crossings symmetrically. Since the zero-crossings are 10 ms apart there was one 1 ms after the start of the 12 ms pulse, and one 1 ms before the end. So you know that the next zero-crossing will be 9 ms after the end of the pulse.
This is very easy in software and keeps BOM cost low.
(end of edit)  

But watch out with the triac driver. The input is isolated from the mains through the optocoupler, but apparently they forgot that on the driver side, so the circuit is directly connected to the mains after all, and therefore possibly lethal!  

You need an optocoupler on that side as well. Typical application from the MOC3051 datasheet:

  

Make sure to use a random phase optocoupler (like the MOC3051).