A script has executed for longer than the default timeout period

Hi

I am using nested for loops to generate some out put but I keep getting this error.

I am generating a calender similar to the one here www.joobili.com

In this they have generated all the month and days in the beginning so that you can scroll smoothly.

But when I tyr to do that I get script time out error.

Is there an efficient way of doing this.

please I really need help.

thanks