UserAgent ="CCBot/1.0 (+http://www.commoncrawl.org/bot.html)"; StationCall=""; CreatingObject = false; function errorHandler(message, url, line) { if(CreatingObject) { location.href = "http://rd1.surfernetwork.com/nu/Player1.asp?call="+StationCall; return true; } return false; } function HaveIE4() { haveIE = 0; if (navigator.appName.substring(0,9) == "Microsoft") { msiestart = (navigator.appVersion.indexOf('(') + 1); msieend = navigator.appVersion.indexOf(')'); msiestring = navigator.appVersion.substring(msiestart, msieend); msieend = msiestring.indexOf('MSIE '); msiearray = msiestring.substring(msieend+5); msieend = msiearray.indexOf(';'); lastchar = msiearray.charAt(msieend-1); if(lastchar < '0' || lastchar > '9') { msieend = msieend -1; } version = msiearray.substring(0,msieend); if(version > 4.0) { haveIE = 1; } } return haveIE; } window.onerror = errorHandler; function SurferHandler(station) { LastRate = ""; CallSign = ""; if(station != null) { CallSign = station; } else { CallSign = StationCall; } RateIndex = CallSign.indexOf('/'); if(RateIndex != -1) { while(RateIndex != -1) { LastIndex = RateIndex; RateIndex = CallSign.indexOf('/',RateIndex+1); } RateIndex = LastIndex; LastRate = CallSign.substring(RateIndex+1,CallSign.length); if(LastRate == "16" || LastRate == "24") { CallSign = CallSign.substring(0,RateIndex); } else { LastRate = ""; } } if(HaveIE4()) { CreatingObject = true; // If the following line fails THAT IS EXPECTED AND CORRECT ! // This script includes a error handler that expects // to catch errors on the next line, but if a script debugger is // enabled it will get the error first ! // Go to IE's Internet options/advanced tab and disable script // debugging, the script will then function correctly. // Bill Gates apologizes for any inconvenience this may cause ! Surfer = new ActiveXObject("SurferNETWORK.Plugin"); CreatingObject = false; if(Surfer.IsPlayerInstalled()) { if(LastRate == "") { LastRate = Surfer.GetKey("LastStation"); if(LastRate != null && LastRate.length > 0) { LastRate = LastRate.substring(LastRate.length-2,LastRate.length); } else { LastRate = "16"; } } Surfer.Play("http://rd1.surfernetwork.com:443/"+CallSign+"/"+LastRate); } else { location.href = "http://rd1.surfernetwork.com/nu/Player1.asp?call="+CallSign; } } else { location.href = "http://rd1.surfernetwork.com/nu/Player1.asp?call="+CallSign; } }