// JavaScript Document
// JavaScript Document
var bkg = 0; 
var width = 0, height = 0;
if(window.innerWidth){
width = window.innerWidth;
height = window.innerHeight;
}

else if(document.body && document.body.clientWidth){
width = document.body.clientWidth;
height = document.body.clientHeight;
}
if(document.documentElement && document.documentElement.clientWidth){ 
width = document.documentElement.clientWidth;
height = document.documentElement.clientHeight;
}
if (width <= 1680){
bkg= 0;
}
if (width <= 1680 && height <= 1050){
bkg= 5;
}
if (width <= 1440){
bkg= 5;
}
if (width <= 1366){
bkg= 3;
}
if (width <= 1281 && height <=1024){
bkg= 1;
}
if (width <= 1281 && height <=800){
bkg= 2;
}
if(width <= 1024 && height <=768) {
bkg= 4;

}
setresx(bkg);
function setresx(bkg) {
document.getElementById('css').setAttribute('href', '/css/res'+bkg+'.css');
}
 function recieveFromFlash(Txt) {
 document.getElementById('maincarrier').style.backgroundImage="url(\"/images"+bkg+"/bg" +Txt+".jpg\")";
}

