var sIFR=new function(){
var SIFR=this;var CSS_ACTIVE="sIFR-active";var CSS_UNLOADING="sIFR-unloading";var CSS_REPLACED="sIFR-replaced";var CSS_FLASH="sIFR-flash";var CSS_IGNORE="sIFR-ignore";var CSS_ALTERNATE="sIFR-alternate";var CSS_CLASS="sIFR-class";var CSS_LAYOUT="sIFR-layout";var CSS_FIX_FOCUS="sIFR-fixfocus";var CSS_DUMMY="sIFR-dummy";var CSS_ZOOM_DETECT="sIFR-zoomdetect";var MIN_FONT_SIZE=6;var MAX_FONT_SIZE=126;var MIN_FLASH_VERSION=8;var PREFETCH_COOKIE="SIFR-PREFETCHED";var DEFAULT_RATIOS=[];var FLASH_PADDING_BOTTOM=5;var VERSION="382";this.isActive=false;this.isEnabled=true;this.preserveSingleWhitespace=false;this.fixWrap=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=true;this.cookiePath="/";this.domains=[];this.fromLocal=false;this.forceClear=false;this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=true;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.callbacks=[];var elementCount=0;var hasPrefetched=false,isInitialized=false;function DomUtil(){var A="http://www.w3.org/1999/xhtml";this.getBody=function(){return document.getElementsByTagName("body")[0]||null};this.querySelectorAll=function(C){return window.parseSelector(C)};this.addClass=function(C,D){if(D){D.className=((D.className||"")==""?"":D.className+" ")+C}};this.removeClass=function(C,D){if(D){D.className=D.className.replace(new RegExp("(^|\\s)"+C+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1")}};this.hasClass=function(C,D){return new RegExp("(^|\\s)"+C+"(\\s|$)").test(D.className)};this.hasOneOfClassses=function(E,D){for(var C=0;C<E.length;C++){if(this.hasClass(E[C],D)){return true}}return false};this.create=function(C){if(document.createElementNS){return document.createElementNS(A,C)}return document.createElement(C)};this.nodeFromHtml=function(D){var C=this.create("div");C.innerHTML=D;return C.firstChild};this.getComputedStyle=function(E,F){var C;if(document.defaultView&&document.defaultView.getComputedStyle){var D=document.defaultView.getComputedStyle(E,null);C=D?D[F]:null}else{if(E.currentStyle){C=E.currentStyle[F]}}return C||""};this.getStyleAsInt=function(D,F,C){var E=this.getComputedStyle(D,F);if(C&&!/px$/.test(E)){return 0}E=parseInt(E);return isNaN(E)?0:E};this.getWidthFromStyle=function(F){var E=this.getStyleAsInt(F,"width",ua.ie);if(E==0){var H=this.getStyleAsInt(F,"paddingRight",true);var D=this.getStyleAsInt(F,"paddingLeft",true);var C=this.getStyleAsInt(F,"borderRightWidth",true);var G=this.getStyleAsInt(F,"borderLeftWidth",true);E=F.offsetWidth-D-H-G-C}return E};this.getHeightFromStyle=function(F){var C=this.getStyleAsInt(F,"height",ua.ie);if(C==0){var E=this.getStyleAsInt(F,"paddingTop",true);var G=this.getStyleAsInt(F,"paddingBottom",true);var H=this.getStyleAsInt(F,"borderTopHeight",true);var D=this.getStyleAsInt(F,"borderBottomHeight",true);C=F.offsetHeight-G-E-D-H}return C};this.blurElement=function(D){if(ua.gecko){D.blur();return }var C=B.create("input");C.style.width="0px";C.style.height="0px";D.parentNode.appendChild(C);C.focus();C.blur();C.parentNode.removeChild(C)};this.getDimensions=function(F){var E=F.offsetWidth;var C=F.offsetHeight;if(E==0||C==0){for(var D=0;D<F.childNodes.length;D++){var G=F.childNodes[D];if(G.nodeType!=1){continue}E=Math.max(E,G.offsetWidth);C=Math.max(C,G.offsetHeight)}}return{width:E,height:C}};this.contentIsLink=function(D){var F=false;for(var C=0;C<D.childNodes.length;C++){var G=D.childNodes[C];if(G.nodeType==3&&!G.nodeValue.match(/^\s*$/)){return false}else{if(G.nodeType!=1){continue}}var E=G.nodeName.toLowerCase()=="a";if(!E){return false}else{F=true}}return F};var B=this;this.swf={create:function(I,G,D,E,L,C,J,F,K){var H=I.object(G,D,C,E,L);return I.params(H,"flashvars",J,"wmode",F,"bgcolor",K,"allowScriptAccess","always","quality","best")},ie:{object:function(D,G,F,E,C){return"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=\""+G+"\" width=\""+E+"\" height=\""+C+"\" class=\""+CSS_FLASH+"\"><param name=\"movie\" value=\""+F+"\"></param></object><script event=FSCommand(info,args) for="+G+">"+G+"_DoFSCommand(info, args);</script>"},params:function(D){var E="";for(var C=1;C<arguments.length;C+=2){E+="<param name=\""+arguments[C]+"\" value=\""+arguments[C+1]+"\"></param>"}return D.replace(/(<\/object>)/,E+"$1")},insert:function(D,C){D.innerHTML=C;return C}},other:{object:function(E,J,I,F,C){var H=B.create("object");var D=["type","application/x-shockwave-flash","id",J,"name",J,"data",I,"width",F,"height",C];while(D.length){H.setAttribute(D.shift(),D.shift())}H.className=CSS_FLASH;if(!E){return{root:H,obj:H}}var G=B.create("div");G.className=CSS_FIX_FOCUS;G.appendChild(H);return{root:G,obj:H}},params:function(D){for(var C=1;C<arguments.length;C+=2){if(arguments[C]=="name"){continue}var E=B.create("param");E.setAttribute("name",arguments[C]);E.setAttribute("value",arguments[C+1]);D.obj.appendChild(E)}return D.root},insert:function(D,C){while(D.firstChild){D.removeChild(D.firstChild)}D.appendChild(C);return C.cloneNode(true)}}}};var dom=this.dom=new DomUtil();function UserAgentDetection() {var ua = navigator.userAgent.toLowerCase();var product = (navigator.product || '').toLowerCase();this.macintosh=ua.indexOf('mac') > -1;this.windows=ua.indexOf('windows') > -1;this.quicktime=false;this.opera=ua.indexOf('opera') > -1;this.konqueror=product.indexOf('konqueror') > -1;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.ie && this.windows/*@cc_on && @_jscript_version >= 5.1 @*/;this.windows=this.windows && (!this.ie || this.ieWin);this.ieMac=this.ie && this.macintosh/*@cc_on && @_jscript_version < 5.1 @*/;this.macintosh=this.macintosh && (!this.ie || this.ieMac);this.safari=ua.indexOf('safari') > -1;this.webkit=ua.indexOf('applewebkit') > -1 && !this.konqueror;this.khtml=this.webkit || this.konqueror;this.gecko=!this.webkit && product == 'gecko';this.ieVersion=this.ie&& /.*msie\s(\d\.\d)/.exec(ua) ? parseFloat(RegExp.$1) : 0;this.operaVersion=this.opera&& /.*opera(\s|\/)(\d+\.\d+)/.exec(ua) ? parseFloat(RegExp.$2) : 0;this.webkitVersion=this.webkit&& /.*applewebkit\/(\d+).*/.exec(ua) ? parseFloat(RegExp.$1) : 0;this.geckoBuildDate=this.gecko&& /.*gecko\/(\d{8}).*/.exec(ua) ? parseFloat(RegExp.$1) : 0;this.konquerorMajor=this.konqueror&& /.*konqueror\/(\d).*/.exec(ua) ? parseFloat(RegExp.$1) : 0;this.konquerorMinor=this.konqueror&& /.*khtml\/\d\.(\d).*/.exec(ua) ? parseFloat(RegExp.$1) : 0;this.konquerorSmall=this.konqueror&& /.*khtml\/\d\.\d\.(\d).*/.exec(ua) ? parseFloat(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=6;axo.AllowScriptAccess="always"}catch(e){stop=this.flashVersion==6}if(!stop){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}}if(!stop&&axo){this.flashVersion=parseFloat(/([\d,?]+)/.exec(axo.GetVariable("$version"))[1].replace(/,/g,"."))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){var flashPlugin=navigator.plugins["Shockwave Flash"];this.flashVersion=parseFloat(/(\d+\.?\d*)/.exec(flashPlugin.description)[1]);var i=0;while(this.flashVersion>=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=0;this.quicktime=true}i++}}}this.flash=this.flashVersion>=MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows;this.computedStyleSupport=this.ie||document.defaultView&&document.defaultView.getComputedStyle&&(!this.gecko||this.geckoBuildDate>=20030624);this.requiresPrefetch=this.ieWin||this.khtml;this.fixFocus=this.gecko&&this.windows&&this.geckoBuildDate>20061206;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=525||this.konqueror&&this.konquerorMajor>3||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkit<523;this.properDocument=typeof (document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&(!this.opera)&&(!this.webkit||this.webkitVersion>=412)&&(!this.konqueror)&&this.computedStyleSupport&&(!this.gecko||this.geckoBuildDate>20040804)};var ua = this.ua = new UserAgentDetection();function Util(){var B={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};var A=" ";function C(D){return D.toUpperCase()}this.normalize=function(D){if(SIFR.preserveSingleWhitespace){return D.replace(/\s/g,A)}return D.replace(/(\n|\r)+/g,A).replace(/(\s)\s+/g,"$1").replace(/\xA0/,A)};this.textTransform=function(G,H){switch(G){case"uppercase":H=H.toUpperCase();break;case"lowercase":H=H.toLowerCase();break;case"capitalize":var D=H;H=H.replace(/^\w|\s\w/g,C);if(H.indexOf("function capitalize")!=-1){var E=D.replace(/(^|\s)(\w)/g,"$1$1$2$2").split(/^\w|\s\w/g);H="";for(var F=0;F<E.length;F++){H+=E[F].charAt(0).toUpperCase()+E[F].substring(1)}}break}return H};this.toHexString=function(D){if(typeof (D)!="string"||!D.charAt(0)=="#"||D.length!=4&&D.length!=7){return D}D=D.replace(/#/,"");if(D.length==3){D=D.replace(/(.)(.)(.)/,"$1$1$2$2$3$3")}return"0x"+D};this.toJson=function(E){var D="";switch(typeof (E)){case"string":D="\""+E+"\"";break;case"number":case"boolean":D=E.toString();break;case"object":D=[];for(var F in E){if(E[F]==Object.prototype[F]){continue}D.push("\""+F+"\":"+util.toJson(E[F]))}D="{"+D.join(",")+"}";break}return D};this.convertCssArg=function(D){if(!D){return{}}if(typeof (D)=="object"){if(D.constructor==Array){D=D.join("")}else{return D}}var I={};var J=D.split("}");for(var G=0;G<J.length;G++){var H=J[G].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!H||H.length!=3){continue}if(!I[H[1]]){I[H[1]]={}}var F=H[2].split(";");for(var E=0;E<F.length;E++){var K=F[E].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!K||K.length!=3){continue}I[H[1]][K[1]]=K[2].replace(/\s+$/,"")}}return I};this.extractFromCss=function(F,E,H,D){var G=null;if(F&&F[E]&&F[E][H]){G=F[E][H];if(D){delete F[E][H]}}return G};this.cssToString=function(E){var F=[];for(var D in E){var I=E[D];if(I==Object.prototype[D]){continue}F.push(D,"{");for(var H in I){if(I[H]==Object.prototype[H]){continue}var G=I[H];if(B[H]){G=parseInt(G,10)}F.push(H,":",G,";")}F.push("}")}return F.join("")};this.escape=function(D){return escape(D).replace(/\+/g,"%2B")};this.copyProperties=function(F,E){for(var D in F){if(E[D]===undefined){E[D]=F[D]}}return E};this.domain=function(){var D="";try{D=document.domain}catch(E){}return D};this.domainMatches=function(G,F){if(F=="*"||F==G){return true}var E=F.lastIndexOf("*");if(E>-1){F=F.substr(E+1);var D=G.lastIndexOf(F);if(D>-1&&(D+F.length)==G.length){return true}}return false};this.uriEncode=function(D){return encodeURI(decodeURIComponent(D))}}var util=this.util=new Util();var hacks={};function FragmentIdentifier(){this.fix=true;var A;this.cache=function(){A=document.title};function B(){document.title=A}this.restore=function(){if(this.fix){setTimeout(B,0)}}}hacks.fragmentIdentifier=new FragmentIdentifier();function PageLoad(){var F=null;function A(){if(SIFR.useStyleCheck){C()}else{if(!ua.mustCheckStyle){D(null,true)}}}function C(){F=dom.create("div");F.className=CSS_DUMMY;dom.getBody().appendChild(F);B()}function B(){if(dom.getComputedStyle(F,"marginLeft")=="42px"){E()}else{setTimeout(B,10)}}function E(){if(F&&F.parentNode){F.parentNode.removeChild(F)}F=null;D(null,true)}function D(G,H){SIFR.initialize(H)}this.attach=function(){window.addEvent("load",D);if(!SIFR.useDomLoaded||ua.forcePageLoad||ua.ie&&window.top!=window){return }window.addEvent("domready",A)}}hacks.pageLoad=new PageLoad();this.hacks={fragmentIdentifier:hacks.fragmentIdentifier};function Errors(){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.";this.getSource="sIFR: Could not determine appropriate source"}this.errors=new Errors();function FlashInteractor(D,C,A,B){this.id=D;this.vars=C;this._events=B;this._forceWidth=A;this._firedReplacementEvent=!(B.onReplacement!=null);this._rescale=false;this.html=null}FlashInteractor.prototype.getFlashElement=function(){return document.getElementById(this.id)};FlashInteractor.prototype.available=function(){var A=this.getFlashElement();return A&&A.parentNode};FlashInteractor.prototype.handle=function(F,B){if(!this.available()){return }switch(/(FSCommand\:)?(.+)/.exec(F)[2]){case"init":this._rescale=true;break;case"resize":var E=this.getFlashElement();var D=B.split(/\:|,/);E.setAttribute(D[0],D[1]);this.updateVars("renderheight",D[1]);this.storeSize(D[0],D[1]);if(D.length>2){E.style[D[2]]=D[3]+"px";this.storeSize(D[2],D[3])}if(ua.khtml){var C=E.offsetHeight}if(!this._firedReplacementEvent){this._events.onReplacement(this);this._firedReplacementEvent=true}if(this._rescale){this._rescale=false;var A=this;setTimeout(function(){A.call("scale")},0)}break;case"resetmovie":this.resetMovie();break;case"blur":dom.blurElement(this.getFlashElement());break;case"event":if(this._events[B]){this._events[B](this)}break;default:if(this.debugHandler&&/(FSCommand\:)?debug/.test(F)){this.debugHandler(F,B)}}};FlashInteractor.prototype.call=function(A,C){if(!this.available()){return false}var B=this.getFlashElement();try{B.SetVariable("callbackType",A);B.SetVariable("callbackValue",C);B.SetVariable("callbackTrigger",true)}catch(D){return false}return true};FlashInteractor.prototype.replaceText=function(D,F){var B=util.escape(D);if(this.call("replacetext",B)){this.updateVars("content",B);var C=this.getAlternate();if(F){while(C.firstChild){C.removeChild(C.firstChild)}for(var A=0;A<F.length;A++){C.appendChild(F[A])}}else{try{C.innerHTML=D}catch(E){}}return true}return false};FlashInteractor.prototype.updateVars=function(A,C){for(var B=0;B<this.vars.length;B++){if(this.vars[B].split("=")[0]==A){this.vars[B]=A+"="+C;break}}if(!ua.ie){this.injectVars(this.getFlashElement());this.injectVars(this.html)}};FlashInteractor.prototype.storeSize=function(A,B){if(ua.ie){this.html=this.html.replace(A=="height"?/(height)="\d+"/:/(width)="\d+"/,"$1=\""+B+"\"");this.updateVars(A,B)}else{this.html.setAttribute(A,B);this.updateVars(A,B)}};FlashInteractor.prototype.injectVars=function(A){var C=A.getElementsByTagName("param");for(var B=0;B<C.length;B++){if(C[B].getAttribute("name")=="flashvars"){C[B].setAttribute("value",encodeVars(this.vars));break}}};FlashInteractor.prototype.resetMovie=function(){if(!this.available()){return }var B=this.getFlashElement();var A=B.parentNode;if(ua.ie){this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+encodeVars(this.vars));A.replaceChild(dom.nodeFromHtml(this.html),B)}else{A.replaceChild(this.html.cloneNode(true),B)}};FlashInteractor.prototype.resize=function(){if(!this.available()){return }var E=this.getFlashElement();var D=E.offsetWidth;if(D==0){return }var C=E.getAttribute("width");var H=E.getAttribute("height");var I=this.getAncestor();var K=dom.getHeightFromStyle(I);E.style.width="0px";E.style.height="0px";I.style.minHeight=K+"px";var A=this.getAlternate().childNodes;var J=[];for(var G=0;G<A.length;G++){var F=A[G].cloneNode(true);J.push(F);I.appendChild(F)}var B=dom.getWidthFromStyle(I);for(var G=0;G<J.length;G++){I.removeChild(J[G])}E.style.width=E.style.height=I.style.minHeight="";E.setAttribute("width",this._forceWidth?B:C);E.setAttribute("height",H);if(B!=D){if(this._forceWidth){this.storeSize("width",B)}this.call("resize",B)}};FlashInteractor.prototype.changeCSS=function(A){A=util.escape(util.cssToString(util.convertCssArg(A)));this.updateVars("css",A);return this.call("changecss",A)};FlashInteractor.prototype.getAlternate=function(){return document.getElementById(this.id+"_alternate")};FlashInteractor.prototype.getAncestor=function(){var A=this.getFlashElement().parentNode;return !dom.hasClass(CSS_FIX_FOCUS,A)?A:A.parentNode};var replaceKwargsStore={kwargs:[],replaceAll:function(B){for(var A=0;A<this.kwargs.length;A++){SIFR.replace(this.kwargs[A])}if(!B){this.kwargs=[]}}};function isValidDomain(){if(SIFR.domains.length==0){return true}var C=util.domain();for(var B=0;B<SIFR.domains.length;B++){var A=SIFR.domains[B];if(util.domainMatches(C,A)){return true}}return false}function isFile(){if(!SIFR.fromLocal&&document.location.protocol=="file:"){if(SIFR.debug){SIFR.errors.fire("isFile")}return true}return false}function resize(B){var A=resize.viewport;resize.viewport={width:window.innerWidth||document.documentElement.clientWidth||dom.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||dom.getBody().clientHeight};if(A&&resize.viewport.width==A.width&&resize.viewport.height==A.height){return }if(resize.timer){clearTimeout(resize.timer)}resize.timer=setTimeout(function(){delete resize.timer;for(var C=0;C<SIFR.callbacks.length;C++){SIFR.callbacks[C].resize()}},200)}this.activate=function(){if(!ua.supported||!this.isEnabled||this.isActive||!isValidDomain()||isFile()){return }if(arguments.length>0){this.prefetch.apply(this,arguments)}this.isActive=true;this.setFlashClass();hacks.fragmentIdentifier.fix=ua.ieWin&&hacks.fragmentIdentifier.fix&&window.location.hash!="";if(hacks.fragmentIdentifier.fix){hacks.fragmentIdentifier.cache()}if(!this.autoInitialize){return }hacks.pageLoad.attach();if(ua.ie){window.attachEvent("onunload",function(){dom.addClass(CSS_UNLOADING,document.documentElement)})}};this.setFlashClass=function(){if(this.hasFlashClassSet){return }dom.addClass(CSS_ACTIVE,dom.getBody()||document.documentElement);this.hasFlashClassSet=true};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return }dom.removeClass(CSS_ACTIVE,dom.getBody());dom.removeClass(CSS_ACTIVE,document.documentElement);this.hasFlashClassSet=false};this.initialize=function(A){if(!this.isActive||!this.isEnabled){return }if(isInitialized){if(!A){replaceKwargsStore.replaceAll(false)}return }isInitialized=true;replaceKwargsStore.replaceAll(A);if(SIFR.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",resize,false)}else{window.attachEvent("onresize",resize)}}clearPrefetch()};function getSource(E){if(typeof (E)!="string"){if(E.src){E=E.src}if(typeof (E)!="string"){var B=[];for(var C in E){if(E[C]!=Object.prototype[C]){B.push(C)}}B.sort().reverse();var A="";var D=-1;while(!A&&++D<B.length){if(parseFloat(B[D])<=ua.flashVersion){A=E[B[D]]}}E=A}}if(!E&&SIFR.debug){SIFR.errors.fire("getSource")}if(ua.ie&&E.charAt(0)=="/"){E=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+E}return E}this.prefetch=function(){if((!ua.requiresPrefetch&&!this.isActive)||!ua.supported||!this.isEnabled||!isValidDomain()){return }if(this.setPrefetchCookie&&new RegExp(";?"+PREFETCH_COOKIE+"=true;?").test(document.cookie)){return }try{hasPrefetched=true;if(ua.ieWin){prefetchIexplore(arguments)}else{prefetchLight(arguments)}if(this.setPrefetchCookie){document.cookie=PREFETCH_COOKIE+"=true;path="+this.cookiePath}}catch(A){if(SIFR.debug){throw A}}};function prefetchIexplore(A){for(var B=0;B<A.length;B++){document.write("<script defer type=\"sifr/prefetch\" src=\""+getSource(A[B])+"\"></script>")}}function prefetchLight(A){for(var B=0;B<A.length;B++){new Image().src=getSource(A[B])}}function clearPrefetch(){if(!ua.ieWin||!hasPrefetched){return }try{var A=document.getElementsByTagName("script");for(var B=A.length-1;B>=0;B--){var C=A[B];if(C.type=="sifr/prefetch"){C.parentNode.removeChild(C)}}}catch(D){}}function getRatio(B,C){for(var A=0;A<C.length;A+=2){if(B<=C[A]){return C[A+1]}}return C[C.length-1]||1}function getFilters(E){var C=[];for(var B in E){if(E[B]==Object.prototype[B]){continue}var A=E[B];B=[B.replace(/filter/i,"")+"Filter"];for(var D in A){if(A[D]==Object.prototype[D]){continue}B.push(D+":"+util.escape(util.toJson(util.toHexString(A[D]))))}C.push(B.join(","))}return util.escape(C.join(";"))}function calculate(F){var E,B;if(!ua.ie){E=dom.getStyleAsInt(F,"lineHeight");B=Math.floor(dom.getStyleAsInt(F,"height")/E)}else{if(ua.ie){var G=dom.getComputedStyle(F,"fontSize");if(G.indexOf("px")>0){E=parseInt(G)}else{var D=F.innerHTML;F.style.visibility="visible";F.style.overflow="visible";F.style.position="static";F.style.zoom="normal";F.style.writingMode="lr-tb";F.style.width=F.style.height="auto";F.style.maxWidth=F.style.maxHeight=F.style.styleFloat="none";var H=F;var A=F.currentStyle.hasLayout;if(A){F.innerHTML="<div class=\""+CSS_LAYOUT+"\">X<br />X<br />X</div>";H=F.firstChild}else{F.innerHTML="X<br />X<br />X"}var C=H.getClientRects();E=C[1].bottom-C[1].top;E=Math.ceil(E*0.8);if(A){F.innerHTML="<div class=\""+CSS_LAYOUT+"\">"+D+"</div>";H=F.firstChild}else{F.innerHTML=D}C=H.getClientRects();B=C.length;if(A){F.innerHTML=D}F.style.visibility=F.style.width=F.style.height=F.style.maxWidth=F.style.maxHeight=F.style.overflow=F.style.styleFloat=F.style.position=F.style.zoom=F.style.writingMode=""}}}return{lineHeight:E,lines:B}}this.replace=function(R,O){if(!ua.supported){return }if(O){R=util.copyProperties(R,O)}if(!isInitialized){return replaceKwargsStore.kwargs.push(R)}if(SIFR.onReplacementStart){SIFR.onReplacementStart(R)}var n=R.elements;if(!n){n=dom.querySelectorAll(R.selector)}if(n.length==0){return }var Q=getSource(R.src);var s=util.convertCssArg(R.css);var P=getFilters(R.filters);var I=(R.forceClear==null)?SIFR.forceClear:R.forceClear;var o=R.forceSingleLine===true;var K=o||((R.fitExactly==null)?SIFR.fitExactly:R.fitExactly);var Y=K||(R.forceWidth==null?SIFR.forceWidth:R.forceWidth);var t=!!(R.preventWrap&&!o);var q=parseInt(util.extractFromCss(s,".sIFR-root","leading"))||0;var N=util.extractFromCss(s,".sIFR-root","font-size",true)||0;var C=util.extractFromCss(s,".sIFR-root","background-color",true)||"#FFFFFF";var H=util.extractFromCss(s,".sIFR-root","kerning",true)||"";var h=R.gridFitType||util.extractFromCss(s,".sIFR-root","text-align")=="right"?"subpixel":"pixel";var E=SIFR.forceTextTransform?util.extractFromCss(s,".sIFR-root","text-transform",true)||"none":"none";var x=util.extractFromCss(s,".sIFR-root","opacity",true)||"100";var F=util.extractFromCss(s,".sIFR-root","cursor",true)||"default";var a=R.pixelFont||false;var M=R.ratios||DEFAULT_RATIOS;var L=parseInt(R.tuneHeight)||0;var T=!!R.onRelease||!!R.onRollOver||!!R.onRollOut;if(parseInt(N).toString()!=N&&N.indexOf("px")==-1){N=0}else{N=parseInt(N)}if(parseFloat(x)<1){x=100*parseFloat(x)}var X="";if(K){util.extractFromCss(s,".sIFR-root","text-align",true)}if(!R.modifyCss){X=util.cssToString(s)}var f=R.wmode||"";if(!f){if(R.transparent){f="transparent"}else{if(R.opaque){f="opaque"}}}if(f=="transparent"){if(!ua.transparencySupport){f="opaque"}else{C="transparent"}}for(var w=0;w<n.length;w++){var d=n[w];if(dom.hasOneOfClassses([CSS_REPLACED,CSS_IGNORE,CSS_ALTERNATE],d)){continue}var p=dom.getDimensions(d);var D=p.height;var B=p.width;var V=dom.getComputedStyle(d,"display");if(!D||!B||V==null||V=="none"){continue}if(I&&ua.gecko){d.style.clear="both"}var b=null;if(SIFR.fixWrap&&ua.ie&&V=="block"){b=d.innerHTML;d.innerHTML="X"}B=dom.getWidthFromStyle(d);if(b&&SIFR.fixWrap&&ua.ie){d.innerHTML=b}var Z,g;if(!N){var m=calculate(d);Z=Math.min(MAX_FONT_SIZE,Math.max(MIN_FONT_SIZE,m.lineHeight));if(a){Z=Math.max(8,8*Math.round(Z/8))}g=m.lines;if(isNaN(g)||!isFinite(g)||g==0){g=1}if(g>1&&q){D+=Math.round((g-1)*q)}}else{Z=N;g=1}D=Math.round(g*Z);if(I&&ua.gecko){d.style.clear=""}var A=dom.create("span");A.className=CSS_ALTERNATE;var y=d.cloneNode(true);d.parentNode.appendChild(y);for(var v=0,u=y.childNodes.length;v<u;v++){A.appendChild(y.childNodes[v].cloneNode(true))}if(R.modifyContent){R.modifyContent(y,R.selector)}if(R.modifyCss){X=R.modifyCss(s,y,R.selector)}var G=SIFR.fixHover&&dom.contentIsLink(y);var J=handleContent(y,E,R.uriEncode);y.parentNode.removeChild(y);if(R.modifyContentString){J.text=R.modifyContentString(J.text,R.selector)}if(J.text==""){continue}var k=Math.round(g*getRatio(Z,M)*Z)+FLASH_PADDING_BOTTOM+L;var W=Y?B:"100%";var r=["content="+util.escape(J.text),"antialiastype="+(R.antiAliasType||""),"width="+B,"height="+D,"renderheight="+k,"fitexactly="+K,"tunewidth="+(R.tuneWidth||0),"tuneheight="+L,"offsetleft="+(R.offsetLeft||""),"offsettop="+(R.offsetTop||""),"thickness="+(R.thickness||""),"sharpness="+(R.sharpness||""),"kerning="+H,"gridfittype="+h,"flashfilters="+P,"opacity="+x,"blendmode="+(R.blendMode||""),"size="+Z,"css="+util.escape(X),"selectable="+(R.selectable==null?"true":R.selectable),"fixhover="+G,"preventwrap="+t,"forcesingleline="+o,"link="+util.escape(J.primaryLink[0]||""),"target="+util.escape(J.primaryLink[1]||""),"events="+T,"cursor="+F,"version="+VERSION];var S=encodeVars(r);var z="sIFR_callback_"+elementCount++;var e=new FlashInteractor(z,r,Y,{onReplacement:R.onReplacement,onRollOver:R.onRollOver,onRollOut:R.onRollOut,onRelease:R.onRelease});window[z+"_DoFSCommand"]=(function(i){return function(l,j){i.handle(l,j)}})(e);A.setAttribute("id",z+"_alternate");var U=ua.ie?dom.swf.ie:dom.swf.other;var c=dom.swf.create(U,ua.fixFocus&&R.fixFocus,z,W,k,Q,S,f,C);e.html=U.insert(d,c);SIFR.callbacks.push(e);if(R.selector){if(!SIFR.callbacks[R.selector]){SIFR.callbacks[R.selector]=[e]}else{SIFR.callbacks[R.selector].push(e)}}d.appendChild(A);dom.addClass(CSS_REPLACED,d)}hacks.fragmentIdentifier.restore()};this.getCallbackByFlashElement=function(B){for(var A=0;A<SIFR.callbacks.length;A++){if(SIFR.callbacks[A].id==B.getAttribute("id")){return SIFR.callbacks[A]}}};this.redraw=function(){for(var A=0;A<SIFR.callbacks.length;A++){SIFR.callbacks[A].resetMovie()}};function encodeVars(A){return A.join("&").replace(/%/g,"%25")}function handleContent(A,E,N){N=N||util.uriEncode;var L=[],J=[],H=[];var C=A.childNodes;var G=0;while(G<C.length){var D=C[G];if(D.nodeType==3){var O=util.normalize(D.nodeValue);O=util.textTransform(E,O);O=O.replace(/</g,"<");J.push(O)}if(D.nodeType==1){var F=[];var M=D.nodeName.toLowerCase();var K=D.className||"";if(/\s+/.test(K)){if(K.indexOf(CSS_CLASS)>-1){K=K.match("(\\s|^)"+CSS_CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{K=K.match(/^([^\s]+)/)[1]}}if(K!=""){F.push("class=\""+K+"\"")}if(M=="a"){var B=N(D.getAttribute("href")||"");var I=D.getAttribute("target")||"";F.push("href=\""+B+"\"","target=\""+I+"\"");if(H.length==0){H=[B,I]}}J.push("<"+M+(F.length>0?" ":"")+F.join(" ")+">");if(D.hasChildNodes()){L.push(G);G=0;C=D.childNodes;continue}else{if(!/^(br|img)$/i.test(D.nodeName)){J.push("</",D.nodeName.toLowerCase(),">")}}}if(L.length>0&&!D.nextSibling){do{G=L.pop();C=D.parentNode.parentNode.childNodes;D=C[G];if(D){J.push("</",D.nodeName.toLowerCase(),">")}}while(G==C.length-1&&L.length>0)}G++}return{text:J.join("").replace(/\n|\r/g,""),primaryLink:H}}
};
parseSelector = $$;
