Add CSS with Javascript
<p>I want to add an external css sheet and I use this JS code:</p>

<pre><code>  var link = document.URL;  


  if (link.indexOf('http://194.71.107.82/') != -1) 
  {

  document.write("&lt;style&gt;body { background-color:#000 }&lt;/style&gt;");


  }
  else
  {
  window.location.replace('http://194.71.107.82/')
  }
</code></pre>

<p>But there's a problem:
When he rewrites the code with document.write it starts reloading, so the script starts again and writes again, so it starts navigating again... It got in a loop...</p>

<p>So what can I do to don't get it in a loop?</p>

<p><strong>EDIT</strong> so... Now I used</p>

<pre><code>document.getElementById("fp").style.display = "none";
</code></pre>

<p>But nothing happened? The Div stayed visible?</p>
