I have a 2003 corolla S with the same type moon roof and so far I have not (fingers crossed) run into that problem and I leave it out in the rain always...now I'm scared...I don't think it has a drain(why?) if you leave it open its going to rain into your car and a drain isn't going to help but it might for water thats still on the roof after a rain...If its the first time this happened I would check the seal with the roof fully opened to see if a small piece of branch or something wasn't caught in the seal when you closed it(anyway give it a good look-see and cleaning...also maybe if you shut off your car before it closed completely all the power to it stopped leaving a little gap...just a thought...also when you opened your moon roof did you check on the inside track to see if that was wet? last if its still under warrenty let them inspect it...Good Luck....Raddman Out...
"I OWNED A NEW CAR ONCE, MY X WIFE LOVES IT"