in reply to insert html with javascript inside perl

You seriously need to spend time checking what you are doing. Firstly this even thought this page is static you are using Perl to generate it, why not use HTML::Template or something similar. Secondly did you even read the HTML you are generating? Lets look at some of the tags:
<html> <head> <body> <script /> </head> <body> Page content </body> </html>
Slightly messed up tag order and two <body> tags? This is not a Perl problem, check your HTML and you may want to do some research on Internet Explorer and some of its more interesting html/JavaScript 'Features'.
For example I believe IE has an issue with excessive white space print "function changedays(x)              {\n";

Update: Fixed formatting problem, added whitespace example.

Martin