This would most likely have to be done at the software level, something in the OS. That is, unless, you want to open up your iMac and start tugging on wires which I wouldn't recommend.
I know that you can cut off the monitor after a user set duration thru the Energy Saver( control panel from OS 9) pane on the System Preferences pane (in OS X). If your iMac DV has the video mirroring card it can mirror what is on the screen but I don't know if you can shut off the internal monitor and use a external one but maybe you can. Trial and error. Tell if it worked, I would like to know.