Scroll down to the line where it mentions;
--This is the name of the database for which the log will be shrunk.
USE [databasename] put the logical name of the database to replace the database name
Also where it mentions;
--Use sp_helpfile to identify the logical file name that you want to shrink.
SET @LogicalFileName = 'database_Log';
Do the same here replace the database_log for the database log name.
Run the script, if it doesn't run then it's down to the logical name of the database that isn't right.
This has been tested on SQL 2000, 7 and 2005 databases very successfully. 40 GB went down to under 1 GB, 176GB went down to 105MB
Make sure that you understand the implications of this script on the backup and recovery of your database(s): Managing Transaction Logs.