rem:    if (jsMath.document.styleSheets) { var style = head.appendChild(jsMath.document.createElement('style')); var sheet = style.styleSheet || style.sheet; if (sheet) { for (var id in styles) { if (styles[id] != '') { if (sheet.addRule) { sheet.addRule(id,styles[id],sheet.length); } else { sheet.insertRule(id+' {'+styles[id]+'}',sheet.length); } } } return; } else { head.removeChild(style); style = null; sheet = null; } }    var count = (jsMath.document.styleSheets)? jsMath.document.styleSheets.length: 0; var string = ''; for (var id in styles) {string += id + ' {'+styles[id]+"}\n"} var link = jsMath.document.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = 'data:text/css;charset=utf-8,'+escape(string); head.appendChild(link);         if (jsMath.document.styleSheets && jsMath.document.styleSheets.length == count && !(jsMath.document.implementation && jsMath.document.implementation.createCSSStyleSheet)) { var div = jsMath.document.createElement('div'); div.style.display = 'none'; jsMath.document.body.appendChild(div); div.innerHTML = '<style type="text/css">'+"\n"+string+"\n"+'</style>'; 
add: var string = ''; for (var id in styles) {string += id + ' {'+styles[id]+"}\n"} if (jsMath.document.createStyleSheet) { head.insertAdjacentHTML('beforeEnd', '<span style="display:none">x</span><style type="text/css">'+string+'</style>'); } else { var style = jsMath.document.createElement('style'); style.type = "text/css"; style.appendChild(jsMath.document.createTextNode(string)); head.appendChild(style); 
context:   AddStyleSheet: function (styles) {    var head = jsMath.document.getElementsByTagName('head')[0];    //    //  Handle MSIE/Windows and Mozilla    //    if (jsMath.document.styleSheets) {      var style = head.appendChild(jsMath.document.createElement('style'));      var sheet = style.styleSheet || style.sheet;      if (sheet) {        for (var id in styles) {	  if (styles[id] != '') {            if (sheet.addRule) {              sheet.addRule(id,styles[id],sheet.length);            } else {              sheet.insertRule(id+' {'+styles[id]+'}',sheet.length);            }	  }        }        return;      } else {        head.removeChild(style);        style = null; sheet = null;      }    }    //    //  Handle Safari, Opera    //    var count = (jsMath.document.styleSheets)? jsMath.document.styleSheets.length: 0;    var string = '';    for (var id in styles) {string += id + ' {'+styles[id]+"}\n"}    var link = jsMath.document.createElement('link');    link.rel = 'stylesheet';    link.type = 'text/css';    link.href = 'data:text/css;charset=utf-8,'+escape(string);    head.appendChild(link);    //    //  Handle MSIE/Mac    //    //  Check if we failed to create the styleSheet (but in    //  Safari, jsMath.document.styleSheets is not updated until after the    //  page is fully loaded, so we don't know if we succeeded.  So     //  skip it (it has createCSSStyleSheet but MSIE/mac doesn't).    //    if (jsMath.document.styleSheets && jsMath.document.styleSheets.length == count &&        !(jsMath.document.implementation && jsMath.document.implementation.createCSSStyleSheet)) {      var div = jsMath.document.createElement('div');      div.style.display = 'none';      jsMath.document.body.appendChild(div);      div.innerHTML = '<style type="text/css">'+"\n"+string+"\n"+'</style>';    }  },
meta: 7708	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7708/a844e1ec626c2b970c32377c4ad06bb088afa9bd/jsMath.js/buggy/htdocs/jsMath/uncompressed/jsMath.js