function getcss(cssfile){
  loadcss = document.createElement('link')
  loadcss.setAttribute("rel", "stylesheet")
  loadcss.setAttribute("type", "text/css")
  loadcss.setAttribute("href", cssfile)
  document.getElementsByTagName("head")[0].appendChild(loadcss)
}

// Defines the resolution range you're targeting (less than 800 pixels wide in this case)
if(screen.width <= '800') {
  getcss('/800x600.css')

// This time we're targeting all resolutions between 800 and 1280 pixels wide
} else if(screen.width > '800' && screen.width < '1280') {
  getcss('/1024x768.css')

/*
} else if(screen.width > '1024' && screen.width < '1600') {
  //Targeting screen resolutions between 1024 and 1600px wide
  getcss('/1280x1024.css')
*/
} else {
  // Default case
  getcss('/default.css')
}
