title: Is changing css styles via 'document.getElementById(o).style[p]=v' valid?
body: <p>We are hoping on trimming some fat from our custom library we use across our products.</p>
  
  <p>One commonly used action is changing of object styles.</p>
  
  <p>Normally, we do this via:</p>
  
  <pre><code>document.getElementById('object').style.property='value';
  </code></pre>
  
  <p>I just tested the following in chromes console, and it worked:</p>
  
  <pre><code>function objStyle(o,p,v){
      document.getElementById(o).style[p]=v;
  }
  
  objStyle('object','property','value');
  </code></pre>
  
  <p>Is this a valid way of doing things?</p>
  
  <p>Any pitfalls one can think of when using this way of doing things? Crossbrowser compatability?</p>