(function(){function q(a,b){for(var c in b)a.prototype[c]=b[c]}function M(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="",h={};for(e=0;e<d.length;e++){var g=d[e],k=d["_"+g];if(!h["_"+g]){f+=k=="xmlns"?'xmlns="'+g+'" ':"xmlns:"+k+'="'+g+'" ';h["_"+
g]=g}}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=H[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(h){}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(g){console.log(g.message);throw new Error("Unable to parse SVG: "+g.message);}}try{H[b+a]=d.cloneNode(true)}catch(k){}return d}
function z(a,b){var c=a._nodeXML||a;c=typeof XMLSerializer!="undefined"?(new XMLSerializer).serializeToString(c):c.xml;c=c.replace(/urn\:__fake__internal__namespace/g,svgns);var d="";if(c.indexOf("xmlns=")==-1)d='xmlns="'+svgns+'" ';if(b)for(var e=0;e<b.length;e++){var f=b[e],h=b["_"+f];if(f==svgnsFake)f=svgns;f=h!="xmlns"?"xmlns:"+h+'="'+f+'"':'xmlns="'+f+'"';if(c.indexOf(f)==-1)d+=f+" "}return c=c.replace(/<([^ ]+)/,"<$1 "+d+" ")}function n(a,b){if(typeof b=="string")b=a[b];return function(){return b.apply(a,
arguments.length?arguments:[])}}function aa(){if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;else if(ActiveXObject){var a=null,b;for(b=0;b<N.length&&!a;++b)try{a=new ActiveXObject(N[b])}catch(c){}if(!a)throw new Error("XMLHttpRequest object not available on this platform");return a}}function O(){this._setXDomain();this.libraryPath=this._getLibraryPath();this.htcFilename=this._getHTCFilename();j&&l._prepareBehavior(this.libraryPath,this.htcFilename);this._interceptOnloadListeners();
this._initDOMContentLoaded()}function P(){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 Q;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 Q(){this._detectVersion()}function l(a){this.type=a.type;this._keyboardListeners=
[];this._redrawManager=new R(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 R(a){this._handler=a;this._batch=[];
this._nextID=1;this._ids=[];this._timeoutIDs={}}function S(){}function i(a,b,c,d,e,f){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;if(b==i.ELEMENT_NODE&&!this._nodeXML){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==i.DOCUMENT_FRAGMENT_NODE)this._nodeXML=y('<?xml version="1.0"?>\n<__document__fragment></__document__fragment>').documentElement;
if(b!=i.DOCUMENT_NODE&&this._nodeXML){this._nodeXML.getAttribute("__guid")||this._nodeXML.setAttribute("__guid","_"+I++);this._guid=this._nodeXML.getAttribute("__guid");svgweb._guidLookup["_"+this._guid]=this}if(b==i.ELEMENT_NODE)this.localName=a.indexOf(":")!=-1?a.match(/^[^:]*:(.*)$/)[1]:a;this.nodeType=b?b:i.ELEMENT_NODE;if(b==i.ELEMENT_NODE||b==i.DOCUMENT_NODE||b==i.DOCUMENT_FRAGMENT_NODE){this.prefix=c;this.namespaceURI=d;this._nodeValue=null}else if(b==i.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._handler&&this._handler.type=="object")this.ownerDocument=this._handler.document;j&&this._createEmptyMethods();this._childNodes=this._createChildNodes();b==i.TEXT_NODE&&this._nodeXML.setAttribute("__fakeTextNode",true);if(j)j&&this.nodeType!=i.DOCUMENT_NODE&&this._createHTC();else this._defineNodeAccessors()}}function t(a,b,c,d,e){if(!(a===undefined&&c===undefined&&d===undefined&&
e===undefined)){i.apply(this,[a,i.ELEMENT_NODE,b,c,d,e]);this._attributes={};this._attributes._id="";this._importAttributes(this,this._nodeXML);j||this._defineAccessors();if(this.namespaceURI==svgns){if(!(j&&this._attached&&this._handler&&this._handler.type=="script"&&this.nodeName=="svg"))this.style=new s(this);if(!(j&&this._attached&&this._handler&&this._handler.type=="script"&&this.nodeName=="svg"))if(j)this.style._ignoreStyleChanges=false}}}function A(a){i.apply(this,["#document-fragment",i.DOCUMENT_FRAGMENT_NODE,
null,null,null,null]);this.ownerDocument=a}function s(a){this._element=a;this._setup()}function T(a,b){this._handler=b;this._svgNode=a;this._scriptsToExec=[];this._swfLoaded=this._htcLoaded=false;for(var c=0;this._svgNode._onloadListeners&&c<this._svgNode._onloadListeners.length;c++){var d=function(e,f){return function(){f.apply(e.flash)}}(this._handler,this._svgNode._onloadListeners[c]);svgweb.addOnLoad(d)}j&&this._loadHTC();this.url=this._svgNode.getAttribute("src");if(!this.url)this.url=this._svgNode.getAttribute("data");
c=n(this,function(e){this._handler._origSVG=e;e=svgweb._cleanSVG(e,true,false);this._svgString=e.svg;this._xml=e.xml;this.document=new B(this._xml,this._handler);this._handler.document=this.document;this._savedParams=this._getPARAMs(this._svgNode);this._handler._inserter=new J("object",this._xml.documentElement,this._svgNode,this._handler)});this.url.substring(0,5)=="data:"?c(this.url.substring(this.url.indexOf(",")+1)):this._fetchURL(this.url,c,n(this,this._fallback))}function U(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 J(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){this._attached=true;t.apply(this,
["svg",null,svgns,a,d]);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(j&&this._handler.type=="script"){this._addRedrawMethods();this.style=new s(this);this._readyStateListener=n(this,this._onHTCLoaded);this._htcNode.attachEvent("onreadystatechange",this._readyStateListener)}else j&&
this._handler.type=="object"&&this._addRedrawMethods();if(this._handler.type=="script")this._handler._inserter=new J("script",this._nodeXML,this._scriptNode,this._handler)}function B(a,b){i.apply(this,["#document",i.DOCUMENT_NODE,null,null,a,b],svgns);this._xml=a;this._handler=b;this._nodeById={};this._namespaces=this._getNamespaces();this.implementation=new S;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 K(a,b,c,d,e,f,h){this.a=a;this.b=b;this.c=c;this.d=d;this.e=e;this.f=f;this._handler=h}function D(a){this.value=a}function E(a){this.baseVal=a;this.animVal=undefined}function V(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 W(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 G=false,w=false,X=false,j=false,ba=false,Y=false,L=false,u=false,Z=false;(function(){var a=navigator,b=a.userAgent;a=a.appVersion;var c=parseFloat(a);if(b.indexOf("Opera")>=0)G=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)ba=1;if(a.indexOf("Konqueror")>=0||w)Y=c;if(b.indexOf("Gecko")>=0&&!Y)X=c;if(X)L=parseFloat(b.split("Firefox/")[1])||undefined;if(document.all&&!G)j=parseFloat(a.split("MSIE ")[1])||undefined;if(b.indexOf("Chrome")>=0)Z=1;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})();var ca=function(){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}();if(typeof console=="undefined"||!console.log){var x=[];console={};if(ca){console.log=function(a){var b=null,c=false;try{b=document.getElementsByTagName("body")[0]}catch(d){c=true}if(j)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(j)var da=window.setInterval(function(){if(document.readyState=="complete"){for(;x.length;){var a=x.shift();p=document.createElement("p");p.appendChild(document.createTextNode(a));document.body.appendChild(p)}window.clearTimeout(da)}},50)}else console.log=function(){}}var H=
{},N=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],I=0;q(O,{libraryPath:"./",config:null,pageLoaded:false,handlers:[],totalLoaded:0,_guidLookup:[],_loadListeners:[],_removedNodes:[],_allSVGNamespaces:[],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}c=this._processSVGObject(c);a._objID=c}else if(a.nodeName.toLowerCase()=="svg"){this.totalSVG++;a.onsvgload&&a.addEventListener("SVGLoad",a.onsvgload,false);if(j&&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 h=this.handlers[f];if(h!=d){e[h.id]=h;e.push(h)}}this.handlers=e}if(c=="object"||c=="embed"){if(this.getHandlerType()=="flash"&&d.document&&d.document.defaultView){var g=d.document.defaultView;
if(g._intervalIDs)for(f=0;f<g._intervalIDs.length;f++)g.clearInterval(g._intervalIDs[f]);if(g._timeoutIDs)for(f=0;f<g._timeoutIDs.length;f++)g.clearTimeout(g._timeoutIDs[f]);for(f=0;f<d._keyboardListeners.length;f++){c=d._keyboardListeners[f];if(j)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(c=document.getElementById("__htc_container"))for(f=0;f<c.childNodes.length;f++){e=c.childNodes[f];if(typeof e.ownerDocument!="undefined"&&e.ownerDocument==d._svgObject.document){if(typeof e._fakeNode!="undefined"&&typeof e._fakeNode._htcNode!="undefined")e._fakeNode._htcNode=null;e._fakeNode=null;e._handler=null;c.removeChild(e)}}for(var k in svgweb._guidLookup){e=
svgweb._guidLookup[k];e._fake&&e.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;f=k.document;f._nodeById=null;f._xml=null;f.defaultView=null;f.documentElement=null;f.rootElement=null;f=f.defaultView=null;k._svgNode=null;k._handler=null;if(g){g._setTimeout=null;g.setTimeout=null;g._setInterval=null;g.setInterval=null}g=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(j&&this.getHandlerType()=="flash"&&a._fakeNode)a=a._fakeNode;g=this.getHandlerType()=="native"?a:a._handler.flash;j?window.setTimeout(function(m,$){return function(){m.removeChild($);$=m=null}}(b,g),1):b.removeChild(g);if(this.getHandlerType()=="flash"){a._setUnattached();for(k in svgweb._guidLookup){e=svgweb._guidLookup[k];e._fake&&e._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 P;j&&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=j?function(a){return function(){a._onWindowResize()}}(this):n(this,function(){this._onWindowResize()})},
_attachResizeListener:function(){j?window.attachEvent("onresize",this._resizeFunc):window.addEventListener("resize",this._resizeFunc,false)},_detachResizeListener:function(){j?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 h=[];for(m=0;d&&RegExp.rightContext;){var g=f.lastIndex-9,k=RegExp.rightContext;d=f.lastIndex+k.indexOf("]]\>")+2;k=k.substring(0,k.indexOf("]]\>"));h.push("<![CDATA["+k+"]]\>");g=e[1].substring(0,g);d=e[1].substring(d+1,e[1].length);e[1]=g+"__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<h.length;m++)e[1]=e[1].replace("__SVG_CDATA_TOKEN_"+m,h[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(h,g){return function(){var k=svgweb.handlers[g];k=svgweb.getHandlerType()=="flash"?k.document.documentElement._getProxyNode():document.getElementById(g);
return h.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+("_"+I++)+
b},_addTracking:function(a,b){var c=y(a,!b),d=c.documentElement;d&&!d.getAttribute("id")&&d.setAttribute("id",this._generateID("__svg__random__",null));if(this.getHandlerType()!="flash")return c;for(var e=d;e;){e.nodeType==i.ELEMENT_NODE&&e.setAttribute("__guid","_"+I++);e.nodeType==i.ELEMENT_NODE&&!e.getAttribute("id")&&e.setAttribute("id",svgweb._generateID("__svg__random__",null));var f=e.firstChild;if(f)e=f;else for(;e;){if(e!=d)if(f=e.nextSibling){e=f;break}if(e==d)e=null;else{e=e.parentNode;
if(e.nodeType!=1)e=null}}}return c},_handleDone:function(a,b,c){this.totalLoaded++;if(b=="script"&&c._scriptNode._onloadListeners){for(a=0;a<c._scriptNode._onloadListeners.length;a++){var d=c._scriptNode._onloadListeners[a];if(svgweb.getHandlerType()=="flash")d=d.listener;else c._svgRoot.addEventListener.toString().indexOf("[native code]")!=-1&&o._patchAddEventListener(c._svgRoot);try{var e=document.getElementById(c.id);G?setTimeout(function(){d.apply(e);e=d=null},1):d.apply(e)}catch(f){console.log("Error while firing onload listener: "+
f.message||f)}}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(j){for(var a=0;a<svgweb.handlers.length;a++)if(svgweb.handlers[a].type=="object"){var b=svgweb.handlers[a].flash;b&&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;H=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")svgweb.addOnLoad(b);else return window._addEventListener(a,b,c)}}else window.addEventListener=function(a,b){if(a.toLowerCase()=="svgload")svgweb.addOnLoad(b);else if(j&&window.attachEvent)return window.attachEvent("on"+a,b)};if(j&&window.attachEvent){window._attachEvent=window.attachEvent;window.attachEvent=
function(a,b){if(a.toLowerCase()=="onsvgload")svgweb.addOnLoad(b);else return window._attachEvent(a,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){j?this._loadListeners.splice(0,0,a):this._loadListeners.push(a);window.onsvgload=a=null}}});q(P,{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}});Q.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(j){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=j?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._keyboardListeners=[];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==i.ELEMENT_NODE)c=new t(a.nodeName,a.prefix,a.namespaceURI,a,b);else if(!c&&(a.nodeType==i.TEXT_NODE||d))c=new i("#text",i.TEXT_NODE,null,null,a,b);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){b._getElementById=b.getElementById;b.getElementById=l._getElementById;
b._getElementsByTagNameNS=b.getElementsByTagNameNS;b.getElementsByTagNameNS=l._getElementsByTagNameNS;b._createElementNS=b.createElementNS;b.createElementNS=l._createElementNS;b._createElement=b.createElement;b.createElement=l._createElement;b._createTextNode=b.createTextNode;b.createTextNode=l._createTextNode;b._importNodeFunc=l._importNodeFunc;b._createDocumentFragment=b.createDocumentFragment;b.createDocumentFragment=l._createDocumentFragment;b._addEventListener=b.addEventListener;b.addEventListener=
l._addEventListener}};l._patchFakeObjects=function(a,b){b._addEventListener=b.addEventListener;b.addEventListener=l._addEventListener};l._addEventListener=function(a,b,c){if(a=="keydown"){var d=function(e){return function(f){if(!f.preventDefault)f.preventDefault=function(){this.returnValue=false;f=null};typeof e=="object"?e.handleEvent.call(e,f):e(f)}}(b);d.__type=a;d.__listener=b;d.__useCapture=c;this._handler?this._handler._keyboardListeners.push(d):l._keyboardListeners.push(d)}this._addEventListener&&
this._addEventListener(a,b,c)};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,c){if(c===undefined)c=false;if(a===null||a=="http://www.w3.org/1999/xhtml")return j?document.createElement(b):document._createElementNS(a,b);var d=false;if(a==svgns){a=svgnsFake;d=true}if(!j&&!c){if(svgweb._allSVGNamespaces["_"+a])d=true;for(c=0;!d&&c<svgweb.handlers.length;c++)if(svgweb.handlers[c].type=="script"&&svgweb.handlers[c].document._namespaces["_"+
a]){d=true;break}if(!d)return document._createElementNS(a,b)}var e;if(svgweb._allSVGNamespaces["_"+a])e=svgweb._allSVGNamespaces["_"+a];else for(c=0;c<svgweb.handlers.length;c++)if(svgweb.handlers[c].type=="script")if(e=svgweb.handlers[c].document._namespaces["_"+a])break;if(e=="xmlns"||!e)e=b.indexOf(":")!=-1?b.substring(0,b.indexOf(":")):null;return(new t(b,e,a))._getProxyNode()};l._createElement=function(a,b){if(b){if(b&&a.toLowerCase()=="object"){var c=document._createElement("object");c._onloadListeners=
[];var d=c.addEventListener;(function(e,f){e.addEventListener=function(h,g,k){if(h.toLowerCase()=="svgload")this._onloadListeners.push(g);else d?f(h,g,k):this.attachEvent("on"+h,g)}})(c,d);return c}}else return document._createElement(a)};l._createTextNode=function(a,b){if(b){var c=l._unattachedDoc,d;d=j?c.createElement("__text"):c.createElementNS(svgnsFake,"__text");d.appendChild(c.createTextNode(a));c=new i("#text",i.TEXT_NODE,null,null,d);c._nodeValue=a;c.ownerDocument=document;return c._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,h=b.getAttribute(f);d.setAttribute(f,h)}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){var c=b.join("__SVG__DELIMIT");if(this._redrawManager.isSuspended())this._redrawManager.batch(a,c);else try{return this.flash[a](c)}catch(d){console.log("Call to flash but flash is not present! "+a+": "+
this.debugMsg(c)+": "+d)}},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 T(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=="keydown")this._onKeyboardEvent(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,button:0,preventDefault:function(){this.returnValue=false},stopPropagation:function(){}},e=c._listeners[a.eventType];if(e)for(var f=0;f<e.length;f++){var h=e[f].listener;typeof h=="object"?h.handleEvent.call(h,d):h.call(d.currentTarget,d)}if(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+",\nbutton: 0,\npreventDefault: function() { this.returnValue=false; },\nstopPropagation: function() { }\n};\n"+(";(function (evt) { "+a.scriptCode+"; }).call(evt.currentTarget, evt);\n"))):(new Function(a.scriptCode)).call(d.currentTarget,d)},_onKeyboardEvent:function(a){var b=
this._getElementByGuid(a.targetGUID),c=this._getElementByGuid(a.currentTargetGUID);a={target:b._getProxyNode(),currentTarget:c._getProxyNode(),type:a.eventType,keyCode:Number(a.keyCode),altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,preventDefault:function(){this.returnValue=false},stopPropagation:function(){}};if(this.type=="script")for(b=0;b<l._keyboardListeners.length;b++){c=l._keyboardListeners[b];(L||Z)&&this.flash.getAttribute("wmode")=="transparent"||c.call(a.currentTarget,a)}var d=
this._keyboardListeners;for(b=0;b<d.length;b++){c=d[b];c.call(a.currentTarget,a)}},addKeyboardListener:function(a,b,c){var d=function(e){return function(f){if(!f.preventDefault)f.preventDefault=function(){this.returnValue=false;f=null};typeof e=="object"?e.handleEvent.call(e,f):e(f)}}(b);d.__type=a;d.__listener=b;d.__useCapture=c;this._keyboardListeners.push(d)},_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);if(j&&b._fakeNode)b=b._fakeNode;b._attached=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 h=0;h<
f.length;h++){var g=f[h];svgweb._exportID(g)}return f}return f}if(f===null||f.length===0)f=r();var k;for(h=0;h<svgweb.handlers.length;h++){g=svgweb.handlers[h];if(g.type!="object")if(k=g._namespaces["_"+d]){k=v(b,g._svgRoot,k=="xmlns"?"//*[namespace-uri()='"+svgns+"' and name()='"+e+"']":k?"//"+k+":"+e:"//"+e,g._namespaces);if(k!==null&&k!==undefined&&k.length>0){for(h=0;h<k.length;h++){g=k[h];g.namespaceURI!==null&&g.namespaceURI!=svgns&&g.namespaceURI!="http://www.w3.org/1999/xhtml"&&svgweb._exportID(g);
f.push(g)}return f}}}return r()};b._createElementNS=b.createElementNS;b.createElementNS=function(d,e){if(d!=svgns||e!="svg")return b._createElementNS(d,e);var f=b._createElementNS(d,e);return f=o._patchAddEventListener(f)};b._createElement=b.createElement;b.createElement=function(d,e){if(!e)return b._createElement(d);if(e&&d=="object"){var f=b._createElement(d);return f=o._patchAddEventListener(f)}else throw"Unknown createElement() call for SVG: "+d;};o._patchCloneNode();L&&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(a.nodeName=="object"&&!o._objectAddEventListener)o._objectAddEventListener=a.addEventListener;
a._addEventListener=a.nodeName=="object"?o._objectAddEventListener:a.addEventListener;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(h){return this.setProperty(f,
h,null)});b.prototype.__defineGetter__(e,function(){return this.getPropertyValue(f)})})(c,d)}};o._patchSvgFileAddEventListener=function(a){var b=a.addEventListener;a.addEventListener=function(c,d,e){if(c.toLowerCase()!="svgload")b(c,d,e);else typeof d=="object"?d.handleEvent.call(d,undefined):d()};a.__defineGetter__("onsvgload",function(){return this.__onsvgload});a.__defineSetter__("onsvgload",function(c){this.__onsvgload=c;this.addEventListener("SVGLoad",c,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(c=0;this._objNode._onloadListeners&&c<this._objNode._onloadListeners.length;c++){a=this._objNode._onloadListeners[c];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(R,{isSuspended:function(){return this._ids.length>0},batch:function(a,b){this._batch.push(a+":"+b)},suspendRedraw:function(a,b){if(a===undefined)throw"Not enough arguments to suspendRedraw";if(b===undefined)b=true;var c=this._nextID;this._nextID++;var d=this,e=window.setTimeout(function(){d.unsuspendRedraw(c);delete d._timeoutIDs["_"+c]},a);this._ids.push(c);this._timeoutIDs["_"+c]=e;if(b)try{this._handler.flash.jsSuspendRedraw()}catch(f){console.log("suspendRedraw exception: "+
f)}return c},unsuspendRedraw:function(a,b){if(b===undefined)b=true;for(var c=-1,d=0;d<this._ids.length;d++)if(this._ids[d]==a){c=d;break}if(c==-1)throw"Unknown id passed to unsuspendRedraw: "+a;this._timeoutIDs["_"+a]!=undefined&&window.clearTimeout(this._timeoutIDs["_"+a]);this._ids.splice(c,1);delete this._timeoutIDs["_"+a];if(!(this.isSuspended()||this._batch.length==0&&!b)){c=this._batch.join("__SVG__METHOD__DELIMIT");this._batch=[];try{this._handler.flash.jsUnsuspendRedrawAll(c)}catch(e){console.log("unsuspendRedraw exception: "+
e)}}},unsuspendRedrawAll:function(){for(var a=0;a<this._ids.length;a++)this.unsuspendRedraw(this._ids[a])},forceRedraw:function(){}});q(S,{hasFeature:function(){}});M(i,{ELEMENT_NODE:1,TEXT_NODE:3,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11});q(i,{_listeners:null,_detachedListeners:null,insertBefore:function(a,b){if(this.nodeType!=i.ELEMENT_NODE&&this.nodeType!=i.DOCUMENT_FRAGMENT_NODE)throw"Not supported";a.parentNode&&a.parentNode.removeChild(a);a=this._getFakeNode(a);b=this._getFakeNode(b);var c=
a.nodeType==i.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)}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(!j)for(c=0;c<f.length;c++){this._defineChildNodeAccessor(this._childNodes.length);this._childNodes.length++}if(a.nodeType==i.DOCUMENT_FRAGMENT_NODE)a._reset();else a._attached=this._attached;return a._getProxyNode()},replaceChild:function(a,b){if(this.nodeType!=i.ELEMENT_NODE&&this.nodeType!=i.DOCUMENT_FRAGMENT_NODE)throw"Not supported";a.parentNode&&a.parentNode.removeChild(a);a=this._getFakeNode(a);
b=this._getFakeNode(b);var c=a.nodeType==i.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(!j)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 h=e;for(c=0;c<f.length;c++){var g=this._importNode(f[c],false);if(d)this._nodeXML.appendChild(g);else{this._nodeXML.insertBefore(g,this._nodeXML.childNodes[h]);h++}}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);b._setUnattached();svgweb._removedNodes.push(b._getProxyNode());if(a.nodeType==i.DOCUMENT_FRAGMENT_NODE)a._reset();
else a._attached=this._attached;return b._getProxyNode()},removeChild:function(a){if(this.nodeType!=i.ELEMENT_NODE&&this.nodeType!=i.DOCUMENT_FRAGMENT_NODE)throw"Not supported";if(a.nodeType!=i.ELEMENT_NODE&&a.nodeType!=i.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==i.ELEMENT_NODE)if((b=a._getId())&&this._attached)this._handler.document._nodeById["_"+
b]=undefined;a._persistEventListeners();if(j)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!=i.ELEMENT_NODE&&this.nodeType!=i.DOCUMENT_FRAGMENT_NODE)throw"Not supported";a.parentNode&&a.parentNode.removeChild(a);a=this._getFakeNode(a);
var b=a.nodeType==i.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(j)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);if(a.nodeType==i.DOCUMENT_FRAGMENT_NODE)a._reset();else a._attached=this._attached;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==i.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!=i.ELEMENT_NODE&&this.nodeType!=i.TEXT_NODE&&(this.nodeType!=i.DOCUMENT_NODE||
a!="keydown"))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;a=="keydown"&&this._handler.addKeyboardListener(a,b,c);this._handler.sendToFlash("jsAddEventListener",[this._guid,a])}},removeEventListener:function(a,b,c){if(this.nodeType!=i.ELEMENT_NODE&&this.nodeType!=i.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 K(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==i.ELEMENT_NODE&&this.namespaceURI!=svgns)b=new t(this.nodeName,this.prefix,this.namespaceURI);else if(this.nodeType==i.ELEMENT_NODE)b=document.createElementNS(this.namespaceURI,this.nodeName);else if(this.nodeType==i.TEXT_NODE)b=document.createTextNode(this._nodeValue,
true);else if(this.nodeType==i.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 h=b._nodeXML.ownerDocument;f=j?h.createNode(2,e.name,f):h.createAttributeNS(f,e.name);f.nodeValue=e.nodeValue;
j?b._nodeXML.setAttributeNode(f):b._nodeXML.setAttributeNodeNS(f)}}b._nodeXML.setAttribute("__guid",b._guid);if(j){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==i.ELEMENT_NODE&&b._importAttributes(b,b._nodeXML);if(a&&(b.nodeType==i.ELEMENT_NODE||b.nodeType==i.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==i.DOCUMENT_NODE||this.nodeType==i.DOCUMENT_FRAGMENT_NODE)return null;if(this._attached&&this._handler&&this._getProxyNode()==this._handler.document.rootElement)if(this._handler.type=="script")return this._handler.flash.parentNode;else if(this._handler.type=="object")return this._handler.document;var a=this._nodeXML.parentNode;
if(a===null||a.nodeType==i.DOCUMENT_NODE)return null;a=l._getNode(a,this._handler);this._getFakeNode(a)._attached=this._attached;return a},_getFirstChild:function(){if(this.nodeType==i.TEXT_NODE)return null;var a=this._nodeXML.firstChild;if(a===null)return null;a=l._getNode(a,this._handler);this._getFakeNode(a)._attached=this._attached;return a},_getLastChild:function(){if(this.nodeType==i.TEXT_NODE)return null;var a=this._nodeXML.lastChild;if(a===null)return null;a=l._getNode(a,this._handler);this._getFakeNode(a)._attached=
this._attached;return a},_getPreviousSibling:function(){if(this.nodeType==i.DOCUMENT_NODE||this.nodeType==i.DOCUMENT_FRAGMENT_NODE)return null;if(this._attached&&this._handler&&this._getProxyNode()==this._handler.document.rootElement&&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)._attached=this._attached;return a},_getNextSibling:function(){if(this.nodeType==i.DOCUMENT_NODE||this.nodeType==i.DOCUMENT_FRAGMENT_NODE)return null;if(this._attached&&this._handler&&this._getProxyNode()==this._handler.document.rootElement&&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)._attached=this._attached;return a},_passThrough:true,_attached:false,_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==i.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._attached=b._attached;return c})},_getChildNodes:function(a){if(!j)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._attached=this._attached;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!=i.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(j&&a._fakeNode)a=a._fakeNode;return a},_processAppendedChildren:function(a,
b,c){var d;b=a.nodeType==i.DOCUMENT_FRAGMENT_NODE?this._getFakeNode(a._getFirstChild()):a;if(c)d=this._handler._redrawManager.suspendRedraw(1E4,false);for(;b;){var e=b._nodeXML;b._handler=this._handler;e=e.getAttribute("id");if(c&&b.nodeType==i.ELEMENT_NODE&&e)this._handler.document._nodeById["_"+e]=b;if(c){if(this._handler.type=="script")b.ownerDocument=document;else if(this._handler.type=="object")b.ownerDocument=this._handler.document;b._attached=true;for(e=0;e<b._detachedListeners.length;e++){var f=
b._detachedListeners[e];f&&b.addEventListener(f.type,f.listener,f.useCapture,true)}b._detachedListeners=[]}if(e=(e=b._getChildNodes())&&e.length>0?e[0]:null){b=e;if(j)b=b._fakeNode}for(;!e&&b;){if(b!=a)if(e=b._getNextSibling()){b=e;if(j)b=b._fakeNode;break}if(b==a)b=null;else{if((b=b._getParentNode())&&j)b=b._fakeNode;if(b&&(b.nodeType!=1||b._handler&&b._getProxyNode()==b._handler.document.rootElement))b=null}}}c&&this._handler._redrawManager.unsuspendRedraw(d,false)},_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(j&&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!=i.ELEMENT_NODE&&f.nodeType!=i.TEXT_NODE))if(!(b&&(f.getAttribute("__fakeTextNode")||f.nodeType==i.TEXT_NODE))){f.nodeType==i.ELEMENT_NODE&&d++;if(f.nodeType==i.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(j)c=c._fakeNode;
c._setUnattached()}this._attached=false;this._handler=null},_getProxyNode:function(){return j?this._htcNode:this},_createChildNodes:function(){var a;if(j)a=r();else{a={};a.item=function(b){return b>=this.length?null:this[b]}}return a},_getTextContent:function(){return this.nodeType==i.TEXT_NODE?this._nodeValue:""},_setTextContent:function(a){return this.nodeType==i.TEXT_NODE?this._setNodeValue(a):""},_getData:function(){if(this.nodeType==i.TEXT_NODE)return this._nodeValue},_setData:function(a){if(this.nodeType==
i.TEXT_NODE)return this._setNodeValue(a)},_createEmptyMethods:function(){if(this.nodeType==i.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 i;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(j){if(j)if(a)for(var e=0;e<this._nodeXML.attributes.length;e++){var f=this._nodeXML.attributes.item(e),h=(new String(f.name)).match(/[^:]*:?(.*)/)[1];if(f.namespaceURI&&f.namespaceURI==a&&h==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(/([^:]+:)?(.*)/),
h;if(d.name.indexOf(":")!=-1){h=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=h+":"+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&&j){e=this._nodeXML.ownerDocument.createNode(2,b,a);e.nodeValue=c;this._nodeXML.setAttributeNode(e)}else j?this._nodeXML.setAttribute(b,c):this._nodeXML.setAttributeNS(a,b,c);if(/^xmlns:?(.*)$/.test(b)){e=b.match(/^xmlns:?(.*)$/);e=e[1]?e[1]:"xmlns";f=c;if(!svgweb._allSVGNamespaces["_"+e]){svgweb._allSVGNamespaces["_"+e]=f;svgweb._allSVGNamespaces["_"+f]=e}}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&&!j)return this._nodeXML.hasAttribute(b);else if(j){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],h=e.namespaceURI;if(h=="")h=null;if(a==h&&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=="*"||a==svgnsFake)&&b=="*"){d=[];for(e=0;e<c.length;e++)c[e].nodeType==i.ELEMENT_NODE&&c[e].nodeName!="__text"&&d.push(c[e]);c=d}d=r();for(e=0;e<c.length;e++){var f=l._getNode(c[e],this._handler);this._getFakeNode(f)._attached=
true;d.push(f)}return d},beginElement:function(){this.beginElementAt(0)},endElement:function(){this.endElementAt(0)},beginElementAt:function(a){this._attached&&this._passThrough&&this._handler.sendToFlash("jsBeginElementAt",[this._guid,a])},endElementAt:function(a){this._attached&&this._passThrough&&this._handler.sendToFlash("jsEndElementAt",[this._guid,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 W(0,0,0,0)},getBBox:function(){var a=this._handler.sendToFlash("jsGetBBox",[this._guid]);a=this._handler._stringToMsg(a);return new W(new Number(a.x),
new Number(a.y),new Number(a.width),new Number(a.height))},_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(var c=0;c<b.attributes.length;c++){var d=b.attributes[c];this._attributes["_"+d.nodeName]=d.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 i;q(A,{_reset:function(){for(;this._nodeXML.firstChild;)this._nodeXML.removeChild(this._nodeXML.firstChild);
this._childNodes=this._createChildNodes();j||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(j){var a=this._element._htcNode.style,b=this._fromStyleString();for(e=0;e<b.length;e++){f=this._toCamelCase(b[e].styleName);var c=b[e].styleValue;try{a[f]=c}catch(d){console.log("The following exception occurred setting style."+f+" on IE: "+(d.message||d))}}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 e=0;e<s._allStyles.length;e++){var f=s._allStyles[e];this._defineAccessor(f)}if(this._element._handler&&this._element._getProxyNode()==this._element._handler.document.rootElement)for(e=0;e<s._allRootStyles.length;e++){f=s._allRootStyles[e];this._defineAccessor(f)}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(j){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){e=
l._encodeFlashData(b);this._element._handler.sendToFlash("jsSetAttribute",[this._element._guid,true,null,c,e])}},_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);this._element._passThrough=false;this._element.setAttribute("style",c);this._element._passThrough=true}},_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(T,{_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=aa();if(j){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(!j||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"),c=new C(a,null,null,this._handler),d=this._handler.document;d.documentElement=c._getProxyNode();d.rootElement=c._getProxyNode();d._nodeById["_"+b]=c;j&&this._handler.flash.setAttribute("contentDocument",null);this._handler.flash.contentDocument=d;this._handler.window=
new U(this._handler);d.defaultView=this._handler.window;l._patchFakeObjects(d.defaultView,d);if(a=a.getAttribute("onload")){a=";(function(){"+('var evt = { target: document.getElementById("'+c.getAttribute("id")+'") ,currentTarget: document.getElementById("'+c.getAttribute("id")+'") ,preventDefault: function() { this.returnValue=false; }};')+a+"}).apply(document.documentElement);";this._scriptsToExec.push(a)}c="";for(a=0;a<this._scriptsToExec.length;a++)c+=this._scriptsToExec[a]+"\n";this._executeScript(c);
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;b=b.contentWindow;this._handler.document.defaultView=b;a=this._sandboxedScript(a);a=a+";if (__svgHandler) __svgHandler.sandbox_eval = "+(j?"window.eval;":"function(scriptCode) { return window.eval(scriptCode) };");if(G)setTimeout(function(d,e,f){return function(){e.eval.apply(e,[f]);d._fireOnload()}}(this._handler.window,b,a),1);else{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(U,{addEventListener:function(a,b){if(a.toLowerCase()=="svgload"||a.toLowerCase()=="load")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(J,{_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(j){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,d;if(this._embedType=="script")for(c=this._parentNode;c&&c.style;){if(c.nodeName.toLowerCase()=="div")break;if(c.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}c=c.parentNode}var e=this._explicitWidth,f=this._explicitHeight,h=this._nodeXML.getAttribute("width");if(h&&h.indexOf("%")==-1)h=parseInt(h).toString();var g=this._nodeXML.getAttribute("height");if(g&&g.indexOf("%")==-1)g=parseInt(g).toString();
if(e&&f){c=e.indexOf("%")!=-1?a*parseInt(e)/100:e;if(f.indexOf("%")!=-1)if(b>0)d=b*parseInt(f)/100;else console.log("SVGWeb: unhandled resize scenario.");else d=f;return{width:e,height:d,pixelsWidth:c,pixelsHeight:d,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"}}if(e){c=e.indexOf("%")!=-1?a*parseInt(e)/100:e;if(this._nodeXML.getAttribute("viewBox")){if(h&&h.indexOf("%")==-1&&g&&g.indexOf("%")==-1)f=c*(g/h);else{g=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);h=g[2];g=g[3];
f=c*(g/h)}return{width:e,height:f,pixelsWidth:c,pixelsHeight:f,clipMode:"neither"}}else{f=h&&h.indexOf("%")==-1&&g&&g.indexOf("%")==-1?c*(g/h):g&&g.indexOf("%")==-1?g:150;return{width:e,height:f,pixelsWidth:c,pixelsHeight:f,clipMode:"both"}}}if(f){d=f.indexOf("%")!=-1?b*parseInt(f)/100:f;if(this._nodeXML.getAttribute("viewBox")){if(h&&h.indexOf("%")==-1&&g&&g.indexOf("%")==-1)e=d*(h/g);else{g=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);h=g[2];g=g[3];e=d*(h/g)}return{width:e,height:f,pixelsWidth:e,
pixelsHeight:d,clipMode:"neither"}}else{if(h&&h.indexOf("%")==-1&&g&&g.indexOf("%")==-1)c=e=d*(h/g);else{e=h?h:"100%";c=e.indexOf("%")!=-1?a*parseInt(e)/100:e}return{width:e,height:f,pixelsWidth:c,pixelsHeight:d,clipMode:"both"}}}e=h?h:"100%";c=e.indexOf("%")!=-1?a*parseInt(e)/100:e;if(g&&g.indexOf("%")==-1){f=g;return{width:e,height:f,pixelsWidth:c,pixelsHeight:f,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%";d=b*parseInt(g)/100;return{width:e,height:d,pixelsWidth:c,pixelsHeight:d,clipMode:"neither"}}g=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);h=g[2];g=g[3];f=c*(g/h);return{width:e,height:f,pixelsWidth:c,pixelsHeight:f,clipMode:"neither"}}else{f=150;return{width:e,height:f,pixelsWidth:c,pixelsHeight:f,clipMode:"both"}}},_getStandardsSize:function(a,b){var c,d,e=this._explicitWidth,f=this._explicitHeight,h=this._nodeXML.getAttribute("width");
if(h&&h.indexOf("%")==-1)h=parseInt(h).toString();var g=this._nodeXML.getAttribute("height");if(g&&g.indexOf("%")==-1)g=parseInt(g).toString();if(e&&!f)return this._getQuirksSize(a,b);if(!e&&!f)return this._getQuirksSize(a,b);if(!e&&f){e=h?h:"100%";c=e.indexOf("%")!=-1?a*parseInt(e)/100:e;if(f.indexOf("%")==-1){d=f;if(h&&h.indexOf("%")==-1&&g&&g.indexOf("%")==-1)c=e=f*(h/g);else if(this._nodeXML.getAttribute("viewBox")){viewBox=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);boxWidth=viewBox[2];
boxHeight=viewBox[3];c=e=d*(boxWidth/boxHeight)}return{width:e,height:f,pixelsWidth:c,pixelsHeight:f,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"}}else{if(g&&g.indexOf("%")==-1)d=g;else if(this._nodeXML.getAttribute("viewBox")){viewBox=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);boxWidth=viewBox[2];boxHeight=viewBox[3];d=c*(boxHeight/boxWidth)}else d=150;return{width:e,height:d,pixelsWidth:c,pixelsHeight:d,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"}}}if(e&&
f){c=e.indexOf("%")!=-1?a*parseInt(e)/100:e;if(f.indexOf("%")==-1)return{width:e,height:f,pixelsWidth:c,pixelsHeight:f,clipMode:this._nodeXML.getAttribute("viewBox")?"neither":"both"};else if(h&&h.indexOf("%")==-1&&g&&g.indexOf("%")==-1){d=c*(g/h);return{width:e,height:d,pixelsWidth:c,pixelsHeight:d,clipMode:"neither"}}else if(this.invalidParentHeight)if(this._nodeXML.getAttribute("viewBox")){viewBox=this._nodeXML.getAttribute("viewBox").split(/\s+|,/);boxWidth=viewBox[2];boxHeight=viewBox[3];f=c*
(boxHeight/boxWidth);return{width:e,height:f,pixelsWidth:c,pixelsHeight:f,clipMode:"neither"}}else{d=g&&g.indexOf("%")==-1?g:150;return{width:e,height:d,pixelsWidth:c,pixelsHeight:d,clipMode:"both"}}else{d=b*parseInt(f)/100;return{width:e,height:d,pixelsWidth:c,pixelsHeight:d,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 h;h=this._isXDomain?svgweb.xDomainURL+"svg.swf":svgweb.libraryPath+"svg.swf";var g=window.location.protocol;if(g.charAt(g.length-1)==":")g=g.substring(0,g.length-1);var k;if(u){k=document.createElement("embed");k.setAttribute("src",h);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",g+"://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="'+g+'://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="'+
h+'"></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="'+h+'" 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="'+g+'://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,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(!j||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 i;q(B,{_nodeById:null,implementation:null,documentElement:null,createElementNS:function(a,b){var c=this._namespaces["_"+a];
if(c=="xmlns"||!c)c=b.indexOf(":")!=-1?b.substring(0,b.indexOf(":")):null;return(new t(b,c,a,undefined,this._handler))._getProxyNode()},createTextNode:function(a){var b=l._unattachedDoc,c;c=j?b.createElement("__text"):b.createElementNS(svgnsFake,"__text");c.appendChild(b.createTextNode(a));b=new i("#text",i.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);this._getFakeNode(a)._attached=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(K,{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 K(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(){}});M(V,{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(V,{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 O})();
