// This script is used to automatically choose from a selection of stylesheets based on the size of the user's window.
if ( window.innerWidth < 910 ) setActiveStyleSheet('smallWidth'); // Check width in Moz.

if ( document.body.offsetWidth < 910 ) setActiveStyleSheet('smallWidth'); // Check width in IE.

function setActiveStyleSheet(title) {
   var i, a;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { // Find all instances of the tag "link." Used mostly for linking stylesheets.
     if(a.getAttribute("rel").indexOf("style") != -1 
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
}

