Window object now extends Global (per ecma).
diff --git a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/java/JsTranslator.java b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/java/JsTranslator.java
index be10543..73e6dee 100644
--- a/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/java/JsTranslator.java
+++ b/bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/java/JsTranslator.java
@@ -197,7 +197,8 @@
 							}
 							// } else {
 							// handle script section
-							if (getCurrentNode().getNext() != null && getCurrentNode().getNext().getType() == DOMRegionContext.BLOCK_TEXT) {
+							
+							if (getCurrentNode().getNext() != null /*&& getCurrentNode().getNext().getType() == DOMRegionContext.BLOCK_TEXT*/) {
 								translateJSNode(getCurrentNode().getNext());
 							}
 						} // End search for <script> sections
@@ -290,6 +291,11 @@
 		ITextRegionCollection containerRegion = container;
 		Iterator regions = containerRegion.getRegions().iterator();
 		ITextRegion region = null;
+		
+		char[] spaces = getPad(container.getStartOffset() - scriptOffset);
+		fScriptText.append(spaces);
+		scriptOffset = container.getStartOffset();
+		
 		while (regions.hasNext() && !isCanceled()) {
 			region = (ITextRegion) regions.next();
 			String type = region.getType();
@@ -304,7 +310,7 @@
 				// regionLength);
 				Position inHtml = new Position(scriptStart, scriptTextEnd);
 				scriptLocationInHtml.add(inHtml);
-				char[] spaces = getPad(scriptStart - scriptOffset);
+				spaces = getPad(scriptStart - scriptOffset);
 				fScriptText.append(spaces);
 				// fJsToHTMLRanges.put(inScript, inHtml);
 				fScriptText.append(regionText);