if(!document.all||navigator.appVersion.indexOf("Mac")!=-1){alert("This utility requires IE4+ running Microsoft Windows.");document.history.go(-1)}Config={};Tests={};Drives=[];Disks=[];Devices={};Monitors=[];Apps=[];CDs=[];document.write('<OBJECT ID="sys" CLASSID="CLSID:0E5F0222-96B9-11D3-8997-00104BD12D94" codebase="'+CODEBASEPATH+CODEBASE+'"> </OBJECT>');document.write('<OBJECT ID="cpu" CLASSID="CLSID:7939AB8E-96A1-11D3-8997-00104BD12D94" codebase="'+CODEBASEPATH+CODEBASE+'"></OBJECT>');document.write('<OBJECT ID="disk" CLASSID="CLSID:7939AB92-96A1-11D3-8997-00104BD12D94" codebase="'+CODEBASEPATH+CODEBASE+'"></OBJECT>');document.write('<OBJECT ID="memory" CLASSID="CLSID:7939AB94-96A1-11D3-8997-00104BD12D94" codebase="'+CODEBASEPATH+CODEBASE+'"></OBJECT>');document.write('<OBJECT ID="video" CLASSID="CLSID:7939AB90-96A1-11D3-8997-00104BD12D94" codebase="'+CODEBASEPATH+CODEBASE+'"></OBJECT>');document.write('<OBJECT ID="CDDrive" CLASSID="CLSID:9F929342-CABD-11D4-8997-00104BD12D94" codebase="'+CODEBASEPATH+CODEBASE+'"></OBJECT>');document.write('<OBJECT ID="email" CLASSID="CLSID:88650482-3892-11D5-8997-00104BD12D94" codebase="'+CODEBASEPATH+CODEBASE+'"></OBJECT>');function ActivateControls(A,B){if(!document.sys||typeof (sys.ControlBuild)=="undefined"||sys.ControlBuild<CONTROLBUILD){if(A){document.location=A}else{alert("You don't appear to have the diagnostic utility installed.")}return false}if(!sys.Enable2(ENABLE2VALUE)){if(B){document.location=B}else{alert("Unable to run the diagnostic utility, permission declined.")}return false}return true}function RunAllTests(){LoadConfiguration();LoadDevices();LoadNetwork();LoadApps();RunCpuLoad();Status.Update("")}function LoadConfiguration(){LoadConfig();LoadDisks();LoadDrives();LoadTests();Status.Update("")}function LoadConfig(){if(Config.nCPUs||(document.Cache&&(Config=Thaw(document.Cache.Config.value)))){return }Config={};var B=navigator.appName+" "+navigator.appVersion;var A=String(B).replace(/^Microsoft Internet Explorer 4.0 \(compatible; /,"");if(A!=B){A=A.replace(/Windows \w+/,"");A=A.replace(/; DigExt/,"");A=A.replace(/(;\s)+/g,"; ");A=A.replace(/(;\s)?\)$/,"")}Config.Browser=A;Config.serial=String(sys.serial);if(Config.serial.length<5||Config.serial.match(/12345|54321|Serial|DESCDESC|DUMMY|TEST|EVAL|null/)){Config.serial=""}Config.make=sys.make;Config.model=sys.model;Config.comp_name=sys.comp_name;Config.CPUDesc=String(cpu.CPUDesc).replace(/ with Multimedia Extensions| with MMX| P55C/i,"");Config.ClockFrequency=cpu.ClockFrequency;Config.ExternalClock=cpu.ExternalClock;Config.nCPUs=cpu.nCPUs;Config.VideoDesc=video.VideoDesc;Config.VidHoriz=video.VidHoriz;Config.VidVert=video.VidVert;Config.VidBpp=video.VidBpp;Config.OSVersion=sys.OSVersion;Config.BIOS=sys.BIOS;Config.RAMInstalled=memory.RAMInstalled;Config.MemorySlots=memory.MemorySlots;Config.FreeMemorySlots=memory.FreeMemorySlots;Config.MemoryType=memory.MemoryType;Config.isLaptop=sys.isLaptop;Config.WindowsInstallDate=StdDate(sys.WindowsInstallDate);sys.FilePath(2)="";sys.Filename="OPENGL32.DLL";Config.OpenGLVer=sys.FileVersion;sys.Filename="ddraw.dll";Config.DirectXVer=sys.FileVersion;if(document.Cache){document.Cache.Config.value=Freeze(Config)}}function LoadTests(){if(Tests.NumFonts||(document.Cache&&(Tests=Thaw(document.Cache.Tests.value)))){return }Tests={};Status.Update("Checking software...");Tests.ControlBuild=sys.ControlBuild;Tests.Flags=sys.Flags;Tests.IEFlags=sys.IEFlags;Tests.IEProxyServer=sys.IEProxyServer;Tests.IEAutoConfigURL=sys.IEAutoConfigURL;sys.FilePath(1)="";sys.Filename="wscript.exe";var A=String(sys.FileVersion);if(A.toLowerCase()=="file not found"){sys.FilePath(2)="";sys.Filename="wscript.exe";A=String(sys.FileVersion)}Tests.WSHVer=A;Tests.PagingDrive=sys.PagingDrive;Tests.MinPagingFileSize=sys.MinPagingFileSize;Tests.MaxPagingFileSize=sys.MaxPagingFileSize;Tests.MaxPhysPage=sys.MaxPhysPage;Tests.MinFileCache=sys.MinFileCache;Tests.MaxFileCache=sys.MaxFileCache;Status.Update("Checking memory...");Tests.RAM=memory.RAM;Tests.FreeResources=Math.min(sys.FreeSystemResources(0),Math.min(sys.FreeSystemResources(1),sys.FreeSystemResources(2)));if(document.Cache){document.Cache.Tests.value=Freeze(Tests)}}function LoadDisks(){if(Disks.length||(document.Cache&&(Disks=Thaw(document.Cache.Disks.value)))){return }Disks=[];Status.Update("Checking disks...");for(var i=0;disk.DiskInfo(i);i++){var di=Disks[i]={};for(var j=0;disk.DiskDetail(j);j++){eval("di."+disk.DiskDetailName+"=disk.DiskDetailValue")}}if(document.Cache){document.Cache.Disks.value=Freeze(Disks)}}var DiskHealthResults=["OK","Unknown(1)","Not tested","Unknown(3)","Unable to read boot sector","Error reading FAT copy 1","Error reading FAT copy 2","FAT1-FAT2 mismatch","Invalid FAT","Crosslinked files"];function LoadDrives(){if(Drives.length||(document.Cache&&(Drives=Thaw(document.Cache.Drives.value)))){return }Drives=[];Status.Update("Checking drives...");var F="C".charCodeAt(0);var B=0;for(var D=0;D<24;D++){var A=String.fromCharCode(F+D)+":\\";disk.DrivePath=A;if(disk.DriveType!="No root directory"){Status.Update("Checking drives..."+A);var E=Drives[B]={};E.DrivePath=disk.DrivePath;E.VolName=disk.VolName;E.VolSer=disk.VolSer;E.DriveType=disk.DriveType;E.PartType=disk.PartType;E.Size=disk.Size;E.cluster_size=disk.cluster_size;E.Free=disk.Free;E.ScanRating=-1;E.FragmentationPercent=0;E.FileFragmentationPercent=0;if(E.PartType!="NTFS"&&(E.DriveType=="Hard disk"||(A=="C:\\"&&E.DriveType=="Removable"))){E.LastScan=StdDate(disk.LastScan);E.LastOpt=StdDate(disk.LastOpt)}B++}}if(document.Cache){document.Cache.Drives.value=Freeze(Drives)}}function RunCpuLoad(){}function LoadNetwork(){LoadDevices();Tests.RWin=sys.RWin;Tests.IPAddress=sys.IPAddress;if(document.Cache){document.Cache.Tests.value=Freeze(Tests)}}function LoadDevices(){if(Devices.system||(document.Cache&&(Devices=Thaw(document.Cache.Devices.value)))){return }Devices={};Status.Update("Checking devices...");for(var A=0;sys.DeviceInfo(A);A++){var C=String(sys.DeviceClass).toLowerCase();if(!Devices[C]){Devices[C]=[]}var D=sys.DeviceVendor||"";D=D.replace(/^\(Standard[^\)]*\)|Generic\s*/i,"");D=Unclutter(D);var B=Unclutter(sys.DeviceProduct||"");Devices[C][Devices[C].length]={Class:C,Vendor:D,Product:B,DriverDate:StdDate(sys.DeviceDriverDate),Problem:sys.DeviceProblem,Status:sys.DeviceStatus}}if(document.Cache){document.Cache.Devices.value=Freeze(Devices)}}function LoadMonitors(){if(Monitors.length||(document.Cache&&(Monitors=Thaw(document.Cache.Monitors.value)))){return }LoadDevices();Monitors=[];for(var A=0;A<sys.NMonitors;A++){Monitors[Monitors.length]={Monitor:sys.Monitor(A),MonMaxHRes:sys.MonMaxHRes(A),MonMaxHSize:sys.MonMaxHSize(A),MonMaxVRes:sys.MonMaxVRes(A),MonMaxVSize:sys.MonMaxVSize(A),ManufactureYear:sys.ManufactureYear(A),ManufactureWeek:sys.ManufactureWeek(A),MonSerialNr:sys.MonSerialNr(A)}}if(document.Cache){document.Cache.Monitors.value=Freeze(Monitors)}}function LoadApps(){if(Apps.length){return }Status.Update("Checking software...");for(var D=0;sys.enumApps(D);D++){var A={};for(var C=0;sys.enumAppDetails(C);C++){A[sys.AppDetailName]=sys.AppDetailValue}if(D%10==0){Status.Update("Checking software..."+D)}var F=Unclutter(A.Vendor||"");var E=Unclutter(A.Product||"");var B=A.Version||"";E=E.replace(/ Operating System| for Windows.*/,"");if(!F&&!E){E=A.FileDescription||""}else{if(E.substr(0,F.length)!=F){E=F+" "+E}}Apps[Apps.length]={Product:E,Version:B,Running:A.Running,FileName:A.FileName,RunFrom:A.RunFrom}}Apps.sort(function(H,G){return H.Product<G.Product?-1:H.Product>G.Product?1:0});Status.Update("")}function RunCPUMemTests(){Status.Update("Testing CPU MHz...");Config.ClockFrequency=cpu.ClockFrequency;Tests.TestClockFrequency=cpu.TestClockFrequency;Status.Update("Testing CPU integer performance...");Tests.IntSpeed=Round(cpu.IntSpeed,0);Status.Update("Testing memory performance...");Tests.RAM=memory.RAM;Tests.MemSpeed=Round(memory.MemSpeed,0);Status.Update("")}function RunDriveTests(){Status.Update("Testing drives...");for(var A=0;A<Drives.length;A++){var B=Drives[A];if(B.DriveType=="Hard disk"||(B.DrivePath=="C:\\"&&B.DriveType=="Removable")){Status.Details(B.DrivePath);disk.DrivePath=B.DrivePath;B.Size=disk.Size;B.Free=disk.Free;B.RecycleCurrent=disk.RecycleCurrent;B.RecycleMaxPct=disk.RecycleMaxPct;Status.Details(B.DrivePath+" (cached)");disk.CachedSpeed;sys.Sleep(5000);B.CachedSpeed=Round(disk.CachedSpeed,2);Status.Details(B.DrivePath+" (uncached)");sys.Sleep(5000);B.UncachedSpeed=Round(disk.UncachedSpeed,2)}}Status.Update("Calculating temp/cache usage...");disk.DrivePath="C:\\";Tests.TempFileUsage=disk.TempFileUsage;Tests.TempPath=disk.TempPath;Tests.ieCacheCurrent=disk.ieCacheCurrent;Tests.ieCachePath=disk.ieCachePath;Tests.nsCacheCurrent=disk.nsCacheCurrent;Tests.nsCachePath=disk.nsCachePath;Status.Update("")}function RunVideoTests(){Status.Update("Testing video...");Config.VidHoriz=video.VidHoriz;Config.VidVert=video.VidVert;Config.VidBpp=video.VidBpp;Tests.VidSpeed=Round(video.VidSpeed,2);Status.Update("")}function RunCDTests(){Status.Update("Detecting CD-ROM/R/RW drives...");CDs=[];for(var D=0;CDDrive.enumCD(D);D++){var C="CD-ROM";var E=CDDrive.CDType;var B=CDDrive.MaxReadSpeed;var A=CDDrive.MaxWriteSpeed;if(E&8192){C="DVD-RAM"}else{if(E&4096){C="DVD-RW"}else{if(E&512){C="CD-RW"}else{if(E&256){C="CD-R"}else{if(E&24){C="DVD-ROM"}}}}}if(B){B=Math.round(B/176)+"X read"}else{B=""}if(A){A=Math.round(A/176)+"X write"}else{A=""}CDs[CDs.length]={CDModel:CDDrive.CDModel,Type:C,ReadSpeed:B,WriteSpeed:A}}Status.Update("")}function OSFormalName(A){A=(A||"").replace(/\s+$/,"");if(A=="Windows Me 4.90.3000"){return"Windows Me"}if(A=="Windows 98 4.10.2222  A"){return"Windows 98 SE"}if(A=="Windows 98 4.10.1998"){return"Windows 98"}if(A=="Windows 95 4.0.1111  B"){return"Windows 95 OSR2"}if(A=="Windows 95 4.0.1212  B"){return"Windows 95 OSR2.1"}if(A=="Windows 95 4.0.950"){return"Windows 95"}A=A.replace(/^Windows NT 4.0.1381/,"Windows NT");A=A.replace(/^Windows 2000 5.0.2195/,"Windows 2000");A=A.replace(/^Windows XP 5.1.2600/,"Windows XP");A=A.replace(/Service Pack /,"SP");return A}function VidBppToColors(A){switch(A){case 4:return"16";case 8:return"256";case 15:return"32,768";case 16:return"65,536";case 24:case 32:return"16 million";default:return A+" bits per pixel"}}function Unclutter(A){A=A.replace(/[\x00-\x1F]+/g," ");A=A.replace(/ [Ii]ncorporated| [Cc]orp(oration)?\.?|,.*$| [Cc]ompany| Ltd\.?/,"");A=A.replace(/\([Rr]\)|\([TtSs][Mm]\)|®/g,"");A=A.replace(/\s+$/,"");return A}function StdDate(A,E){var D=new Date(A);if(!D.getTime()||D.getTime()<1||D.getFullYear>2100){return""}var G=(D.getMonth()+1)+"/"+D.getDate()+"/"+D.getFullYear();if(!E){return G}var C=String(D.getHours());if(C.length==1){C="0"+C}var F=String(D.getMinutes());if(F.length==1){F="0"+F}var B=String(D.getSeconds());if(B.length==1){B="0"+B}return G+" "+C+":"+F+":"+B}function Round(C,B){var A=Math.pow(10,B||0);return Math.round(C*A)/A}function Freeze(D){var C=typeof (D);if(C=="undefined"){return"undefined"}if(D==null){return"null"}var A=(C!="object")?null:D.constructor;if(C=="function"||C=="boolean"||C=="number"||A==Boolean||A==Number){return D.toString()}if(C=="string"||A==String){D=D.replace(/(["\\])/g,"$1$1");D=D.replace(/\x0D/g,"\\r");D=D.replace(/\x0A/g,"\\n");return'"'+D+'"'}if(C!="object"){return"??"}var E="";if(A===Array){for(var B=0;B<D.length;B++){E+=Freeze(D[B])+","}return"["+E.substr(0,E.length-1)+"]"}if(A==Object){for(var B in D){E+='"'+B+'":'+Freeze(D[B])+","}return"{"+E.substr(0,E.length-1)+"}"}if(A==Date){return"new Date("+D.getTime()+")"}if(A==RegExp){return"/"+D.source+"/"+(D.global?"g":"")+(D.ignoreCase?"i":"")}if(D.toSource){return D.toSource()}return'"??"'}function Thaw(block){var NaN=Number.NaN;var Infinity=Number.POSITIVE_INFINITY;var _RET,undefined;if(block==""||block==null){return undefined}eval("_RET="+block);return _RET};
