Verify _url on current domain

Hey everyone!

I found this script on the web. What it is trying to do is verify the url so that if the swf is running on another url, the script will either give a message or do an action. Yet I have not got it to work?

Here is the script, can someone implement it and tell me how they got it to work?

protocol=_url.substr(0,_url.indexOf(":"));
if (protocol=="file") {
 // Let's be nice:
 // If the leecher downloaded the SWF, well let them play it
 // on their on computer
 //
 message="It seems you are trying out this SWF on your local hard disk. That's ok, but be aware that this SWF will only work if played on the source site"
} else if (protocol=="http")  {
 // doubleSlash
 // ===========
 // The location of the first occurance of a "//" in the url.
 //  url's are formed as following:
 //
 // [protocol]://[server]/[pathname]
 //
 // Where protocol is any udp such as ftp, file, http, etc
 //
 doubleSlash=_url.indexOf("//");
 //
 // server
 // ======
 // Isolate the server name: Go past the "//", and everything
 // between the doubleslash and the next "/" (single slash")
 // is a server name
 server=_url.substr(doubleSlash+2,_url.indexOf("/",doubleSlash+2)-doubleSlash-2);
 //
 // Let's get rid of the "www" prefix, because
 // sometimes servers recognize the address without this
 // prefix.
 // Here's a little catch!
 // What if the user typed "[http://www.6FootMedia.com](http://www.6footmedia.com/)"
 // That is not the same as "[http://www.6footmedia.com](http://www.6footmedia.com/)"
 // (The difference is in the caps)
 server=server.toUpperCase()
 //
 // Get rid of the WWW. prefix
 // so we can focus on examining only the server domain name
 if (server.indexOf("WWW.") <>-1) server=server.substr(server.indexOf("<A href="http://www.")+4,server.length/">WWW.")+4,server.length);
 //
 if (server.indexOf ("FRUNDER.COM") <> -1 or server.indexOf("FLASHKIT.COM") <> -1) {
 message = "Copyrights are being preserved";
 } else {
 message = "Alert! This film's copyrights are being infringed! A message is being sent to author that you have copied his work. Expect the copyright police to arrive 15 minutes at your doorsteps. 
Offending website path: " + _url;
 // Here you can put code to redirect the film to another frame
 // or to getURL to a page on your site that reports a stolen goods page...
 }
}
box1=prefix;

Thanks!