This is a great script, but the version used for SQL Server 2000 doesn't work with SQL Server 2005 because the sysxlogins table doesn't exist.
Microsoft published a new version of this script that is compatible with SQL Server 2005 and it's documented in KB 918992
I tried this version on one of our SQL Server 2005 servers and it works just as the original version.