// 本脚本用于判断浏览器、操作系统、屏幕分辨率和屏幕颜色设置
// Contion Chou @ 2002/04/05

function checkBrowser(){	//检查MSIE版本
 if(document.all && navigator.appName=='Microsoft Internet Explorer'){	//MSIE4或更高版本
  strVersion=navigator.appVersion;
  if(strVersion.indexOf('MSIE 4')!=-1) return 4;	//MSIE4.X
  else if(strVersion.indexOf('MSIE 5')!=-1){	//MSIE5.X
   if(strVersion.indexOf('MSIE 5.5')!=-1) return 5.5;	//MSIE5.5
   else return 5;	//MSIE5.0X
  }
  else{	//对MSIE6或更高版本浏览器使用正则表达式匹配版本号
   var re=/MSIE \b(\d\.*\d*);/gi;	//全程忽略大小写查找匹配
   var ary=re.exec(strVersion);
   return RegExp.$1;
  }
 }
 else return 3;	//MSIE3或其它浏览器
}

function checkOS(){	//检查操作系统版本
 var strVersion=navigator.appVersion;
 if(strVersion.indexOf('Win')!=-1){	//MS-Windows系统
  if(strVersion.indexOf('NT')==-1){	//9x内核Windows系统
   if(strVersion.indexOf('95')!=-1) return 4.00;	//Windows 95
   if(strVersion.indexOf('98')!=-1) return 4.10;	//Windows 98
   if(strVersion.indexOf('98')!=-1 && strVersion.indexOf('4.9')!=-1)
    return 4.90;	//Windows ME
  }
  else{	//NT内核Windows系统
   if(strVersion.indexOf('NT 4')!=-1) return 4.00;	//Windows NT 4.0
   else{	//Windows 2000/XP/.net Server或更高
    var re=/windows nt \b([0-9]+.[0-9]+)/gi;	//可以匹配“Windows NT x.xx”
	var ary=re.exec(strVersion);
	return RegExp.$1;
   }
  }
 }
 return 3.00;	//Windows 3.X或其它操作系统
}

var arySysErrInfo,strSysErrInfo,intSysErrInfoLen,intCorlorBit;
 arySysErrInfo=new Array();
 intSysErrInfoLen=0;
 intCorlorBit=(document.all)?screen.colorDepth:screen.pixelDepth;

if(checkOS()<=3.00) arySysErrInfo[intSysErrInfoLen++]='当前操作系统';
if(checkBrowser()<5.00) arySysErrInfo[intSysErrInfoLen++]='当前浏览器';
if(eval(screen.width)<800 && eval(screen.height)<600) arySysErrInfo[intSysErrInfoLen++]='当前屏幕分辨率';
if(eval(intCorlorBit)<24) arySysErrInfo[intSysErrInfoLen++]='当前屏幕颜色位数设置';

if(intSysErrInfoLen){
 strSysErrInfo='注意：';
 for(var i=0;i<arySysErrInfo.length;i++){
  strSysErrInfo+=arySysErrInfo[i];
  if(i!=arySysErrInfo.length-1) strSysErrInfo+='、';
 }
 strSysErrInfo+='不是浏览精图网站的推荐配置。';
 window.defaultStatus=strSysErrInfo;
}
