﻿sIFR.debug=new function(){function c(){this.fire=function(a){if(this[a+"Alert"])alert(this[a+"Alert"]);throw new Error(this[a])};this.isFile="sIFR: Did not activate because the page is being loaded from the filesystem.";this.isFileAlert="Hi!\n\nThanks for using sIFR on your page. Unfortunately sIFR couldn't activate, because it was loaded directly from your computer.\nDue to Flash security restrictions, you need to load sIFR through a web server.\n\nWe apologize for the inconvenience."}sIFR.errors=new c;function a(a){if(!sIFR.ua.safari&&window.console&&console.log)console.log(a);else alert(a)}this.ua=function(){var c=[];for(var b in sIFR.ua){if(sIFR.ua[b]==Object.prototype[b])continue;c.push(b,": ",sIFR.ua[b],"\n")}a(c.join(""))};this.domains=function(){if(sIFR.domains.length==0){a("No domain verification used.");return}var g=sIFR.util.domain(),c=[],b=[];for(var f=0;f<sIFR.domains.length;f++){var e=sIFR.domains[f];if(sIFR.util.domainMatches(g,e))c.push(e);else b.push(e)}var d=['The domain "',g,'"'];if(c.length>0)d.push(" matches:\n* ",c.join("\n* "));if(c.length>0&&b.length>0)d.push("\nbut");if(b.length>0)d.push(" does not match:\n* ",b.join("\n* "));a(d.join(""))};this.ratios=function(b,c){if(c)b=sIFR.util.copyProperties(b,c);if(!b.selector&&!b.elements){a("Cannot calculate ratios, no selector or element given.");return}delete b.wmode;delete b.transparent;delete b.opaque;if(b.css){b.css=sIFR.util.convertCssArg(b.css);sIFR.util.extractFromCss(b.css,".sIFR-root","leading",true)}var d=false;b.onReplacement=function(a){if(d)return;d=true;sIFR.debug.__ratiosCallback[a.id]=function(c){c="["+c.join(", ")+"]";setTimeout(function(){var d=new Date;prompt("The ratios for "+b.selector+" are:",c);if(sIFR.ua.ie&&d-new Date<200)alert("Press Control+C to copy the text of this alert box. Then paste it into your favorite text editor.\nThe numbers between the braces, including the braces, are the ratios. You have to add those to your sIFR configuration.\n\nTip: try calculating the ratios in Firefox instead, it'll be easier to copy the ratios.\n\n"+c);a.resetMovie()},0)};a.call("calculateRatios")};sIFR.replace(b)};this.__ratiosCallback=function(a,b){if(this.__ratiosCallback[a])this.__ratiosCallback[a](b)};function b(c,d,e){if(sIFR.ua.ie&&c.charAt(0)=="/")c=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+c;var b=new XMLHttpRequest;b.open("GET",c,true);b.onreadystatechange=function(){if(b.readyState==4)if(b.status!=200)a(d);else a(e)};b.send("")}this.test=function(g,k){g=merge(g,k);var c=g.src,i=false;if(typeof c!="string"){if(c.src)c=c.src;if(typeof c!="string"){var d=[];for(var f in c)if(c[f]!=Object.prototype[f])d.push(f);d.sort().reverse();var h="",e=-1;while(!h&&++e<d.length){if(parseFloat(d[e])<=ua.flashVersion)h=c[d[e]];var j="<"+c[d[e]]+">, flash "+parseFloat(d[e]);b(c[d[e]],"FAILED: "+j,"OK: "+j)}c=h;i=true}}if(!c)a("Could not determine appropriate source.");else if(!i)b(c,"FAILED: <"+c+">","OK: <"+c+">")};this.forceTest=function(){var a=sIFR.replace;sIFR.replace=function(c,b){sIFR.debug.test(c,b);a.call(sIFR,c,b)}}}
