Cool plugin extended to control the fan by DeuxVis and Joost-b in this forum thread: http://forums.reprap.org/read.php?154,149615,245895