change class of a div if domain name =
<p>I have 2 domains going to my site but I want to change the class of a div that has an ID of #logo.</p>

<p>I have tried the following but no luck...</p>

<pre><code>&lt;script type="text/javascript"&gt; 
var hasChar1 = window.location.href.indexOf('domain01') != -1;
var hasChar2 = window.location.href.indexOf('domain') != -1;
if (hasChar1)
{
   if (hasChar1)
   {document.getElementById("logo").className = "logoNZ";}
   else
   {document.getElementById("logo").className = "";}
}
else if (hasChar2)
{document.getElementById("logo").className = "";}
&lt;/script&gt;
</code></pre>
