title: Accessing CSS classes in a css file, cross-domain, in javascript
body: <p>We include the CSS file via standard HTML STYLE tag.</p>
  
  <p>Then we need the javascript code to access the CSS classes and attributes.
  in IE and Chrome all goes fine, but in Firefox it throws this exception:</p>
  
  <p>uncaught exception: Security error (NS ERROR DOM SECURITY ERR)</p>
  
  <p>here's the javascript code:</p>
  
  <pre><code>for (var i = 0; i != window.document.styleSheets.length; i++) {
      rules = window.document.styleSheets.item(i);
      if(rules.href.indexOf('someurl.com')){
          break;
      }
  }
  return rules.cssRules || rules.rules;
  </code></pre>
  
  <p>it works fine in IE, Chrome and Safari, but it doens't in Firefox and Opera.</p>
  
  <p>any ideas?
  thanks in advance</p>