// nacti extra CSS pokud browser windowWidth < 1100px
// mensi displaye maji zpravidla horsi barevnou hloubku, script+css kompenzuje tento nedostatek

window.onresize = reswid;
window.onload = reswid; //toto je prvni onload event

function reswid() {
  var windowWidth;
  if (self.innerWidth) {windowWidth = self.innerWidth;} // all except Explorer
  else if (document.documentElement && document.documentElement.clientWidth) {windowWidth = document.documentElement.clientWidth;} // Explorer 6 Strict Mode
  else if (document.body) {windowWidth = document.body.clientWidth;} // other Explorers

  if (windowWidth<1100) { // nacti extra CSS
    var extraCSS = document.createElement("link")
    extraCSS.href = "/css/os_reswid1100color.css";
    extraCSS.type = "text/css";
    extraCSS.rel = "stylesheet";
    extraCSS.media = "screen";
    document.getElementsByTagName("head")[0].appendChild(extraCSS);
  }
}