(function(){function Z(){var a=navigator,b=a.userAgent;a=a.appVersion;var c=parseFloat(a);if(b.indexOf("Opera")>=0)K=c;var d=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0);if(d)w=parseFloat(a.split("Version/")[1])||parseFloat(a.substr(d+7))>419.3?3:2;if(b.indexOf("AdobeAIR")>=0)$=1;if(a.indexOf("Konqueror")>=0||w)L=c;if(b.indexOf("Gecko")>=0&&!L)M=c;if(M)N=parseFloat(b.split("Firefox/")[1])||undefined;if(document.all&&!K)i=parseFloat(a.split("MSIE ")[1])||undefined;isStandardsMode=document.documentMode?
document.documentMode>5:document.compatMode=="CSS1Compat";if(document.contentType=="application/xhtml+xml")u=true;else if(typeof XMLDocument!="undefined"&&document.constructor==XMLDocument)u=true}function aa(){for(var a=false,b=document.getElementsByTagName("script"),c=0;c<b.length;c++)if(/svg(?:\-uncompressed)?\.js/.test(b[c].src)){a=b[c].getAttribute("data-debug");a=a==="true"||a===true?true:false}return a}function q(a,b){for(var c in b)a.prototype[c]=b[c]}function O(a,b){for(var c in b)a[c]=b[c]}
function v(a,b,c,d){if(!b)b=a.documentElement;if(typeof XPathEvaluator!="undefined"){var e=new XPathEvaluator;a=a.createNSResolver(b);c=e.evaluate(c,b,a,0,null);for(b=r();e=c.iterateNext();)b.push(e);return b}else{a.setProperty("SelectionLanguage","XPath");if(d){var f="",g={};for(e=0;e<d.length;e++){var j=d[e],k=d["_"+j];if(!g["_"+j]){f+=k=="xmlns"?'xmlns="'+j+'" ':"xmlns:"+k+'="'+j+'" ';g["_"+j]=j}}a.setProperty("SelectionNamespaces",f)}b=b.selectNodes(c);if(b===null||typeof b=="undefined")b=r();
c=r();for(e=0;e<b.length;e++)c.push(b[e]);return c}}function y(a,b){if(b===undefined)b=false;var c=G[b+a];if(c)return c.cloneNode(true);var d;if(typeof DOMParser!="undefined"){c=new DOMParser;try{d=c.parseFromString(a,"application/xml")}catch(e){throw e;}c=d.documentElement;if(c.nodeName=="parsererror")throw new Error("There is a bug in your SVG: "+(new XMLSerializer).serializeToString(c));}else{c=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0"];for(var f=0;f<c.length;f++)try{if(d=new ActiveXObject(c[f]))break}catch(g){}if(!d)throw new Error("Unable to instantiate XML parser");
try{d.preserveWhiteSpace=b;d.resolveExternals=false;d.validateOnParse=false;d.setProperty("ProhibitDTD",false);d.async="false";if(!d.loadXML(a)||d.parseError.errorCode!==0)throw new Error(d.parseError.reason);}catch(j){console.log(j.message);throw new Error("Unable to parse SVG: "+j.message);}}try{G[b+a]=d.cloneNode(true)}catch(k){}return d}function z(a,b){a=a._nodeXML||a;a=typeof XMLSerializer!="undefined"?(new XMLSerializer).serializeToString(a):a.xml;a=a.replace(/urn\:__fake__internal__namespace/g,
svgns);var c="";if(a.indexOf("xmlns=")==-1)c='xmlns="'+svgns+'" ';if(b)for(var d=0;d<b.length;d++){var e=b[d],f=b["_"+e];if(e==svgnsFake)e=svgns;e=f!="xmlns"?"xmlns:"+f+'="'+e+'"':'xmlns="'+e+'"';if(a.indexOf(e)==-1)c+=e+" "}return a=a.replace(/<([^ ]+)/,"<$1 "+c+" ")}function n(a,b){if(typeof b=="string")b=a[b];return function(){return b.apply(a,arguments.length?arguments:[])}}function ba(){if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;else if(ActiveXObject){var a=null,b;for(b=
0;b<P.length&&!a;++b)try{a=new ActiveXObject(P[b])}catch(c){}if(!a)throw new Error("XMLHttpRequest object not available on this platform");return a}}function H(){return"_"+ca++}function Q(){this._setXDomain();this.libraryPath=this._getLibraryPath();this.htcFilename=this._getHTCFilename();i&&l._prepareBehavior(this.libraryPath,this.htcFilename);this._interceptOnloadListeners();this._initDOMContentLoaded()}function R(){if(this._forceFlash())console.log("Forcing Flash SVG viewer for this browser");else if(this.hasNativeSVG()){this.supported=
true;this.use="native";return}var a=new S;if(a.capable)if(a.isVersionOrAbove(9,0,0)){this.supported=true;this.use="flash"}else{this.supported=false;this.reason="Flash 9+ required"}else{this.supported=false;this.reason="Flash 9+ or a different browser required"}}function S(){this._detectVersion()}function l(a){this.type=a.type;this._keyboardListeners=[];this._redrawManager=new T(this);if(this.type=="script"){this.id=a.svgID;this._xml=a.xml;this._svgString=a.svgString;this._origSVG=a.origSVG;this._scriptNode=
a.scriptNode}else if(this.type=="object"){this.id=a.objID;this._objNode=a.objNode}}function o(a){this.type=a.type;this._xml=a.xml;if(this.type=="object"){this.id=a.objID;this._objNode=a.objNode}else if(this.type=="script"){this.id=a.svgID;this._svgString=a.svgString;this._scriptNode=a.scriptNode}}function T(a){this._handler=a;this._batch=[];this._nextID=1;this._ids=[];this._timeoutIDs={}}function U(){}function h(a,b,c,d,e,f,g){if(!(a===undefined&&b===undefined)){this.nodeName=a;this._nodeXML=e;this._handler=
f;this._listeners={};this._detachedListeners=[];this.fake=true;if(d==svgnsFake)d=svgns;this._attached=true;if(!this._handler)this._attached=false;if(b==h.ELEMENT_NODE&&!this._nodeXML&&!this._handler){e='<?xml version="1.0"?>\n';e+=d==svgns&&!c?"<"+a+' xmlns="'+svgnsFake+'"/>':"<"+a+" xmlns:"+c+'="'+d+'"/>';this._nodeXML=y(e).documentElement}else if(b==h.DOCUMENT_FRAGMENT_NODE){e='<?xml version="1.0"?>\n<__document__fragment></__document__fragment>';this._nodeXML=y(e).documentElement}if(b!=h.DOCUMENT_NODE&&
this._nodeXML){this._nodeXML.getAttribute("__guid")||this._nodeXML.setAttribute("__guid",H());this._guid=this._nodeXML.getAttribute("__guid");svgweb._guidLookup["_"+this._guid]=this}if(b==h.ELEMENT_NODE)this.localName=a.indexOf(":")!=-1?a.match(/^[^:]*:(.*)$/)[1]:a;this.nodeType=b?b:h.ELEMENT_NODE;if(b==h.ELEMENT_NODE||b==h.DOCUMENT_NODE||b==h.DOCUMENT_FRAGMENT_NODE){this.prefix=c;this.namespaceURI=d;this._nodeValue=null}else if(b==h.TEXT_NODE){this._nodeValue=this._nodeXML.firstChild.nodeValue;this.namespaceURI=
this.prefix=null;if(this._nodeValue===undefined)this._nodeValue=null}this.ownerDocument=document;if(this._attached&&this._handler.type=="object")this.ownerDocument=this._handler.document;if(g===undefined)g=false;this._passThrough=g;i&&this._createEmptyMethods();this._childNodes=this._createChildNodes();b==h.TEXT_NODE&&this._nodeXML.setAttribute("__fakeTextNode",true);if(i)i&&this.nodeType!=h.DOCUMENT_NODE&&this._createHTC();else this._defineNodeAccessors()}}function t(a,b,c,d,e,f){if(!(a===undefined&&
c===undefined&&d===undefined&&e===undefined)){h.apply(this,[a,h.ELEMENT_NODE,b,c,d,e,f]);this._attributes={};this._attributes._id="";this._importAttributes(this,this._nodeXML);i||this._defineAccessors();if(this.namespaceURI==svgns){if(!(i&&this._attached&&this._handler.type=="script"&&this.nodeName=="svg"))this.style=new s(this);if(!(i&&this._attached&&this._handler.type=="script"&&this.nodeName=="svg"))if(i)this.style._ignoreStyleChanges=false}}}function A(a){h.apply(this,["#document-fragment",h.DOCUMENT_FRAGMENT_NODE,
null,null,null,null]);this.ownerDocument=a}function s(a){this._element=a;this._setup()}function V(a,b){this._handler=b;this._svgNode=a;this._scriptsToExec=[];this._swfLoaded=this._htcLoaded=false;for(a=0;this._svgNode._onloadListeners&&a<this._svgNode._onloadListeners.length;a++){b=function(c,d){return function(){d.apply(c.flash)}}(this._handler,this._svgNode._onloadListeners[a]);svgweb.addOnLoad(b)}i&&this._loadHTC();this.url=this._svgNode.getAttribute("src");if(!this.url)this.url=this._svgNode.getAttribute("data");
a=n(this,function(c){this._handler._origSVG=c;c=svgweb._cleanSVG(c,true,false);this._svgString=c.svg;this._xml=c.xml;this.document=new B(this._xml,this._handler);this._handler.document=this.document;this._savedParams=this._getPARAMs(this._svgNode);this._handler._inserter=new I("object",this._xml.documentElement,this._svgNode,this._handler)});this.url.substring(0,5)=="data:"?a(this.url.substring(this.url.indexOf(",")+1)):this._fetchURL(this.url,a,n(this,this._fallback))}function W(a){this._handler=
a;this.fake=true;this.frameElement=this._handler.flash;this.location=this._createLocation();this.alert=window.alert;this.top=this.parent=window;this._onloadListeners=[]}function I(a,b,c,d){this._embedType=a;this._nodeXML=b;this._replaceMe=c;this._handler=d;this._parentNode=c.parentNode;if(this._embedType=="object"){this._explicitWidth=this._replaceMe.getAttribute("width");this._explicitHeight=this._replaceMe.getAttribute("height")}this._setupFlash()}function C(a,b,c,d){t.apply(this,["svg",null,svgns,
a,d,true]);this._nodeXML=a;this._svgString=b;this._scriptNode=c;this._swfLoaded=this._htcLoaded=false;if(this._handler.type=="script")this._handler.document._nodeById["_"+this._nodeXML.getAttribute("id")]=this;this._currentScale=1;this._currentTranslate=this._createCurrentTranslate();if(i&&this._handler.type=="script"){this._addRedrawMethods();this.style=new s(this);this._readyStateListener=n(this,this._onHTCLoaded);this._htcNode.attachEvent("onreadystatechange",this._readyStateListener)}else i&&
this._handler.type=="object"&&this._addRedrawMethods();if(this._handler.type=="script")this._handler._inserter=new I("script",this._nodeXML,this._scriptNode,this._handler)}function B(a,b){h.apply(this,["#document",h.DOCUMENT_NODE,null,null,a,b],svgns);this._xml=a;this._handler=b;this._nodeById={};this._namespaces=this._getNamespaces();this.implementation=new U;if(this._handler.type=="script")this.defaultView=window}function r(){var a=[];a.item=function(b){return b>=this.length?null:this[b]};return a}
function J(a,b,c,d,e,f,g){this.a=a;this.b=b;this.c=c;this.d=d;this.e=e;this.f=f;this._handler=g}function D(a){this.value=a}function E(a){this.baseVal=a;this.animVal=undefined}function X(a,b,c){this.type=a;this.matrix=b;this.angle=c}function F(a,b,c,d){if(c===undefined)c=false;this._formalAccessors=c;this.x=a;this.y=b;if(c){this.setX=n(this,function(e){this.x=e;d("x",e)});this.getX=n(this,function(){return this.x});this.setY=n(this,function(e){this.y=e;d("y",e)});this.getY=n(this,function(){return this.y});
this.setXY=n(this,function(e,f){this.x=e;this.y=f;d("xy",e,f)})}}function da(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d}window.svgns="http://www.w3.org/2000/svg";window.xlinkns="http://www.w3.org/1999/xlink";svgnsFake="urn:__fake__internal__namespace";var K=false,w=false,M=false,i=false,$=false,L=false,N=false,u=false;Z();var ea=aa();if(typeof console=="undefined"||!console.log){var x=[];console={};if(ea){console.log=function(a){var b=null,c=false;try{b=document.getElementsByTagName("body")[0]}catch(d){c=
true}if(i)try{document.documentElement.doScroll("left")}catch(e){c=true}if(c)x.push(a);else{for(;x.length;){var f=x.shift();c=document.createElement("p");c.appendChild(document.createTextNode(f));b.appendChild(c)}c=document.createElement("p");c.appendChild(document.createTextNode(a));b.appendChild(c)}};if(i)var fa=function(){for(;x.length;){var a=x.shift();p=document.createElement("p");p.appendChild(document.createTextNode(a));document.body.appendChild(p)}},ga=window.setInterval(function(){if(document.readyState==
"complete"){fa();window.clearTimeout(ga)}},50)}else console.log=function(){}}var G={},P=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],ca=0;q(Q,{libraryPath:"./",config:null,pageLoaded:false,handlers:[],totalLoaded:0,_guidLookup:[],_loadListeners:[],_removedNodes:[],addOnLoad:function(a,b,c){if(b){var d=c.frameElement;if(b&&this.getHandlerType()=="flash")a.apply(c);else if(d._svgHandler)d._svgHandler._onObjectLoad(a,c);else{d._svgWindow=c;d._svgFunc=a}}else this._loadListeners.push(a);
this.pageLoaded&&this._fireOnLoad()},getHandlerType:function(){if(this.renderer==l)return"flash";else if(this.renderer==o)return"native"},appendChild:function(a,b){if(a.nodeName.toLowerCase()=="object"&&a.getAttribute("type")=="image/svg+xml"){this.totalSVG++;this._svgObjects.push(a);if(this.getHandlerType()=="native"){a.onload=a.onsvgload;b.appendChild(a)}var c=a;if(this.getHandlerType()=="flash"){a.onsvgload&&a.addEventListener("SVGLoad",a.onsvgload,false);c=document._createElement("div");for(var d=
0;d<a.attributes.length;d++){var e=a.attributes[d],f=e.nodeValue;!f&&f!=="true"||c.setAttribute(e.nodeName,f)}b.appendChild(c);c._onloadListeners=a._onloadListeners;c=c}b=this._processSVGObject(c);a._objID=b}else if(a.nodeName.toLowerCase()=="svg"){this.totalSVG++;a.onsvgload&&a.addEventListener("SVGLoad",a.onsvgload,false);if(i&&a._fakeNode)a=a._fakeNode;c=z(a);d=document.createElement("script");d.type="image/svg+xml";if(u)d.appendChild(document.createTextNode(c));else d.text=c;this._svgScripts.push(d);
b.appendChild(d);d._onloadListeners=a._detachedListeners||a._onloadListeners;this._processSVGScript(d)}},removeChild:function(a,b){var c=a.nodeName.toLowerCase(),d;if(c=="object"||c=="embed"||c=="svg"){this.totalSVG=this.totalSVG==0?0:this.totalSVG-1;this.totalLoaded=this.totalLoaded==0?0:this.totalLoaded-1;d=a.getAttribute("id");d=this.handlers[d];for(var e=[],f=0;f<this.handlers.length;f++){var g=this.handlers[f];if(g!=d){e[g.id]=g;e.push(g)}}this.handlers=e}if(c=="object"||c=="embed"){if(this.getHandlerType()==
"flash"&&d.document&&d.document.defaultView){var j=d.document.defaultView;for(f=0;f<j._intervalIDs.length;f++)j.clearInterval(j._intervalIDs[f]);for(f=0;f<j._timeoutIDs.length;f++)j.clearTimeout(j._timeoutIDs[f]);for(f=0;f<d._keyboardListeners.length;f++){c=d._keyboardListeners[f];if(i)document.detachEvent("onkeydown",c);else{document.removeEventListener("keydown",c,true);document.removeEventListener("keydown",c,false)}}}c=typeof a._objID!="undefined"?a._objID:typeof a.contentDocument!="undefined"?
a.contentDocument._handler.id:a._handler.id;for(f=0;f<svgweb._svgObjects.length;f++)if(svgweb._svgObjects[f]._objID===c){svgweb._svgObjects.splice(f,1);break}b.removeChild(a);if(this.getHandlerType()=="flash"){if(a=document.getElementById("__htc_container"))for(f=0;f<a.childNodes.length;f++){b=a.childNodes[f];if(typeof b.ownerDocument!="undefined"&&b.ownerDocument==d._svgObject.document){if(typeof b._fakeNode!="undefined"&&typeof b._fakeNode._htcNode!="undefined")b._fakeNode._htcNode=null;b._fakeNode=
null;b._handler=null;a.removeChild(b)}}for(var k in svgweb._guidLookup){b=svgweb._guidLookup[k];b._fake&&b.ownerDocument===d.document&&delete svgweb._guidLookup[k]}d.flash.contentDocument=null;d.flash=null;d._xml=null;if(d.window){d.window._scope=null;d.window=null}k=d._svgObject;a=k.document;a._nodeById=null;a._xml=null;a.defaultView=null;a.documentElement=null;a.rootElement=null;a=a.defaultView=null;k._svgNode=null;k._handler=null;if(j){j._setTimeout=null;j.setTimeout=null;j._setInterval=null;j.setInterval=
null}j=d=k=d._svgObject=null}}else if(c=="svg"){for(f=0;f<svgweb._svgScripts.length;f++)if(svgweb._svgScripts[f]==d._scriptNode){svgweb._svgScripts.splice(f,1);break}if(i&&this.getHandlerType()=="flash"&&a._fakeNode)a=a._fakeNode;j=this.getHandlerType()=="native"?a:a._handler.flash;i?window.setTimeout(function(m,Y){return function(){m.removeChild(Y);Y=m=null}}(b,j),1):b.removeChild(j);if(this.getHandlerType()=="flash"){a._setUnattached();for(k in svgweb._guidLookup){b=svgweb._guidLookup[k];b._fake&&
b._getFakeNode()===d&&delete svgweb._guidLookup[k]}d._scriptNode=null;d.flash.documentElement=null;d.flash=null;d=d._xml=null}}},_initDOMContentLoaded:function(){var a=this;if(document.addEventListener)document.addEventListener("DOMContentLoaded",function(){a._onDOMContentLoaded()},false);else{document.write('<script id="__ie__svg__onload" defer src=//0><\/script>');document.getElementById("__ie__svg__onload").onreadystatechange=function(){this.readyState=="complete"&&a._onDOMContentLoaded()};var b=
function(){if(window.onload){a._saveWindowOnload();document.detachEvent("onreadystatechange",b)}};document.attachEvent("onreadystatechange",b)}},_setXDomain:function(){for(var a=document.getElementsByTagName("script"),b=0;b<a.length;b++)if(/svg(?:\-uncompressed)?\.js/.test(a[b].src)&&/^https?/.test(a[b].src)){var c=a[b].src.replace(/svg(?:\-uncompressed)?\.js/,""),d=c.match(/https?\:\/\/[^\/]*/)[0],e=window.location.protocol.replace(/:|\//g,"")+"://"+window.location.host;if(d!=e){this.xDomainURL=
c;this._isXDomain=true;return}}this._isXDomain=false},_getLibraryPath:function(){for(var a="./",b=document.getElementsByTagName("meta"),c=0;c<b.length;c++)if(b[c].name=="svg.config.data-path"&&b[c].content.length>0)a=b[c].content;b=document.getElementsByTagName("script");for(c=0;c<b.length;c++)if(/svg(?:\-uncompressed)?\.js/.test(b[c].src)&&b[c].getAttribute("data-path")){a=b[c].getAttribute("data-path");break}if(a.charAt(a.length-1)!="/")a+="/";return a},_getHTCFilename:function(){var a="svg.htc",
b=window.location.toString();if(b.indexOf("svg.htcFilename=svg-htc.php")!=-1)return"svg-htc.php";else if(b.indexOf("svg.htcFilename=svg-htc.jsp")!=-1)return"svg-htc.jsp";else if(b.indexOf("svg.htcFilename=svg-htc.asp")!=-1)return"svg-htc.asp";b=document.getElementsByTagName("script");for(var c=0;c<b.length;c++)if(/svg(?:\-uncompressed)?\.js/.test(b[c].src)&&b[c].getAttribute("data-htc-filename")){a=b[c].getAttribute("data-htc-filename");break}return a},_onDOMContentLoaded:function(){if(!arguments.callee.done){arguments.callee.done=
true;this._startTime=(new Date).getTime();var a=document.getElementById("__ie__svg__onload");if(a){a.parentNode.removeChild(a);a.onreadystatechange=null}this._saveWindowOnload();this.config=new R;i&&this._watchUnload();this._svgScripts=this._getSVGScripts();this._svgObjects=this._getSVGObjects();this.totalSVG=this._svgScripts.length+this._svgObjects.length;this._cleanupSVGObjects();this._handleHTMLTitleBug();if(this.config.supported){if(this.config.use=="flash")this.renderer=l;else if(this.config.use==
"native")this.renderer=o;this.renderer._patchBrowserObjects(window,document);if(this.config.use=="flash"){this._createResizeListener();this._attachResizeListener()}if(this.totalSVG===0)this._fireOnLoad();else{for(a=0;a<this._svgScripts.length;a++)this._processSVGScript(this._svgScripts[a]);for(a=0;a<this._svgObjects.length;a++){var b=this._processSVGObject(this._svgObjects[a]);this._svgObjects[a]._objID=b}}}else{this._displayNotSupported(this.config.reason);this._fireOnLoad()}}},_createResizeListener:function(){this._resizeFunc=
i?function(a){return function(){a._onWindowResize()}}(this):n(this,function(){this._onWindowResize()})},_attachResizeListener:function(){i?window.attachEvent("onresize",this._resizeFunc):window.addEventListener("resize",this._resizeFunc,false)},_detachResizeListener:function(){i?window.detachEvent("onresize",this._resizeFunc):window.removeEventListener("resize",this._resizeFunc,false)},_onWindowResize:function(){if(this.pageLoaded){this._detachResizeListener();for(var a=0;a<this.handlers.length;a++){var b=
this.handlers[a];if(b._inserter&&b.flash){var c=b._inserter._determineSize();b.flash.width=c.width;b.flash.height=c.height;b.sendToFlash("jsHandleResize",[c.pixelsWidth,c.pixelsHeight])}}this._attachResizeListener()}},_getSVGScripts:function(){for(var a=document.getElementsByTagName("script"),b=[],c=0;c<a.length;c++)a[c].type=="image/svg+xml"&&b.push(a[c]);return b},_getSVGObjects:function(){for(var a=document.getElementsByTagName("object"),b=[],c=0;c<a.length;c++)if(a[c].getAttribute("classid")==
"image/svg+xml")b.push(a[c]);else a[c].getAttribute("type")=="image/svg+xml"&&b.push(a[c]);return b},_displayNotSupported:function(a){for(var b=0;b<this._svgObjects.length;b++){var c=this._svgObjects[b];if(!c.childNodes.length||c.childNodes.length==1&&c.childNodes[0].nodeType==3&&/^[ ]*$/m.test(c.childNodes[0].nodeValue)){var d=document.createElement("span");d.className="svg-noscript";d.appendChild(document.createTextNode(a));c.parentNode.replaceChild(d,c)}}for(b=0;b<this._svgScripts.length;b++){c=
this._svgScripts[b];d=document.createElement("span");d.className="svg-noscript";for(var e=c.nextSibling;e&&e.nodeType!=1;)e=e.nextSibling;if(e&&e.nodeName.toLowerCase()=="noscript")d.innerHTML=e.innerHTML;else d.appendChild(document.createTextNode(a));c.parentNode.insertBefore(d,c)}},_fireOnLoad:function(){if(!(this.handlers.length<this._svgObjects.length)){for(var a=true,b=0;b<this.handlers.length;b++)if(!this.handlers[b]._loaded){a=false;break}if(a){this.pageLoaded=true;this._endTime=(new Date).getTime();
if(this._loadListeners.length){var c=this;window.setTimeout(function(){var d=c._loadListeners;c._loadListeners=[];for(var e=this.totalLoaded=0;e<d.length;e++)try{d[e]()}catch(f){console.log("Error while firing onload: "+(f.message||f))}},1)}}}},_cleanSVG:function(a,b,c){if(/^\s*<\!\[CDATA\[/.test(a)){a=a.replace(/^\s*<\!\[CDATA\[/,"");a=a.replace(/\]\]>\s*/,"")}if(b){if(/\<\?xml/m.test(a)==false)a='<?xml version="1.0"?>\n'+a;if(/xmlns\=['"]http:\/\/www\.w3\.org\/2000\/svg['"]/.test(a)==false)a=a.replace("<svg",
'<svg xmlns="http://www.w3.org/2000/svg"');if(/xmlns:[^=]+=['"]http:\/\/www\.w3\.org\/1999\/xlink['"]/.test(a)==false)a=a.replace("<svg",'<svg xmlns:xlink="http://www.w3.org/1999/xlink"')}if(a.charAt(0)!="<")a=a.replace(/\s*<\?xml/,"<?xml");RegExp.lastIndex=0;var d;for(b=/<!ENTITY\s+(\S+)\s+"([^"]*)"/g;b.exec(a)!=null;){var e=RegExp.$2;a=a.split("&"+RegExp.$1+";").join(e)}if(c)a=a.replace(/\>\s+\</gm,"><");if(this.renderer==l){a=a.replace(/<!\-\-[\s\S]*?\-\->/g,"");a=a.replace(/<svg/,"<SVGROOT");
a=a.replace(/<svg/g,"<NESTEDSVG");a=a.replace(/<SVGROOT/,"<svg");b=a.match(/<svg/)[0];e=a.split(/<svg/);if(a=e[1].indexOf("<![CDATA[")!=-1){RegExp.lastIndex=0;var f=/<\!\[CDATA\[/g;d=f.exec(e[1]);var g=[];for(m=0;d&&RegExp.rightContext;){var j=f.lastIndex-9,k=RegExp.rightContext;d=f.lastIndex+k.indexOf("]]\>")+2;k=k.substring(0,k.indexOf("]]\>"));k="<![CDATA["+k+"]]\>";g.push(k);j=e[1].substring(0,j);d=e[1].substring(d+1,e[1].length);e[1]=j+"__SVG_CDATA_TOKEN_"+m+d;d=f.exec(e[1]);m++}}e[1]=e[1].replace(/>([^>]+)</g,
"><__text>$1</__text><");if(a)for(var m=0;m<g.length;m++)e[1]=e[1].replace("__SVG_CDATA_TOKEN_"+m,g[m]);a=e[0]+b+e[1];for(m=2;m<e.length;m++)a+=e[m]}a=a.replace(/<NESTEDSVG/g,"<svg");if(this.renderer==l){a=l._encodeFlashData(a);a=a.replace(/xmlns(\:[^=]*)?=['"]http\:\/\/www\.w3\.org\/2000\/svg['"]/g,"xmlns$1='"+svgnsFake+"'")}c=this._addTracking(a,c);a=typeof XMLSerializer!="undefined"?(new XMLSerializer).serializeToString(c):c.xml;if(this.renderer==l)a=a.replace(new RegExp(svgnsFake,"g"),svgns);
return{svg:a,xml:c}},_processSVGScript:function(a){var b;if(u){b="";for(var c=0;c<a.childNodes.length;c++)b+=a.childNodes[c].textContent}else b=a.innerHTML;var d=this._cleanSVG(b,true,true);c=d.svg;var e=d.xml;d=e.documentElement.getAttribute("id");var f=e.documentElement.getAttribute("onload");if(f){f=new Function('var evt = { target: document.getElementById("'+d+'") ,currentTarget: document.getElementById("'+d+'") ,preventDefault: function() { this.returnValue=false; }};'+f);this._loadListeners.push(function(g,
j){return function(){var k=svgweb.handlers[j];k=svgweb.getHandlerType()=="flash"?k.document.documentElement._getProxyNode():document.getElementById(j);return g.apply(k)}}(f,d))}a=new this.renderer({type:"script",svgID:d,xml:e,svgString:c,origSVG:b,scriptNode:a});this.handlers[d]=a;this.handlers.push(a);a.start()},_processSVGObject:function(a){var b=a.getAttribute("id");if(!b){a.setAttribute("id",svgweb._generateID("__svg__random__","__object"));b=a.getAttribute("id")}a=new this.renderer({type:"object",
objID:b,objNode:a});this.handlers[b]=a;this.handlers.push(a);a.start();return b},_generateID:function(a,b){b||(b="");a||(a="");return a+H()+b},_addTracking:function(a,b){a=y(a,!b);(b=a.documentElement)&&!b.getAttribute("id")&&b.setAttribute("id",this._generateID("__svg__random__",null));if(this.getHandlerType()!="flash")return a;for(var c=b;c;){c.nodeType==h.ELEMENT_NODE&&c.setAttribute("__guid",H());c.nodeType==h.ELEMENT_NODE&&!c.getAttribute("id")&&c.setAttribute("id",svgweb._generateID("__svg__random__",
null));var d=c.firstChild;if(d)c=d;else for(;c;){if(c!=b)if(d=c.nextSibling){c=d;break}if(c==b)c=null;else{c=c.parentNode;if(c.nodeType!=1||c.nodeName.toUpperCase()=="SVG")c=null}}}return a},_handleDone:function(a,b,c){this.totalLoaded++;if(b=="script"&&c._scriptNode._onloadListeners){for(a=0;a<c._scriptNode._onloadListeners.length;a++){b=c._scriptNode._onloadListeners[a];if(svgweb.getHandlerType()=="flash")b=b.listener;else c._svgRoot.addEventListener.toString().indexOf("[native code]")!=-1&&o._patchAddEventListener(c._svgRoot);
try{var d=document.getElementById(c.id);b.apply(d)}catch(e){console.log("Error while firing onload listener: "+e.message||e)}}c._scriptNode._onloadListeners=[]}this.totalLoaded>=this.totalSVG&&this._fireOnLoad()},_handleHTMLTitleBug:function(){var a=document.getElementsByTagName("head")[0],b=a.getElementsByTagName("title");if(b.length===0){b=document.createElement("title");a.appendChild(b)}},_fireFlashError:function(){},_exportID:function(a){a.__defineGetter__("id",function(){return a.getAttribute("id")});
a.__defineSetter__("id",function(b){return a.setAttribute("id",b)})},_watchUnload:function(){window.attachEvent("onunload",function(){window.detachEvent("onunload",arguments.callee);svgweb._fireUnload()})},_fireUnload:function(){if(i){for(var a=0;a<svgweb.handlers.length;a++)if(svgweb.handlers[a].type=="object"){var b=svgweb.handlers[a].flash;b.parentNode&&svgweb.removeChild(b,b.parentNode)}else svgweb.handlers[a].document.documentElement=null;if(b=document.getElementById("__htc_container")){for(a=
0;a<b.childNodes.length;a++){var c=b.childNodes[a];if(c.nodeType==1&&c.namespaceURI==svgns){c.detachEvent("onpropertychange",c._fakeNode.style._changeListener);c.style.item=null;c.style.setProperty=null;c.style.getPropertyValue=null}if(c._fakeNode)c._fakeNode._htcNode=null;c._fakeNode=null;c._handler=null}b.parentNode.removeChild(b)}for(a=0;a<svgweb.handlers.length;a++)svgweb.handlers[a].flash=null;svgweb.handlers=null;for(a=0;a<svgweb._removedNodes.length;a++){b=svgweb._removedNodes[a];if(b._fakeNode)b._fakeNode._htcNode=
null;b._fakeNode=null;b._handler=null}svgweb._removedNodes=null;document.getElementById=document._getElementById;document._getElementById=null;document.getElementsByTagNameNS=document._getElementsByTagNameNS;document._getElementsByTagNameNS=null;document.createElementNS=document._createElementNS;document._createElementNS=null;document.createElement=document._createElement;document._createElement=null;document.createTextNode=document._createTextNode;document._createTextNode=null;document._importNodeFunc=
null;document.createDocumentFragment=document._createDocumentFragment;document._createDocumentFragment=null;window.addEventListener=null;window._addEventListener=null;window.attachEvent=window._attachEvent;G=window._attachEvent=null}},_cleanupSVGObjects:function(){if(this.config.use=="flash"&&this.config.hasNativeSVG())for(var a=0;a<this._svgObjects.length;a++){for(var b=this._svgObjects[a],c=document.createElement("div"),d=0;d<b.attributes.length;d++){var e=b.attributes[d];c.setAttribute(e.nodeName,
e.nodeValue)}c.innerHTML=b.innerHTML;b.parentNode.replaceChild(c,b);this._svgObjects[a]=c}for(a=0;a<this._svgObjects.length;a++)this._svgObjects[a].style.visibility="hidden"},_interceptOnloadListeners:function(){if(window.addEventListener){window._addEventListener=window.addEventListener;window.addEventListener=function(a,b,c){if(a.toLowerCase()!="svgload")return window._addEventListener(a,b,c);else svgweb.addOnLoad(b)}}else window.addEventListener=function(a,b){a.toLowerCase()=="svgload"&&svgweb.addOnLoad(b)};
if(i&&window.attachEvent){window._attachEvent=window.attachEvent;window.attachEvent=function(a,b){if(a.toLowerCase()!="onsvgload")return window._attachEvent(a,b);else svgweb.addOnLoad(b)}}},_saveWindowOnload:function(){var a=window.onsvgload;if(document.getElementsByTagName("body")){var b=document.getElementsByTagName("body")[0];if(b.getAttribute("onsvgload")){callbackStr=b.getAttribute("onsvgload");a=function(c){return function(){eval(c)}}(callbackStr)}}if(a){i?this._loadListeners.splice(0,0,a):
this._loadListeners.push(a);window.onsvgload=a=null}}});q(R,{supported:false,reason:null,use:null,_forceFlash:function(){for(var a=false,b=false,c=document.getElementsByTagName("meta"),d=0;d<c.length;d++)if(c[d].name=="svg.render.forceflash"&&c[d].content.toLowerCase()=="true")b=a=true;if(window.location.search.indexOf("svg.render.forceflash=true")!=-1)a=true;else if(b&&window.location.search.indexOf("svg.render.forceflash=false")!=-1)a=false;return a},hasNativeSVG:function(){return document.implementation&&
document.implementation.hasFeature?document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"):false}});S.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,isVersionOrAbove:function(a,b,c){c=parseFloat("."+c);return this.versionMajor>=a&&this.versionMinor>=b&&this.versionRevision>=c?true:false},_detectVersion:function(){for(var a,b=25;b>0;b--){if(i){var c;try{c=b>6?new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b):new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
if(typeof c=="object"){if(b==6)c.AllowScriptAccess="always";a=c.GetVariable("$version")}}catch(d){continue}}else a=this._JSFlashInfo(b);if(a==-1){this.capable=false;return}else if(a!==0){a=i?a.split(" ")[1].split(","):a.split(".");this.versionMajor=a[0];this.versionMinor=a[1];this.versionRevision=a[2];this.version=parseFloat(this.versionMajor+"."+this.versionRevision);this.capable=true;break}}},_JSFlashInfo:function(){if(navigator.plugins!==null&&navigator.plugins.length>0)if(navigator.plugins["Shockwave Flash 2.0"]||
navigator.plugins["Shockwave Flash"]){var a=navigator.plugins["Shockwave Flash"+(navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"")].description.split(" "),b=a[2].split("."),c=b[0];b=b[1];a=(a[3]||a[4]).split("r");return c+"."+b+"."+(a[1]>0?a[1]:0)}return-1}};l._unattachedDoc=y('<?xml version="1.0"?>\n<svg xmlns="'+svgns+'"></svg>',false);l._prepareBehavior=function(a,b){for(var c=null,d=0;d<document.namespaces.length;d++)if(document.namespaces.item(d).name=="svg"){c=document.namespaces.item(d);
break}if(c===null)c=document.namespaces.add("svg",svgns);c.doImport(a+b)};l._getNode=function(a,b){var c;c=svgweb._guidLookup["_"+a.getAttribute("__guid")];var d=false;if(!c&&a.nodeName=="__text")d=true;if(!c&&!d&&a.nodeType==h.ELEMENT_NODE)c=new t(a.nodeName,a.prefix,a.namespaceURI,a,b,true);else if(!c&&(a.nodeType==h.TEXT_NODE||d))c=new h("#text",h.TEXT_NODE,null,null,a,b,false);else if(!c)throw new Error("Unknown node type given to _getNode: "+a.nodeType);return c._getProxyNode()};l._patchBrowserObjects=
function(a,b){if(!b._getElementById){document._getElementById=document.getElementById;document.getElementById=l._getElementById;document._getElementsByTagNameNS=document.getElementsByTagNameNS;document.getElementsByTagNameNS=l._getElementsByTagNameNS;document._createElementNS=document.createElementNS;document.createElementNS=l._createElementNS;document._createElement=document.createElement;document.createElement=l._createElement;document._createTextNode=document.createTextNode;document.createTextNode=
l._createTextNode;document._importNodeFunc=l._importNodeFunc;document._createDocumentFragment=document.createDocumentFragment;document.createDocumentFragment=l._createDocumentFragment}};l._getElementById=function(a){var b=document._getElementById(a);if(b!==null)return b;for(var c=0;c<svgweb.handlers.length;c++){if(svgweb.handlers[c].type=="script")b=svgweb.handlers[c].document.getElementById(a);if(b)return b}return null};l._getElementsByTagNameNS=function(a,b){var c=r();if(document._getElementsByTagNameNS)for(var d=
document._getElementsByTagNameNS(a,b),e=0;e<d.length;e++)c.push(d[e]);for(var f=0;f<svgweb.handlers.length;f++)if(svgweb.handlers[f].type=="script"){d=svgweb.handlers[f].document.getElementsByTagNameNS(a,b);for(e=0;e<d.length;e++)c.push(d[e])}return c};l._createElementNS=function(a,b){if(a===null||a=="http://www.w3.org/1999/xhtml")return i?document.createElement(b):document._createElementNS(a,b);var c=false;if(a==svgns){a=svgnsFake;c=true}if(!i){for(var d=0;!c&&d<svgweb.handlers.length;d++)if(svgweb.handlers[d].type==
"script"&&svgweb.handlers[d].document._namespaces["_"+a]){c=true;break}if(!c)return document._createElementNS(a,b)}var e;for(d=0;d<svgweb.handlers.length;d++)if(svgweb.handlers[d].type=="script")if(e=svgweb.handlers[d].document._namespaces["_"+a])break;if(e=="xmlns"||!e)e=null;return(new t(b,e,a))._getProxyNode()};l._createElement=function(a,b){if(b){if(b&&a.toLowerCase()=="object"){a=document._createElement("object");a._onloadListeners=[];var c=a.addEventListener;(function(d,e){d.addEventListener=
function(f,g,j){if(f.toLowerCase()=="svgload")this._onloadListeners.push(g);else c?e(f,g,j):this.attachEvent("on"+f,g)}})(a,c);return a}}else return document._createElement(a)};l._createTextNode=function(a,b){if(b){b=l._unattachedDoc;var c;c=i?b.createElement("__text"):b.createElementNS(svgnsFake,"__text");c.appendChild(b.createTextNode(a));b=new h("#text",h.TEXT_NODE,null,null,c);b._nodeValue=a;b.ownerDocument=document;return b._getProxyNode()}else return document._createTextNode(a)};l._importNodeFunc=
function(a,b,c){switch(b.nodeType){case 1:var d=a.createElement(b.nodeName);if(b.attributes&&b.attributes.length>0)for(var e=0;e<b.attributes.length;e++){var f=b.attributes[e].nodeName,g=b.getAttribute(f);d.setAttribute(f,g)}if(c&&b.childNodes&&b.childNodes.length>0)for(e=0;e<b.childNodes.length;e++)d.appendChild(document._importNodeFunc(a,b.childNodes[e],c));return d;case 3:return a.createTextNode(b.nodeValue)}};l._createDocumentFragment=function(a){return a?(new A(document))._getProxyNode():document._createDocumentFragment()};
l._encodeFlashData=function(a){a=a.toString().replace(/\\/g,"\\\\");return a=a.replace(/&/g,"__SVG__AMPERSAND")};q(l,{flashID:null,flash:null,start:function(){if(this.type=="script")this._handleScript();else this.type=="object"&&this._handleObject()},_stringToMsg:function(a){if(a==null||typeof a!="string")return a;var b={};a=a.split(/__SVG__DELIMIT/g);for(var c=0;c<a.length;c++){var d=a[c].indexOf(":"),e=a[c].substring(0,d);d=a[c].substring(d+1);if(d==="true")d=true;else if(d==="false")d=false;else if(d===
"null")d=null;else if(d==="undefined")d=undefined;b[e]=d}return b},debugMsg:function(a){if(a===undefined)return"undefined";else if(a===null)return"null";var b=[];for(var c in a)b.push(c+":"+a[c]);b=b.join(", ");return"{"+b+"}"},sendToFlash:function(a,b){b=b.join("__SVG__DELIMIT");if(this._redrawManager.isSuspended())this._redrawManager.batch(a,b);else return this.flash[a](b)},onMessage:function(a){a=this._stringToMsg(a);if(a.type=="event")this._onEvent(a);else if(a.type=="log")this._onLog(a);else if(a.type==
"script")this._onObjectScript(a);else if(a.type=="viewsource")this._onViewSource();else if(a.type=="viewsourceDynamic")this._onViewSourceDynamic(a);else a.type=="error"&&this._onFlashError(a)},fireOnLoad:function(a,b){svgweb._handleDone(a,b,this)},_handleScript:function(){this.document=new B(this._xml,this);this.document.documentElement=new C(this._xml.documentElement,this._svgString,this._scriptNode,this)},_handleObject:function(){this._svgObject=new V(this._objNode,this);this._objNode=null},_onLog:function(a){console.log("FLASH: "+
a.logString)},_onEvent:function(a){if(a.eventType.substr(0,5)=="mouse"||a.eventType=="click")this._onMouseEvent(a);else if(a.eventType=="onRenderingFinished")if(this.type=="script")this.document.documentElement._onRenderingFinished(a);else this.type=="object"&&this._svgObject._onRenderingFinished(a);else if(a.eventType=="onFlashLoaded")if(this.type=="script")this.document.documentElement._onFlashLoaded(a);else this.type=="object"&&this._svgObject._onFlashLoaded(a)},_onMouseEvent:function(a){var b=
this._getElementByGuid(a.targetGUID),c=this._getElementByGuid(a.currentTargetGUID),d={target:b._getProxyNode(),currentTarget:c._getProxyNode(),type:a.eventType,clientX:new Number(a.stageX),clientY:new Number(a.stageY),screenX:new Number(a.stageX),screenY:new Number(a.stageY),altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,preventDefault:function(){this.returnValue=false}},e=c._listeners[a.eventType];if(e)for(var f=0;f<e.length;f++){var g=e[f].listener;g(d)}a.scriptCode!=null&&this.type=="object"&&
this.sandbox_eval(this._svgObject._sandboxedScript('var evt = { target: document.getElementById("'+b._getProxyNode().getAttribute("id")+'") ,\ncurrentTarget:document.getElementById("'+c._getProxyNode().getAttribute("id")+'") ,\ntype: "'+a.eventType+'",\nclientX: '+new Number(a.stageX)+",\nclientY: "+new Number(a.stageY)+",\nscreenX: "+new Number(a.stageX)+",\nscreenY: "+new Number(a.stageY)+",\naltKey: "+a.altKey+",\nctrlKey: "+a.ctrlKey+",\nshiftKey: "+a.shiftKey+",\npreventDefault: function() { this.returnValue=false; }\n};\n"+
(";(function (evt) { "+a.scriptCode+"; }).call(evt.target, evt);\n")))},_getElementByGuid:function(a){var b=svgweb._guidLookup["_"+a];if(b)return b;var c;if(this.type=="script")c=v(this._xml,null,'//*[@__guid="'+a+'"]');else if(this.type=="object")c=v(this._svgObject._xml,null,'//*[@__guid="'+a+'"]');if(c.length)a=c[0];else return null;b=l._getNode(a,this);b._passThrough=true;return b},_onFlashError:function(a){this._onLog(a);svgweb._fireFlashError("FLASH: "+a.logString);throw new Error("FLASH: "+
a.logString);},_onObjectScript:function(a){this._svgObject._scriptsToExec.push(a.script)},_onViewSource:function(){var a=this._origSVG;a||(a="SVG Source Not Available");a=a.replace(/>/g,"&gt;").replace(/</g,"&lt;");var b=window.open("","_blank");b.document.write("<html><body><pre>"+a+"</pre></body></html>");b.document.close()},_onViewSourceDynamic:function(a){if(a.source.indexOf("<?xml")==-1)a.source='<?xml version="1.0"?>\n'+a.source;a.source=a.source.replace(/<svg:([^ ]+) /g,"<$1 ");a.source=a.source.replace(/<\/svg:([^>]+)>/g,
"</$1>");a.source=a.source.replace(/\n\s*<__text[^\/]*\/>/gm,"");a.source=a.source.replace(/<__text[^>]*>([^<]*)<\/__text>/gm,"$1");a.source=a.source.replace(/<__text[^>]*>/g,"");a.source=a.source.replace(/<\/__text>/g,"");a.source=a.source.replace(/\s*__guid="[^"]*"/g,"");a.source=a.source.replace(/ id="__svg__random__[^"]*"/g,"");a.source=a.source.replace(/>\n\n/g,">\n");a.source=a.source.replace(/>/g,"&gt;");a.source=a.source.replace(/</g,"&lt;");var b=window.open("","_blank");b.document.write("<body><pre>"+
a.source+"</pre></body>");b.document.close()}});o._patchBrowserObjects=function(a,b){if(!b._getElementById){b._getElementById=b.getElementById;b.getElementById=function(d){var e=b._getElementById(d);if(e!==null)return e.parentNode===null?null:e;e=v(b,null,'//*[@id="'+d+'"]');if(e.length){d=e[0];d.namespaceURI!==null&&d.namespaceURI!=svgns&&d.namespaceURI!="http://www.w3.org/1999/xhtml"&&svgweb._exportID(d);return d}else return null};b._getElementsByTagNameNS=b.getElementsByTagNameNS;b.getElementsByTagNameNS=
function(d,e){var f=b._getElementsByTagNameNS(d,e);if(f!==null&&f.length!==0){if(d!==null&&d!="http://www.w3.org/1999/xhtml"&&d!=svgns){for(var g=0;g<f.length;g++){d=f[g];svgweb._exportID(d)}return f}return f}if(f===null||f.length===0)f=r();var j;for(g=0;g<svgweb.handlers.length;g++){j=svgweb.handlers[g];if(j.type!="object"){var k=j._namespaces["_"+d];if(k){j=v(b,j._svgRoot,k=="xmlns"?"//*[namespace-uri()='"+svgns+"' and name()='"+e+"']":k?"//"+k+":"+e:"//"+e,j._namespaces);if(j!==null&&j!==undefined&&
j.length>0){for(g=0;g<j.length;g++){d=j[g];d.namespaceURI!==null&&d.namespaceURI!=svgns&&d.namespaceURI!="http://www.w3.org/1999/xhtml"&&svgweb._exportID(d);f.push(d)}return f}}}}return r()};b._createElementNS=b.createElementNS;b.createElementNS=function(d,e){if(d!=svgns||e!="svg")return b._createElementNS(d,e);d=b._createElementNS(d,e);return d=o._patchAddEventListener(d)};b._createElement=b.createElement;b.createElement=function(d,e){if(!e)return b._createElement(d);if(e&&d=="object"){d=b._createElement(d);
return d=o._patchAddEventListener(d)}else throw"Unknown createElement() call for SVG: "+d;};o._patchCloneNode();N&&o._patchStyleObject(a);var c=b.rootElement;c&&c.localName=="svg"&&c.namespaceURI==svgns&&o._patchSvgFileAddEventListener(a,b)}};o._patchCloneNode=function(){var a;a=typeof SVGSVGElement!="undefined"?SVGSVGElement.prototype:document.createElementNS(svgns,"svg").__proto__;if(!a._cloneNode){a._cloneNode=a.cloneNode;a.cloneNode=function(b){b=this._cloneNode(b);o._patchAddEventListener(b);
return b}}};o._patchAddEventListener=function(a){if(!o._objectAddEventListener)o._objectAddEventListener=a.addEventListener;a._addEventListener=o._objectAddEventListener;a._onloadListeners=[];a.addEventListener=function(){return function(b,c,d){b.toLowerCase()=="svgload"?this._onloadListeners.push(c):a._addEventListener(b,c,d)}}();return a};o._patchStyleObject=function(a){var b=a.CSSStyleDeclaration;for(a=0;a<s._allStyles.length;a++){var c=s._allStyles[a],d=c.replace(/([A-Z])/g,"-$1").toLowerCase();
(function(e,f){b.prototype.__defineSetter__(e,function(g){return this.setProperty(f,g,null)});b.prototype.__defineGetter__(e,function(){return this.getPropertyValue(f)})})(c,d)}};o._patchSvgFileAddEventListener=function(a,b){var c=a.addEventListener;a.addEventListener=function(d,e,f){if(d.toLowerCase()!="svgload")c(d,e,f);else b.readyState=="complete"&&e()};a.__defineGetter__("onsvgload",function(){return this.__onsvgload});a.__defineSetter__("onsvgload",function(d){this.__onsvgload=d;this.addEventListener("SVGLoad",
d,false)})};q(o,{start:function(){if(this.type=="object")this._handleObject();else this.type=="script"&&this._handleScript()},_handleScript:function(){this._namespaces=this._getNamespaces();this._processSVGScript(this._xml,this._svgString,this._scriptNode);this._loaded=true;svgweb._handleDone(this.id,"script",this)},_handleObject:function(){this._objNode.style.overflow="hidden";this._objNode.style.visibility="visible";if(this._objNode._svgWindow)this._onObjectLoad(this._objNode._svgFunc,this._objNode._svgWindow);
else{this._objNode._svgHandler=this;var a=this,b=function(){a._objNode.contentDocument&&a._onObjectLoad(a._objNode._svgFunc,a._objNode.contentDocument.defaultView)};this._objNode._addEventListener?this._objNode._addEventListener("load",b,false):this._objNode.addEventListener("load",b,false)}},_onObjectLoad:function(a,b){if(!this._loaded){this._loaded=true;var c=b.document;o._patchBrowserObjects(b,c);var d=c.rootElement;d&&this._patchCurrentTranslate(d);b.svgns=svgns;b.xlinkns=xlinkns;this._namespaces=
this._getNamespaces(c);a&&a.apply(b);for(b=0;this._objNode._onloadListeners&&b<this._objNode._onloadListeners.length;b++){a=this._objNode._onloadListeners[b];a.apply(this._objNode)}svgweb._fireOnLoad()}},_processSVGScript:function(a,b,c){a=document.importNode(a.documentElement,true);c.parentNode.replaceChild(a,c);this._svgRoot=a;this._patchCurrentTranslate(this._svgRoot)},_getNamespaces:function(a){var b=[];a=a?a.documentElement.attributes:this._xml.documentElement.attributes;for(var c=0;c<a.length;c++){var d=
a[c];if(/^xmlns:?(.*)$/.test(d.nodeName)){var e=d.nodeName.match(/^xmlns:?(.*)$/);e=e[1]?e[1]:"xmlns";d=d.nodeValue;if(!b["_"+e]){b["_"+e]=d;b["_"+d]=e;b.push(d)}}}return b},_patchCurrentTranslate:function(a){var b;if(typeof SVGRoot!="undefined")b=a.currentTranslate;else if(typeof a.currentTranslate.__proto__!="undefined")b=a.currentTranslate.__proto__;else if(typeof SVGPoint!="undefined")b=SVGPoint.prototype;b.setX=function(c){return this.x=c};b.getX=function(){return this.x};b.setY=function(c){return this.y=
c};b.getY=function(){return this.y};b.setXY=function(c,d){this.x=c;this.y=d}}});q(T,{isSuspended:function(){return this._ids.length>0},batch:function(a,b){this._batch.push(a+":"+b)},suspendRedraw:function(a){if(a===undefined)throw"Not enough arguments to suspendRedraw";var b=this._nextID;this._nextID++;var c=this;a=window.setTimeout(function(){c.unsuspendRedraw(b);delete c._timeoutIDs["_"+b]},a);this._ids.push(b);this._timeoutIDs["_"+b]=a;this._handler.flash.jsSuspendRedraw();return b},unsuspendRedraw:function(a){for(var b=
-1,c=0;c<this._ids.length;c++)if(this._ids[c]==a){b=c;break}if(b==-1)throw"Unknown id passed to unsuspendRedraw: "+a;this._timeoutIDs["_"+a]!=undefined&&window.clearTimeout(this._timeoutIDs["_"+a]);this._ids.splice(b,1);delete this._timeoutIDs["_"+a];if(!this.isSuspended()){a=this._batch.join("__SVG__METHOD__DELIMIT");this._batch=[];try{this._handler.flash.jsUnsuspendRedrawAll(a)}catch(d){console.log("unsuspendRedraw exception: "+d)}}},unsuspendRedrawAll:function(){for(var a=0;a<this._ids.length;a++)this.unsuspendRedraw(this._ids[a])},
forceRedraw:function(){}});q(U,{hasFeature:function(){}});O(h,{ELEMENT_NODE:1,TEXT_NODE:3,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11});q(h,{_listeners:null,_detachedListeners:null,insertBefore:function(a,b){if(this.nodeType!=h.ELEMENT_NODE&&this.nodeType!=h.DOCUMENT_FRAGMENT_NODE)throw"Not supported";a.parentNode&&a.parentNode.removeChild(a);a=this._getFakeNode(a);b=this._getFakeNode(b);var c=a.nodeType==h.DOCUMENT_FRAGMENT_NODE,d;if(c)d=a._getChildNodes(true);if(c&&d.length==0){a._reset();return a._getProxyNode()}var e=
this._findChild(b);if(e===null)throw new Error("Invalid child passed to insertBefore");e=e.position;var f=[];if(c)for(c=0;c<d.length;c++)f.push(d[c]);else f.push(a);for(c=0;c<f.length;c++){this._nodeXML.insertBefore(this._importNode(f[c],false),b._nodeXML);this._processAppendedChildren(f[c],this,this._attached,this._passThrough)}if(this._attached&&this._passThrough){d=l._encodeFlashData(z(a,this._handler.document._namespaces));this._handler.sendToFlash("jsInsertBefore",[b._guid,this._guid,e,d])}if(!i)for(c=
0;c<f.length;c++){this._defineChildNodeAccessor(this._childNodes.length);this._childNodes.length++}a.nodeType==h.DOCUMENT_FRAGMENT_NODE&&a._reset();return a._getProxyNode()},replaceChild:function(a,b){if(this.nodeType!=h.ELEMENT_NODE&&this.nodeType!=h.DOCUMENT_FRAGMENT_NODE)throw"Not supported";a.parentNode&&a.parentNode.removeChild(a);a=this._getFakeNode(a);b=this._getFakeNode(b);var c=a.nodeType==h.DOCUMENT_FRAGMENT_NODE,d;if(c)d=a._getChildNodes(true);if(c&&d.length==0){a._reset();return a._getProxyNode()}var e=
this._findChild(b);if(e===null)throw new Error("Invalid child passed to replaceChild");e=e.position;this.removeChild(b);var f=[];if(c)for(c=0;c<d.length;c++)f.push(d[c]);else f.push(a);if(!i)for(c=0;c<f.length;c++){this._defineChildNodeAccessor(this._childNodes.length);this._childNodes.length++}d=false;if(e>=this._nodeXML.childNodes.length)d=true;var g=e;for(c=0;c<f.length;c++){var j=this._importNode(f[c],false);if(d)this._nodeXML.appendChild(j);else{this._nodeXML.insertBefore(j,this._nodeXML.childNodes[g]);
g++}}if(this._attached&&this._passThrough){f=l._encodeFlashData(z(a,this._handler.document._namespaces));this._handler.sendToFlash("jsAddChildAt",[this._guid,e,f])}this._processAppendedChildren(a,this,this._attached,this._passThrough);b._setUnattached();svgweb._removedNodes.push(b._getProxyNode());a.nodeType==h.DOCUMENT_FRAGMENT_NODE&&a._reset();return b._getProxyNode()},removeChild:function(a){if(this.nodeType!=h.ELEMENT_NODE&&this.nodeType!=h.DOCUMENT_FRAGMENT_NODE)throw"Not supported";if(a.nodeType!=
h.ELEMENT_NODE&&a.nodeType!=h.TEXT_NODE)throw"Not supported";a=this._getFakeNode(a);var b=this._findChild(a);if(b===null)throw new Error("Invalid child passed to removeChild");var c=b.position;this._nodeXML.removeChild(b.nodeXML);if(a.nodeType==h.ELEMENT_NODE)if((b=a._getId())&&this._attached)this._handler.document._nodeById["_"+b]=undefined;a._persistEventListeners();if(i)this._childNodes.splice(c,1);else{delete this._childNodes[this._childNodes.length-1];this._childNodes.length--}this._attached&&
this._passThrough&&this._handler.sendToFlash("jsRemoveChild",[a._guid]);a._setUnattached();svgweb._removedNodes.push(a._getProxyNode());return a._getProxyNode()},appendChild:function(a){if(this.nodeType!=h.ELEMENT_NODE&&this.nodeType!=h.DOCUMENT_FRAGMENT_NODE)throw"Not supported";a.parentNode&&a.parentNode.removeChild(a);a=this._getFakeNode(a);var b=a.nodeType==h.DOCUMENT_FRAGMENT_NODE,c;if(b)c=a._getChildNodes(true);if(b&&c.length==0){a._reset();return a._getProxyNode()}if(b)for(var d=0;d<c.length;d++)this._importNode(c[d]);
else this._importNode(a);if(i)if(b)for(d=0;d<c.length;d++)this._childNodes.push(c[d]._htcNode);else this._childNodes.push(a._htcNode);else if(b)for(d=0;d<c.length;d++){this._defineChildNodeAccessor(this._childNodes.length);this._childNodes.length++}else{this._defineChildNodeAccessor(this._childNodes.length);this._childNodes.length++}this._attached&&this._passThrough&&this._handler.sendToFlash("jsAppendChild",[this._guid,l._encodeFlashData(z(a,this._handler.document._namespaces))]);this._processAppendedChildren(a,
this,this._attached,this._passThrough);a.nodeType==h.DOCUMENT_FRAGMENT_NODE&&a._reset();return a._getProxyNode()},hasChildNodes:function(){return this._getChildNodes().length>0},isSupported:function(a,b){if(b=="2.0")if(a=="Core")return true;else{if(a=="Events"||a=="UIEvents"||a=="MouseEvents")return true}else return false},hasAttributes:function(){if(this.nodeType==h.ELEMENT_NODE)for(var a in this._attributes)if(!/^_xmlns/i.test(a))if(!(a=="_id"&&/^__svg__random__/.test(this._attributes[a])))if(!(a==
"___guid"&&/^__guid/.test(this._attributes[a])))if(!(a=="___fakeTextNode"&&/^__fakeTextNode/.test(this._attributes[a])))if(/^_.*/.test(a)&&this._attributes.hasOwnProperty(a))return true;return false},addEventListener:function(a,b,c,d){if(this.nodeType!=h.ELEMENT_NODE&&this.nodeType!=h.TEXT_NODE)throw"Not supported";if(!d&&!this._attached)this._detachedListeners.push({type:a,listener:b,useCapture:c});else{if(this._listeners[a]===undefined)this._listeners[a]=[];this._listeners[a].push({type:a,listener:b,
useCapture:c});this._listeners[a]["_"+b.toString()+":"+c]=b;if(a=="keydown"){d=function(e){return function(f){if(!f.preventDefault)f.preventDefault=function(){this.returnValue=false;f=null};e(f)}}(b);d.__type=a;d.__listener=b;d.__useCapture=c;this._handler._keyboardListeners.push(d);this._addEvent(document,a,d)}else this._handler.sendToFlash("jsAddEventListener",[this._guid,a])}},removeEventListener:function(a,b,c){if(this.nodeType!=h.ELEMENT_NODE&&this.nodeType!=h.TEXT_NODE)throw"Not supported";
var d;if(this._attached){d=this._findListener(this._listeners,a,b,c);if(d!==null){delete this._listeners[d];delete this._listeners[a]["_"+b.toString()+":"+c]}if(a=="keydown"){d=this._findListener(this._keyboardListeners,a,b,c);d!==null&&delete this._keyboardListeners[d]}this._handler.sendToFlash("jsRemoveEventListener",[this._guid,a])}else{d=this._findListener(this._detachedListeners,a,b,c);d!==null&&delete this._detachedListeners[d]}},getScreenCTM:function(){var a=this._handler.sendToFlash("jsGetScreenCTM",
[this._guid]);a=this._handler._stringToMsg(a);return new J(new Number(a.a),new Number(a.b),new Number(a.c),new Number(a.d),new Number(a.e),new Number(a.f),this._handler)},getCTM:function(){return this.getScreenCTM()},cloneNode:function(a){var b;if(this.nodeType==h.ELEMENT_NODE&&this.namespaceURI!=svgns)b=new t(this.nodeName,this.prefix,this.namespaceURI);else if(this.nodeType==h.ELEMENT_NODE)b=document.createElementNS(this.namespaceURI,this.nodeName);else if(this.nodeType==h.TEXT_NODE)b=document.createTextNode(this._nodeValue,
true);else if(this.nodeType==h.DOCUMENT_FRAGMENT_NODE)b=document.createDocumentFragment(true);else throw"cloneNode not supported for nodeType: "+this.nodeType;b=this._getFakeNode(b);for(var c=this._nodeXML.attributes,d=0;d<c.length;d++){var e=c.item(d);e.name.match(/([^:]+):?(.*)/);var f=e.namespaceURI;if(w&&e.name.indexOf("xmlns")!=-1)b._nodeXML.setAttribute(e.name,e.nodeValue);else{var g=b._nodeXML.ownerDocument;f=i?g.createNode(2,e.name,f):g.createAttributeNS(f,e.name);f.nodeValue=e.nodeValue;
i?b._nodeXML.setAttributeNode(f):b._nodeXML.setAttributeNodeNS(f)}}b._nodeXML.setAttribute("__guid",b._guid);if(i){c=this._htcNode.style;for(d=0;d<c.length;d++){e=c.item(d);f=c.getPropertyValue(e);b._htcNode.style.length++;b.style.length++;b.style._ignoreStyleChanges=true;b._htcNode.style[e]=f;b.style._ignoreStyleChanges=false}}b.nodeType==h.ELEMENT_NODE&&b._importAttributes(b,b._nodeXML);if(a&&(b.nodeType==h.ELEMENT_NODE||b.nodeType==h.DOCUMENT_FRAGMENT_NODE)){a=this._getChildNodes();for(d=0;d<a.length;d++){c=
a[d].cloneNode(true);b.appendChild(c)}}b.ownerDocument=this.ownerDocument;return b._getProxyNode()},toString:function(){return this.namespaceURI==svgns?"[_SVG"+this.localName.charAt(0).toUpperCase()+this.localName.substring(1)+"]":this.prefix?"["+this.prefix+":"+this.localName+"]":this.localName?"["+this.localName+"]":"["+this.nodeName+"]"},_addEvent:function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else if(a.attachEvent){a["e"+b+c]=c;a[b+c]=function(d,e,f){return function(){d["e"+
e+f](window.event)}}(a,b,c);a.attachEvent("on"+b,a[b+c])}},nodeName:null,nodeType:null,ownerDocument:null,namespaceURI:null,localName:null,prefix:null,_getParentNode:function(){if(this.nodeType==h.DOCUMENT_NODE||this.nodeType==h.DOCUMENT_FRAGMENT_NODE)return null;if(this.nodeName=="svg"&&this._handler.type=="script")return this._handler.flash.parentNode;else if(this.nodeName=="svg"&&this._handler.type=="object")return this._handler.document;var a=this._nodeXML.parentNode;if(a===null||a.nodeType==
h.DOCUMENT_NODE)return null;return l._getNode(a,this._handler)},_getFirstChild:function(){if(this.nodeType==h.TEXT_NODE)return null;var a=this._nodeXML.firstChild;if(a===null)return null;a=l._getNode(a,this._handler);this._getFakeNode(a)._passThrough=this._passThrough;return a},_getLastChild:function(){if(this.nodeType==h.TEXT_NODE)return null;var a=this._nodeXML.lastChild;if(a===null)return null;a=l._getNode(a,this._handler);this._getFakeNode(a)._passThrough=this._passThrough;return a},_getPreviousSibling:function(){if(this.nodeType==
h.DOCUMENT_NODE||this.nodeType==h.DOCUMENT_FRAGMENT_NODE)return null;if(this.nodeName=="svg"&&this._handler.type=="script"){var a=this._handler.flash.previousSibling;if(a&&a.nodeType==1&&a.className&&a.className.indexOf("embedssvg")!=-1){a=a.getAttribute("id").replace("_flash","");a=svgweb.handlers[a].document.documentElement;return a._getProxyNode()}else return a}a=this._nodeXML.previousSibling;if(a===null||a.nodeType==7)return null;a=l._getNode(a,this._handler);this._getFakeNode(a)._passThrough=
this._passThrough;return a},_getNextSibling:function(){if(this.nodeType==h.DOCUMENT_NODE||this.nodeType==h.DOCUMENT_FRAGMENT_NODE)return null;if(this.nodeName=="svg"&&this._handler.type=="script"){var a=this._handler.flash.nextSibling;if(a&&a.nodeType==1&&a.className&&a.className.indexOf("embedssvg")!=-1){a=this._handler.document._nodeById["_"+a.getAttribute("id").replace("_flash","")];return a._getProxyNode()}else return a}a=this._nodeXML.nextSibling;if(a===null)return null;a=l._getNode(a,this._handler);
this._getFakeNode(a)._passThrough=this._passThrough;return a},_passThrough:false,_attached:true,_fake:true,_defineNodeAccessors:function(){this.__defineGetter__("parentNode",n(this,this._getParentNode));this.__defineGetter__("firstChild",n(this,this._getFirstChild));this.__defineGetter__("lastChild",n(this,this._getLastChild));this.__defineGetter__("previousSibling",n(this,this._getPreviousSibling));this.__defineGetter__("nextSibling",n(this,this._getNextSibling));this.__defineGetter__("childNodes",
function(c){return function(){return c._childNodes}}(this));if(this.nodeName=="#text")this._childNodes.length=0;else{var a=this._nodeXML.childNodes;this._childNodes.length=a.length;for(var b=0;b<a.length;b++)this._defineChildNodeAccessor(b)}if(this.nodeType==h.TEXT_NODE){this.__defineGetter__("data",function(c){return function(){return c._nodeValue}}(this));this.__defineSetter__("data",function(c){return function(d){return c._setNodeValue(d)}}(this));this.__defineGetter__("textContent",function(c){return function(){return c._nodeValue}}(this));
this.__defineSetter__("textContent",function(c){return function(d){return c._setNodeValue(d)}}(this))}else this.__defineGetter__("textContent",function(){return function(){return""}}());this.__defineGetter__("nodeValue",function(c){return function(){return c._nodeValue}}(this));this.__defineSetter__("nodeValue",function(c){return function(d){return c._setNodeValue(d)}}(this))},_defineChildNodeAccessor:function(a){var b=this;this._childNodes.__defineGetter__(a,function(){var c=l._getNode(b._nodeXML.childNodes[a],
b._handler);c._passThrough=b._passThrough;return c})},_getChildNodes:function(a){if(!i)return this._childNodes;if(a===undefined)a=false;var b=r();if(this.nodeName=="#text")return b;if(this._nodeXML.childNodes.length==this._childNodes.length&&!a)return this._childNodes;else{for(var c=0;c<this._nodeXML.childNodes.length;c++){var d=l._getNode(this._nodeXML.childNodes[c],this._handler);d._fakeNode._passThrough=this._passThrough;if(a)d=d._fakeNode;b.push(d)}return this._childNodes=b}},_createHTC:function(){if(!this._htcContainer){this._htcContainer=
document.getElementById("__htc_container");if(!this._htcContainer){var a=document.getElementsByTagName("body")[0],b=document.createElement("div");b.id="__htc_container";b.style.position="absolute";b.style.top="-5000px";b.style.left="-5000px";a.appendChild(b);this._htcContainer=b}}a=document.createElement("svg:"+this.nodeName);a._fakeNode=this;a._handler=this._handler;this._htcContainer.appendChild(a);this._htcNode=a},_setNodeValue:function(a){if(this.nodeType!=h.TEXT_NODE)return a;this._nodeValue=
a;this._nodeXML.firstChild.nodeValue=a;if(this._attached&&this._passThrough){var b=l._encodeFlashData(a);this._handler.sendToFlash("jsSetText",[this._nodeXML.parentNode.getAttribute("__guid"),this._guid,b])}return a},_getFakeNode:function(a){a||(a=this);if(i&&a._fakeNode)a=a._fakeNode;return a},_processAppendedChildren:function(a,b,c,d){var e;if(a.nodeType==h.DOCUMENT_FRAGMENT_NODE){b=this._getFakeNode(a._getFirstChild());if(c&&d)e=this._handler._redrawManager.suspendRedraw(1E4)}else b=a;for(;b;){var f=
b._nodeXML;b._handler=this._handler;f=f.getAttribute("id");if(c&&b.nodeType==h.ELEMENT_NODE&&f)this._handler.document._nodeById["_"+f]=b;if(c)if(this._handler.type=="script")b.ownerDocument=document;else if(this._handler.type=="object")b.ownerDocument=this._handler.document;if(c){for(f=0;f<b._detachedListeners.length;f++){var g=b._detachedListeners[f];b.addEventListener(g.type,g.listener,g.useCapture,true)}b._detachedListeners=[]}f=b;if(g=(g=b._getChildNodes())&&g.length>0?g[0]:null){b=g;if(i)b=b._fakeNode}for(;!g&&
b;){if(b!=a)if(g=b._getNextSibling()){b=g;if(i)b=b._fakeNode;break}if(b==a)b=null;else{if((b=b._getParentNode())&&i)b=b._fakeNode;if(b&&(b.nodeType!=1||b.nodeName.toUpperCase()=="SVG"))b=null}}f._attached=c;f._passThrough=d}a.nodeType==h.DOCUMENT_FRAGMENT_NODE&&c&&d&&this._handler._redrawManager.unsuspendRedraw(e)},_importNode:function(a,b){if(typeof b=="undefined")b=true;var c;c=this._attached?this._handler.document._xml:this._nodeXML.ownerDocument;c=typeof c.importNode=="undefined"?document._importNodeFunc(c,
a._nodeXML,true):c.importNode(a._nodeXML,true);b&&this._nodeXML.appendChild(c);a._importChildXML(c);return c},_importChildXML:function(a){this._nodeXML=a;a=this._getChildNodes();for(var b=0;b<a.length;b++){var c=a[b];if(i&&c._fakeNode)c=c._fakeNode;c._nodeXML=this._nodeXML.childNodes[b];c._importChildXML(this._nodeXML.childNodes[b])}},_findChild:function(a,b){if(b===undefined)b=false;for(var c={},d=0,e=0;e<this._nodeXML.childNodes.length;e++){var f=this._nodeXML.childNodes[e];if(!(f.nodeType!=h.ELEMENT_NODE&&
f.nodeType!=h.TEXT_NODE))if(!(b&&(f.getAttribute("__fakeTextNode")||f.nodeType==h.TEXT_NODE))){f.nodeType==h.ELEMENT_NODE&&d++;if(f.nodeType==h.ELEMENT_NODE&&f.getAttribute("__guid")==a._guid){c.position=b?d:e;c.nodeXML=f;return c}}}return null},_setUnattached:function(){for(var a=this._getChildNodes(),b=0;b<a.length;b++){var c=a[b];if(i)c=c._fakeNode;c._setUnattached()}this._passThrough=this._attached=false;this._handler=null},_getProxyNode:function(){return i?this._htcNode:this},_createChildNodes:function(){var a;
if(i)a=r();else{a={};a.item=function(b){return b>=this.length?null:this[b]}}return a},_getTextContent:function(){return this.nodeType==h.TEXT_NODE?this._nodeValue:""},_setTextContent:function(a){return this.nodeType==h.TEXT_NODE?this._setNodeValue(a):""},_getData:function(){if(this.nodeType==h.TEXT_NODE)return this._nodeValue},_setData:function(a){if(this.nodeType==h.TEXT_NODE)return this._setNodeValue(a)},_createEmptyMethods:function(){if(this.nodeType==h.TEXT_NODE)this.getAttribute=this.getAttributeNS=
this.setAttribute=this.setAttributeNS=this.removeAttribute=this.removeAttributeNS=this.hasAttribute=this.hasAttributeNS=this.getElementsByTagNameNS=this._getId=this._setId=this._getX=this._getY=this._getWidth=this._getHeight=this._getCurrentScale=this._setCurrentScale=this._getCurrentTranslate=this.createSVGRect=this.createSVGPoint=function(){}},_persistEventListeners:function(){for(var a in this._listeners)for(var b=0;b<this._listeners[a].length;b++){var c=this._listeners[a][b];this._detachedListeners.push({type:c.type,
listener:c.listener,useCapture:c.useCapture})}this._listeners=[];a=this._getChildNodes();for(b=0;b<a.length;b++){c=a[b];if(c._fakeNode)c=c._fakeNode;c._persistEventListeners()}},_findListener:function(a,b,c,d){for(var e=0;e<a.length;e++){var f=a[e];if(f.listener==c&&f.type==b&&f.useCapture==d)return e}return null}});t.prototype=new h;q(t,{getAttribute:function(a){return this.getAttributeNS(null,a,true)},getAttributeNS:function(a,b,c){var d;if(a==null&&b=="__guid")return null;if(this._attached&&this._passThrough&&
!this._handler._redrawManager.isSuspended())d=this._handler.sendToFlash("jsGetAttribute",[this._guid,false,false,a,b,true]);else if(i){if(i)if(a)for(var e=0;e<this._nodeXML.attributes.length;e++){var f=this._nodeXML.attributes.item(e),g=(new String(f.name)).match(/[^:]*:?(.*)/)[1];if(f.namespaceURI&&f.namespaceURI==a&&g==b){d=f.nodeValue;break}}else d=this._nodeXML.getAttribute(b)}else d=this._nodeXML.getAttributeNS(a,b);if(a=="null"&&b=="id"&&!d)return"";if(d===undefined||d===null||/^[ ]*$/.test(d))return c?
null:"";return d},removeAttribute:function(a){this.removeAttributeNS(null,a)},removeAttributeNS:function(a,b){if(b=="id"&&this._attached&&this.namespaceURI==svgns){var c=this._handler.document,d=this._nodeXML.getAttribute("id");c._nodeById["_"+d]=undefined}var e;if(a)for(c=0;c<this._nodeXML.attributes.length;c++){d=this._nodeXML.attributes.item(c);var f=(new String(d.name)).match(/([^:]+:)?(.*)/),g;if(d.name.indexOf(":")!=-1){g=f[1];f=f[2]}else f=f[1];if(d.namespaceURI&&d.namespaceURI==a&&f==b){e=
d;break}}else e=this._nodeXML.getAttributeNode(b);if(e){this._nodeXML.removeAttributeNode(e);e=b;if(a)e=g+":"+b;this._attributes["_"+e]=undefined;this._attached&&this._passThrough&&this._handler.sendToFlash("jsRemoveAttribute",[this._guid,a,b])}else console.log("No attribute node found for: "+b+" in the namespace: "+a)},setAttribute:function(a,b){this.setAttributeNS(null,a,b)},setAttributeNS:function(a,b,c){if(c===null||typeof c=="undefined")c="";var d=b;if(b.indexOf(":")!=-1)d=b.split(":")[1];if(this._attached&&
b=="id"){var e=this._handler.document,f=this._nodeXML.getAttribute("id");e._nodeById["_"+f]=undefined;if(f===0||f)e._nodeById["_"+c]=this}if(w&&d=="style"&&this._nodeXML.parentNode!==null&&this._nodeXML.parentNode.nodeName=="clipPath"){e=this._nodeXML.nextSibling;f=this._nodeXML.parentNode;this._nodeXML.parentNode.removeChild(this._nodeXML);this._nodeXML.setAttribute("style",c);e?f.insertBefore(this._nodeXML,e):f.appendChild(this._nodeXML)}else if(a&&i){e=this._nodeXML.ownerDocument.createNode(2,
b,a);e.nodeValue=c;this._nodeXML.setAttributeNode(e)}else i?this._nodeXML.setAttribute(b,c):this._nodeXML.setAttributeNS(a,b,c);this._attributes["_"+b]=c;if(this._attached&&this._passThrough){b=l._encodeFlashData(c);this._handler.sendToFlash("jsSetAttribute",[this._guid,false,a,d,b])}},hasAttribute:function(a){return this.hasAttributeNS(null,a)},hasAttributeNS:function(a,b){if(!a&&!i)return this._nodeXML.hasAttribute(b);else if(i){for(var c=null,d=0;d<this._nodeXML.attributes.length;d++){var e=this._nodeXML.attributes.item(d),
f=(new String(e.name)).match(/(?:[^:]+:)?(.*)/)[1],g=e.namespaceURI;if(g=="")g=null;if(a==g&&f==b){c=e;break}}return c!=null}else return this._nodeXML.hasAttributeNS(a,b)},getElementsByTagNameNS:function(a,b){var c=r(),d;if(a=="")a=null;if(a==svgns)a=svgnsFake;if(this._nodeXML.getElementsByTagNameNS)c=this._nodeXML.getElementsByTagNameNS(a,b);else{var e=null;if(this._attached)e=this._handler.document._namespaces;d="xmlns";if(a&&a!="*"&&e){d=e["_"+a];if(d===undefined)return r()}d=v(this._nodeXML.ownerDocument,
this._nodeXML,a=="*"&&b=="*"?"//*[ancestor::*[@__guid = '"+this._guid+"']]":a=="*"?"//*[namespace-uri()='*' and local-name()='"+b+"' and ancestor::*[@__guid = '"+this._guid+"']]":b=="*"?"//*[namespace-uri()='"+a+"' and ancestor::*[@__guid = '"+this._guid+"']]":"//"+b+"[ancestor::*[@__guid = '"+this._guid+"']]| //*[namespace-uri()='"+a+"' and local-name()='"+b+"' and ancestor::*[@__guid = '"+this._guid+"']]",e);if(d!==null&&d!==undefined&&d.length>0)for(e=0;e<d.length;e++)d[e]!==this._nodeXML&&c.push(d[e])}if(a==
"*"&&b=="*"){a=[];for(e=0;e<c.length;e++)c[e].nodeType==h.ELEMENT_NODE&&c[e].nodeName!="__text"&&a.push(c[e]);c=a}a=r();for(e=0;e<c.length;e++){b=l._getNode(c[e],this._handler);b._passThrough=true;a.push(b)}return a},style:null,_setClassName:function(){},_getClassName:function(){},_setTransform:function(){},_getTransform:function(){},_getViewBox:function(){},_getId:function(){return this._attributes._id?this._attributes._id:""},_setId:function(a){return this.setAttribute("id",a)},ownerSVGElement:null,
_getX:function(){var a=this._trimMeasurement(this.getAttribute("x"));return new E(new D(new Number(a)))},_getY:function(){var a=this._trimMeasurement(this.getAttribute("y"));return new E(new D(new Number(a)))},_getWidth:function(){var a=this._trimMeasurement(this.getAttribute("width"));return new E(new D(new Number(a)))},_getHeight:function(){var a=this._trimMeasurement(this.getAttribute("height"));return new E(new D(new Number(a)))},_getCurrentScale:function(){return this._currentScale},_setCurrentScale:function(a){if(a!==
this._currentScale){this._currentScale=a;this._handler.sendToFlash("jsSetCurrentScale",[a])}return a},_getCurrentTranslate:function(){return this._currentTranslate},createSVGPoint:function(){return new F(0,0)},createSVGRect:function(){return new da(0,0,0,0)},_trimMeasurement:function(a){if(a!==null)a=a.replace(/[a-z]/gi,"");return a},_getInnerHTML:function(){},_setInnerHTML:function(){},_allEvents:["onfocusin","onfocusout","onactivate","onclick","onmousedown","onmouseup","onmouseover","onmousemove",
"onmouseout","onload","onunload","onabort","onerror","onresize","onscroll","onzoom","onbegin","onend","onrepeat"],_handleEvent:function(){},_prepareEvents:function(){},_attributes:null,_importAttributes:function(a,b){for(a=0;a<b.attributes.length;a++){var c=b.attributes[a];this._attributes["_"+c.nodeName]=c.nodeValue}},_defineAccessors:function(){var a=this;if(this.nodeName=="svg"||this.nodeName=="use"){this.__defineGetter__("x",function(){return a._getX()});this.__defineGetter__("y",function(){return a._getY()});
this.__defineGetter__("width",function(){return a._getWidth()});this.__defineGetter__("height",function(){return a._getHeight()})}if(this.nodeName=="svg"){this.__defineGetter__("currentTranslate",function(){return a._getCurrentTranslate()});this.__defineGetter__("currentScale",function(){return a._getCurrentScale()});this.__defineSetter__("currentScale",function(b){return a._setCurrentScale(b)})}this.__defineGetter__("id",n(this,this._getId));this.__defineSetter__("id",n(this,this._setId))},_defineAccessor:function(a,
b){var c=this;this.__defineGetter__(a,function(){return c.getAttribute(a)});b&&this.__defineSetter__(a,function(d){return c.setAttribute(a,d)})}});A.prototype=new h;q(A,{_reset:function(){for(;this._nodeXML.firstChild;)this._nodeXML.removeChild(this._nodeXML.firstChild);this._childNodes=this._createChildNodes();i||this._defineNodeAccessors()}});s._allStyles=["font","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","direction","letterSpacing","textDecoration",
"unicodeBidi","wordSpacing","clip","color","cursor","display","overflow","visibility","clipPath","clipRule","mask","opacity","enableBackground","filter","floodColor","floodOpacity","lightingColor","stopColor","stopOpacity","pointerEvents","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","fill","fillOpacity","fillRule","imageRendering","marker","markerEnd","markerMid","markerStart","shapeRendering","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin",
"strokeMiterlimit","strokeOpacity","strokeWidth","textRendering","alignmentBaseline","baselineShift","dominantBaseline","glyphOrientationHorizontal","glyphOrientationVertical","kerning","textAnchor","writingMode"];s._allRootStyles=["border","verticalAlign","backgroundColor","top","right","bottom","left","position","width","height","margin","marginTop","marginBottom","marginRight","marginLeft","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","borderTopWidth","borderRightWidth","borderBottomWidth",
"borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","zIndex","overflowX","overflowY","float","clear"];q(s,{_ignoreStyleChanges:true,_setup:function(){this._normalizeStyle();if(i){var a=this._element._htcNode.style,b=this._fromStyleString();for(c=0;c<b.length;c++){d=this._toCamelCase(b[c].styleName);a[d]=b[c].styleValue}this.length=a.length=0;a.item=n(this,this.item);a.setProperty=n(this,
this.setProperty);a.getPropertyValue=n(this,this.getPropertyValue);this._changeListener=n(this,this._onPropertyChange);this._element._htcNode.attachEvent("onpropertychange",this._changeListener)}else{for(var c=0;c<s._allStyles.length;c++){var d=s._allStyles[c];this._defineAccessor(d)}if(this._element.nodeName=="svg")for(c=0;c<s._allRootStyles.length;c++){d=s._allRootStyles[c];this._defineAccessor(d)}this.__defineGetter__("length",n(this,this._getLength))}},_defineAccessor:function(a){var b=this;this.__defineGetter__(a,
function(){return b._getStyleAttribute(a)});this.__defineSetter__(a,function(c){return b._setStyleAttribute(a,c)})},_setStyleAttribute:function(a,b){for(var c=this._fromCamelCase(a),d=this._fromStyleString(),e=false,f=0;f<d.length;f++)if(d[f].styleName===c){d[f].styleValue=b;e=true;break}e||d.push({styleName:c,styleValue:b});d=this._toStyleString(d);this._element._nodeXML.setAttribute("style",d);this._element._attributes._style=d;if(i){d=this._element._htcNode.style;if(!e){d.length++;this.length++}this._ignoreStyleChanges=
true;d[a]=b;this._ignoreStyleChanges=false}if(this._element._attached&&this._element._passThrough){a=l._encodeFlashData(b);this._element._handler.sendToFlash("jsSetAttribute",[this._element._guid,true,null,c,a])}},_getStyleAttribute:function(a){a=this._fromCamelCase(a);if(this._element._attached&&this._element._passThrough&&!this._element._handler._redrawManager.isSuspended())return this._element._handler.sendToFlash("jsGetAttribute",[this._element._guid,true,false,null,a,false]);else{for(var b=this._fromStyleString(),
c=0;c<b.length;c++)if(b[c].styleName===a)return b[c].styleValue;return null}},_fromStyleString:function(){var a=this._element._nodeXML.getAttribute("style");if(a===null||a===undefined)return[];if(a.indexOf(";")==-1)a=[a];else{a=a.split(/\s*;\s*/);a[a.length-1]||(a=a.slice(0,a.length-1))}for(var b=[],c=0;c<a.length;c++){var d=a[c].split(":");if(d.length==2){var e=d[0];d=d[1];e=e.replace(/^\s+/,"");d=d.replace(/^\s+/,"");b.push({styleName:e,styleValue:d})}}return b},_toStyleString:function(a){for(var b=
"",c=0;c<a.length;c++){b+=a[c].styleName+": ";b+=a[c].styleValue+";";if(c!=a.length-1)b+=" "}return b},_fromCamelCase:function(a){return a.replace(/([A-Z])/g,"-$1").toLowerCase()},_toCamelCase:function(a){if(a.indexOf("-")==-1)return a;var b="";a=a.split("-");b+=a[0];for(var c=1;c<a.length;c++)b+=a[c].charAt(0).toUpperCase()+a[c].substring(1);return b},setProperty:function(a,b){this._setStyleAttribute(this._toCamelCase(a),b);return b},getPropertyValue:function(a){return this._getStyleAttribute(this._toCamelCase(a))},
item:function(a){return this._fromStyleString()[a].styleName},_getLength:function(){return this._fromStyleString().length},_normalizeStyle:function(){if(this._element._nodeXML.getAttribute("style"))if(/[A-Z]/.test(this._element._nodeXML.getAttribute("style"))){for(var a=this._fromStyleString(),b=0;b<a.length;b++){a[b].styleName=a[b].styleName.toLowerCase();if(a[b].styleValue.indexOf("url(")==-1)a[b].styleValue=a[b].styleValue.toLowerCase()}var c="";for(b=0;b<a.length;b++)c+=a[b].styleName+": "+a[b].styleValue+
"; ";if(c.charAt(c.length-1)==" ")c=c.substring(0,c.length-1);a=this._element._passThrough;this._element._passThrough=false;this._element.setAttribute("style",c);this._element._passThrough=a}},_onPropertyChange:function(){if(!this._ignoreStyleChanges){var a=window.event.propertyName;if(a&&/^style\./.test(a)&&a!="style.length"){a=a.match(/^style\.(.*)$/)[1];this._setStyleAttribute(a,this._element._htcNode.style[a])}}}});q(V,{_scriptsToExec:null,_utf8encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b=
"",c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128)b+=String.fromCharCode(d);else{if(d>127&&d<2048)b+=escape(String.fromCharCode(d>>6|192));else{b+=escape(String.fromCharCode(d>>12|224));b+=escape(String.fromCharCode(d>>6&63|128))}b+=escape(String.fromCharCode(d&63|128))}}return b},_fetchURL:function(a,b,c){var d=ba();if(i){a=this._utf8encode(a);a+=a.indexOf("?")==-1?"?":"&";a+=(new Date).getTime()}d.onreadystatechange=function(){if(d.readyState==4){d.status==200?b(d.responseText):c(d.status+": "+
d.statusText);d=null}};d.open("GET",a,true);d.send(null)},_fallback:function(a){console.log("onError (fallback), error="+a)},_loadHTC:function(){this._dummyNode=document.createElement("svg:__force__load");this._dummyNode._handler=this._handler;this._readyStateListener=n(this,this._onHTCLoaded);this._dummyNode.attachEvent("onreadystatechange",this._readyStateListener);document.getElementsByTagName("head")[0].appendChild(this._dummyNode)},_onFlashLoaded:function(){this._handler.flash=document.getElementById(this._handler.flashID);
if(this._savedParams.length){for(var a=0;a<this._savedParams.length;a++)this._handler.flash.appendChild(this._savedParams[a]);this._savedParams=null}this._handler.flash.top=this._handler.flash.parent=window;this._swfLoaded=true;if(!i||this._htcLoaded)this._onEverythingLoaded()},_onHTCLoaded:function(){document.getElementsByTagName("head")[0].removeChild(this._dummyNode);this._dummyNode.detachEvent("onreadystatechange",this._readyStateListener);this._dummyNode=null;this._htcLoaded=true;this._swfLoaded&&
this._onEverythingLoaded()},_onEverythingLoaded:function(){var a=this._handler._inserter._determineSize();this._handler.sendToFlash("jsHandleLoad",[this._getRelativeTo("object"),this._getRelativeTo("page"),a.pixelsWidth,a.pixelsHeight,false,this._svgString])},_onRenderingFinished:function(){this._handler.flash.style.visibility="visible";var a=this._xml.documentElement,b=a.getAttribute("id");a=new C(a,null,null,this._handler);var c=this._handler.document;c.documentElement=a._getProxyNode();c.rootElement=
a._getProxyNode();c._nodeById["_"+b]=a;i&&this._handler.flash.setAttribute("contentDocument",null);this._handler.flash.contentDocument=c;this._handler.window=new W(this._handler);c.defaultView=this._handler.window;if(b=a.getAttribute("onload")){b="(function(){"+('var evt = { target: document.getElementById("'+a.getAttribute("id")+'") ,currentTarget: document.getElementById("'+a.getAttribute("id")+'") ,preventDefault: function() { this.returnValue=false; }};')+b+"}).apply(document.documentElement);";
this._scriptsToExec.push(b)}b="";for(a=0;a<this._scriptsToExec.length;a++)b+=this._scriptsToExec[a]+"\n";this._executeScript(b);this._handler._loaded=true;this._handler.fireOnLoad(this._handler.id,"object")},_getRelativeTo:function(a){var b="";if((a=a=="object"?this.url.replace(/[^:]*:\/\/[^\/]*/).match(/\/?[^\?\#]*/)[0]:window.location.pathname.toString())&&a.length>0&&a.indexOf("/")!=-1)b=a.replace(/\/([^\/]*)$/,"/");return b},_executeScript:function(a){var b=document.createElement("iframe");b.setAttribute("src",
"about:blank");b.style.position="absolute";b.style.top="-1000px";b.style.left="-1000px";document.getElementsByTagName("body")[0].appendChild(b);var c=b.contentDocument?b.contentDocument:b.contentWindow.document;this._handler.document.defaultView=b.contentWindow;a=this._sandboxedScript(a);a=a+";__svgHandler.sandbox_eval = "+(i?"window.eval;":"function(scriptCode) { return window.eval(scriptCode) };");c.write("<script>"+a+"<\/script>");c.close();this._handler.window._fireOnload()},_sandboxedScript:function(a){a=
'var __svgHandler = top.svgweb.handlers["'+this._handler.id+'"];\nwindow.svgns = "'+svgns+'";\nwindow.xlinkns = "'+xlinkns+'";\nwindow._timeoutIDs = [];\nwindow._setTimeout = window.setTimeout;\nwindow.setTimeout = \n       (function() {\n          return function(f, ms) {\n            var timeID = window._setTimeout(f, ms);\n            window._timeoutIDs.push(timeID);\n            return timeID;\n          };\n        })();\nwindow._intervalIDs = [];\nwindow._setInterval = window.setInterval;\nwindow.setInterval = \n       (function() {\n          return function(f, ms) {\n            var timeID = window._setInterval(f, ms);\n            window._intervalIDs.push(timeID);\n            return timeID;\n          };\n        })();\n\n\n'+
a;a=a.replace(/top\.document/g,"top.DOCUMENT");a=a.replace(/top\.window/g,"top.WINDOW");a=a.replace(/(^|[^A-Za-z0-9_])document(\.|'|"|\,| |\))/g,"$1__svgHandler.document$2");a=a.replace(/window\.(location|addEventListener|onload|frameElement)/g,"__svgHandler.window.$1");a=a.replace(/top\.DOCUMENT/g,"top.document");return a=a.replace(/top\.WINDOW/g,"top.window")},_getPARAMs:function(a){for(var b=[],c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];d.nodeName.toUpperCase()=="PARAM"&&b.push(d.cloneNode(false))}return b}});
q(W,{addEventListener:function(a,b){a.toLowerCase()=="SVGLoad"&&this._onloadListeners.push(b)},_fireOnload:function(){for(var a=0;a<this._onloadListeners.length;a++)try{this._onloadListeners[a]()}catch(b){console.log("The following exception occurred from an SVG onload listener: "+(b.message||b))}if(this.onload)try{this.onload()}catch(c){console.log("The following exception occurred from an SVG onload listener: "+(c.message||c))}},_createLocation:function(a){var b={},c=this._handler._svgObject.url;
a=a?a:window.location;if(/^data:/.test(c)){b.href=c;b.toString=function(){return this.href};return b}if(!/^http/.test(c))if(c.charAt(0)=="/")c=a.protocol+"//"+a.host+c;else if(a.pathname.indexOf("/")==-1)c=a.protocol+"//"+a.host+"/"+c;else{for(var d=a.pathname,e=d.length-1;e>=0;e--){if(d.charAt(e)=="/")break;d=d.substring(0,e)}c=a.protocol+"//"+a.host+d+c}c=c.match(/^(https?:)\/\/([^\/:]*):?([0-9]*)([^\?#]*)([^#]*)(#.*)?$/);b.protocol=c[1]?c[1]:a.href;if(b.protocol.charAt(b.protocol.length-1)!=":")b.protocol+=
":";b.hostname=c[2];b.port="";if(c[3])b.port=c[3];d=true;if(b.protocol!=a.protocol||b.hostname!=a.hostname||b.port&&b.port!=a.port)d=false;if(d&&!b.port)b.port=a.port;b.host=b.port?b.hostname+":"+b.port:b.hostname;b.pathname=c[4]?c[4]:"";b.search=c[5]?c[5]:"";b.hash=c[6]?c[6]:"";b.href=b.protocol+"//"+b.host+b.pathname+b.search+b.hash;b.toString=function(){return this.protocol+"//"+this.host+this.pathname+this.search+this.hash};return b}});q(I,{_setupFlash:function(){var a=this._determineSize(),b=
this._determineBackground(),c=this._determineStyle(),d=this._determineClassName(),e=this._determineCustomAttrs(),f;if(this._embedType=="script"){f=this._nodeXML.getAttribute("id");this._handler.flashID=f+"_flash"}else if(this._embedType=="object"){f=this._replaceMe.getAttribute("id");this._handler.flashID=f}this._insertFlash(this._createFlash(a,f,b,c,d,e))},_insertFlash:function(a){if(i){var b=this;window.setTimeout(function(){b._replaceMe.outerHTML=a;b=null},1)}else{var c;if(u){if(u)c=a}else{var d=
document.createElement("div");d.innerHTML=a;c=d.childNodes[0];d.removeChild(c);for(d=0;d<c.childNodes.length;d++){var e=c.childNodes[d];if(e.nodeName.toUpperCase()=="EMBED"){c=e;break}}}this._replaceMe.parentNode.replaceChild(c,this._replaceMe);return c}},_determineSize:function(){var a=this._parentNode.clientWidth,b=this._parentNode.clientHeight;if(b==0)this.invalidParentHeight=true;if(a==0)a=this._parentNode.offsetWidth;if(!w){a-=this._getMargin(this._parentNode,"margin-left");a-=this._getMargin(this._parentNode,
"margin-right");b-=this._getMargin(this._parentNode,"margin-top");b-=this._getMargin(this._parentNode,"margin-bottom")}return isStandardsMode?this._getStandardsSize(a,b):this._getQuirksSize(a,b)},_getQuirksSize:function(a,b){var c;if(this._embedType=="script")for(var d=this._parentNode;d&&d.style;){if(d.nodeName.toLowerCase()=="div")break;if(d.nodeName.toLowerCase()=="body"){if(this._nodeXML.getAttribute("style")&&this._nodeXML.getAttribute("style").indexOf("fixed")!=-1){b=window.innerHeight&&window.innerHeight>
0?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&document.documentElement.clientHeight>0?document.documentElement.clientHeight:document.body.clientHeight;this.invalidParentHeight=false}else{this.invalidParentHeight=true;b=0}break}d=d.parentNode}d=this._explicitWidth;var e=this._explicitHeight,f=this._nodeXML.getAttribute("width");if(f&&f.indexOf("%")==-1)f=parseInt(f).toString();var g=this._nodeXML.getAttribute("height");if(g&&g.indexOf("%")==-1)g=parseInt(g).toString();
if(d&&e){a=d.indexOf("%")!=-1?a*parseInt(d)/100:d;if(e.indexOf("%")!=-1)if(b>0)c=b*parseInt(e)/100;else console.log("SVGWeb: unhandled resize scenario.");else c=e;return{width:d,height:c,pixelsWidth:a,pixelsHeight:c,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"}}if(d){a=d.indexOf("%")!=-1?a*parseInt(d)/100:d;if(this._nodeXML.getAttribute("viewBox")){if(f&&f.indexOf("%")==-1&&g&&g.indexOf("%")==-1)e=a*(g/f);else{f=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);b=f[2];f=f[3];
e=a*(f/b)}return{width:d,height:e,pixelsWidth:a,pixelsHeight:e,clipMode:"neither"}}else{e=f&&f.indexOf("%")==-1&&g&&g.indexOf("%")==-1?a*(g/f):g&&g.indexOf("%")==-1?g:150;return{width:d,height:e,pixelsWidth:a,pixelsHeight:e,clipMode:"both"}}}if(e){c=e.indexOf("%")!=-1?b*parseInt(e)/100:e;if(this._nodeXML.getAttribute("viewBox")){if(f&&f.indexOf("%")==-1&&g&&g.indexOf("%")==-1)d=c*(f/g);else{f=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);b=f[2];f=f[3];d=c*(b/f)}return{width:d,height:e,pixelsWidth:d,
pixelsHeight:c,clipMode:"neither"}}else{if(f&&f.indexOf("%")==-1&&g&&g.indexOf("%")==-1)a=d=c*(f/g);else{d=f?f:"100%";a=d.indexOf("%")!=-1?a*parseInt(d)/100:d}return{width:d,height:e,pixelsWidth:a,pixelsHeight:c,clipMode:"both"}}}d=f?f:"100%";a=d.indexOf("%")!=-1?a*parseInt(d)/100:d;if(g&&g.indexOf("%")==-1){e=g;return{width:d,height:e,pixelsWidth:a,pixelsHeight:e,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"}}else if(this._nodeXML.getAttribute("viewBox")){if(this._embedType=="script"&&
(g==null||g.indexOf("%")!=-1)&&!this.invalidParentHeight){if(g==null)g="100%";c=b*parseInt(g)/100;return{width:d,height:c,pixelsWidth:a,pixelsHeight:c,clipMode:"neither"}}f=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);b=f[2];f=f[3];e=a*(f/b);return{width:d,height:e,pixelsWidth:a,pixelsHeight:e,clipMode:"neither"}}else{e=150;return{width:d,height:e,pixelsWidth:a,pixelsHeight:e,clipMode:"both"}}},_getStandardsSize:function(a,b){var c=this._explicitWidth,d=this._explicitHeight,e=this._nodeXML.getAttribute("width");
if(e&&e.indexOf("%")==-1)e=parseInt(e).toString();var f=this._nodeXML.getAttribute("height");if(f&&f.indexOf("%")==-1)f=parseInt(f).toString();if(c&&!d)return this._getQuirksSize(a,b);if(!c&&!d)return this._getQuirksSize(a,b);if(!c&&d){c=e?e:"100%";a=c.indexOf("%")!=-1?a*parseInt(c)/100:c;if(d.indexOf("%")==-1){b=d;if(e&&e.indexOf("%")==-1&&f&&f.indexOf("%")==-1)a=c=d*(e/f);else if(this._nodeXML.getAttribute("viewBox")){viewBox=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);boxWidth=viewBox[2];
boxHeight=viewBox[3];a=c=b*(boxWidth/boxHeight)}return{width:c,height:d,pixelsWidth:a,pixelsHeight:d,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"}}else{if(f&&f.indexOf("%")==-1)b=f;else if(this._nodeXML.getAttribute("viewBox")){viewBox=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);boxWidth=viewBox[2];boxHeight=viewBox[3];b=a*(boxHeight/boxWidth)}else b=150;return{width:c,height:b,pixelsWidth:a,pixelsHeight:b,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"}}}if(c&&
d){a=c.indexOf("%")!=-1?a*parseInt(c)/100:c;if(d.indexOf("%")==-1)return{width:c,height:d,pixelsWidth:a,pixelsHeight:d,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"};else if(e&&e.indexOf("%")==-1&&f&&f.indexOf("%")==-1){b=a*(f/e);return{width:c,height:b,pixelsWidth:a,pixelsHeight:b,clipMode:"neither"}}else if(this.invalidParentHeight)if(this._nodeXML.getAttribute("viewBox")){viewBox=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);boxWidth=viewBox[2];boxHeight=viewBox[3];d=a*
(boxHeight/boxWidth);return{width:c,height:d,pixelsWidth:a,pixelsHeight:d,clipMode:"neither"}}else{b=f&&f.indexOf("%")==-1?f:150;return{width:c,height:b,pixelsWidth:a,pixelsHeight:b,clipMode:"both"}}else{b=b*parseInt(d)/100;return{width:c,height:b,pixelsWidth:a,pixelsHeight:b,clipMode:"neither"}}}},_getMargin:function(a,b){var c;if(a.currentStyle)c=parseInt(a.currentStyle[b]);else if(window.getComputedStyle)c=parseInt(document.defaultView.getComputedStyle(a,null).getPropertyValue(b));return c?c:0},
_determineBackground:function(){var a=false,b=null,c=this._nodeXML.getAttribute("style");if(c&&c.indexOf("background-color")!=-1)if(c=c.match(/background\-color:\s*([^;]*)/))b=c[1];if(b===null)a=true;return{color:b,transparent:a}},_determineStyle:function(){var a=this._nodeXML.getAttribute("style");a||(a="");if(a.length>0&&a.charAt(a.length-1)!=";")a+=";";if(this._embedType=="script"&&a.indexOf("display:")==-1)a+="display: inline;";if(this._embedType=="script"&&a.indexOf("overflow:")==-1)a+="overflow: hidden;";
return a},_determineClassName:function(){var a=this._nodeXML.getAttribute("class");return a?a+" embedssvg":"embedssvg"},_determineCustomAttrs:function(){var a=[];if(this._embedType=="object")for(var b=this._replaceMe,c=document._createElement("object"),d=0;d<b.attributes.length;d++){var e=b.attributes[d],f=e.nodeName;e=e.nodeValue;!e&&e!=="true"||c.getAttribute(f)||/^(id|name|width|height|data|class|style|codebase|type|_listeners|addEventListener|onload)$/.test(f)||a.push({attrName:f.toString(),attrValue:e.toString()})}return a},
_createFlash:function(a,b,c,d,e,f){b="uniqueId="+encodeURIComponent(b)+"&sourceType=string&clipMode="+a.clipMode+"&debug=true&svgId="+encodeURIComponent(b);var g;g=this._isXDomain?svgweb.xDomainURL+"svg.swf":svgweb.libraryPath+"svg.swf";var j=window.location.protocol;if(j.charAt(j.length-1)==":")j=j.substring(0,j.length-1);var k;if(u){k=document.createElement("embed");k.setAttribute("src",g);k.setAttribute("quality","high");c.color&&k.setAttribute("bgcolor",c.color);c.transparent&&k.setAttribute("wmode",
"transparent");k.setAttribute("width",a.width);k.setAttribute("height",a.height);k.setAttribute("id",this._handler.flashID);k.setAttribute("name",this._handler.flashID);k.setAttribute("swLiveConnect","true");k.setAttribute("allowScriptAccess","always");k.setAttribute("type","application/x-shockwave-flash");k.setAttribute("FlashVars",b);k.setAttribute("pluginspage",j+"://www.macromedia.com/go/getflashplayer");k.setAttribute("style",d);k.setAttribute("className",e);for(var m=0;m<f.length;m++)k.setAttribute(f[m].attrName,
f[m].attrValue)}else{k="";for(m=0;m<f.length;m++)k+=" "+f[m].attrName+'="'+f[m].attrValue+'"';k='<object\n classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n codebase="'+j+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"\n width="'+a.width+'"\n height="'+a.height+'"\n id="'+this._handler.flashID+'"\n name="'+this._handler.flashID+'"\n style="'+d+'"\n class="'+e+'"\n '+k+'\n>\n <param name="allowScriptAccess" value="always"></param>\n <param name="movie" value="'+
g+'"></param>\n <param name="quality" value="high"></param>\n <param name="FlashVars" value="'+b+'"></param>\n '+(c.color?'<param name="bgcolor" value="'+c.color+'"></param>\n ':"")+(c.transparent?'<param name="wmode" value="transparent"></param>\n ':"")+'<embed src="'+g+'" quality="high" '+(c.color?'bgcolor="'+c.color+'" \n':"")+(c.transparent?'wmode="transparent" \n':"")+'width="'+a.width+'" height="'+a.height+'" id="'+this._handler.flashID+'" name="'+this._handler.flashID+'" swLiveConnect="true" allowScriptAccess="always" type="application/x-shockwave-flash" FlashVars="'+
b+'" pluginspage="'+j+'://www.macromedia.com/go/getflashplayer" style="'+d+'"\n class="'+e+'"\n '+k+"\n /></object>"}return k}});C.prototype=new t;q(C,{suspendRedraw:function(a){return this._handler._redrawManager.suspendRedraw(a)},unsuspendRedraw:function(a){this._handler._redrawManager.unsuspendRedraw(a)},unsuspendRedrawAll:function(){this._handler._redrawManager.unsuspendRedrawAll()},forceRedraw:function(){},nearestViewportElement:null,farthestViewportElement:null,getBBox:function(){},getTransformToElement:function(){},
_onHTCLoaded:function(){this._htcNode.detachEvent("onreadystatechange",this._readyStateListener);this.style._ignoreStyleChanges=false;this._htcLoaded=true;this._swfLoaded&&this._onEverythingLoaded()},_onFlashLoaded:function(){this._handler.flash=document.getElementById(this._handler.flashID);this._swfLoaded=true;if(!i||this._htcLoaded)this._onEverythingLoaded()},_onEverythingLoaded:function(){var a=this._handler._inserter._determineSize();this._handler.sendToFlash("jsHandleLoad",[this._getRelativeTo("object"),
this._getRelativeTo("page"),a.pixelsWidth,a.pixelsHeight,true,this._svgString])},_onRenderingFinished:function(){if(this._handler.type=="script")this._handler.flash.documentElement=this._getProxyNode();if(this._attached)if(this._handler.type=="script")this.ownerDocument=document;else if(this._handler.type=="object")this.ownerDocument=this._handler.document;this._handler.document.rootElement=this._getProxyNode();var a=this._nodeXML.getAttribute("id");this._handler._loaded=true;this._handler.fireOnLoad(a,
"script")},_getRelativeTo:function(){var a="",b=window.location.pathname.toString();if(b&&b.length>0&&b.indexOf("/")!=-1)a=b.replace(/\/([^\/]*)$/,"/");return a},_addRedrawMethods:function(){this._htcNode.suspendRedraw=function(){return function(a){return this._fakeNode.suspendRedraw(a)}}();this._htcNode.unsuspendRedraw=function(){return function(a){return this._fakeNode.unsuspendRedraw(a)}}();this._htcNode.unsuspendRedrawAll=function(){return function(){return this._fakeNode.unsuspendRedrawAll()}}();
this._htcNode.forceRedraw=function(){return function(){return this._fakeNode.forceRedraw()}}()},_createCurrentTranslate:function(){return new F(0,0,true,n(this,this._updateCurrentTranslate))},_updateCurrentTranslate:function(a,b,c){a=="xy"?this._handler.sendToFlash("jsSetCurrentTranslate",["xy",b,c]):this._handler.sendToFlash("jsSetCurrentTranslate",[a,b])}});B.prototype=new h;q(B,{_nodeById:null,implementation:null,documentElement:null,createElementNS:function(a,b){var c=this._namespaces["_"+a];
if(c=="xmlns"||!c)c=null;return(new t(b,c,a))._getProxyNode()},createTextNode:function(a){var b=l._unattachedDoc,c;c=i?b.createElement("__text"):b.createElementNS(svgnsFake,"__text");c.appendChild(b.createTextNode(a));b=new h("#text",h.TEXT_NODE,null,null,c,this._handler);b._nodeValue=a;b.ownerDocument=this;return b._getProxyNode()},createDocumentFragment:function(){return(new A(this))._getProxyNode()},getElementById:function(a){a=v(this._xml,null,'//*[@id="'+a+'"]');if(a.length)a=a[0];else return null;
a=l._getNode(a,this._handler);a._passThrough=true;return a},getElementsByTagNameNS:function(a,b){if(this._handler.type=="script"&&!this._handler._loaded)return[];var c=this.rootElement.getElementsByTagNameNS(a,b);a==svgns&&b=="svg"&&c.push(this.rootElement);return c},_getNamespaces:function(){for(var a=[],b=this._xml.documentElement.attributes,c=0;c<b.length;c++){var d=b[c];if(/^xmlns:?(.*)$/.test(d.nodeName)){var e=d.nodeName.match(/^xmlns:?(.*)$/);e=e[1]?e[1]:"xmlns";d=d.nodeValue;if(!a["_"+e]){a["_"+
e]=d;a["_"+d]=e;a.push(d)}}}return a}});q(J,{multiply:function(){},inverse:function(){var a=this._handler.sendToFlash("jsMatrixInvert",[this.a,this.b,this.c,this.d,this.e,this.f]);a=this._handler._stringToMsg(a);return new J(new Number(a.a),new Number(a.b),new Number(a.c),new Number(a.d),new Number(a.e),new Number(a.f),this._handler)},translate:function(){},scale:function(){},scaleNonUniform:function(){},rotate:function(){},rotateFromVector:function(){},flipX:function(){},flipY:function(){},skewX:function(){},
skewY:function(){}});O(X,{SVG_TRANSFORM_UNKNOWN:0,SVG_TRANSFORM_MATRIX:1,SVG_TRANSFORM_TRANSLATE:2,SVG_TRANSFORM_SCALE:3,SVG_TRANSFORM_ROTATE:4,SVG_TRANSFORM_SKEWX:5,SVG_TRANSFORM_SKEWY:6});q(X,{type:null,matrix:null,angle:null,setMatrix:function(){},setTranslate:function(){},setScale:function(){},setRotate:function(){},setSkewX:function(){},setSkewY:function(){}});q(F,{matrixTransform:function(a){return new F(a.a*this.x+a.c*this.y+a.e,a.b*this.x+a.d*this.y+a.f,this._formalAccessors)}});window.svgweb=
new Q})();