Ricevo questo errore:

Active Server Pages error 'ASP 0138'
Nested Script Block
/Header.asp, line 17
A script block cannot be placed inside another script block.

dopo avere aggiunto questo codice in una pagina ASP:
codice:
<SCRIPT language=JavaScript>
function PopupImage(img) {
	titre="Popup Image - Tout Javascript.com";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>[img]"+img+"[/img]");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}
</SCRIPT>
Come posso fare per risolvere il problema?