var sIFR=new function(){var self=this;var ClassNames={ACTIVE:"sIFR-active",UNLOADING:"sIFR-unloading",REPLACED:"sIFR-replaced",IGNORE:"sIFR-ignore",ALTERNATE:"sIFR-alternate",CLASS:"sIFR-class",LAYOUT:"sIFR-layout",FLASH:"sIFR-flash",FIX_FOCUS:"sIFR-fixfocus",DUMMY:"sIFR-dummy"};ClassNames.IGNORE_CLASSES=[ClassNames.REPLACED,ClassNames.IGNORE,ClassNames.ALTERNATE];this.MIN_FONT_SIZE=6;this.MAX_FONT_SIZE=126;this.FLASH_PADDING_BOTTOM=5;this.VERSION="408";this.isActive=false;this.isEnabled=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=true;this.cookiePath="/";this.domains=[];this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=true;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.replacements=[];var elementCount=0;var isInitialized=false;function Errors(){this.fire=function(id){if(this[id+"Alert"]){alert(this[id+"Alert"])}throw new Error(this[id])};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."}function Util(sIFR){function capitalize($){return $.toLocaleUpperCase()}this.normalize=function(str){return str.replace(/\n|\r|\xA0/g,Util.SINGLE_WHITESPACE).replace(/\s+/g,Util.SINGLE_WHITESPACE)};this.textTransform=function(type,str){switch(type){case"uppercase":return str.toLocaleUpperCase();case"lowercase":return str.toLocaleLowerCase();case"capitalize":return str.replace(/^\w|\s\w/g,capitalize)}return str};this.toHexString=function(str){if(str.charAt(0)!="#"||str.length!=4&&str.length!=7){return str}str=str.substring(1);return"0x"+(str.length==3?str.replace(/(.)(.)(.)/,"$1$1$2$2$3$3"):str)};this.toJson=function(obj,strFunc){var json="";switch(typeof (obj)){case"string":json='"'+strFunc(obj)+'"';break;case"number":case"boolean":json=obj.toString();break;case"object":json=[];for(var prop in obj){if(obj[prop]==Object.prototype[prop]){continue}json.push('"'+prop+'":'+this.toJson(obj[prop]))}json="{"+json.join(",")+"}";break}return json};this.convertCssArg=function(arg){if(!arg){return{}}if(typeof (arg)=="object"){if(arg.constructor==Array){arg=arg.join("")}else{return arg}}var obj={};var rules=arg.split("}");for(var i=0;i<rules.length;i++){var $=rules[i].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!$||$.length!=3){continue}if(!obj[$[1]]){obj[$[1]]={}}var properties=$[2].split(";");for(var j=0;j<properties.length;j++){var $2=properties[j].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!$2||$2.length!=3){continue}obj[$[1]][$2[1]]=$2[2].replace(/\s+$/,"")}}return obj};this.extractFromCss=function(css,selector,property,remove){var value=null;if(css&&css[selector]&&css[selector][property]){value=css[selector][property];if(remove){delete css[selector][property]}}return value};this.cssToString=function(arg){var css=[];for(var selector in arg){var rule=arg[selector];if(rule==Object.prototype[selector]){continue}css.push(selector,"{");for(var property in rule){if(rule[property]==Object.prototype[property]){continue}var value=rule[property];if(Util.UNIT_REMOVAL_PROPERTIES[property]){value=parseInt(value,10)}css.push(property,":",value,";")}css.push("}")}return css.join("")};this.escape=function(str){return escape(str).replace(/\+/g,"%2B")};this.encodeVars=function(vars){return vars.join("&").replace(/%/g,"%25")};this.copyProperties=function(from,to){for(var property in from){if(to[property]===undefined){to[property]=from[property]}}return to};this.domain=function(){var domain="";try{domain=document.domain}catch(e){}return domain};this.domainMatches=function(domain,match){if(match=="*"||match==domain){return true}var wildcard=match.lastIndexOf("*");if(wildcard>-1){match=match.substr(wildcard+1);var matchPosition=domain.lastIndexOf(match);if(matchPosition>-1&&(matchPosition+match.length)==domain.length){return true}}return false};this.uriEncode=function(s){return encodeURI(decodeURIComponent(s))};this.delay=function(ms,func,scope){var args=Array.prototype.slice.call(arguments,3);setTimeout(function(){func.apply(scope,args)},ms)}}Util.UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};Util.SINGLE_WHITESPACE=" ";function DomUtil(sIFR){var self=this;function getDimensionFromStyle(node,property,offsetProperty){var dimension=self.getStyleAsInt(node,property,sIFR.ua.ie);if(dimension==0){dimension=node[offsetProperty];for(var i=3;i<arguments.length;i++){dimension-=self.getStyleAsInt(node,arguments[i],true)}}return dimension}this.getBody=function(){return document.getElementsByTagName("body")[0]||null};this.querySelectorAll=function(selector){return window.parseSelector(selector)};this.addClass=function(name,node){if(node){node.className=((node.className||"")==""?"":node.className+" ")+name}};this.removeClass=function(name,node){if(node){node.className=node.className.replace(new RegExp("(^|\\s)"+name+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1")}};this.hasClass=function(name,node){return new RegExp("(^|\\s)"+name+"(\\s|$)").test(node.className)};this.hasOneOfClassses=function(names,node){for(var i=0;i<names.length;i++){if(this.hasClass(names[i],node)){return true}}return false};this.ancestorHasClass=function(node,name){node=node.parentNode;while(node&&node.nodeType==1){if(this.hasClass(name,node)){return true}node=node.parentNode}return false};this.create=function(name,className){var node=document.createElementNS?document.createElementNS(DomUtil.XHTML_NS,name):document.createElement(name);if(className){node.className=className}return node};this.getComputedStyle=function(node,property){var result;if(document.defaultView&&document.defaultView.getComputedStyle){var style=document.defaultView.getComputedStyle(node,null);result=style?style[property]:null}else{if(node.currentStyle){result=node.currentStyle[property]}}return result||""};this.getStyleAsInt=function(node,property,requirePx){var value=this.getComputedStyle(node,property);if(requirePx&&!/px$/.test(value)){return 0}return parseInt(value)||0};this.getWidthFromStyle=function(node){return getDimensionFromStyle(node,"width","offsetWidth","paddingRight","paddingLeft","borderRightWidth","borderLeftWidth")};this.getHeightFromStyle=function(node){return getDimensionFromStyle(node,"height","offsetHeight","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth")};this.getDimensions=function(node){var width=node.offsetWidth;var height=node.offsetHeight;if(width==0||height==0){for(var i=0;i<node.childNodes.length;i++){var child=node.childNodes[i];if(child.nodeType!=1){continue}width=Math.max(width,child.offsetWidth);height=Math.max(height,child.offsetHeight)}}return{width:width,height:height}};this.getViewport=function(){return{width:window.innerWidth||document.documentElement.clientWidth||this.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||this.getBody().clientHeight}};this.blurElement=function(element){try{element.blur();return }catch(e){}var input=this.create("input");input.style.width="0px";input.style.height="0px";element.parentNode.appendChild(input);input.focus();input.blur();input.parentNode.removeChild(input)}}DomUtil.XHTML_NS="http://www.w3.org/1999/xhtml";function UserAgentDetection(sIFR){var ua=navigator.userAgent.toLowerCase();var product=(navigator.product||"").toLowerCase();var platform=navigator.platform.toLowerCase();this.parseVersion=UserAgentDetection.parseVersion;this.macintosh=/^mac/.test(platform);this.windows=/^win/.test(platform);this.quicktime=false;this.opera=/opera/.test(ua);this.konqueror=/konqueror/.test(product);this.ie=false
/*@cc_on || true @*/
;this.ieSupported=this.ie&&!/ppc|smartphone|iemobile|msie\s5\.5/.test(ua)
/*@cc_on && @_jscript_version >= 5.5 @*/
;this.ieWin=this.windows&&this.ie
/*@cc_on && @_jscript_version >= 5.1 @*/
;this.windows=this.windows&&(!this.ie||this.ieWin);this.ieMac=this.macintosh&&this.ie
/*@cc_on && @_jscript_version < 5.1 @*/
;this.macintosh=this.macintosh&&(!this.ie||this.ieMac);this.safari=/safari/.test(ua);this.webkit=!this.konqueror&&/applewebkit/.test(ua);this.khtml=this.webkit||this.konqueror;this.gecko=!this.webkit&&product=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(ua)?this.parseVersion(RegExp.$2):"0";this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.geckoVersion=this.gecko&&/.*rv:\s*([^\)]+)\)\s+gecko/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.konquerorVersion=this.konqueror&&/.*konqueror\/([\d\.]+).*/.exec(ua)?this.parseVersion(RegExp.$1):"0";this.flashVersion=0;if(this.ieWin){var axo;var stop=false;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=this.parseVersion("6");axo.AllowScriptAccess="always"}catch(e){stop=this.flashVersion==this.parseVersion("6")}if(!stop){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}}if(!stop&&axo){this.flashVersion=this.parseVersion(/([\d,?]+)/.exec(axo.GetVariable("$version"))[1].replace(/,/g,"."))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){this.flashVersion=this.parseVersion(navigator.plugins["Shockwave Flash"].description.replace(/\D*(\d+\.?\d*)\s*r(\d+)/,"$1$2"));var i=0;while(this.flashVersion>=UserAgentDetection.MIN_FLASH_VERSION&&i<navigator.mimeTypes.length){var mime=navigator.mimeTypes[i];if(mime.type=="application/x-shockwave-flash"&&mime.enabledPlugin.description.toLowerCase().indexOf("quicktime")>-1){this.flashVersion=this.parseVersion("0");this.quicktime=true}i++}}}this.flash=this.flashVersion>=UserAgentDetection.MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows;this.computedStyleSupport=this.ie||!!document.defaultView.getComputedStyle;this.requiresPrefetch=false;this.fixFocus=this.gecko&&this.windows;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=this.parseVersion("525")||this.konqueror&&this.konquerorMajor>this.parseVersion("03")||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkitVersion<this.parseVersion("523");this.properDocument=typeof (document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&this.computedStyleSupport&&(!this.opera||this.operaVersion>=this.parseVersion("9.50"))&&(!this.webkit||this.webkitVersion>=this.parseVersion("412"))&&(!this.gecko||this.geckoVersion>=this.parseVersion("1.8.0.12"))&&(!this.konqueror)}UserAgentDetection.parseVersion=function(s){return s.replace(/(^|\D)(\d)(?=\D|$)/g,"$10000$2")};UserAgentDetection.MIN_FLASH_VERSION=UserAgentDetection.parseVersion("8");function FragmentIdentifier(sIFR){this.fix=sIFR.ua.ieWin&&window.location.hash!="";var cachedTitle;this.cache=function(){cachedTitle=document.title};function doFix(){document.title=cachedTitle}this.restore=function(){if(this.fix){setTimeout(doFix,0)}}}function PageLoad(sIFR){var dummy=null;function pollLoad(){try{if(sIFR.ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left")}}catch(e){return setTimeout(pollLoad,10)}afterDomLoad()}function afterDomLoad(){if(sIFR.useStyleCheck){checkStyle()}else{if(!sIFR.ua.mustCheckStyle){fire(null,true)}}}function checkStyle(){dummy=sIFR.dom.create("div",ClassNames.DUMMY);sIFR.dom.getBody().appendChild(dummy);pollStyle()}function pollStyle(){if(sIFR.dom.getComputedStyle(dummy,"marginLeft")=="42px"){afterStyle()}else{setTimeout(pollStyle,10)}}function afterStyle(){if(dummy&&dummy.parentNode){dummy.parentNode.removeChild(dummy)}dummy=null;fire(null,true)}function fire(evt,preserveReplacements){sIFR.initialize(preserveReplacements);if(evt&&evt.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",fire,false)}if(window.removeEventListener){window.removeEventListener("load",fire,false)}}}this.attach=function(){if(window.addEventListener){window.addEventListener("load",fire,false)}else{window.attachEvent("onload",fire)}if(!sIFR.useDomLoaded||sIFR.ua.forcePageLoad||sIFR.ua.ie&&window.top!=window){return }if(sIFR.ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",afterDomLoad,false)}else{if(sIFR.ua.ie||sIFR.ua.khtml){pollLoad()}}}}var PREFETCH_COOKIE="sifrFetch";function Prefetch(sIFR){var hasPrefetched=false;this.fetchMovies=function(movies){if(sIFR.setPrefetchCookie&&new RegExp(";?"+PREFETCH_COOKIE+"=true;?").test(document.cookie)){return }try{hasPrefetched=true;prefetch(movies)}catch(e){if(sIFR.debug){throw e}}if(sIFR.setPrefetchCookie){document.cookie=PREFETCH_COOKIE+"=true;path="+sIFR.cookiePath}};this.clear=function(){if(!hasPrefetched){return }try{var nodes=document.getElementsByTagName("script");for(var i=nodes.length-1;i>=0;i--){var node=nodes[i];if(node.type=="sifr/prefetch"){node.parentNode.removeChild(node)}}}catch(e){}};function prefetch(args){for(var i=0;i<args.length;i++){document.write('<script defer type="sifr/prefetch" src="'+args[i].src+'"><\/script>')}}}function BrokenFlashIE(sIFR){var active=sIFR.ua.ie;var fixCallbacks=active&&sIFR.ua.flashVersion<sIFR.ua.parseVersion("9.0.115");var resetMovies={};var registry={};this.register=function(flashNode){if(!active){return }var id=flashNode.id;registry[id]=flashNode;delete resetMovies[id];if(fixCallbacks){window[id]=flashNode}};this.reset=function(){if(!active){return false}for(var i=0;i<sIFR.replacements.length;i++){var flash=sIFR.replacements[i];var flashNode=registry[flash.id];if(!resetMovies[flash.id]&&(!flashNode.parentNode||flashNode.parentNode.nodeType==11)){flash.resetMovie();resetMovies[flash.id]=true}}return true}}function FlashInteractor(sIFR,id,vars,forceWidth,events){this.sIFR=sIFR;this.id=id;this.vars=vars;this.movie=null;this.__forceWidth=forceWidth;this.__events=events;this.__resizing=0}FlashInteractor.prototype={getFlashElement:function(){return document.getElementById(this.id)},getAlternate:function(){return document.getElementById(this.id+"_alternate")},getAncestor:function(){var ancestor=this.getFlashElement().parentNode;return !this.sIFR.dom.hasClass(ClassNames.FIX_FOCUS,ancestor)?ancestor:ancestor.parentNode},available:function(){var flashNode=this.getFlashElement();return flashNode&&flashNode.parentNode},call:function(type){var flashNode=this.getFlashElement();return Function.prototype.apply.call(flashNode[type],flashNode,Array.prototype.slice.call(arguments,1))},attempt:function(){if(!this.available()){return false}try{this.call.apply(this,arguments)}catch(e){if(this.sIFR.debug){throw e}return false}return true},updateVars:function(name,value){for(var i=0;i<this.vars.length;i++){if(this.vars[i].split("=")[0]==name){this.vars[i]=name+"="+value;break}}var vars=this.sIFR.util.encodeVars(this.vars);this.movie.injectVars(this.getFlashElement(),vars);this.movie.injectVars(this.movie.html,vars)},storeSize:function(type,value){this.movie.setSize(type,value);this.updateVars(type,value)},fireEvent:function(name){if(this.available()&&this.__events[name]){this.sIFR.util.delay(0,this.__events[name],this,this)}},resizeFlashElement:function(height,width,firstResize){if(!this.available()){return }this.__resizing++;var flashNode=this.getFlashElement();flashNode.setAttribute("height",height);this.updateVars("renderheight",height);this.storeSize("height",height);if(width!==null){flashNode.setAttribute("width",width);this.movie.setSize("width",width)}if(this.__events.onReplacement){this.sIFR.util.delay(0,this.__events.onReplacement,this,this);delete this.__events.onReplacement}if(firstResize){this.sIFR.util.delay(0,function(){this.attempt("scaleMovie");this.__resizing--},this)}else{this.__resizing--}},blurFlashElement:function(){if(this.available()){this.sIFR.dom.blurElement(this.getFlashElement())}},resetMovie:function(){this.sIFR.util.delay(0,this.movie.reset,this.movie,this.getFlashElement(),this.getAlternate())},resizeAfterScale:function(){if(this.available()&&this.__resizing==0){this.sIFR.util.delay(0,this.resize,this)}},resize:function(){if(!this.available()){return }this.__resizing++;var flashNode=this.getFlashElement();var currentWidth=flashNode.offsetWidth;if(currentWidth==0){return }var originalWidth=flashNode.getAttribute("width");var originalHeight=flashNode.getAttribute("height");var ancestor=this.getAncestor();var minHeight=this.sIFR.dom.getHeightFromStyle(ancestor);flashNode.style.width="1px";flashNode.style.height="1px";ancestor.style.minHeight=minHeight+"px";var nodes=this.getAlternate().childNodes;var clones=[];for(var i=0;i<nodes.length;i++){var node=nodes[i].cloneNode(true);clones.push(node);ancestor.appendChild(node)}var width=this.sIFR.dom.getWidthFromStyle(ancestor);for(var i=0;i<clones.length;i++){ancestor.removeChild(clones[i])}flashNode.style.width=flashNode.style.height=ancestor.style.minHeight="";flashNode.setAttribute("width",this.__forceWidth?width:originalWidth);flashNode.setAttribute("height",originalHeight);if(sIFR.ua.ie){flashNode.style.display="none";var repaint=flashNode.offsetHeight;flashNode.style.display=""}if(width!=currentWidth){if(this.__forceWidth){this.storeSize("width",width)}this.attempt("resize",width)}this.__resizing--},replaceText:function(content,alternate){var escapedContent=this.sIFR.util.escape(content);if(!this.attempt("replaceText",escapedContent)){return false}this.updateVars("content",escapedContent);var node=this.getAlternate();if(alternate){while(node.firstChild){node.removeChild(node.firstChild)}for(var i=0;i<alternate.length;i++){node.appendChild(alternate[i])}}else{try{node.innerHTML=content}catch(e){}}return true},changeCSS:function(css){css=this.sIFR.util.escape(this.sIFR.util.cssToString(this.sIFR.util.convertCssArg(css)));this.updateVars("css",css);return this.attempt("changeCSS",css)}};var MovieCreator=new function(){this.create=function(sIFR,brokenFlash,node,fixFocus,id,src,width,height,vars,wmode,backgroundColor){var klass=sIFR.ua.ie?IEFlashMovie:FlashMovie;return new klass(sIFR,brokenFlash,node,fixFocus,id,src,width,height,["flashvars",vars,"wmode",wmode,"bgcolor",backgroundColor,"allowScriptAccess","always","quality","best"])};function FlashMovie(sIFR,brokenFlash,node,fixFocus,id,src,width,height,params){var object=sIFR.dom.create("object",ClassNames.FLASH);var attrs=["type","application/x-shockwave-flash","id",id,"name",id,"data",src,"width",width,"height",height];for(var i=0;i<attrs.length;i+=2){object.setAttribute(attrs[i],attrs[i+1])}var insertion=object;if(fixFocus){insertion=dom.create("div",ClassNames.FIX_FOCUS);insertion.appendChild(object)}for(var i=0;i<params.length;i+=2){if(params[i]=="name"){continue}var param=dom.create("param");param.setAttribute("name",params[i]);param.setAttribute("value",params[i+1]);object.appendChild(param)}while(node.firstChild){node.removeChild(node.firstChild)}node.appendChild(insertion);this.html=insertion.cloneNode(true)}FlashMovie.prototype={reset:function(flashNode,alternate){flashNode.parentNode.replaceChild(this.html.cloneNode(true),flashNode)},setSize:function(type,value){this.html.setAttribute(type,value)},injectVars:function(flash,encodedVars){var params=flash.getElementsByTagName("param");for(var i=0;i<params.length;i++){if(params[i].getAttribute("name")=="flashvars"){params[i].setAttribute("value",encodedVars);break}}}};function IEFlashMovie(sIFR,brokenFlash,node,fixFocus,id,src,width,height,params){this.dom=sIFR.dom;this.broken=brokenFlash;this.html='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+id+'" width="'+width+'" height="'+height+'" class="'+ClassNames.FLASH+'"><param name="movie" value="'+src+'"></param></object>';var paramsHtml="";for(var i=0;i<params.length;i+=2){paramsHtml+='<param name="'+params[i]+'" value="'+params[i+1]+'"></param>'}this.html=this.html.replace(/(<\/object>)/,paramsHtml+"$1");node.innerHTML=this.html;this.broken.register(node.firstChild)}IEFlashMovie.prototype={reset:function(flashNode,alternate){alternate=alternate.cloneNode(true);var parent=flashNode.parentNode;parent.innerHTML=this.html;this.broken.register(parent.firstChild);parent.appendChild(alternate)},setSize:function(type,value){this.html=this.html.replace(type=="height"?/(height)="\d+"/:/(width)="\d+"/,'$1="'+value+'"')},injectVars:function(flash,encodedVars){if(flash!=this.html){return }this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+encodedVars)}}};this.errors=new Errors(self);var util=this.util=new Util(self);var dom=this.dom=new DomUtil(self);var ua=this.ua=new UserAgentDetection(self);var hacks={fragmentIdentifier:new FragmentIdentifier(self),pageLoad:new PageLoad(self),prefetch:new Prefetch(self),brokenFlashIE:new BrokenFlashIE(self)};this.__resetBrokenMovies=hacks.brokenFlashIE.reset;var replaceKwargsStore={kwargs:[],replaceAll:function(preserve){for(var i=0;i<this.kwargs.length;i++){self.replace(this.kwargs[i])}if(!preserve){this.kwargs=[]}}};this.activate=function(){if(!ua.supported||!this.isEnabled||this.isActive||!isValidDomain()||isFile()){return }if(ua.requiresPrefetch){hacks.prefetch.fetchMovies(arguments)}this.isActive=true;this.setFlashClass();hacks.fragmentIdentifier.cache();if(!this.autoInitialize){return }hacks.pageLoad.attach();if(ua.ie){window.attachEvent("onunload",function(){dom.addClass(ClassNames.UNLOADING,document.documentElement)})}};this.setFlashClass=function(){if(this.hasFlashClassSet){return }dom.addClass(ClassNames.ACTIVE,dom.getBody()||document.documentElement);this.hasFlashClassSet=true};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return }dom.removeClass(ClassNames.ACTIVE,dom.getBody());dom.removeClass(ClassNames.ACTIVE,document.documentElement);this.hasFlashClassSet=false};this.initialize=function(preserveReplacements){if(!this.isActive||!this.isEnabled){return }if(isInitialized){if(!preserveReplacements){replaceKwargsStore.replaceAll(false)}return }isInitialized=true;replaceKwargsStore.replaceAll(preserveReplacements);if(self.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",resize,false)}else{window.attachEvent("onresize",resize)}}hacks.prefetch.clear()};this.replace=function(kwargs,mergeKwargs){if(!ua.supported){return }if(mergeKwargs){kwargs=util.copyProperties(kwargs,mergeKwargs)}if(!isInitialized){return replaceKwargsStore.kwargs.push(kwargs)}if(this.onReplacementStart){this.onReplacementStart(kwargs)}var nodes=kwargs.elements||dom.querySelectorAll(kwargs.selector);if(nodes.length==0){return }var src=getSource(kwargs.src);var css=util.convertCssArg(kwargs.css);var filters=getFilters(kwargs.filters);var forceSingleLine=kwargs.forceSingleLine===true;var preventWrap=kwargs.preventWrap===true&&!forceSingleLine;var fitExactly=forceSingleLine||(kwargs.fitExactly==null?this.fitExactly:kwargs.fitExactly)===true;var forceWidth=fitExactly||(kwargs.forceWidth==null?this.forceWidth:kwargs.forceWidth)===true;var ratios=kwargs.ratios||[];var pixelFont=kwargs.pixelFont===true;var tuneHeight=parseInt(kwargs.tuneHeight)||0;var events=!!kwargs.onRelease||!!kwargs.onRollOver||!!kwargs.onRollOut;if(fitExactly){util.extractFromCss(css,".sIFR-root","text-align",true)}var fontSize=util.extractFromCss(css,".sIFR-root","font-size",true)||"0";var backgroundColor=util.extractFromCss(css,".sIFR-root","background-color",true)||"#FFFFFF";var kerning=util.extractFromCss(css,".sIFR-root","kerning",true)||"";var opacity=util.extractFromCss(css,".sIFR-root","opacity",true)||"100";var cursor=util.extractFromCss(css,".sIFR-root","cursor",true)||"default";var leading=parseInt(util.extractFromCss(css,".sIFR-root","leading"))||0;var gridFitType=kwargs.gridFitType||(util.extractFromCss(css,".sIFR-root","text-align")=="right")?"subpixel":"pixel";var textTransform=this.forceTextTransform===false?"none":util.extractFromCss(css,".sIFR-root","text-transform",true)||"none";fontSize=/^\d+(px)?$/.test(fontSize)?parseInt(fontSize):0;opacity=parseFloat(opacity)<1?100*parseFloat(opacity):opacity;var cssText=kwargs.modifyCss?"":util.cssToString(css);var wmode=kwargs.wmode||"";if(!wmode){if(kwargs.transparent){wmode="transparent"}else{if(kwargs.opaque){wmode="opaque"}}}if(wmode=="transparent"){if(!ua.transparencySupport){wmode="opaque"}else{backgroundColor="transparent"}}for(var i=0;i<nodes.length;i++){var node=nodes[i];if(dom.hasOneOfClassses(ClassNames.IGNORE_CLASSES,node)||dom.ancestorHasClass(node,ClassNames.ALTERNATE)){continue}var dimensions=dom.getDimensions(node);var height=dimensions.height;var width=dimensions.width;var display=dom.getComputedStyle(node,"display");if(!height||!width||!display||display=="none"){continue}width=dom.getWidthFromStyle(node);var size,lines;if(!fontSize){var calculation=calculate(node);size=Math.min(this.MAX_FONT_SIZE,Math.max(this.MIN_FONT_SIZE,calculation.fontSize));if(pixelFont){size=Math.max(8,8*Math.round(size/8))}lines=calculation.lines;if(isNaN(lines)||!isFinite(lines)||lines==0){lines=1}if(lines>1&&leading){height+=Math.round((lines-1)*leading)}}else{size=fontSize;lines=1}var alternate=dom.create("span",ClassNames.ALTERNATE);var contentNode=node.cloneNode(true);node.parentNode.appendChild(contentNode);for(var j=0,l=contentNode.childNodes.length;j<l;j++){alternate.appendChild(contentNode.childNodes[j].cloneNode(true))}if(kwargs.modifyContent){kwargs.modifyContent(contentNode,kwargs.selector)}if(kwargs.modifyCss){cssText=kwargs.modifyCss(css,contentNode,kwargs.selector)}var content=parseContent(contentNode,textTransform,kwargs.uriEncode);contentNode.parentNode.removeChild(contentNode);if(kwargs.modifyContentString){content.text=kwargs.modifyContentString(content.text,kwargs.selector)}if(content.text==""){continue}height=Math.round(lines*size);var renderHeight=Math.round(lines*getRatio(size,ratios)*size)+this.FLASH_PADDING_BOTTOM+tuneHeight;var forcedWidth=forceWidth?width:"100%";var id="sIFR_replacement_"+elementCount++;var vars=["id="+id,"content="+util.escape(content.text),"width="+width,"height="+height,"renderheight="+renderHeight,"link="+util.escape(content.primaryLink.href||""),"target="+util.escape(content.primaryLink.target||""),"size="+size,"css="+util.escape(cssText),"cursor="+cursor,"tunewidth="+(kwargs.tuneWidth||0),"tuneheight="+tuneHeight,"offsetleft="+(kwargs.offsetLeft||""),"offsettop="+(kwargs.offsetTop||""),"fitexactly="+fitExactly,"preventwrap="+preventWrap,"forcesingleline="+forceSingleLine,"antialiastype="+(kwargs.antiAliasType||""),"thickness="+(kwargs.thickness||""),"sharpness="+(kwargs.sharpness||""),"kerning="+kerning,"gridfittype="+gridFitType,"flashfilters="+filters,"opacity="+opacity,"blendmode="+(kwargs.blendMode||""),"selectable="+(kwargs.selectable==null?"true":kwargs.selectable===true),"fixhover="+(this.fixHover===true),"events="+events,"version="+this.VERSION];var encodedVars=util.encodeVars(vars);var interactor=new FlashInteractor(self,id,vars,forceWidth,{onReplacement:kwargs.onReplacement,onRollOver:kwargs.onRollOver,onRollOut:kwargs.onRollOut,onRelease:kwargs.onRelease});interactor.movie=MovieCreator.create(sIFR,hacks.brokenFlashIE,node,ua.fixFocus&&kwargs.fixFocus,id,src,forcedWidth,renderHeight,encodedVars,wmode,backgroundColor);this.replacements.push(interactor);this.replacements[id]=interactor;if(kwargs.selector){if(!this.replacements[kwargs.selector]){this.replacements[kwargs.selector]=[interactor]}else{this.replacements[kwargs.selector].push(interactor)}}alternate.setAttribute("id",id+"_alternate");node.appendChild(alternate);dom.addClass(ClassNames.REPLACED,node)}hacks.fragmentIdentifier.restore()};this.getReplacementByFlashElement=function(node){for(var i=0;i<self.replacements.length;i++){if(self.replacements[i].id==node.getAttribute("id")){return self.replacements[i]}}};this.redraw=function(){for(var i=0;i<self.replacements.length;i++){self.replacements[i].resetMovie()}};function isValidDomain(){if(self.domains.length==0){return true}var domain=util.domain();for(var i=0;i<self.domains.length;i++){if(util.domainMatches(domain,self.domains[i])){return true}}return false}function isFile(){if(document.location.protocol=="file:"){if(self.debug){self.errors.fire("isFile")}return true}return false}function getSource(src){if(ua.ie&&src.charAt(0)=="/"){src=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+src}return src}function getRatio(size,ratios){for(var i=0;i<ratios.length;i+=2){if(size<=ratios[i]){return ratios[i+1]}}return ratios[ratios.length-1]||1}function getFilters(obj){var filters=[];for(var filter in obj){if(obj[filter]==Object.prototype[filter]){continue}var properties=obj[filter];filter=[filter.replace(/filter/i,"")+"Filter"];for(var property in properties){if(properties[property]==Object.prototype[property]){continue}filter.push(property+":"+util.escape(util.toJson(properties[property],util.toHexString)))}filters.push(filter.join(","))}return util.escape(filters.join(";"))}function resize(evt){var current=resize.viewport;var viewport=dom.getViewport();if(current&&viewport.width==current.width&&viewport.height==current.height){return }resize.viewport=viewport;if(self.replacements.length==0){return }if(resize.timer){clearTimeout(resize.timer)}resize.timer=setTimeout(function(){delete resize.timer;for(var i=0;i<self.replacements.length;i++){self.replacements[i].resize()}},200)}function calculate(node){var fontSize,lines;if(!ua.ie){fontSize=dom.getStyleAsInt(node,"lineHeight");lines=Math.floor(dom.getStyleAsInt(node,"height")/fontSize)}else{if(ua.ie){var fontSize=dom.getComputedStyle(node,"fontSize");if(fontSize.indexOf("px")>0){fontSize=parseInt(fontSize)}else{var html=node.innerHTML;node.style.visibility="visible";node.style.overflow="visible";node.style.position="static";node.style.zoom="normal";node.style.writingMode="lr-tb";node.style.width=node.style.height="auto";node.style.maxWidth=node.style.maxHeight=node.style.styleFloat="none";var rectNode=node;var hasLayout=node.currentStyle.hasLayout;if(hasLayout){node.innerHTML='<div class="'+ClassNames.LAYOUT+'">X<br>X<br>X</div>';rectNode=node.firstChild}else{node.innerHTML="X<br>X<br>X"}var rects=rectNode.getClientRects();fontSize=rects[1].bottom-rects[1].top;fontSize=Math.ceil(fontSize*0.8);if(hasLayout){node.innerHTML='<div class="'+ClassNames.LAYOUT+'">'+html+"</div>";rectNode=node.firstChild}else{node.innerHTML=html}rects=rectNode.getClientRects();lines=rects.length;if(hasLayout){node.innerHTML=html}node.style.visibility=node.style.width=node.style.height=node.style.maxWidth=node.style.maxHeight=node.style.overflow=node.style.styleFloat=node.style.position=node.style.zoom=node.style.writingMode=""}}}return{fontSize:fontSize,lines:lines}}function parseContent(source,textTransform,uriEncode){uriEncode=uriEncode||util.uriEncode;var stack=[],content=[];var primaryLink=null;var nodes=source.childNodes;var whiteSpaceEnd=false,firstText=false;var i=0;while(i<nodes.length){var node=nodes[i];if(node.nodeType==3){var text=util.textTransform(textTransform,util.normalize(node.nodeValue)).replace(/</g,"&lt;");if(whiteSpaceEnd&&firstText){text=text.replace(/^\s+/,"")}content.push(text);whiteSpaceEnd=/\s$/.test(text);firstText=false}if(node.nodeType==1&&!/^(style|script)$/i.test(node.nodeName)){var attributes=[];var nodeName=node.nodeName.toLowerCase();var className=node.className||"";if(/\s+/.test(className)){if(className.indexOf(ClassNames.CLASS)>-1){className=className.match("(\\s|^)"+ClassNames.CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{className=className.match(/^([^\s]+)/)[1]}}if(className!=""){attributes.push('class="'+className+'"')}if(nodeName=="a"){var href=uriEncode(node.getAttribute("href")||"");var target=node.getAttribute("target")||"";attributes.push('href="'+href+'"','target="'+target+'"');if(!primaryLink){primaryLink={href:href,target:target}}}content.push("<"+nodeName+(attributes.length>0?" ":"")+attributes.join(" ")+">");firstText=true;if(node.hasChildNodes()){stack.push(i);i=0;nodes=node.childNodes;continue}else{if(!/^(br|img)$/i.test(node.nodeName)){content.push("</",node.nodeName.toLowerCase(),">")}}}if(stack.length>0&&!node.nextSibling){do{i=stack.pop();nodes=node.parentNode.parentNode.childNodes;node=nodes[i];if(node){content.push("</",node.nodeName.toLowerCase(),">")}}while(i==nodes.length-1&&stack.length>0)}i++}return{text:content.join("").replace(/^\s+|\s+$|\s*(<br>)\s*/g,"$1"),primaryLink:primaryLink||{}}}};var parseSelector=(function(){var B=/\s*,\s*/;var A=/\s*([\s>+~(),]|^|$)\s*/g;var L=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var F=/(^|\))[^\s>+~]/g;var M=/(\)|^)/;var K=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function H(R,P){P=P||document.documentElement;var S=R.split(B),X=[];for(var U=0;U<S.length;U++){var N=[P],W=G(S[U]);for(var T=0;T<W.length;){var Q=W[T++],O=W[T++],V="";if(W[T]=="("){while(W[T++]!=")"&&T<W.length){V+=W[T]}V=V.slice(0,-1)}N=I(N,Q,O,V)}X=X.concat(N)}return X}function G(N){var O=N.replace(A,"$1").replace(L,"$1*$2").replace(F,D);return O.match(K)||[]}function D(N){return N.replace(M,"$1 ")}function I(N,P,Q,O){return(H.selectors[P])?H.selectors[P](N,Q,O):[]}var E={toArray:function(O){var N=[];for(var P=0;P<O.length;P++){N.push(O[P])}return N}};var C={isTag:function(O,N){return(N=="*")||(N.toLowerCase()==O.nodeName.toLowerCase())},previousSiblingElement:function(N){do{N=N.previousSibling}while(N&&N.nodeType!=1);return N},nextSiblingElement:function(N){do{N=N.nextSibling}while(N&&N.nodeType!=1);return N},hasClass:function(N,O){return(O.className||"").match("(^|\\s)"+N+"(\\s|$)")},getByTag:function(N,O){return O.getElementsByTagName(N)}};var J={"#":function(N,P){for(var O=0;O<N.length;O++){if(N[O].getAttribute("id")==P){return[N[O]]}}return[]}," ":function(O,Q){var N=[];for(var P=0;P<O.length;P++){N=N.concat(E.toArray(C.getByTag(Q,O[P])))}return N},">":function(O,R){var N=[];for(var Q=0,S;Q<O.length;Q++){S=O[Q];for(var P=0,T;P<S.childNodes.length;P++){T=S.childNodes[P];if(T.nodeType==1&&C.isTag(T,R)){N.push(T)}}}return N},".":function(O,Q){var N=[];for(var P=0,R;P<O.length;P++){R=O[P];if(C.hasClass([Q],R)){N.push(R)}}return N},":":function(N,P,O){return(H.pseudoClasses[P])?H.pseudoClasses[P](N,O):[]}};H.selectors=J;H.pseudoClasses={};H.util=E;H.dom=C;return H})();