i have a problem in printing div content.it printing correctly it showing the error like 'sys' undefined..can any one tell me the solution,

```
    <div id="mydiv" runat="server" style="display:none;">

        </div>

```

and my javascript is :

```
 function Print() {

            var PrintDiv = $('#' + '<%= mydiv.ClientID %>').html();

            //var NewWindow = window.open('', '', 'width=500,height=500');
            var NewWindow = window.open('', '_blank', 'location=1,status=1,scrollbars=1,width=1000,height=700');
            NewWindow.document.open("text/html");
            NewWindow.document.write('<html><head><title></title>');
            NewWindow.document.write('<link href="CSS/style.css" rel="stylesheet" type="text/css" />');

            NewWindow.document.write('</head><body  onload="window.print()">');
            NewWindow.document.write(PrintDiv);
            NewWindow.document.write('</body></html>');

            NewWindow.document.close();

        }

```