, , . document.styleSheets.

function simplifyCSSExpression() {
 try {
 var ss = document.styleSheets;
 var i = ss.length

 while (i-- > 0) {
 simplifyCSSBlock(ss[i]);
 }
 }
 catch (exc) {
 alert>("    css.   " +
 "   , , ,    +
 ");
 throw exc;
  }
}

(@import), . , , cssText expression(constExpression).

function simplifyCSSBlock(ss) {
 //    import'
 var i = ss.imports.length;
 while (i-- > 0)
 simplifyCSSBlock(ss.imports[i]);

 //   cssText'  constExpression, 
 if (ss.cssText.indexOf("expression(constExpression(") == -1)
 return;

 var rs = ss.rules;
 var rl = rs.length;
  while (rl-- > 0)
 simplifyCSSRule(rs[j]);
}

cssText , simplifyCSSRuleHelper, .

function simplifyCSSRule(r) {
 var str = r.style.cssText;
 var str2 = str;
 var lastStr;

 //  ,     
 do {
 lastStr = str2;
 str2 = simplifyCSSRuleHelper(lastStr);
 } while (str2 != lastStr)

 if (str2 != str)
 r.style.cssText = str2;
}

, .

function simplifyCSSRuleHelper(str) {
 var i = str.indexOf("expression(constExpression(");
 if (i == -1)
 return str;
 var i2 = str.indexOf("))", i);
 var hd = str.substring(0, i);
 var tl = str.substring(i2 + 2);
 var exp = str.substring(i + 27, i2);
 var val = eval(exp)
 return hd + val + tl;
}

, simplifyCSSExpression .

if (/msie/i.test(navigator.userAgent) && window.attachEvent != null) {
 window.attachEvent("onload", function () {
 simplifyCSSExpression();
 });
}