See the solution in http://www.codeguru.com/forum/showthread.php?t=374155.

Thanks.