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