// res-detect.js - for Lab Home. This javascript detects the browser resolution and attachs an appropriate CSS file.
// In addition the ReWin function is defined which can used to expand the browser window.
// LIVE VERSION
if(screen.height<=600) {
 document.write("<link rel=\"stylesheet\" href=\"http://www.lancs.ac.uk/iss/css/landscape/pclab.css\" type=\"text/css\"/>");
 BoxHeight=600;
 BoxWidth=800;
 Margin: 10px 10px 10px 10px;
 }
 
else

if(screen.height<=768) {
 document.write("<link rel=\"stylesheet\" href=\"http://www.lancs.ac.uk/iss/css/landscape/pclab_1024.css\" type=\"text/css\"/>");
 BoxHeight=750;
 BoxWidth=900;
 Margin: 10px 10px 10px 10px
}

else

if(screen.height<=864) {
 document.write("<link rel=\"stylesheet\" href=\"http://www.lancs.ac.uk/iss/css/landscape/pclab_1152.css\" type=\"text/css\"/>");
 BoxHeight=840;
 BoxWidth=1050;
 Margin: 10px 10px 10px 10px;
}

else

if(screen.height<=1024){
 document.write("<link rel=\"stylesheet\" href=\"http://www.lancs.ac.uk/iss/css/landscape/pclab_1280.css\" type=\"text/css\"/>");
 BoxHeight=950;
 BoxWidth=1150;
 Margin: 10px 10px 10px 10px;
}

else

if(screen.height<=1200) {
 document.write("<link rel=\"stylesheet\" href=\"http://www.lancs.ac.uk/iss/css/landscape/pclab_1600.css\" type=\"text/css\"/>");
 BoxHeight=1070;
 BoxWidth=1350;
 Margin: 10px 10px 10px 10px;
}

else {
 document.write("<link rel=\"stylesheet\" href=\"http://www.lancs.ac.uk/iss/css/landscape/pclab_1280.css\" type=\"text/css\"/>");
 BoxHeight=950;
 BoxWidth=1150;
 Margin: 10px 10px 10px 10px;
}



function ReWin() {
 window.resizeTo(BoxWidth,BoxHeight) 
}

// res-detect.js - [ends]