There are a couple of options. One is based on this IC:
**broken link removed** Take a look at the datasheet.
Another is modifying this very cheap AC detector to detect 240 VAC.
http://www.gravitech.us/buacinbo.html Refer to the user's manual.
If you take the 100K resistor and the 0.1 uf cap, and plug them into here: **broken link removed** with a L value of zero, you get about 26K of capacitive reluctance. Tke ~170 V and divide by ~26K and you get about 6 mA of current through he optocoupler. 170 is aprox 120*1.414. If you half the capacitance, the circuit will work on 240 V. But, you would also have to check the voltage rating. Putting the caps in series would effectively double the voltage rating for the combination.
If you take a look at figure 1, here:
http://www.datasheetcatalog.org/datasheet/SGSThomsonMicroelectronics/mXyzyvt.pdf you can see how that would work.
My brain isn't quite working right at the moment (migraine), but it should be food for thought anyway.
In the datasheet, the 240 is basically full wave rectified to give 300 VDC and for 120 V input, the voltage is doubled, so 120 VAC results in 300 VDC as well. I'll have to stare at the stuff some more to actually get component values.
i.e. Change the cap to 0.05 uf or put two 0.1 uf Caps in series. The caps would have to be an X or Y safety cap. Not sure which is more appropriate.
By using a series combination of R and C, you are using the capacitive reactance to limit the current, so there is less loss.
These sorts of modules are available too: **broken link removed**
Carbon resistors can change value. Metal oxide resistors tend to open when they get stressed. Carbon composition tends to go to a higher value. Metal film resistors puddle and sometimes get lower in value.