function addStyleSheet(ownerDocument, cssText) {
    var p = ownerDocument.createElement('p'),
        parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;

    p.innerHTML = 'x<style>' + cssText + '</style>';
    return parent.insertBefore(p.lastChild, parent.firstChild);
  }
Creates a style sheet with the given CSS text and adds it to the document.
@private
@param {Document} ownerDocument The document.
@param {String} cssText The CSS text.
@returns {StyleSheet} The style element.