if (screen.width <= 800) {
  document.write('<link rel="stylesheet" type="text/css" href="800chem.css" />');
}
if (screen.width <= 1124) {
  document.write('<link rel="stylesheet" type="text/css" href="1024chem.css" />');
} 
else {
  document.write('<link rel="stylesheet" type="text/css" href="chem.css" />');
}
