title: JavaScript - how do i get currentStyle of the element in Opera
body: <p>i'm trying to get fontWeight property of the strong element in opera. and i'm stuck. this is my function:</p>
  
  <pre><code>getCurrentStyle: function (el, styleProp) {
      if (!el || !styleProp) return ''
      styleProp = pinecf.unifyStyleProp(styleProp)
      var y = '',
          st
      try {
          st = pinecf.getElementStyle(el)
      } catch (e) {}
      alert($(el).css(styleProp.replace(/([A-Z])/g, '-$1').toLowerCase()))
      if (pinecf.CAE(st, styleProp)) y = st[styleProp]
      else try {
          if (el.currentStyle) y = el.currentStyle[styleProp];
          else if (pine.window.getComputedStyle) y = pine.document.defaultView.getComputedStyle(el, null)[styleProp]
      } catch (e) {
          try {
              y = $(el).css(styleProp.replace(/([A-Z])/g, '-$1').toLowerCase())
          } catch (e) {}
      }
      if (styleProp == 'fontWeight' &amp;&amp; parseInt(y) &gt; 0) {
          if (y &gt; 400) y = 'bold'
          else y = 'normal'
      } else if (styleProp == 'fontSize' &amp;&amp; y &amp;&amp; y.search(/pt/i) != -1) y = parseInt(y) * 1.33
      if (!y) y = ''
      return typeof y == 'string' ? pinecf.trim(y).toLowerCase() : y
  }
  </code></pre>
  
  <p>and it allways return empty value whatever method i try.</p>
  
  <p>please tell me how to get real value of currentStyle in Opera browser.</p>
  
  <p>any help appriciated!</p>