var firstRun = (!window.styleFunctions);
if (firstRun) {
 window.styleFunctions = new Array();
 window.executeStyleFunctions = function() {
  for (var i = 0; i < window.styleFunctions.length; i++) {
    window.styleFunctions[i]();
  }
 }

 if (navigator.userAgent.indexOf("MSIE") != -1) {
  window.attachEvent("onload", window.executeStyleFunctions);
 } else {
  window.addEventListener("load", window.executeStyleFunctions, false);
 }
   
 window.registerStyleFunction = function(fn) {
  window.styleFunctions[window.styleFunctions.length] = fn;
 }

}
