var ss = getStyleSheetLink();
var skinPath = "";  /* This is directory path to SmallResrolutions.css file */
function setStyleSheet(element) {
    if(ss != null) {
      if(element.offsetWidth < 1000) {  /* XX is number (width) of screen, when browser is resized on smaller width then XX then SmallResrolutions.css file will be loaded */
        if(ss.href != skinPath + "SmallResrolutions.css") {  /* This is CSS file with atributes which controls floated elements when resolution is smalled then XX */
          ss.href = skinPath + "SmallResrolutions.css";
        }
      } else {
        if(ss.href != '') {
          ss.href = '';
        }
      }
    }
}

function getStyleSheetLink() {
    var links = document.getElementsByTagName("link");
    for(i=0; i<links.length; i++) {
      var ss = links[i];
      if(ss.title) {
        if(ss.title == "conditional style") {
          return ss;
        }
      }
    }
    return null;
}

window.onresize = function() {
    setStyleSheet(document.body);
};
