window.FlashCanvasOptions = window.FlashCanvasOptions || {}; webshims.$.extend(FlashCanvasOptions, { swfPath: webshims.cfg.basePath + 'FlashCanvas/' }); /* * FlashCanvas * * Copyright (c) 2009 Tim Cameron Ryan * Copyright (c) 2009-2013 FlashCanvas Project * Released under the MIT/X License */ window.ActiveXObject&&!window.CanvasRenderingContext2D&&function(i,j,z){function D(a){this.code=a;this.message=R[a]}function S(a){this.width=a}function v(a){this.id=a.C++}function k(a){this.G=a;this.id=a.C++}function m(a,b){this.canvas=a;this.B=b;this.d=b.id.slice(8);this.D();this.C=0;this.f=this.u="";var c=this;setInterval(function(){o[c.d]===0&&c.e()},30)}function A(){if(j.readyState==="complete"){j.detachEvent(E,A);for(var a=j.getElementsByTagName(r),b=0,c=a.length;b=8?a.src:a.getAttribute("src",4)}function t(a){return(""+a).replace(/&/g,"&").replace(/0)return eval(this.B.CallFunction(''+a.join("�")+""))},I:function(a,b){this.e();this.D();if(a>0)this.B.width=a;if(b>0)this.B.height=b;this.a.push(e.resize,a,b)}};k.prototype={addColorStop:function(a,b){(isNaN(a)||a<0||a>1)&&h(1);this.G.a.push(e.addColorStop,this.id,a,b)}};D.prototype=Error();var R={1:"INDEX_SIZE_ERR",9:"NOT_SUPPORTED_ERR",11:"INVALID_STATE_ERR", 12:"SYNTAX_ERR",17:"TYPE_MISMATCH_ERR",18:"SECURITY_ERR"},B={initElement:function(a){if(a.getContext)return a;var b=Math.random().toString(36).slice(2)||"0",c="external"+b;u[b]=!1;p[b]={};o[b]=1;x[b]={};P(a);a.innerHTML='';s[b]=a;var d=a.firstChild;y[b]=a.lastChild;var f=j.body.contains;if(f(a))d.movie=w;else var g=setInterval(function(){if(f(a))clearInterval(g),d.movie=w},0);if(j.compatMode==="BackCompat"||!i.XMLHttpRequest)y[b].style.overflow="hidden";var h=new m(a,d);a.getContext=function(a){return a==="2d"?h:l};a.toDataURL=function(a, b){(""+a).replace(/[A-Z]+/g,U)==="image/jpeg"?h.a.push(e.toDataURL,a,typeof b==="number"?b:""):h.a.push(e.toDataURL,a);return h.e()};d.attachEvent(J,F);return a},saveImage:function(a,b){a.firstChild.saveImage(b)},setOptions:function(){},trigger:function(a,b){s[a].fireEvent("on"+b)},unlock:function(a,b,c){var d,e,g;o[a]&&--o[a];if(b===z){d=s[a];b=d.firstChild;P(d);e=d.width;c=d.height;d.style.width=e+"px";d.style.height=c+"px";if(e>0)b.width=e;if(c>0)b.height=c;b.resize(e,c);d.attachEvent(K,G);u[a]= !0;typeof d.onload==="function"&&setTimeout(function(){d.onload()},0)}else if(g=x[a][b])e=g[0],c=g[1+c],delete x[a][b],typeof c==="function"&&c.call(e)}};j.createElement(r);j.createStyleSheet().cssText=r+"{display:inline-block;overflow:hidden;width:300px;height:150px}";j.readyState==="complete"?A():j.attachEvent(E,A);i.attachEvent(I,H);if(w.indexOf(location.protocol+"//"+location.host+"/")===0){var Q=new ActiveXObject("Microsoft.XMLHTTP");Q.open("GET",w,!1);Q.send(l)}i[L]=m;i[M]=k;i[N]=v;i[C]=B;i[O]= {init:function(){},init_:function(){},initElement:B.initElement};keep=[m.measureText,m.loadImage]}(window,document); (function(document){ webshims.addReady(function(context, elem){ if(context == document){ if(window.G_vmlCanvasManager && G_vmlCanvasManager.init_ ){ G_vmlCanvasManager.init_(document); } } webshims.$('canvas', context).add(elem.filter('canvas')).each(function(){ var hasContext = this.getContext; if(!hasContext && window.G_vmlCanvasManager){ G_vmlCanvasManager.initElement(this); } }); }); webshims.isReady('canvas', true); })(document);