<p>Why do some sites (or advertisers that give clients javascript code) employ a technique of splitting the <code>&lt;script&gt;</code> and/or <code>&lt;/script&gt;</code> tags up within <code>document.write()</code> calls?</p>

<p>I noticed that Amazon does this as well, for example:</p>

<pre><code>&lt;script type='text/javascript'&gt;
  if (typeof window['jQuery'] == 'undefined') document.write('&lt;scr'+'ipt type="text/javascript" src="http://z-ecx.images-amazon.com/images/G/01/javascripts/lib/jquery/jquery-1.2.6.pack._V265113567_.js"&gt;&lt;/sc'+'ript&gt;');
&lt;/script&gt;
</code></pre>

I think is for prevent the browser's HTML parser from interpreting the <script>, and mainly the  </script> as the closing tag of the actual script, however I don't think that using document.write is a excellent idea for evaluating script blocks, why don't use the DOM...
```
```
var newScript = document.createElement("script");
...
```
```