/*
 * Raphael 0.7.dev - JavaScript Vector Library
 *
 * Copyright (c) 2008 – 2009 Dmitry Baranovskiy (http://raphaeljs.com)
 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
 */
function Raphael(){return Raphael._create.apply(Raphael,arguments);}(function(F){F.version="0.7.dev";F.type=(window.SVGAngle?"SVG":"VML");F.svg=!(F.vml=F.type=="VML");F.idGenerator=0;var L={};F.fn={};var A={cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'16px "Arial"',"font-family":'"Arial"',"font-size":"16",gradient:0,height:0,opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,translation:"0 0",width:0,x:0,y:0},E={cx:"number",cy:"number",fill:"colour","fill-opacity":"number","font-size":"number",height:"number",opacity:"number",path:"path",r:"number",rotation:"number",rx:"number",ry:"number",scale:"csv",stroke:"colour","stroke-opacity":"number","stroke-width":"number",translation:"csv",width:"number",x:"number",y:"number"};F.toString=function(){return"Your browser "+(this.vml?"doesn't ":"")+"support"+(this.svg?"s":"")+" SVG.\nYou are running "+unescape("Rapha%EBl%20")+this.version;};F.hsb2rgb=function(e,c,l){if(typeof e=="object"&&"h" in e&&"s" in e&&"b" in e){l=e.b;c=e.s;e=e.h;}var Y,Z,m;if(l==0){return{r:0,g:0,b:0,hex:"#000"};}else{var a=Math.floor(e*6),h=(e*6)-a,X=l*(1-c),W=l*(1-(c*h)),n=l*(1-(c*(1-h)));[function(){Y=l;Z=n;m=X;},function(){Y=W;Z=l;m=X;},function(){Y=X;Z=l;m=n;},function(){Y=X;Z=W;m=l;},function(){Y=n;Z=X;m=l;},function(){Y=l;Z=X;m=W;},function(){Y=l;Z=n;m=X;}][a]();}var j={r:Y,g:Z,b:m};Y*=255;Z*=255;m*=255;var R=Math.round(Y).toString(16);if(R.length==1){R="0"+R;}var d=Math.round(Z).toString(16);if(d.length==1){d="0"+d;}var k=Math.round(m).toString(16);if(k.length==1){k="0"+k;}j.hex="#"+R+d+k;return j;};F.rgb2hsb=function(R,W,c){if(typeof R=="object"&&"r" in R&&"g" in R&&"b" in R){c=R.b;W=R.g;R=R.r;}if(typeof R=="string"&&R.charAt(0)=="#"){if(R.length==4){c=parseInt(R.substring(3),16);W=parseInt(R.substring(2,3),16);R=parseInt(R.substring(1,2),16);}else{c=parseInt(R.substring(5),16);W=parseInt(R.substring(3,5),16);R=parseInt(R.substring(1,3),16);}}if(R>1||W>1||c>1){R/=255;W/=255;c/=255;}var b=Math.max(R,W,c),X=Math.min(R,W,c),Z,Y,a=b;if(X==b){return{h:0,s:0,b:b};}else{var d=(b-X);Y=d/b;if(R==b){Z=(W-c)/d;}else{if(W==b){Z=2+((c-R)/d);}else{Z=4+((R-W)/d);}}Z/=6;if(Z<0){Z+=1;}if(Z>1){Z-=1;}}return{h:Z,s:Y,b:a};};F.getRGB=function(d){var c,a,W,X=d.match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*(\d+,\s*\d+,\s*\d+)\s*\)|rgb\(\s*(\d+%,\s*\d+%,\s*\d+%)\s*\)|hsb\(\s*(\d+,\s*\d+,\s*\d+)\s*\)|hsb\(\s*(\d+%,\s*\d+%,\s*\d+%)\s*\))\s*$/i);if(X){if(X[2]){W=parseInt(X[2].substring(5),16);a=parseInt(X[2].substring(3,5),16);c=parseInt(X[2].substring(1,3),16);}if(X[3]){W=parseInt(X[3].substring(3)+X[3].substring(3),16);a=parseInt(X[3].substring(2,3)+X[3].substring(2,3),16);c=parseInt(X[3].substring(1,2)+X[3].substring(1,2),16);}if(X[4]){X=X[4].split(/\s*,\s*/);c=parseInt(X[0],10);a=parseInt(X[1],10);W=parseInt(X[2],10);}if(X[5]){X=X[5].split(/\s*,\s*/);c=parseInt(X[0],10)*2.55;a=parseInt(X[1],10)*2.55;W=parseInt(X[2],10)*2.55;}if(X[6]){X=X[6].split(/\s*,\s*/);c=parseInt(X[0],10);a=parseInt(X[1],10);W=parseInt(X[2],10);return this.hsb2rgb(c,a,W);}if(X[7]){X=X[7].split(/\s*,\s*/);c=parseInt(X[0],10)*2.55;a=parseInt(X[1],10)*2.55;W=parseInt(X[2],10)*2.55;return this.hsb2rgb(c,a,W);}var X={r:c,g:a,b:W};var Z=Math.round(c).toString(16);(Z.length==1)&&(Z="0"+Z);var Y=Math.round(a).toString(16);(Y.length==1)&&(Y="0"+Y);var R=Math.round(W).toString(16);(R.length==1)&&(R="0"+R);X.hex="#"+Z+Y+R;return X;}};F.getColor=function(W){var X=arguments.callee.start=arguments.callee.start||{h:0,s:1,b:W||0.75};var R=this.hsb2rgb(X.h,X.s,X.b);X.h+=0.075;if(X.h>1){X.h=0;X.s-=0.2;if(X.s<=0){arguments.callee.start={h:0,s:1,b:X.b};}}return R.hex;};F.getColor.reset=function(){this.start=undefined;};F.parsePathString=function(R){var Y={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},W=[],X=function(){var a="";for(var Z=0,b=this.length;Z<b;Z++){a+=this[Z][0]+this[Z].join(",").substring(2);}return a;};if(R.toString.toString()==X.toString()){return R;}R.replace(/([achlmqstvz])[\s,]*((-?\d*\.?\d*\s*,?\s*)+)/ig,function(d,Z,g){var f=[],e=Z.toLowerCase();g.replace(/(-?\d*\.?\d*)\s*,?\s*/ig,function(h,c){c&&f.push(+c);});while(f.length>=Y[e]){W.push([Z].concat(f.splice(0,Y[e])));if(!Y[e]){break;}}});W.toString=X;return W;};F.pathDimensions=function(f){var R=f;if(typeof f=="string"){R=this.parsePathString(f);}R=this.pathToAbsolute(R);var b=[],a=[],W=0;for(var Y=0,e=R.length;Y<e;Y++){switch(R[Y][0]){case"Z":break;case"A":b.push(R[Y][R[Y].length-2]);a.push(R[Y][R[Y].length-1]);break;default:for(var X=1,Z=R[Y].length;X<Z;X++){if(X%2){b.push(R[Y][X]);}else{a.push(R[Y][X]);}}}}var d=Math.min.apply(Math,b),c=Math.min.apply(Math,a);return{x:d,y:c,width:Math.max.apply(Math,b)-d,height:Math.max.apply(Math,a)-c,X:b,Y:a};};F.pathToRelative=function(W){var a=[];if(typeof W=="string"){W=this.parsePathString(W);}var c=0,b=0,R=0;if(W[0][0]=="M"){c=W[0][1];b=W[0][2];R++;a.push(W[0]);}for(var Y=R,d=W.length;Y<d;Y++){a[Y]=[];if(W[Y][0]!=W[Y][0].toLowerCase()){a[Y][0]=W[Y][0].toLowerCase();switch(a[Y][0]){case"a":a[Y][1]=W[Y][1];a[Y][2]=W[Y][2];a[Y][3]=0;a[Y][4]=W[Y][4];a[Y][5]=W[Y][5];a[Y][6]=+(W[Y][6]-c).toFixed(3);a[Y][7]=+(W[Y][7]-b).toFixed(3);break;case"v":a[Y][1]=+(W[Y][1]-b).toFixed(3);break;default:for(var X=1,Z=W[Y].length;X<Z;X++){a[Y][X]=+(W[Y][X]-((X%2)?c:b)).toFixed(3);}}}else{a[Y]=W[Y];}switch(a[Y][0]){case"z":break;case"h":c+=a[Y][a[Y].length-1];break;case"v":b+=a[Y][a[Y].length-1];break;default:c+=a[Y][a[Y].length-2];b+=a[Y][a[Y].length-1];}}a.toString=W.toString;return a;};F.pathToAbsolute=function(W){var a=[];if(typeof W=="string"){W=this.parsePathString(W);}var c=0,b=0,R=0;if(W[0][0]=="M"){c=+W[0][1];b=+W[0][2];R++;a[0]=W[0];}for(var Y=R,d=W.length;Y<d;Y++){a[Y]=[];if(W[Y][0]!=W[Y][0].toUpperCase()){a[Y][0]=W[Y][0].toUpperCase();switch(a[Y][0]){case"A":a[Y][1]=W[Y][1];a[Y][2]=W[Y][2];a[Y][3]=0;a[Y][4]=W[Y][4];a[Y][5]=W[Y][5];a[Y][6]=+(W[Y][6]+c).toFixed(3);a[Y][7]=+(W[Y][7]+b).toFixed(3);break;case"V":a[Y][1]=+W[Y][1]+b;break;default:for(var X=1,Z=W[Y].length;X<Z;X++){a[Y][X]=+W[Y][X]+((X%2)?c:b);}}}else{a[Y]=W[Y];}switch(a[Y][0]){case"Z":break;case"H":c=a[Y][1];break;case"V":b=a[Y][1];break;default:c=a[Y][a[Y].length-2];b=a[Y][a[Y].length-1];}}a.toString=W.toString;return a;};F.pathEqualiser=function(a,Z){var Y=[this.pathToAbsolute(this.parsePathString(a)),this.pathToAbsolute(this.parsePathString(Z))],W=[{x:0,y:0,bx:0,by:0,X:0,Y:0},{x:0,y:0,bx:0,by:0,X:0,Y:0}],R=function(e,f){if(!e){return["U"];}switch(e[0]){case"M":f.X=e[1];f.Y=e[2];break;case"S":var c=f.x+(f.x-(f.bx||f.x));var g=f.y+(f.y-(f.by||f.y));e=["C",c,g,e[1],e[2],e[3],e[4]];break;case"T":var c=f.x+(f.x-(f.bx||f.x));var g=f.y+(f.y-(f.by||f.y));e=["Q",c,g,e[1],e[2]];break;case"H":e=["L",e[1],f.y];break;case"V":e=["L",f.x,e[1]];break;case"Z":e=["L",f.X,f.Y];break;}return e;},b=function(e,d,g){if(Y[e][g][0]=="M"&&Y[d][g][0]!="M"){Y[d].splice(g,0,["M",W[d].x,W[d].y]);W[e].bx=Y[e][g][Y[e][g].length-4]||0;W[e].by=Y[e][g][Y[e][g].length-3]||0;W[e].x=Y[e][g][Y[e][g].length-2];W[e].y=Y[e][g][Y[e][g].length-1];return true;}else{if(Y[e][g][0]=="L"&&Y[d][g][0]=="C"){Y[e][g]=["C",W[e].x,W[e].y,Y[e][g][1],Y[e][g][2],Y[e][g][1],Y[e][g][2]];}else{if(Y[e][g][0]=="L"&&Y[d][g][0]=="Q"){Y[e][g]=["Q",Y[e][g][1],Y[e][g][2],Y[e][g][1],Y[e][g][2]];}else{if(Y[e][g][0]=="Q"&&Y[d][g][0]=="C"){var c=Y[d][g][Y[d][g].length-2];var k=Y[d][g][Y[d][g].length-1];Y[d].splice(g+1,0,["Q",c,k,c,k]);Y[e].splice(g,0,["C",W[e].x,W[e].y,W[e].x,W[e].y,W[e].x,W[e].y]);g++;W[d].bx=Y[d][g][Y[d][g].length-4]||0;W[d].by=Y[d][g][Y[d][g].length-3]||0;W[d].x=Y[d][g][Y[d][g].length-2];W[d].y=Y[d][g][Y[d][g].length-1];return true;}else{if(Y[e][g][0]=="A"&&Y[d][g][0]=="C"){var c=Y[d][g][Y[d][g].length-2];var k=Y[d][g][Y[d][g].length-1];Y[d].splice(g+1,0,["A",0,0,Y[e][g][3],Y[e][g][4],Y[e][g][5],c,k]);Y[e].splice(g,0,["C",W[e].x,W[e].y,W[e].x,W[e].y,W[e].x,W[e].y]);g++;W[d].bx=Y[d][g][Y[d][g].length-4]||0;W[d].by=Y[d][g][Y[d][g].length-3]||0;W[d].x=Y[d][g][Y[d][g].length-2];W[d].y=Y[d][g][Y[d][g].length-1];return true;}else{if(Y[e][g][0]=="U"){Y[e][g][0]=Y[d][g][0];for(var f=1,h=Y[d][g].length;f<h;f++){Y[e][g][f]=(f%2)?W[e].x:W[e].y;}}}}}}}return false;};for(var X=0;X<Math.max(Y[0].length,Y[1].length);X++){Y[0][X]=R(Y[0][X],W[0]);Y[1][X]=R(Y[1][X],W[1]);if(Y[0][X][0]!=Y[1][X][0]&&(b(0,1,X)||b(1,0,X))){continue;}W[0].bx=Y[0][X][Y[0][X].length-4]||0;W[0].by=Y[0][X][Y[0][X].length-3]||0;W[0].x=Y[0][X][Y[0][X].length-2];W[0].y=Y[0][X][Y[0][X].length-1];W[1].bx=Y[1][X][Y[1][X].length-4]||0;W[1].by=Y[1][X][Y[1][X].length-3]||0;W[1].x=Y[1][X][Y[1][X].length-2];W[1].y=Y[1][X][Y[1][X].length-1];}return Y;};if(F.svg){var J=function(Y,R,Z){var W=document.createElementNS(Z.svgns,"path");W.setAttribute("fill","none");if(Z.canvas){Z.canvas.appendChild(W);}var X=new M(W,Z);X.isAbsolute=true;X.type="path";X.last={x:0,y:0,bx:0,by:0};X.absolutely=function(){this.isAbsolute=true;return this;};X.relatively=function(){this.isAbsolute=false;return this;};X.moveTo=function(a,e){var c=this.isAbsolute?"M":"m";c+=parseFloat(a,10).toFixed(3)+" "+parseFloat(e,10).toFixed(3)+" ";var b=this[0].getAttribute("d")||"";(b=="M0,0")&&(b="");this[0].setAttribute("d",b+c);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(a,10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(e,10);this.attrs.path=b+c;return this;};X.lineTo=function(a,e){this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(a,10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(e,10);var c=this.isAbsolute?"L":"l";c+=parseFloat(a,10).toFixed(3)+" "+parseFloat(e,10).toFixed(3)+" ";var b=this[0].getAttribute("d")||"";this[0].setAttribute("d",b+c);this.attrs.path=b+c;return this;};X.arcTo=function(g,f,b,e,a,i){var h=this.isAbsolute?"A":"a";h+=[parseFloat(g,10).toFixed(3),parseFloat(f,10).toFixed(3),0,b,e,parseFloat(a,10).toFixed(3),parseFloat(i,10).toFixed(3)].join(" ");var c=this[0].getAttribute("d")||"";this[0].setAttribute("d",c+h);this.last.x=parseFloat(a,10);this.last.y=parseFloat(i,10);this.attrs.path=c+h;return this;};X.cplineTo=function(b,k,e){if(!e){return this.lineTo(b,k);}else{var a={};var l=parseFloat(b,10);var h=parseFloat(k,10);var m=parseFloat(e,10);var g=this.isAbsolute?"C":"c";var f=[+this.last.x+m,+this.last.y,l-m,h,l,h];for(var c=0,n=f.length;c<n;c++){g+=f[c].toFixed(3)+" ";}this.last.x=(this.isAbsolute?0:this.last.x)+f[4];this.last.y=(this.isAbsolute?0:this.last.y)+f[5];this.last.bx=f[2];this.last.by=f[3];var j=this[0].getAttribute("d")||"";this[0].setAttribute("d",j+g);this.attrs.path=j+g;return this;}};X.curveTo=function(){var e={},g=[0,1,2,3,"s",5,"c"];var f=g[arguments.length];if(this.isAbsolute){f=f.toUpperCase();}for(var b=0,c=arguments.length;b<c;b++){f+=parseFloat(arguments[b],10).toFixed(3)+" ";}this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[arguments.length-2],10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[arguments.length-1],10);this.last.bx=parseFloat(arguments[arguments.length-4],10);this.last.by=parseFloat(arguments[arguments.length-3],10);var a=this.node.getAttribute("d")||"";this.node.setAttribute("d",a+f);this.attrs.path=a+f;return this;};X.qcurveTo=function(){var e={},g=[0,1,"t",3,"q"];var f=g[arguments.length];if(this.isAbsolute){f=f.toUpperCase();}for(var b=0,c=arguments.length;b<c;b++){f+=parseFloat(arguments[b],10).toFixed(3)+" ";}this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[arguments.length-2],10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[arguments.length-1],10);if(arguments.length!=2){this.last.qx=parseFloat(arguments[arguments.length-4],10);this.last.qy=parseFloat(arguments[arguments.length-3],10);}var a=this.node.getAttribute("d")||"";this.node.setAttribute("d",a+f);this.attrs.path=a+f;return this;};X.addRoundedCorner=function(d,b){var c=0.5522*d,a=this.isAbsolute,f=this;if(a){this.relatively();a=function(){f.absolutely();};}else{a=function(){};}var e={l:function(){return{u:function(){f.curveTo(-c,0,-d,-(d-c),-d,-d);},d:function(){f.curveTo(-c,0,-d,d-c,-d,d);}};},r:function(){return{u:function(){f.curveTo(c,0,d,-(d-c),d,-d);},d:function(){f.curveTo(c,0,d,d-c,d,d);}};},u:function(){return{r:function(){f.curveTo(0,-c,-(c-d),-d,d,-d);},l:function(){f.curveTo(0,-c,c-d,-d,-d,-d);}};},d:function(){return{r:function(){f.curveTo(0,c,-(c-d),d,d,d);},l:function(){f.curveTo(0,c,c-d,d,-d,d);}};}};e[b[0]]()[b[1]]();a();return f;};X.andClose=function(){var a=this[0].getAttribute("d")||"";this[0].setAttribute("d",a+"Z ");this.attrs.path=a+"Z ";return this;};if(R){X.attrs.path=""+R;X.absolutely();L.pathfinder(X,X.attrs.path);}if(Y){Q(X,Y);}return X;};var T=function(a,Z,b){var Y=document.createElementNS(b.svgns,Z.type+"Gradient");Y.id="raphael-gradient-"+Raphael.idGenerator++;if(Z.vector&&Z.vector.length){Y.setAttribute("x1",Z.vector[0]);Y.setAttribute("y1",Z.vector[1]);Y.setAttribute("x2",Z.vector[2]);Y.setAttribute("y2",Z.vector[3]);}b.defs.appendChild(Y);for(var W=0,X=Z.dots.length;W<X;W++){var R=document.createElementNS(b.svgns,"stop");R.setAttribute("offset",Z.dots[W].offset?Z.dots[W].offset:(W==0)?"0%":"100%");R.setAttribute("stop-color",Z.dots[W].color||"#fff");if(typeof Z.dots[W].opacity!="undefined"){R.setAttribute("stop-opacity",Z.dots[W].opacity);}Y.appendChild(R);}a.setAttribute("fill","url(#"+Y.id+")");};var C=function(W){if(W.pattern){var R=W.node.getBBox();W.pattern.setAttribute("patternTransform","translate("+[R.x,R.y].join(",")+")");}};var Q=function(X,Y){var d={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},R=function(p,n){n=d[n.toString().toLowerCase()];if(n){var l=p.attrs["stroke-width"]||"1",h={round:l,square:l,butt:0}[p.attrs["stroke-linecap"]||Y["stroke-linecap"]]||0,m=[];for(var j=0,k=n.length;j<k;j++){m.push(n[j]*l+((j%2)?1:-1)*h);}n=m.join(",");p.node.setAttribute("stroke-dasharray",n);}};for(var b in Y){var e=Y[b];X.attrs[b]=e;switch(b){case"path":if(X.type=="path"){X.node.setAttribute("d","M0,0");L.pathfinder(X,e);}case"rx":case"cx":case"x":X.node.setAttribute(b,e);C(X);break;case"ry":case"cy":case"y":X.node.setAttribute(b,e);C(X);break;case"width":X.node.setAttribute(b,e);break;case"height":X.node.setAttribute(b,e);break;case"gradient":T(X.node,e,X.svg);break;case"stroke-width":X.node.style.strokeWidth=e;X.node.setAttribute(b,e);if(X.attrs["stroke-dasharray"]){R(X,X.attrs["stroke-dasharray"]);}break;case"stroke-dasharray":R(X,e);break;case"text":if(X.type=="text"){X.node.childNodes.length&&X.node.removeChild(X.node.firstChild);X.node.appendChild(document.createTextNode(e));}break;case"rotation":X.rotate(e,true);break;case"translation":var g=e.split(/[, ]+/);X.translate(g[0],g[1]);break;case"scale":var g=e.split(/[, ]+/);X.scale(g[0],g[1]);break;case"fill":var a=e.match(/^url\(([^\)]+)\)$/i);if(a){var W=document.createElementNS(X.svg.svgns,"pattern");var f=document.createElementNS(X.svg.svgns,"image");W.id="raphael-pattern-"+Raphael.idGenerator++;W.setAttribute("x",0);W.setAttribute("y",0);W.setAttribute("patternUnits","userSpaceOnUse");f.setAttribute("x",0);f.setAttribute("y",0);f.setAttributeNS(X.svg.xlink,"href",a[1]);W.appendChild(f);var Z=document.createElement("img");Z.style.position="absolute";Z.style.top="-9999em";Z.style.left="-9999em";Z.onload=function(){W.setAttribute("width",this.offsetWidth);W.setAttribute("height",this.offsetHeight);f.setAttribute("width",this.offsetWidth);f.setAttribute("height",this.offsetHeight);document.body.removeChild(this);L.safari();};document.body.appendChild(Z);Z.src=a[1];X.svg.defs.appendChild(W);X.node.style.fill="url(#"+W.id+")";X.node.setAttribute("fill","url(#"+W.id+")");X.pattern=W;C(X);break;}default:var c=b.replace(/(\-.)/g,function(h){return h.substring(1).toUpperCase();});X.node.style[c]=e;X.node.setAttribute(b,e);break;}}};var M=function(W,R){var a=0,Z=0;this[0]=W;this.node=W;this.svg=R;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,x:0,y:0},sx:1,sy:1};};M.prototype.translate=function(R,X){if(R==undefined&&X==undefined){return{x:this._.tx,y:this._.ty};}this._.tx+=+R;this._.ty+=+X;switch(this.type){case"circle":case"ellipse":this.attr({cx:this.attrs.cx+R,cy:this.attrs.cy+X});break;case"rect":case"image":case"text":this.attr({x:this.attrs.x+R,y:this.attrs.y+X});break;case"path":var W=Raphael.pathToRelative(this.attrs.path);W[0][1]+=+R;W[0][2]+=+X;this.attr({path:W.join(" ")});break;}return this;};M.prototype.rotate=function(R,W){if(R==undefined){return this._.rt.deg;}var X=this.getBBox();if(W){this._.rt.deg=R;}else{this._.rt.deg+=R;}if(this._.rt.deg){this.transformations[0]=("rotate("+this._.rt.deg+" "+(X.x+X.width/2)+" "+(X.y+X.height/2)+")");}else{this.transformations[0]="";}this.node.setAttribute("transform",this.transformations.join(" "));return this;};M.prototype.hide=function(){this.node.style.display="none";return this;};M.prototype.show=function(){this.node.style.display="block";return this;};M.prototype.remove=function(){this.node.parentNode.removeChild(this.node);};M.prototype.getBBox=function(){return this.node.getBBox();};M.prototype.attr=function(){if(arguments.length==1&&typeof arguments[0]=="string"){if(arguments[0]=="translation"){return this.translate();}return this.attrs[arguments[0]];}if(arguments.length==1&&arguments[0] instanceof Array){var R={};for(var W in arguments[0]){R[arguments[0][W]]=this.attrs[arguments[0][W]];}return R;}if(arguments.length==2){var X={};X[arguments[0]]=arguments[1];Q(this,X);}else{if(arguments.length==1&&typeof arguments[0]=="object"){Q(this,arguments[0]);}}return this;};M.prototype.toFront=function(){this.node.parentNode.appendChild(this.node);return this;};M.prototype.toBack=function(){if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);}return this;};M.prototype.insertAfter=function(R){if(R.node.nextSibling){R.node.parentNode.insertBefore(this.node,R.node.nextSibling);}else{R.node.parentNode.appendChild(this.node);}return this;};M.prototype.insertBefore=function(R){R.node.parentNode.insertBefore(this.node,R.node);return this;};var I=function(W,R,a,Z){var Y=document.createElementNS(W.svgns,"circle");Y.setAttribute("cx",R);Y.setAttribute("cy",a);Y.setAttribute("r",Z);Y.setAttribute("fill","none");Y.setAttribute("stroke","#000");if(W.canvas){W.canvas.appendChild(Y);}var X=new M(Y,W);X.attrs=X.attrs||{};X.attrs.cx=R;X.attrs.cy=a;X.attrs.r=Z;X.attrs.stroke="#000";X.type="circle";return X;};var U=function(X,R,c,W,a,b){var Z=document.createElementNS(X.svgns,"rect");Z.setAttribute("x",R);Z.setAttribute("y",c);Z.setAttribute("width",W);Z.setAttribute("height",a);if(b){Z.setAttribute("rx",b);Z.setAttribute("ry",b);}Z.setAttribute("fill","none");Z.setAttribute("stroke","#000");if(X.canvas){X.canvas.appendChild(Z);}var Y=new M(Z,X);Y.attrs=Y.attrs||{};Y.attrs.x=R;Y.attrs.y=c;Y.attrs.width=W;Y.attrs.height=a;Y.attrs.stroke="#000";if(b){Y.attrs.rx=Y.attrs.ry=b;}Y.type="rect";return Y;};var K=function(W,R,b,a,Z){var Y=document.createElementNS(W.svgns,"ellipse");Y.setAttribute("cx",R);Y.setAttribute("cy",b);Y.setAttribute("rx",a);Y.setAttribute("ry",Z);Y.setAttribute("fill","none");Y.setAttribute("stroke","#000");if(W.canvas){W.canvas.appendChild(Y);}var X=new M(Y,W);X.attrs=X.attrs||{};X.attrs.cx=R;X.attrs.cy=b;X.attrs.rx=a;X.attrs.ry=Z;X.attrs.stroke="#000";X.type="ellipse";return X;};var V=function(X,b,R,c,W,a){var Z=document.createElementNS(X.svgns,"image");Z.setAttribute("x",R);Z.setAttribute("y",c);Z.setAttribute("width",W);Z.setAttribute("height",a);Z.setAttribute("preserveAspectRatio","none");Z.setAttributeNS(X.xlink,"href",b);if(X.canvas){X.canvas.appendChild(Z);}var Y=new M(Z,X);Y.attrs=Y.attrs||{};Y.attrs.x=R;Y.attrs.y=c;Y.attrs.width=W;Y.attrs.height=a;Y.type="image";return Y;};var H=function(W,R,a,Z){var Y=document.createElementNS(W.svgns,"text");Y.setAttribute("x",R);Y.setAttribute("y",a);Y.setAttribute("text-anchor","middle");if(Z){Y.appendChild(document.createTextNode(Z));}if(W.canvas){W.canvas.appendChild(Y);}var X=new M(Y,W);X.attrs=X.attrs||{};X.attrs.x=R;X.attrs.y=a;X.type="text";Q(X,{font:'10px "Arial"',stroke:"none",fill:"#000"});return X;};var O=function(R){var X=document.createElementNS(R.svgns,"g");if(R.canvas){R.canvas.appendChild(X);}var W=new M(X,R);for(var Y in R){if(Y[0]!="_"&&typeof R[Y]=="function"){W[Y]=(function(Z){return function(){var a=R[Z].apply(R,arguments);X.appendChild(a[0]);return a;};})(Y);}}W.type="group";return W;};F._create=function(){if(typeof arguments[0]=="string"){var X=document.getElementById(arguments[0]);var Y=arguments[1];var W=arguments[2];}if(typeof arguments[0]=="object"){var X=arguments[0];var Y=arguments[1];var W=arguments[2];}if(typeof arguments[0]=="number"){var X=1,R=arguments[0],a=arguments[1],Y=arguments[2],W=arguments[3];}if(!X){throw new Error("SVG container not found.");}L.canvas=document.createElementNS(L.svgns,"svg");L.canvas.setAttribute("width",Y||320);L.width=Y||320;L.canvas.setAttribute("height",W||200);L.height=W||200;if(X==1){document.body.appendChild(L.canvas);L.canvas.style.position="absolute";L.canvas.style.left=R+"px";L.canvas.style.top=a+"px";}else{if(X.firstChild){X.insertBefore(L.canvas,X.firstChild);}else{X.appendChild(L.canvas);}}X={canvas:L.canvas,clear:function(){while(this.canvas.firstChild){this.canvas.removeChild(this.canvas.firstChild);}this.defs=document.createElementNS(L.svgns,"defs");this.canvas.appendChild(this.defs);}};for(var Z in L){if(Z!="create"){X[Z]=L[Z];}}for(var Z in F.fn){if(!X[Z]){X[Z]=F.fn[Z];}}X.clear();return X;};L.remove=function(){this.canvas.parentNode.removeChild(this.canvas);};L.svgns="http://www.w3.org/2000/svg";L.xlink="http://www.w3.org/1999/xlink";L.safari=function(){if(navigator.vendor=="Apple Computer, Inc."){var R=this.rect(-this.width,-this.height,this.width*3,this.height*3).attr({stroke:"none"});setTimeout(function(){R.remove();},0);}};}if(F.vml){J=function(c,R,a){var Y=document.createElement("rvml:group"),b=Y.style;b.position="absolute";b.left=0;b.top=0;b.width=a.width+"px";b.height=a.height+"px";var X=document.createElement("rvml:shape"),W=X.style;W.width=a.width+"px";W.height=a.height+"px";X.path="";if(c["class"]){X.className=c["class"];}X.coordsize=this.coordsize;X.coordorigin=this.coordorigin;Y.appendChild(X);a.canvas.appendChild(Y);var Z=new M(X,Y,a);Z.isAbsolute=true;Z.type="path";Z.path=[];Z.last={x:0,y:0,bx:0,by:0,isAbsolute:true};Z.Path="";Z.absolutely=function(){this.isAbsolute=true;return this;};Z.relatively=function(){this.isAbsolute=false;return this;};Z.moveTo=function(e,g){var f=this.isAbsolute?"m":"t";f+=Math.round(parseFloat(e,10))+" "+Math.round(parseFloat(g,10));this.node.path=this.Path+=f;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(e,10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(g,10);this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"M":"m")+[e,g];return this;};Z.lineTo=function(e,g){var f=this.isAbsolute?"l":"r";f+=Math.round(parseFloat(e,10))+" "+Math.round(parseFloat(g,10));this[0].path=this.Path+=f;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(e,10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(g,10);this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"L":"l")+[e,g];return this;};Z.arcTo=function(g,e,o,h,f,s){f=(this.isAbsolute?0:this.last.x)+f;s=(this.isAbsolute?0:this.last.y)+s;var i=this.last.x,u=this.last.y,t=(i-f)/2,r=(u-s)/2,n=(o==h?-1:1)*Math.sqrt(Math.abs(g*g*e*e-g*g*r*r-e*e*t*t)/(g*g*r*r+e*e*t*t)),m=n*g*r/e+(i+f)/2,l=n*-e*t/g+(u+s)/2,p=h?(this.isAbsolute?"wa":"wr"):(this.isAbsolute?"at":"ar"),j=Math.round(m-g),q=Math.round(l-e);p+=[j,q,Math.round(j+g*2),Math.round(q+e*2),Math.round(i),Math.round(u),Math.round(parseFloat(f,10)),Math.round(parseFloat(s,10))].join(", ");this.node.path=this.Path+=p;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(f,10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(s,10);this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"A":"a")+[g,e,0,o,h,f,s];return this;};Z.cplineTo=function(e,k,g){if(!g){return this.lineTo(e,k);}else{var l=Math.round(Math.round(parseFloat(e,10)*100)/100),j=Math.round(Math.round(parseFloat(k,10)*100)/100),m=Math.round(Math.round(parseFloat(g,10)*100)/100),i=this.isAbsolute?"c":"v",h=[Math.round(this.last.x)+m,Math.round(this.last.y),l-m,j,l,j],f=[this.last.x+g,this.last.y,e-g,k,e,k];i+=h.join(" ")+" ";this.last.x=(this.isAbsolute?0:this.last.x)+h[4];this.last.y=(this.isAbsolute?0:this.last.y)+h[5];this.last.bx=h[2];this.last.by=h[3];this.node.path=this.Path+=i;this.attrs.path+=(this.isAbsolute?"C":"c")+f;return this;}};Z.curveTo=function(){var g=this.isAbsolute?"c":"v";if(arguments.length==6){this.last.bx=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2],10);this.last.by=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3],10);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[4],10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[5],10);g+=[Math.round(parseFloat(arguments[0],10)),Math.round(parseFloat(arguments[1],10)),Math.round(parseFloat(arguments[2],10)),Math.round(parseFloat(arguments[3],10)),Math.round(parseFloat(arguments[4],10)),Math.round(parseFloat(arguments[5],10))].join(" ")+" ";this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"C":"c")+Array.prototype.splice.call(arguments,0,arguments.length);}if(arguments.length==4){var f=this.last.x*2-this.last.bx;var e=this.last.y*2-this.last.by;this.last.bx=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[0],10);this.last.by=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[1],10);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2],10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3],10);g+=[Math.round(f),Math.round(e),Math.round(parseFloat(arguments[0],10)),Math.round(parseFloat(arguments[1],10)),Math.round(parseFloat(arguments[2],10)),Math.round(parseFloat(arguments[3],10))].join(" ")+" ";this.attrs.path+=(this.isAbsolute?"S":"s")+Array.prototype.splice.call(arguments,0,arguments.length);}this.node.path=this.Path+=g;return this;};Z.qcurveTo=function(){var e="qb";if(arguments.length==4){this.last.qx=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[0],10);this.last.qy=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[1],10);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2],10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3],10);e+=[Math.round(this.last.qx),Math.round(this.last.qy),Math.round(this.last.x),Math.round(this.last.y)].join(" ")+" ";this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"Q":"q")+Array.prototype.splice.call(arguments,0,arguments.length);}if(arguments.length==2){this.last.qx=this.last.x*2-this.last.qx;this.last.qy=this.last.y*2-this.last.qy;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2],10);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3],10);e+=[Math.round(this.last.qx),Math.round(this.last.qy),Math.round(this.last.x),Math.round(this.last.y)].join(" ")+" ";this.attrs.path+=(this.isAbsolute?"T":"t")+Array.prototype.splice.call(arguments,0,arguments.length);}this.node.path=this.Path+=e;this.path.push({type:"qcurve",arg:[].slice.call(arguments,0),pos:this.isAbsolute});return this;};Z.addRoundedCorner=function(g,e){var f=0.5522*g,d=this.isAbsolute,i=this;if(d){this.relatively();d=function(){i.absolutely();};}else{d=function(){};}var h={l:function(){return{u:function(){i.curveTo(-f,0,-g,-(g-f),-g,-g);},d:function(){i.curveTo(-f,0,-g,g-f,-g,g);}};},r:function(){return{u:function(){i.curveTo(f,0,g,-(g-f),g,-g);},d:function(){i.curveTo(f,0,g,g-f,g,g);}};},u:function(){return{r:function(){i.curveTo(0,-f,-(f-g),-g,g,-g);},l:function(){i.curveTo(0,-f,f-g,-g,-g,-g);}};},d:function(){return{r:function(){i.curveTo(0,f,-(f-g),g,g,g);},l:function(){i.curveTo(0,f,f-g,g,-g,g);}};}};h[e.charAt(0)]()[e.charAt(1)]();d();return i;};Z.andClose=function(){this.node.path=(this.Path+="x e");this.attrs.path+="z";return this;};if(R){Z.absolutely();Z.attrs.path="";L.pathfinder(Z,""+R);}Z.setBox();Q(Z,c);if(c.gradient){T(Z,c.gradient);}return Z;};var Q=function(R,W){var f=R.node.style,Z=R;R.attrs=R.attrs||{};for(var Y in W){R.attrs[Y]=W[Y];}if(W.path&&R.type=="path"){R.Path="";R.path=[];L.pathfinder(R,W.path);}if(W.rotation!=null){R.Group.style.rotation=W.rotation;}if(W.translation){var e=W.translation.split(/[, ]+/);R.translate(e[0],e[1]);}if(W.scale){var e=W.scale.split(/[, ]+/);R.scale(e[0],e[1]);}if(R.type=="image"&&W.opacity){R.node.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(W.opacity*100)+")";R.node.style.filter=(R.node.filterMatrix||"")+(R.node.filterOpacity||"");}W.font&&(f.font=W.font);W["font-family"]&&(f.fontFamily=W["font-family"]);W["font-size"]&&(f.fontSize=W["font-size"]);W["font-weight"]&&(f.fontWeight=W["font-weight"]);W["font-style"]&&(f.fontStyle=W["font-style"]);if(typeof W.opacity!="undefined"||typeof W["stroke-width"]!="undefined"||typeof W.fill!="undefined"||typeof W.stroke!="undefined"){R=R.shape||R.node;var d=(R.getElementsByTagName("fill")&&R.getElementsByTagName("fill")[0])||document.createElement("rvml:fill");if("fill-opacity" in W||"opacity" in W){d.opacity=((W["fill-opacity"]+1||2)-1)*((W.opacity+1||2)-1);}if(W.fill){d.on=true;}if(d.on==undefined||W.fill=="none"){d.on=false;}if(d.on&&W.fill){var X=W.fill.match(/^url\(([^\)]+)\)$/i);if(X){d.src=X[1];d.type="tile";}else{d.color=W.fill;d.src="";d.type="solid";}}R.appendChild(d);var c=(R.getElementsByTagName("stroke")&&R.getElementsByTagName("stroke")[0])||document.createElement("rvml:stroke");if((W.stroke&&W.stroke!="none")||W["stroke-width"]||W["stroke-opacity"]||W["stroke-dasharray"]){c.on=true;}if(W.stroke=="none"||typeof c.on=="undefined"){c.on=false;}if(c.on&&W.stroke){c.color=W.stroke;}c.opacity=((W["stroke-opacity"]+1||2)-1)*((W.opacity+1||2)-1);W["stroke-linejoin"]&&(c.joinstyle=W["stroke-linejoin"]||"miter");c.miterlimit=W["stroke-miterlimit"]||8;W["stroke-linecap"]&&(c.endcap={butt:"flat",square:"square",round:"round"}[W["stroke-linecap"]]||"miter");W["stroke-width"]&&(c.weight=(parseFloat(W["stroke-width"],10)||1)*12/16);if(W["stroke-dasharray"]){var a={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};c.dashstyle=a[W["stroke-dasharray"]]||"";}R.appendChild(c);}if(Z.type=="text"){var b=document.createElement("span"),f=b.style;Z.attrs.font&&(f.font=Z.attrs.font);Z.attrs["font-family"]&&(f.fontFamily=Z.attrs["font-family"]);Z.attrs["font-size"]&&(f.fontSize=Z.attrs["font-size"]);Z.attrs["font-weight"]&&(f.fontWeight=Z.attrs["font-weight"]);Z.attrs["font-style"]&&(f.fontStyle=Z.attrs["font-style"]);Z.node.parentNode.appendChild(b);b.innerText=Z.node.string;Z.W=Z.attrs.w=b.offsetWidth;Z.H=Z.attrs.h=b.offsetHeight;Z.X=Z.attrs.x-Math.round(Z.W/2);Z.Y=Z.attrs.y-Math.round(Z.H/2);Z.node.parentNode.removeChild(b);}};var G=function(W,R,Z,Y){var X=Math.round(Math.atan((parseFloat(Z,10)-parseFloat(W,10))/(parseFloat(Y,10)-parseFloat(R,10)))*57.29)||0;if(!X&&parseFloat(W,10)<parseFloat(R,10)){X=180;}X-=180;if(X<0){X+=360;}return X;};var T=function(c,b){c.attrs=c.attrs||{};c.attrs.gradient=b;c=c.shape||c[0];var a=c.getElementsByTagName("fill");if(a.length){a=a[0];}else{a=document.createElement("rvml:fill");}if(b.dots.length){a.on=true;a.method="none";a.type=(b.type.toLowerCase()=="linear")?"gradient":"gradientTitle";if(typeof b.dots[0].color!="undefined"){a.color=b.dots[0].color||"#000";}if(typeof b.dots[b.dots.length-1].color!="undefined"){a.color2=b.dots[b.dots.length-1].color||"#000";}var R=[];for(var Y=0,Z=b.dots.length;Y<Z;Y++){if(b.dots[Y].offset){R.push(b.dots[Y].offset+" "+b.dots[Y].color);}}var W=typeof b.dots[0].opacity=="undefined"?1:b.dots[0].opacity;var X=typeof b.dots[b.dots.length-1].opacity=="undefined"?1:b.dots[b.dots.length-1].opacity;if(R){a.colors.value=R.join(",");X+=W;W=X-W;X-=W;}a.setAttribute("opacity",W);a.setAttribute("opacity2",X);if(b.vector){a.angle=G.apply(null,b.vector);}if(b.type.toLowerCase()=="radial"){a.focus="100%";a.focusposition="0.5 0.5";}}};var M=function(Z,b,R){var a=0,X=0,W=0,Y=1;this[0]=Z;this.node=Z;this.X=0;this.Y=0;this.attrs={};this.Group=b;this.vml=R;this._={tx:0,ty:0,rt:0,sx:1,sy:1};};M.prototype.rotate=function(R,W){if(R==undefined){return this._.rt;}if(W){this._.rt=R;}else{this._.rt+=R;}this.Group.style.rotation=this._.rt;return this;};M.prototype.setBox=function(X){var R=this.Group.style,Y=(this.shape&&this.shape.style)||this.node.style;for(var Z in X){this.attrs[Z]=X[Z];}var c=this.attrs,f,e,g,b;switch(this.type){case"circle":f=c.cx-c.r;e=c.cy-c.r;g=b=c.r*2;break;case"ellipse":f=c.cx-c.rx;e=c.cy-c.ry;g=c.rx*2;b=c.ry*2;break;case"rect":case"image":f=c.x;e=c.y;g=c.width||0;b=c.height||0;break;case"text":this.textpath.v=["m",Math.round(c.x),", ",Math.round(c.y-2),"l",Math.round(c.x)+1,", ",Math.round(c.y-2)].join("");f=c.x-Math.round(this.W/2);e=c.y-this.H/2;g=this.W;b=this.H;break;case"path":if(!this.attrs.path){f=0;e=0;g=this.vml.width;b=this.vml.height;}else{var a=Raphael.pathDimensions(this.attrs.path),f=a.x;e=a.y;g=a.width;b=a.height;}break;default:f=0;e=0;g=this.vml.width;b=this.vml.height;break;}if(this.type=="path"||this.type=="text"){var W=Math.round(this.vml.width/2-g/2-f),d=Math.round(this.vml.height/2-b/2-e);R.left=-W+"px";R.top=-d+"px";this.X=this.type=="text"?f:W;this.Y=this.type=="text"?e:d;this.W=g;this.H=b;Y.top=d+"px";Y.left=W+"px";}else{var W=this.vml.width/2-g/2,d=this.vml.height/2-b/2;R.position="absolute";R.left=f-W+"px";R.top=e-d+"px";this.X=f-W;this.Y=e-d;this.W=g;this.H=b;R.width=this.vml.width+"px";R.height=this.vml.height+"px";Y.position="absolute";Y.top=d+"px";Y.left=W+"px";Y.width=g+"px";Y.height=b+"px";}};M.prototype.hide=function(){this.Group.style.display="none";return this;};M.prototype.show=function(){this.Group.style.display="block";return this;};M.prototype.translate=function(R,X){if(R==undefined&&X==undefined){return{x:this._.tx,y:this._.ty};}this._.tx+=+R;this._.ty+=+X;if(this.type=="path"){var W=this.attrs.path;W=Raphael.pathToRelative(W);W[0][1]+=+R;W[0][2]+=+X;this.attr({path:W.join(" ")});}this.setBox({x:this._.tx,y:this._.ty});return this;};M.prototype.getBBox=function(){return{x:this.X,y:this.Y,width:this.W,height:this.H};};M.prototype.remove=function(){this[0].parentNode.removeChild(this[0]);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);};M.prototype.attr=function(){if(arguments.length==1&&typeof arguments[0]=="string"){if(arguments[0]=="translation"){return this.translate();}return this.attrs[arguments[0]];}if(this.attrs&&arguments.length==1&&arguments[0] instanceof Array){var R={};for(var Y=0,Z=arguments[0].length;Y<Z;Y++){R[arguments[0][Y]]=this.attrs[arguments[0][Y]];}return R;}if(this.node.tagName.toLowerCase()=="group"){var X=this[0].childNodes;this.attrs=this.attrs||{};if(arguments.length==2){this.attrs[arguments[0]]=arguments[1];}else{if(arguments.length==1||typeof arguments[0]=="object"){for(var W in arguments[0]){this.attrs[W]=arguments[0][W];}}}for(var Y=0,Z=X.length;Y<Z;Y++){this.attr.apply(new item(X[Y],this[0],this.vml),arguments);}}else{var a;if(arguments.length==2){a={};a[arguments[0]]=arguments[1];}if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];}if(a){if(a.gradient){T(this,a.gradient);}if(a.text&&this.type=="text"){this.node.string=a.text;}if(a.id){this.node.id=a.id;}Q(this,a);this.setBox(a);}}return this;};M.prototype.toFront=function(){this.Group.parentNode.appendChild(this.Group);return this;};M.prototype.toBack=function(){if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);}return this;};M.prototype.insertAfter=function(R){if(R.Group.nextSibling){R.Group.parentNode.insertBefore(this.Group,R.Group.nextSibling);}else{R.Group.parentNode.appendChild(this.Group);}return this;};M.prototype.insertBefore=function(R){R.Group.parentNode.insertBefore(this.Group,R.Group);return this;};var I=function(W,R,b,Z){var Y=document.createElement("rvml:group");var a=document.createElement("rvml:oval");Y.appendChild(a);W.canvas.appendChild(Y);var X=new M(a,Y,W);X.type="circle";Q(X,{stroke:"#000",fill:"none"});X.attrs.cx=R;X.attrs.cy=b;X.attrs.r=Z;X.setBox({x:R-Z,y:b-Z,width:Z*2,height:Z*2});return X;};var U=function(W,c,b,d,Y,R){var Z=document.createElement("rvml:group");var X=document.createElement(R?"rvml:roundrect":"rvml:rect");if(R){X.arcsize=R/(Math.min(d,Y));}Z.appendChild(X);W.canvas.appendChild(Z);var a=new M(X,Z,W);a.type="rect";Q(a,{stroke:"#000"});a.attrs.x=c;a.attrs.y=b;a.attrs.w=d;a.attrs.h=Y;a.attrs.r=R;a.setBox({x:c,y:b,width:d,height:Y});return a;};var K=function(W,R,c,a,Z){var Y=document.createElement("rvml:group");var b=document.createElement("rvml:oval");Y.appendChild(b);W.canvas.appendChild(Y);var X=new M(b,Y,W);X.type="ellipse";Q(X,{stroke:"#000"});X.attrs.cx=R;X.attrs.cy=c;X.attrs.rx=a;X.attrs.ry=Z;X.setBox({x:R-a,y:c-Z,width:a*2,height:Z*2});return X;};var V=function(W,R,c,b,d,Y){var Z=document.createElement("rvml:group");var X=document.createElement("rvml:image");X.src=R;Z.appendChild(X);W.canvas.appendChild(Z);var a=new M(X,Z,W);a.type="image";a.attrs.x=c;a.attrs.y=b;a.attrs.w=d;a.attrs.h=Y;a.setBox({x:c,y:b,width:d,height:Y});return a;};var H=function(W,e,d,f){var a=document.createElement("rvml:group"),Z=a.style;var Y=document.createElement("rvml:shape"),c=Y.style;var h=document.createElement("rvml:path"),R=h.style;h.v=["m",Math.round(e),", ",Math.round(d-2),"l",Math.round(e)+1,", ",Math.round(d-2)].join("");h.textpathok=true;c.width=W.width;c.height=W.height;Z.position="absolute";Z.left=0;Z.top=0;Z.width=W.width;Z.height=W.height;var X=document.createElement("rvml:textpath");X.string=f;X.on=true;X.coordsize=W.coordsize;X.coordorigin=W.coordorigin;Y.appendChild(X);Y.appendChild(h);a.appendChild(Y);W.canvas.appendChild(a);var b=new M(X,a,W);b.shape=Y;b.textpath=h;b.type="text";b.attrs.x=e;b.attrs.y=d;b.attrs.w=1;b.attrs.h=1;Q(b,{font:'10px "Arial"',stroke:"none",fill:"#000"});return b;};F._create=function(){var X,Y,i;if(typeof arguments[0]=="string"){X=document.getElementById(arguments[0]);Y=arguments[1];i=arguments[2];}if(typeof arguments[0]=="object"){X=arguments[0];Y=arguments[1];i=arguments[2];}if(typeof arguments[0]=="number"){X=1;x=arguments[0];y=arguments[1];Y=arguments[2];i=arguments[3];}if(!X){throw new Error("VML container not found.");}if(!document.namespaces.rvml){document.namespaces.add("rvml","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("rvml\\:*","behavior:url(#default#VML)");}var f=document.createElement("div"),e=document.createElement("div"),R=L.canvas=document.createElement("rvml:group"),a=f.style,Z=R.style;L.width=Y;L.height=i;Y=Y||"320px";i=i||"200px";a.clip="rect(0 "+Y+" "+i+" 0)";a.top="-2px";a.left="-2px";a.position="absolute";Z.position="absolute";e.style.position="relative";Z.width=Y;Z.height=i;R.coordsize=(Y=="100%"?Y:parseFloat(Y))+" "+(i=="100%"?i:parseFloat(i));R.coordorigin="0 0";var g=document.createElement("rvml:rect"),h=g.style;h.left=h.top=0;h.width=Z.width;h.height=Z.height;g.filled=g.stroked="f";R.appendChild(g);f.appendChild(R);e.appendChild(f);if(X==1){document.body.appendChild(e);a.position="absolute";a.left=x+"px";a.top=y+"px";a.width=Y;a.height=i;X={style:{width:Y,height:i}};}else{a.width=X.style.width=Y;a.height=X.style.height=i;if(X.firstChild){X.insertBefore(e,X.firstChild);}else{X.appendChild(e);}}for(var W in L){X[W]=L[W];}for(var W in F.fn){if(!X[W]){X[W]=F.fn[W];}}X.clear=function(){var b=[];for(var c=0,d=R.childNodes.length;c<d;c++){if(R.childNodes[c]!=g){b.push(R.childNodes[c]);}}for(c=0,d=b.length;c<d;c++){R.removeChild(b[c]);}};return X;};L.remove=function(){this.canvas.parentNode.parentNode.parentNode.removeChild(this.canvas.parentNode.parentNode);};L.safari=function(){};}var N=(function(){if(document.addEventListener){return function(X,W,R){X.addEventListener(W,R,false);};}else{if(document.attachEvent){return function(Y,W,R){var X=function(Z){R.call(this,Z||window.event);};Y.attachEvent("on"+W,X);};}}})();var B=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup"];for(var P=B.length;P--;){(function(R){M.prototype[R]=function(W){N(this.node,R,W);return this;};})(B[P]);}var S=function(W){this.items=[];if(W&&W.constructor==Array){for(var R=W.length;R--;){if(W[R].constructor==M){this.items[this.items.length]=W[R];}}}};S.prototype.add=function(R){if(R&&R.constructor==M){this.items[this.items.length]=R;}return this;};S.prototype.remove=function(W){if(W&&W.constructor==M){for(var R=this.items.length;R--;){if(this.items[R]==W){this.items.splice(R,1);return this;}}}return this;};for(var D in M.prototype){S.prototype[D]=(function(R){return function(){for(var W=this.items.length;W--;){this.items[W][R].apply(this.items[W],arguments);}return this;};})(D);}S.prototype.getBBox=function(){var R=[],a=[],W=[],Y=[];for(var X=this.items.length;X--;){var Z=this.items[X].getBBox();R.push(Z.x);a.push(Z.y);W.push(Z.x+Z.width);Y.push(Z.y+Z.height);}R=Math.min(R);a=Math.min(a);return{x:R,y:a,w:Math.max(W)-R,h:Math.max(Y)-a};};L.circle=function(R,X,W){return I(this,R,X,W);};L.rect=function(R,Z,W,X,Y){return U(this,R,Z,W,X,Y);};L.ellipse=function(R,Y,X,W){return K(this,R,Y,X,W);};L.path=function(W,R){return J(W,R,this);};L.image=function(Y,R,Z,W,X){return V(this,Y,R,Z,W,X);};L.text=function(R,X,W){return H(this,R,X,W);};L.group=function(){return this;};L.drawGrid=function(e,d,f,b,a,c,Y){Y=Y||"#000";var W=this.path({stroke:Y,"stroke-width":1}).moveTo(e,d).lineTo(e+f,d).lineTo(e+f,d+b).lineTo(e,d+b).lineTo(e,d),R=b/c,X=f/a;for(var Z=1;Z<c;Z++){W.moveTo(e,d+Z*R).lineTo(e+f,d+Z*R);}for(var Z=1;Z<a;Z++){W.moveTo(e+Z*X,d).lineTo(e+Z*X,d+b);}return W;};L.pathfinder=function(a,Z){var W={M:function(b,c){this.moveTo(b,c);},C:function(e,g,c,f,b,d){this.curveTo(e,g,c,f,b,d);},Q:function(c,e,b,d){this.qcurveTo(c,e,b,d);},T:function(b,c){this.qcurveTo(b,c);},S:function(c,e,b,d){a.curveTo(c,e,b,d);},L:function(b,c){a.lineTo(b,c);},H:function(b){this.lineTo(b,this.last.y);},V:function(b){this.lineTo(this.last.x,b);},A:function(f,e,c,d,g,b,h){this.arcTo(f,e,d,g,b,h);},Z:function(){this.andClose();}};Z=Raphael.pathToAbsolute(Z);for(var X=0,Y=Z.length;X<Y;X++){var R=Z[X].shift();W[R].apply(a,Z[X]);}};L.set=function(R){return new S(R);};M.prototype.stop=function(){clearTimeout(this.animation_in_progress);};M.prototype.scale=function(d,c){if(d==undefined&&c==undefined){return{x:this._.sx,y:this._.sy};}c=c||d;var n,k,W,R;if(d!=0&&!(d==1&&c==1)){var g=Math.round(d/Math.abs(d)),e=Math.round(c/Math.abs(c)),m=this.node.style;n=this.attr("x");k=this.attr("y");W=this.attr("cx");R=this.attr("cy");if(g!=1||e!=1){if(this.transformations){this.transformations[2]="scale("+[g,e]+")";this.node.setAttribute("transform",this.transformations.join(" "));n=(g<0)?-this.attr("x")-this.attrs.width*d*g/this._.sx:this.attr("x");k=(e<0)?-this.attr("y")-this.attrs.height*c*e/this._.sy:this.attr("y");W=this.attr("cx")*g;R=this.attr("cy")*e;}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11="+g+", M12=0, M21=0, M22="+e+", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')";m.filter=(this.node.filterMatrix||"")+(this.node.filterOpacity||"");}}else{if(this.transformations){this.transformations[2]="";this.node.setAttribute("transform",this.transformations.join(" "));}else{this.node.filterMatrix="";m.filter=(this.node.filterMatrix||"")+(this.node.filterOpacity||"");}}switch(this.type){case"rect":case"image":this.attr({width:this.attrs.width*d*g/this._.sx,height:this.attrs.height*c*e/this._.sy,x:n,y:k});break;case"circle":case"ellipse":this.attr({rx:this.attrs.rx*d*g/this._.sx,ry:this.attrs.ry*c*e/this._.sy,r:this.attrs.r*d*e/this._.sx,cx:W,cy:R});break;case"path":var l=Raphael.pathToRelative(Raphael.parsePathString(this.attr("path"))),f=true,Z=Raphael.pathDimensions(this.attrs.path),n=-Z.width*(d-1)/2,k=-Z.height*(c-1)/2;for(var Y=0,h=l.length;Y<h;Y++){if(l[Y][0].toUpperCase()=="M"&&f){continue;}else{f=false;}if(l[Y][0].toUpperCase()=="A"){l[Y][l[Y].length-2]*=d*g;l[Y][l[Y].length-1]*=c*e;}else{for(var X=1,a=l[Y].length;X<a;X++){l[Y][X]*=(X%2)?d*g/this._.sx:c*e/this._.sy;}}}var b=Raphael.pathDimensions(l),n=Z.x+Z.width/2-b.x-b.width/2,k=Z.y+Z.height/2-b.y-b.height/2;l=Raphael.pathToRelative(l);l[0][1]+=n;l[0][2]+=k;this.attr({path:l.join(" ")});}}this._.sx=d;this._.sy=c;return this;};M.prototype.animate=function(o,f,Y){clearTimeout(this.animation_in_progress);var k={},W={},d={},c={x:0,y:0};for(var g in o){if(g in E){k[g]=this.attr(g);if(typeof k[g]=="undefined"){k[g]=A[g];}W[g]=o[g];switch(E[g]){case"number":d[g]=(W[g]-k[g])/f;break;case"colour":k[g]=Raphael.getRGB(k[g]);var h=Raphael.getRGB(W[g]);d[g]={r:(h.r-k[g].r)/f,g:(h.g-k[g].g)/f,b:(h.b-k[g].b)/f};break;case"path":var Z=Raphael.pathEqualiser(k[g],W[g]);k[g]=Z[0];W[g]=Z[1];d[g]=[];for(var m=0,b=k[g].length;m<b;m++){d[g][m]=[0];for(var l=1,n=k[g][m].length;l<n;l++){d[g][m][l]=(W[g][m][l]-k[g][m][l])/f;}}break;case"csv":var R=o[g].split(/[, ]+/);if(g=="translation"){k[g]=[0,0];d[g]=[R[0]/f,R[1]/f];}else{k[g]=k[g].split(/[, ]+/);d[g]=[(R[0]-k[g][0])/f,(R[1]-k[g][0])/f];}W[g]=R;}}}var X=new Date(),e=0,a=this;(function(){var q=(new Date()).getTime()-X.getTime(),z={},p;if(q<f){for(var u in k){switch(E[u]){case"number":p=+k[u]+q*d[u];break;case"colour":p="rgb("+[Math.round(k[u].r+q*d[u].r),Math.round(k[u].g+q*d[u].g),Math.round(k[u].b+q*d[u].b)].join(",")+")";break;case"path":p=[];for(var s=0,AA=k[u].length;s<AA;s++){p[s]=[k[u][s][0]];for(var r=1,t=k[u][s].length;r<t;r++){p[s][r]=k[u][s][r]+q*d[u][s][r];}p[s]=p[s].join(" ");}p=p.join(" ");break;case"csv":if(u=="translation"){var w=d[u][0]*(q-e),v=d[u][1]*(q-e);c.x+=w;c.y+=v;p=[w,v].join(" ");}else{p=[+k[u][0]+q*d[u][0],+k[u][1]+q*d[u][1]].join(" ");}break;}if(u=="font-size"){z[u]=p+"px";}else{z[u]=p;}}a.attr(z);a.animation_in_progress=setTimeout(arguments.callee,0);L.safari();}else{if(c.x||c.y){a.translate(-c.x,-c.y);}a.attr(o);clearTimeout(a.animation_in_progress);L.safari();(typeof Y=="function")&&Y.call(a);}e=q;})();return this;};})(Raphael);