/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is an optimized version of Dojo, built for deployment and not for
	development. To get sources and documentation, please visit:

		http://dojotoolkit.org
*/

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.gfx.shape"],["provide","dojox.gfx.path"],["provide","dojox.gfx.arc"],["provide","dojox.gfx.gradient"],["provide","dojox.gfx.vml"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.gfx.shape"]){_4._hasResource["dojox.gfx.shape"]=true;_4.provide("dojox.gfx.shape");_4.declare("dojox.gfx.shape.Shape",null,{constructor:function(){this.rawNode=null;this.shape=null;this.matrix=null;this.fillStyle=null;this.strokeStyle=null;this.bbox=null;this.parent=null;this.parentMatrix=null;},getNode:function(){return this.rawNode;},getShape:function(){return this.shape;},getTransform:function(){return this.matrix;},getFill:function(){return this.fillStyle;},getStroke:function(){return this.strokeStyle;},getParent:function(){return this.parent;},getBoundingBox:function(){return this.bbox;},getTransformedBoundingBox:function(){var b=this.getBoundingBox();if(!b){return null;}var m=this._getRealMatrix();gm=_6.gfx.matrix;return [gm.multiplyPoint(m,b.x,b.y),gm.multiplyPoint(m,b.x+b.width,b.y),gm.multiplyPoint(m,b.x+b.width,b.y+b.height),gm.multiplyPoint(m,b.x,b.y+b.height)];},getEventSource:function(){return this.rawNode;},setShape:function(_7){this.shape=_6.gfx.makeParameters(this.shape,_7);this.bbox=null;return this;},setFill:function(_8){if(!_8){this.fillStyle=null;return this;}var f=null;if(typeof (_8)=="object"&&"type" in _8){switch(_8.type){case "linear":f=_6.gfx.makeParameters(_6.gfx.defaultLinearGradient,_8);break;case "radial":f=_6.gfx.makeParameters(_6.gfx.defaultRadialGradient,_8);break;case "pattern":f=_6.gfx.makeParameters(_6.gfx.defaultPattern,_8);break;}}else{f=_6.gfx.normalizeColor(_8);}this.fillStyle=f;return this;},setStroke:function(_9){if(!_9){this.strokeStyle=null;return this;}if(typeof _9=="string"||_4.isArray(_9)||_9 instanceof _4.Color){_9={color:_9};}var s=this.strokeStyle=_6.gfx.makeParameters(_6.gfx.defaultStroke,_9);s.color=_6.gfx.normalizeColor(s.color);return this;},setTransform:function(_a){this.matrix=_6.gfx.matrix.clone(_a?_6.gfx.matrix.normalize(_a):_6.gfx.matrix.identity);return this._applyTransform();},_applyTransform:function(){return this;},moveToFront:function(){var p=this.getParent();if(p){p._moveChildToFront(this);this._moveToFront();}return this;},moveToBack:function(){var p=this.getParent();if(p){p._moveChildToBack(this);this._moveToBack();}return this;},_moveToFront:function(){},_moveToBack:function(){},applyRightTransform:function(_b){return _b?this.setTransform([this.matrix,_b]):this;},applyLeftTransform:function(_c){return _c?this.setTransform([_c,this.matrix]):this;},applyTransform:function(_d){return _d?this.setTransform([this.matrix,_d]):this;},removeShape:function(_e){if(this.parent){this.parent.remove(this,_e);}return this;},_setParent:function(_f,_10){this.parent=_f;return this._updateParentMatrix(_10);},_updateParentMatrix:function(_11){this.parentMatrix=_11?_6.gfx.matrix.clone(_11):null;return this._applyTransform();},_getRealMatrix:function(){var m=this.matrix;var p=this.parent;while(p){if(p.matrix){m=_6.gfx.matrix.multiply(p.matrix,m);}p=p.parent;}return m;}});_6.gfx.shape._eventsProcessing={connect:function(_12,_13,_14){return arguments.length>2?_4.connect(this.getEventSource(),_12,_13,_14):_4.connect(this.getEventSource(),_12,_13);},disconnect:function(_15){_4.disconnect(_15);}};_4.extend(_6.gfx.shape.Shape,_6.gfx.shape._eventsProcessing);_6.gfx.shape.Container={_init:function(){this.children=[];},openBatch:function(){},closeBatch:function(){},add:function(_16){var _17=_16.getParent();if(_17){_17.remove(_16,true);}this.children.push(_16);return _16._setParent(this,this._getRealMatrix());},remove:function(_18,_19){for(var i=0;i<this.children.length;++i){if(this.children[i]==_18){if(_19){}else{_18.parent=null;_18.parentMatrix=null;}this.children.splice(i,1);break;}}return this;},clear:function(){this.children=[];return this;},_moveChildToFront:function(_1a){for(var i=0;i<this.children.length;++i){if(this.children[i]==_1a){this.children.splice(i,1);this.children.push(_1a);break;}}return this;},_moveChildToBack:function(_1b){for(var i=0;i<this.children.length;++i){if(this.children[i]==_1b){this.children.splice(i,1);this.children.unshift(_1b);break;}}return this;}};_4.declare("dojox.gfx.shape.Surface",null,{constructor:function(){this.rawNode=null;this._parent=null;this._nodes=[];this._events=[];},destroy:function(){_4.forEach(this._nodes,_4.destroy);this._nodes=[];_4.forEach(this._events,_4.disconnect);this._events=[];this.rawNode=null;if(_4.isIE){while(this._parent.lastChild){_4.destroy(this._parent.lastChild);}}else{this._parent.innerHTML="";}this._parent=null;},getEventSource:function(){return this.rawNode;},_getRealMatrix:function(){return null;},isLoaded:true,onLoad:function(_1c){},whenLoaded:function(_1d,_1e){var f=_4.hitch(_1d,_1e);if(this.isLoaded){f(this);}else{var h=_4.connect(this,"onLoad",function(_1f){_4.disconnect(h);f(_1f);});}}});_4.extend(_6.gfx.shape.Surface,_6.gfx.shape._eventsProcessing);_4.declare("dojox.gfx.Point",null,{});_4.declare("dojox.gfx.Rectangle",null,{});_4.declare("dojox.gfx.shape.Rect",_6.gfx.shape.Shape,{constructor:function(_20){this.shape=_6.gfx.getDefault("Rect");this.rawNode=_20;},getBoundingBox:function(){return this.shape;}});_4.declare("dojox.gfx.shape.Ellipse",_6.gfx.shape.Shape,{constructor:function(_21){this.shape=_6.gfx.getDefault("Ellipse");this.rawNode=_21;},getBoundingBox:function(){if(!this.bbox){var _22=this.shape;this.bbox={x:_22.cx-_22.rx,y:_22.cy-_22.ry,width:2*_22.rx,height:2*_22.ry};}return this.bbox;}});_4.declare("dojox.gfx.shape.Circle",_6.gfx.shape.Shape,{constructor:function(_23){this.shape=_6.gfx.getDefault("Circle");this.rawNode=_23;},getBoundingBox:function(){if(!this.bbox){var _24=this.shape;this.bbox={x:_24.cx-_24.r,y:_24.cy-_24.r,width:2*_24.r,height:2*_24.r};}return this.bbox;}});_4.declare("dojox.gfx.shape.Line",_6.gfx.shape.Shape,{constructor:function(_25){this.shape=_6.gfx.getDefault("Line");this.rawNode=_25;},getBoundingBox:function(){if(!this.bbox){var _26=this.shape;this.bbox={x:Math.min(_26.x1,_26.x2),y:Math.min(_26.y1,_26.y2),width:Math.abs(_26.x2-_26.x1),height:Math.abs(_26.y2-_26.y1)};}return this.bbox;}});_4.declare("dojox.gfx.shape.Polyline",_6.gfx.shape.Shape,{constructor:function(_27){this.shape=_6.gfx.getDefault("Polyline");this.rawNode=_27;},setShape:function(_28,_29){if(_28&&_28 instanceof Array){this.inherited(arguments,[{points:_28}]);if(_29&&this.shape.points.length){this.shape.points.push(this.shape.points[0]);}}else{this.inherited(arguments,[_28]);}return this;},_normalizePoints:function(){var p=this.shape.points,l=p&&p.length;if(l&&typeof p[0]=="number"){var _2a=[];for(var i=0;i<l;i+=2){_2a.push({x:p[i],y:p[i+1]});}this.shape.points=_2a;}},getBoundingBox:function(){if(!this.bbox&&this.shape.points.length){var p=this.shape.points;var l=p.length;var t=p[0];var _2b={l:t.x,t:t.y,r:t.x,b:t.y};for(var i=1;i<l;++i){t=p[i];if(_2b.l>t.x){_2b.l=t.x;}if(_2b.r<t.x){_2b.r=t.x;}if(_2b.t>t.y){_2b.t=t.y;}if(_2b.b<t.y){_2b.b=t.y;}}this.bbox={x:_2b.l,y:_2b.t,width:_2b.r-_2b.l,height:_2b.b-_2b.t};}return this.bbox;}});_4.declare("dojox.gfx.shape.Image",_6.gfx.shape.Shape,{constructor:function(_2c){this.shape=_6.gfx.getDefault("Image");this.rawNode=_2c;},getBoundingBox:function(){return this.shape;},setStroke:function(){return this;},setFill:function(){return this;}});_4.declare("dojox.gfx.shape.Text",_6.gfx.shape.Shape,{constructor:function(_2d){this.fontStyle=null;this.shape=_6.gfx.getDefault("Text");this.rawNode=_2d;},getFont:function(){return this.fontStyle;},setFont:function(_2e){this.fontStyle=typeof _2e=="string"?_6.gfx.splitFontString(_2e):_6.gfx.makeParameters(_6.gfx.defaultFont,_2e);this._setFont();return this;}});_6.gfx.shape.Creator={createShape:function(_2f){var gfx=_6.gfx;switch(_2f.type){case gfx.defaultPath.type:return this.createPath(_2f);case gfx.defaultRect.type:return this.createRect(_2f);case gfx.defaultCircle.type:return this.createCircle(_2f);case gfx.defaultEllipse.type:return this.createEllipse(_2f);case gfx.defaultLine.type:return this.createLine(_2f);case gfx.defaultPolyline.type:return this.createPolyline(_2f);case gfx.defaultImage.type:return this.createImage(_2f);case gfx.defaultText.type:return this.createText(_2f);case gfx.defaultTextPath.type:return this.createTextPath(_2f);}return null;},createGroup:function(){return this.createObject(_6.gfx.Group);},createRect:function(_30){return this.createObject(_6.gfx.Rect,_30);},createEllipse:function(_31){return this.createObject(_6.gfx.Ellipse,_31);},createCircle:function(_32){return this.createObject(_6.gfx.Circle,_32);},createLine:function(_33){return this.createObject(_6.gfx.Line,_33);},createPolyline:function(_34){return this.createObject(_6.gfx.Polyline,_34);},createImage:function(_35){return this.createObject(_6.gfx.Image,_35);},createText:function(_36){return this.createObject(_6.gfx.Text,_36);},createPath:function(_37){return this.createObject(_6.gfx.Path,_37);},createTextPath:function(_38){return this.createObject(_6.gfx.TextPath,{}).setText(_38);},createObject:function(_39,_3a){return null;}};}if(!_4._hasResource["dojox.gfx.path"]){_4._hasResource["dojox.gfx.path"]=true;_4.provide("dojox.gfx.path");_4.declare("dojox.gfx.path.Path",_6.gfx.shape.Shape,{constructor:function(_3b){this.shape=_4.clone(_6.gfx.defaultPath);this.segments=[];this.tbbox=null;this.absolute=true;this.last={};this.rawNode=_3b;this.segmented=false;},setAbsoluteMode:function(_3c){this._confirmSegmented();this.absolute=typeof _3c=="string"?(_3c=="absolute"):_3c;return this;},getAbsoluteMode:function(){this._confirmSegmented();return this.absolute;},getBoundingBox:function(){this._confirmSegmented();return (this.bbox&&("l" in this.bbox))?{x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null;},_getRealBBox:function(){this._confirmSegmented();if(this.tbbox){return this.tbbox;}var _3d=this.bbox,_3e=this._getRealMatrix();this.bbox=null;for(var i=0,len=this.segments.length;i<len;++i){this._updateWithSegment(this.segments[i],_3e);}var t=this.bbox;this.bbox=_3d;this.tbbox=t?[{x:t.l,y:t.t},{x:t.r,y:t.t},{x:t.r,y:t.b},{x:t.l,y:t.b}]:null;return this.tbbox;},getLastPosition:function(){this._confirmSegmented();return "x" in this.last?this.last:null;},_applyTransform:function(){this.tbbox=null;return this.inherited(arguments);},_updateBBox:function(x,y,_3f){if(_3f){var t=_6.gfx.matrix.multiplyPoint(_3f,x,y);x=t.x;y=t.y;}if(this.bbox&&("l" in this.bbox)){if(this.bbox.l>x){this.bbox.l=x;}if(this.bbox.r<x){this.bbox.r=x;}if(this.bbox.t>y){this.bbox.t=y;}if(this.bbox.b<y){this.bbox.b=y;}}else{this.bbox={l:x,b:y,r:x,t:y};}},_updateWithSegment:function(_40,_41){var n=_40.args,l=n.length;switch(_40.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(var i=0;i<l;i+=2){this._updateBBox(n[i],n[i+1],_41);}this.last.x=n[l-2];this.last.y=n[l-1];this.absolute=true;break;case "H":for(var i=0;i<l;++i){this._updateBBox(n[i],this.last.y,_41);}this.last.x=n[l-1];this.absolute=true;break;case "V":for(var i=0;i<l;++i){this._updateBBox(this.last.x,n[i],_41);}this.last.y=n[l-1];this.absolute=true;break;case "m":var _42=0;if(!("x" in this.last)){this._updateBBox(this.last.x=n[0],this.last.y=n[1],_41);_42=2;}for(var i=_42;i<l;i+=2){this._updateBBox(this.last.x+=n[i],this.last.y+=n[i+1],_41);}this.absolute=false;break;case "l":case "t":for(var i=0;i<l;i+=2){this._updateBBox(this.last.x+=n[i],this.last.y+=n[i+1],_41);}this.absolute=false;break;case "h":for(var i=0;i<l;++i){this._updateBBox(this.last.x+=n[i],this.last.y,_41);}this.absolute=false;break;case "v":for(var i=0;i<l;++i){this._updateBBox(this.last.x,this.last.y+=n[i],_41);}this.absolute=false;break;case "c":for(var i=0;i<l;i+=6){this._updateBBox(this.last.x+n[i],this.last.y+n[i+1],_41);this._updateBBox(this.last.x+n[i+2],this.last.y+n[i+3],_41);this._updateBBox(this.last.x+=n[i+4],this.last.y+=n[i+5],_41);}this.absolute=false;break;case "s":case "q":for(var i=0;i<l;i+=4){this._updateBBox(this.last.x+n[i],this.last.y+n[i+1],_41);this._updateBBox(this.last.x+=n[i+2],this.last.y+=n[i+3],_41);}this.absolute=false;break;case "A":for(var i=0;i<l;i+=7){this._updateBBox(n[i+5],n[i+6],_41);}this.last.x=n[l-2];this.last.y=n[l-1];this.absolute=true;break;case "a":for(var i=0;i<l;i+=7){this._updateBBox(this.last.x+=n[i+5],this.last.y+=n[i+6],_41);}this.absolute=false;break;}var _43=[_40.action];for(var i=0;i<l;++i){_43.push(_6.gfx.formatNumber(n[i],true));}if(typeof this.shape.path=="string"){this.shape.path+=_43.join("");}else{Array.prototype.push.apply(this.shape.path,_43);}},_validSegments:{m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},_pushSegment:function(_44,_45){this.tbbox=null;var _46=this._validSegments[_44.toLowerCase()];if(typeof _46=="number"){if(_46){if(_45.length>=_46){var _47={action:_44,args:_45.slice(0,_45.length-_45.length%_46)};this.segments.push(_47);this._updateWithSegment(_47);}}else{var _47={action:_44,args:[]};this.segments.push(_47);this._updateWithSegment(_47);}}},_collectArgs:function(_48,_49){for(var i=0;i<_49.length;++i){var t=_49[i];if(typeof t=="boolean"){_48.push(t?1:0);}else{if(typeof t=="number"){_48.push(t);}else{if(t instanceof Array){this._collectArgs(_48,t);}else{if("x" in t&&"y" in t){_48.push(t.x,t.y);}}}}}},moveTo:function(){this._confirmSegmented();var _4a=[];this._collectArgs(_4a,arguments);this._pushSegment(this.absolute?"M":"m",_4a);return this;},lineTo:function(){this._confirmSegmented();var _4b=[];this._collectArgs(_4b,arguments);this._pushSegment(this.absolute?"L":"l",_4b);return this;},hLineTo:function(){this._confirmSegmented();var _4c=[];this._collectArgs(_4c,arguments);this._pushSegment(this.absolute?"H":"h",_4c);return this;},vLineTo:function(){this._confirmSegmented();var _4d=[];this._collectArgs(_4d,arguments);this._pushSegment(this.absolute?"V":"v",_4d);return this;},curveTo:function(){this._confirmSegmented();var _4e=[];this._collectArgs(_4e,arguments);this._pushSegment(this.absolute?"C":"c",_4e);return this;},smoothCurveTo:function(){this._confirmSegmented();var _4f=[];this._collectArgs(_4f,arguments);this._pushSegment(this.absolute?"S":"s",_4f);return this;},qCurveTo:function(){this._confirmSegmented();var _50=[];this._collectArgs(_50,arguments);this._pushSegment(this.absolute?"Q":"q",_50);return this;},qSmoothCurveTo:function(){this._confirmSegmented();var _51=[];this._collectArgs(_51,arguments);this._pushSegment(this.absolute?"T":"t",_51);return this;},arcTo:function(){this._confirmSegmented();var _52=[];this._collectArgs(_52,arguments);this._pushSegment(this.absolute?"A":"a",_52);return this;},closePath:function(){this._confirmSegmented();this._pushSegment("Z",[]);return this;},_confirmSegmented:function(){if(!this.segmented){var _53=this.shape.path;this.shape.path=[];this._setPath(_53);this.shape.path=this.shape.path.join("");this.segmented=true;}},_setPath:function(_54){var p=_4.isArray(_54)?_54:_54.match(_6.gfx.pathSvgRegExp);this.segments=[];this.absolute=true;this.bbox={};this.last={};if(!p){return;}var _55="",_56=[],l=p.length;for(var i=0;i<l;++i){var t=p[i],x=parseFloat(t);if(isNaN(x)){if(_55){this._pushSegment(_55,_56);}_56=[];_55=t;}else{_56.push(x);}}this._pushSegment(_55,_56);},setShape:function(_57){this.inherited(arguments,[typeof _57=="string"?{path:_57}:_57]);this.segmented=false;this.segments=[];if(!_6.gfx.lazyPathSegmentation){this._confirmSegmented();}return this;},_2PI:Math.PI*2});_4.declare("dojox.gfx.path.TextPath",_6.gfx.path.Path,{constructor:function(_58){if(!("text" in this)){this.text=_4.clone(_6.gfx.defaultTextPath);}if(!("fontStyle" in this)){this.fontStyle=_4.clone(_6.gfx.defaultFont);}},getText:function(){return this.text;},setText:function(_59){this.text=_6.gfx.makeParameters(this.text,typeof _59=="string"?{text:_59}:_59);this._setText();return this;},getFont:function(){return this.fontStyle;},setFont:function(_5a){this.fontStyle=typeof _5a=="string"?_6.gfx.splitFontString(_5a):_6.gfx.makeParameters(_6.gfx.defaultFont,_5a);this._setFont();return this;}});}if(!_4._hasResource["dojox.gfx.arc"]){_4._hasResource["dojox.gfx.arc"]=true;_4.provide("dojox.gfx.arc");(function(){var m=_6.gfx.matrix,_5b=2*Math.PI,pi4=Math.PI/4,pi8=Math.PI/8,_5c=pi4+pi8,_5d=_5e(pi8);function _5e(_5f){var _60=Math.cos(_5f),_61=Math.sin(_5f),p2={x:_60+(4/3)*(1-_60),y:_61-(4/3)*_60*(1-_60)/_61};return {s:{x:_60,y:-_61},c1:{x:p2.x,y:-p2.y},c2:p2,e:{x:_60,y:_61}};};_6.gfx.arc={unitArcAsBezier:_5e,curvePI4:_5d,arcAsBezier:function(_62,rx,ry,_63,_64,_65,x,y){_64=Boolean(_64);_65=Boolean(_65);var _66=m._degToRad(_63),rx2=rx*rx,ry2=ry*ry,pa=m.multiplyPoint(m.rotate(-_66),{x:(_62.x-x)/2,y:(_62.y-y)/2}),_67=pa.x*pa.x,_68=pa.y*pa.y,c1=Math.sqrt((rx2*ry2-rx2*_68-ry2*_67)/(rx2*_68+ry2*_67));if(isNaN(c1)){c1=0;}var ca={x:c1*rx*pa.y/ry,y:-c1*ry*pa.x/rx};if(_64==_65){ca={x:-ca.x,y:-ca.y};}var c=m.multiplyPoint([m.translate((_62.x+x)/2,(_62.y+y)/2),m.rotate(_66)],ca);var _69=m.normalize([m.translate(c.x,c.y),m.rotate(_66),m.scale(rx,ry)]);var _6a=m.invert(_69),sp=m.multiplyPoint(_6a,_62),ep=m.multiplyPoint(_6a,x,y),_6b=Math.atan2(sp.y,sp.x),_6c=Math.atan2(ep.y,ep.x),_6d=_6b-_6c;if(_65){_6d=-_6d;}if(_6d<0){_6d+=_5b;}else{if(_6d>_5b){_6d-=_5b;}}var _6e=pi8,_6f=_5d,_70=_65?_6e:-_6e,_71=[];for(var _72=_6d;_72>0;_72-=pi4){if(_72<_5c){_6e=_72/2;_6f=_5e(_6e);_70=_65?_6e:-_6e;_72=0;}var c1,c2,e,M=m.normalize([_69,m.rotate(_6b+_70)]);if(_65){c1=m.multiplyPoint(M,_6f.c1);c2=m.multiplyPoint(M,_6f.c2);e=m.multiplyPoint(M,_6f.e);}else{c1=m.multiplyPoint(M,_6f.c2);c2=m.multiplyPoint(M,_6f.c1);e=m.multiplyPoint(M,_6f.s);}_71.push([c1.x,c1.y,c2.x,c2.y,e.x,e.y]);_6b+=2*_70;}return _71;}};})();}if(!_4._hasResource["dojox.gfx.gradient"]){_4._hasResource["dojox.gfx.gradient"]=true;_4.provide("dojox.gfx.gradient");(function(){var d=_4,m=_6.gfx.matrix,C=d.Color;_6.gfx.gradient.rescale=function(_73,_74,to){var len=_73.length,_75=(to<_74),_76;if(_75){var tmp=_74;_74=to;to=tmp;}if(!len){return [];}if(to<=_73[0].offset){_76=[{offset:0,color:_73[0].color},{offset:1,color:_73[0].color}];}else{if(_74>=_73[len-1].offset){_76=[{offset:0,color:_73[len-1].color},{offset:1,color:_73[len-1].color}];}else{var _77=to-_74,_78,_79,i;_76=[];if(_74<0){_76.push({offset:0,color:new C(_73[0].color)});}for(i=0;i<len;++i){_78=_73[i];if(_78.offset>=_74){break;}}if(i){_79=_73[i-1];_76.push({offset:0,color:d.blendColors(new C(_79.color),new C(_78.color),(_74-_79.offset)/(_78.offset-_79.offset))});}else{_76.push({offset:0,color:new C(_78.color)});}for(;i<len;++i){_78=_73[i];if(_78.offset>=to){break;}_76.push({offset:(_78.offset-_74)/_77,color:new C(_78.color)});}if(i<len){_79=_73[i-1];_76.push({offset:1,color:d.blendColors(new C(_79.color),new C(_78.color),(to-_79.offset)/(_78.offset-_79.offset))});}else{_76.push({offset:1,color:new C(_73[len-1].color)});}}}if(_75){_76.reverse();for(i=0,len=_76.length;i<len;++i){_78=_76[i];_78.offset=1-_78.offset;}}return _76;};function _7a(x,y,_7b,_7c,_7d,_7e){var r=m.multiplyPoint(_7b,x,y),p=m.multiplyPoint(_7c,r);return {r:r,p:p,o:m.multiplyPoint(_7d,p).x/_7e};};function _7f(a,b){return a.o-b.o;};_6.gfx.gradient.project=function(_80,_81,tl,rb,ttl,trb){_80=_80||m.identity;var f1=m.multiplyPoint(_80,_81.x1,_81.y1),f2=m.multiplyPoint(_80,_81.x2,_81.y2),_82=Math.atan2(f2.y-f1.y,f2.x-f1.x),_83=m.project(f2.x-f1.x,f2.y-f1.y),pf1=m.multiplyPoint(_83,f1),pf2=m.multiplyPoint(_83,f2),_84=new m.Matrix2D([m.rotate(-_82),{dx:-pf1.x,dy:-pf1.y}]),_85=m.multiplyPoint(_84,pf2).x,_86=[_7a(tl.x,tl.y,_80,_83,_84,_85),_7a(rb.x,rb.y,_80,_83,_84,_85),_7a(tl.x,rb.y,_80,_83,_84,_85),_7a(rb.x,tl.y,_80,_83,_84,_85)].sort(_7f),_87=_86[0].o,to=_86[3].o,_88=_6.gfx.gradient.rescale(_81.colors,_87,to),_89=Math.atan2(_86[3].r.y-_86[0].r.y,_86[3].r.x-_86[0].r.x);return {type:"linear",x1:_86[0].p.x,y1:_86[0].p.y,x2:_86[3].p.x,y2:_86[3].p.y,colors:_88,angle:_82};};})();}if(!_4._hasResource["dojox.gfx.vml"]){_4._hasResource["dojox.gfx.vml"]=true;_4.provide("dojox.gfx.vml");(function(){var d=_4,g=_6.gfx,m=g.matrix,gs=g.shape,vml=g.vml;vml.xmlns="urn:schemas-microsoft-com:vml";vml.text_alignment={start:"left",middle:"center",end:"right"};vml._parseFloat=function(str){return str.match(/^\d+f$/i)?parseInt(str)/65536:parseFloat(str);};vml._bool={"t":1,"true":1};d.declare("dojox.gfx.vml.Shape",gs.Shape,{setFill:function(_8a){if(!_8a){this.fillStyle=null;this.rawNode.filled="f";return this;}var i,f,fo,a,s;if(typeof _8a=="object"&&"type" in _8a){switch(_8a.type){case "linear":var _8b=this._getRealMatrix(),_8c=this.getBoundingBox(),_8d=this._getRealBBox?this._getRealBBox():this.getTransformedBoundingBox();s=[];if(this.fillStyle!==_8a){this.fillStyle=g.makeParameters(g.defaultLinearGradient,_8a);}f=g.gradient.project(_8b,this.fillStyle,{x:_8c.x,y:_8c.y},{x:_8c.x+_8c.width,y:_8c.y+_8c.height},_8d[0],_8d[2]);a=f.colors;if(a[0].offset.toFixed(5)!="0.00000"){s.push("0 "+g.normalizeColor(a[0].color).toHex());}for(i=0;i<a.length;++i){s.push(a[i].offset.toFixed(5)+" "+g.normalizeColor(a[i].color).toHex());}i=a.length-1;if(a[i].offset.toFixed(5)!="1.00000"){s.push("1 "+g.normalizeColor(a[i].color).toHex());}fo=this.rawNode.fill;fo.colors.value=s.join(";");fo.method="sigma";fo.type="gradient";fo.angle=(270-m._radToDeg(f.angle))%360;fo.on=true;break;case "radial":f=g.makeParameters(g.defaultRadialGradient,_8a);this.fillStyle=f;var l=parseFloat(this.rawNode.style.left),t=parseFloat(this.rawNode.style.top),w=parseFloat(this.rawNode.style.width),h=parseFloat(this.rawNode.style.height),c=isNaN(w)?1:2*f.r/w;a=[];if(f.colors[0].offset>0){a.push({offset:1,color:g.normalizeColor(f.colors[0].color)});}d.forEach(f.colors,function(v,i){a.push({offset:1-v.offset*c,color:g.normalizeColor(v.color)});});i=a.length-1;while(i>=0&&a[i].offset<0){--i;}if(i<a.length-1){var q=a[i],p=a[i+1];p.color=d.blendColors(q.color,p.color,q.offset/(q.offset-p.offset));p.offset=0;while(a.length-i>2){a.pop();}}i=a.length-1,s=[];if(a[i].offset>0){s.push("0 "+a[i].color.toHex());}for(;i>=0;--i){s.push(a[i].offset.toFixed(5)+" "+a[i].color.toHex());}fo=this.rawNode.fill;fo.colors.value=s.join(";");fo.method="sigma";fo.type="gradientradial";if(isNaN(w)||isNaN(h)||isNaN(l)||isNaN(t)){fo.focusposition="0.5 0.5";}else{fo.focusposition=((f.cx-l)/w).toFixed(5)+" "+((f.cy-t)/h).toFixed(5);}fo.focussize="0 0";fo.on=true;break;case "pattern":f=g.makeParameters(g.defaultPattern,_8a);this.fillStyle=f;fo=this.rawNode.fill;fo.type="tile";fo.src=f.src;if(f.width&&f.height){fo.size.x=g.px2pt(f.width);fo.size.y=g.px2pt(f.height);}fo.alignShape="f";fo.position.x=0;fo.position.y=0;fo.origin.x=f.width?f.x/f.width:0;fo.origin.y=f.height?f.y/f.height:0;fo.on=true;break;}this.rawNode.fill.opacity=1;return this;}this.fillStyle=g.normalizeColor(_8a);fo=this.rawNode.fill;if(!fo){fo=this.rawNode.ownerDocument.createElement("v:fill");}fo.method="any";fo.type="solid";fo.opacity=this.fillStyle.a;var _8e=this.rawNode.filters["DXImageTransform.Microsoft.Alpha"];if(_8e){_8e.opacity=Math.round(this.fillStyle.a*100);}this.rawNode.fillcolor=this.fillStyle.toHex();this.rawNode.filled=true;return this;},setStroke:function(_8f){if(!_8f){this.strokeStyle=null;this.rawNode.stroked="f";return this;}if(typeof _8f=="string"||d.isArray(_8f)||_8f instanceof d.Color){_8f={color:_8f};}var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_8f);s.color=g.normalizeColor(s.color);var rn=this.rawNode;rn.stroked=true;rn.strokecolor=s.color.toCss();rn.strokeweight=s.width+"px";if(rn.stroke){rn.stroke.opacity=s.color.a;rn.stroke.endcap=this._translate(this._capMap,s.cap);if(typeof s.join=="number"){rn.stroke.joinstyle="miter";rn.stroke.miterlimit=s.join;}else{rn.stroke.joinstyle=s.join;}rn.stroke.dashstyle=s.style=="none"?"Solid":s.style;}return this;},_capMap:{butt:"flat"},_capMapReversed:{flat:"butt"},_translate:function(_90,_91){return (_91 in _90)?_90[_91]:_91;},_applyTransform:function(){var _92=this._getRealMatrix();if(_92){var _93=this.rawNode.skew;if(typeof _93=="undefined"){for(var i=0;i<this.rawNode.childNodes.length;++i){if(this.rawNode.childNodes[i].tagName=="skew"){_93=this.rawNode.childNodes[i];break;}}}if(_93){_93.on="f";var mt=_92.xx.toFixed(8)+" "+_92.xy.toFixed(8)+" "+_92.yx.toFixed(8)+" "+_92.yy.toFixed(8)+" 0 0",_94=Math.floor(_92.dx).toFixed()+"px "+Math.floor(_92.dy).toFixed()+"px",s=this.rawNode.style,l=parseFloat(s.left),t=parseFloat(s.top),w=parseFloat(s.width),h=parseFloat(s.height);if(isNaN(l)){l=0;}if(isNaN(t)){t=0;}if(isNaN(w)||!w){w=1;}if(isNaN(h)||!h){h=1;}var _95=(-l/w-0.5).toFixed(8)+" "+(-t/h-0.5).toFixed(8);_93.matrix=mt;_93.origin=_95;_93.offset=_94;_93.on=true;}}if(this.fillStyle&&this.fillStyle.type=="linear"){this.setFill(this.fillStyle);}return this;},_setDimensions:function(_96,_97){return this;},setRawNode:function(_98){_98.stroked="f";_98.filled="f";this.rawNode=_98;},_moveToFront:function(){this.rawNode.parentNode.appendChild(this.rawNode);return this;},_moveToBack:function(){var r=this.rawNode,p=r.parentNode,n=p.firstChild;p.insertBefore(r,n);if(n.tagName=="rect"){n.swapNode(r);}return this;},_getRealMatrix:function(){return this.parentMatrix?new g.Matrix2D([this.parentMatrix,this.matrix]):this.matrix;}});_4.declare("dojox.gfx.vml.Group",vml.Shape,{constructor:function(){gs.Container._init.call(this);},_applyTransform:function(){var _99=this._getRealMatrix();for(var i=0;i<this.children.length;++i){this.children[i]._updateParentMatrix(_99);}return this;},_setDimensions:function(_9a,_9b){var r=this.rawNode,rs=r.style,bs=this.bgNode.style;rs.width=_9a;rs.height=_9b;r.coordsize=_9a+" "+_9b;bs.width=_9a;bs.height=_9b;for(var i=0;i<this.children.length;++i){this.children[i]._setDimensions(_9a,_9b);}return this;}});vml.Group.nodeType="group";_4.declare("dojox.gfx.vml.Rect",[vml.Shape,gs.Rect],{setShape:function(_9c){var _9d=this.shape=g.makeParameters(this.shape,_9c);this.bbox=null;var r=Math.min(1,(_9d.r/Math.min(parseFloat(_9d.width),parseFloat(_9d.height)))).toFixed(8);var _9e=this.rawNode.parentNode,_9f=null;if(_9e){if(_9e.lastChild!==this.rawNode){for(var i=0;i<_9e.childNodes.length;++i){if(_9e.childNodes[i]===this.rawNode){_9f=_9e.childNodes[i+1];break;}}}_9e.removeChild(this.rawNode);}if(d.isIE>7){var _a0=this.rawNode.ownerDocument.createElement("v:roundrect");_a0.arcsize=r;_a0.style.display="inline-block";this.rawNode=_a0;}else{this.rawNode.arcsize=r;}if(_9e){if(_9f){_9e.insertBefore(this.rawNode,_9f);}else{_9e.appendChild(this.rawNode);}}var _a1=this.rawNode.style;_a1.left=_9d.x.toFixed();_a1.top=_9d.y.toFixed();_a1.width=(typeof _9d.width=="string"&&_9d.width.indexOf("%")>=0)?_9d.width:_9d.width.toFixed();_a1.height=(typeof _9d.height=="string"&&_9d.height.indexOf("%")>=0)?_9d.height:_9d.height.toFixed();return this.setTransform(this.matrix).setFill(this.fillStyle).setStroke(this.strokeStyle);}});vml.Rect.nodeType="roundrect";_4.declare("dojox.gfx.vml.Ellipse",[vml.Shape,gs.Ellipse],{setShape:function(_a2){var _a3=this.shape=g.makeParameters(this.shape,_a2);this.bbox=null;var _a4=this.rawNode.style;_a4.left=(_a3.cx-_a3.rx).toFixed();_a4.top=(_a3.cy-_a3.ry).toFixed();_a4.width=(_a3.rx*2).toFixed();_a4.height=(_a3.ry*2).toFixed();return this.setTransform(this.matrix);}});vml.Ellipse.nodeType="oval";_4.declare("dojox.gfx.vml.Circle",[vml.Shape,gs.Circle],{setShape:function(_a5){var _a6=this.shape=g.makeParameters(this.shape,_a5);this.bbox=null;var _a7=this.rawNode.style;_a7.left=(_a6.cx-_a6.r).toFixed();_a7.top=(_a6.cy-_a6.r).toFixed();_a7.width=(_a6.r*2).toFixed();_a7.height=(_a6.r*2).toFixed();return this;}});vml.Circle.nodeType="oval";_4.declare("dojox.gfx.vml.Line",[vml.Shape,gs.Line],{constructor:function(_a8){if(_a8){_a8.setAttribute("dojoGfxType","line");}},setShape:function(_a9){var _aa=this.shape=g.makeParameters(this.shape,_a9);this.bbox=null;this.rawNode.path.v="m"+_aa.x1.toFixed()+" "+_aa.y1.toFixed()+"l"+_aa.x2.toFixed()+" "+_aa.y2.toFixed()+"e";return this.setTransform(this.matrix);}});vml.Line.nodeType="shape";_4.declare("dojox.gfx.vml.Polyline",[vml.Shape,gs.Polyline],{constructor:function(_ab){if(_ab){_ab.setAttribute("dojoGfxType","polyline");}},setShape:function(_ac,_ad){if(_ac&&_ac instanceof Array){this.shape=g.makeParameters(this.shape,{points:_ac});if(_ad&&this.shape.points.length){this.shape.points.push(this.shape.points[0]);}}else{this.shape=g.makeParameters(this.shape,_ac);}this.bbox=null;this._normalizePoints();var _ae=[],p=this.shape.points;if(p.length>0){_ae.push("m");_ae.push(p[0].x.toFixed(),p[0].y.toFixed());if(p.length>1){_ae.push("l");for(var i=1;i<p.length;++i){_ae.push(p[i].x.toFixed(),p[i].y.toFixed());}}}_ae.push("e");this.rawNode.path.v=_ae.join(" ");return this.setTransform(this.matrix);}});vml.Polyline.nodeType="shape";_4.declare("dojox.gfx.vml.Image",[vml.Shape,gs.Image],{setShape:function(_af){var _b0=this.shape=g.makeParameters(this.shape,_af);this.bbox=null;this.rawNode.firstChild.src=_b0.src;return this.setTransform(this.matrix);},_applyTransform:function(){var _b1=this._getRealMatrix(),_b2=this.rawNode,s=_b2.style,_b3=this.shape;if(_b1){_b1=m.multiply(_b1,{dx:_b3.x,dy:_b3.y});}else{_b1=m.normalize({dx:_b3.x,dy:_b3.y});}if(_b1.xy==0&&_b1.yx==0&&_b1.xx>0&&_b1.yy>0){s.filter="";s.width=Math.floor(_b1.xx*_b3.width);s.height=Math.floor(_b1.yy*_b3.height);s.left=Math.floor(_b1.dx);s.top=Math.floor(_b1.dy);}else{var ps=_b2.parentNode.style;s.left="0px";s.top="0px";s.width=ps.width;s.height=ps.height;_b1=m.multiply(_b1,{xx:_b3.width/parseInt(s.width),yy:_b3.height/parseInt(s.height)});var f=_b2.filters["DXImageTransform.Microsoft.Matrix"];if(f){f.M11=_b1.xx;f.M12=_b1.xy;f.M21=_b1.yx;f.M22=_b1.yy;f.Dx=_b1.dx;f.Dy=_b1.dy;}else{s.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+_b1.xx+", M12="+_b1.xy+", M21="+_b1.yx+", M22="+_b1.yy+", Dx="+_b1.dx+", Dy="+_b1.dy+")";}}return this;},_setDimensions:function(_b4,_b5){var r=this.rawNode,f=r.filters["DXImageTransform.Microsoft.Matrix"];if(f){var s=r.style;s.width=_b4;s.height=_b5;return this._applyTransform();}return this;}});vml.Image.nodeType="rect";_4.declare("dojox.gfx.vml.Text",[vml.Shape,gs.Text],{constructor:function(_b6){if(_b6){_b6.setAttribute("dojoGfxType","text");}this.fontStyle=null;},_alignment:{start:"left",middle:"center",end:"right"},setShape:function(_b7){this.shape=g.makeParameters(this.shape,_b7);this.bbox=null;var r=this.rawNode,s=this.shape,x=s.x,y=s.y.toFixed(),_b8;switch(s.align){case "middle":x-=5;break;case "end":x-=10;break;}_b8="m"+x.toFixed()+","+y+"l"+(x+10).toFixed()+","+y+"e";var p=null,t=null,c=r.childNodes;for(var i=0;i<c.length;++i){var tag=c[i].tagName;if(tag=="path"){p=c[i];if(t){break;}}else{if(tag=="textpath"){t=c[i];if(p){break;}}}}if(!p){p=r.ownerDocument.createElement("v:path");r.appendChild(p);}if(!t){t=r.ownerDocument.createElement("v:textpath");r.appendChild(t);}p.v=_b8;p.textPathOk=true;t.on=true;var a=vml.text_alignment[s.align];t.style["v-text-align"]=a?a:"left";t.style["text-decoration"]=s.decoration;t.style["v-rotate-letters"]=s.rotated;t.style["v-text-kern"]=s.kerning;t.string=s.text;return this.setTransform(this.matrix);},_setFont:function(){var f=this.fontStyle,c=this.rawNode.childNodes;for(var i=0;i<c.length;++i){if(c[i].tagName=="textpath"){c[i].style.font=g.makeFontString(f);break;}}this.setTransform(this.matrix);},_getRealMatrix:function(){var _b9=this.inherited(arguments);if(_b9){_b9=m.multiply(_b9,{dy:-g.normalizedLength(this.fontStyle?this.fontStyle.size:"10pt")*0.35});}return _b9;},getTextWidth:function(){var _ba=this.rawNode,_bb=_ba.style.display;_ba.style.display="inline";var _bc=g.pt2px(parseFloat(_ba.currentStyle.width));_ba.style.display=_bb;return _bc;}});vml.Text.nodeType="shape";_4.declare("dojox.gfx.vml.Path",[vml.Shape,g.path.Path],{constructor:function(_bd){if(_bd&&!_bd.getAttribute("dojoGfxType")){_bd.setAttribute("dojoGfxType","path");}this.vmlPath="";this.lastControl={};},_updateWithSegment:function(_be){var _bf=d.clone(this.last);this.inherited(arguments);if(arguments.length>1){return;}var _c0=this[this.renderers[_be.action]](_be,_bf);if(typeof this.vmlPath=="string"){this.vmlPath+=_c0.join("");this.rawNode.path.v=this.vmlPath+" r0,0 e";}else{Array.prototype.push.apply(this.vmlPath,_c0);}},setShape:function(_c1){this.vmlPath=[];this.lastControl.type="";this.inherited(arguments);this.vmlPath=this.vmlPath.join("");this.rawNode.path.v=this.vmlPath+" r0,0 e";return this;},_pathVmlToSvgMap:{m:"M",l:"L",t:"m",r:"l",c:"C",v:"c",qb:"Q",x:"z",e:""},renderers:{M:"_moveToA",m:"_moveToR",L:"_lineToA",l:"_lineToR",H:"_hLineToA",h:"_hLineToR",V:"_vLineToA",v:"_vLineToR",C:"_curveToA",c:"_curveToR",S:"_smoothCurveToA",s:"_smoothCurveToR",Q:"_qCurveToA",q:"_qCurveToR",T:"_qSmoothCurveToA",t:"_qSmoothCurveToR",A:"_arcTo",a:"_arcTo",Z:"_closePath",z:"_closePath"},_addArgs:function(_c2,_c3,_c4,_c5){var n=_c3 instanceof Array?_c3:_c3.args;for(var i=_c4;i<_c5;++i){_c2.push(" ",n[i].toFixed());}},_adjustRelCrd:function(_c6,_c7,_c8){var n=_c7 instanceof Array?_c7:_c7.args,l=n.length,_c9=new Array(l),i=0,x=_c6.x,y=_c6.y;if(typeof x!="number"){_c9[0]=x=n[0];_c9[1]=y=n[1];i=2;}if(typeof _c8=="number"&&_c8!=2){var j=_c8;while(j<=l){for(;i<j;i+=2){_c9[i]=x+n[i];_c9[i+1]=y+n[i+1];}x=_c9[j-2];y=_c9[j-1];j+=_c8;}}else{for(;i<l;i+=2){_c9[i]=(x+=n[i]);_c9[i+1]=(y+=n[i+1]);}}return _c9;},_adjustRelPos:function(_ca,_cb){var n=_cb instanceof Array?_cb:_cb.args,l=n.length,_cc=new Array(l);for(var i=0;i<l;++i){_cc[i]=(_ca+=n[i]);}return _cc;},_moveToA:function(_cd){var p=[" m"],n=_cd instanceof Array?_cd:_cd.args,l=n.length;this._addArgs(p,n,0,2);if(l>2){p.push(" l");this._addArgs(p,n,2,l);}this.lastControl.type="";return p;},_moveToR:function(_ce,_cf){return this._moveToA(this._adjustRelCrd(_cf,_ce));},_lineToA:function(_d0){var p=[" l"],n=_d0 instanceof Array?_d0:_d0.args;this._addArgs(p,n,0,n.length);this.lastControl.type="";return p;},_lineToR:function(_d1,_d2){return this._lineToA(this._adjustRelCrd(_d2,_d1));},_hLineToA:function(_d3,_d4){var p=[" l"],y=" "+_d4.y.toFixed(),n=_d3 instanceof Array?_d3:_d3.args,l=n.length;for(var i=0;i<l;++i){p.push(" ",n[i].toFixed(),y);}this.lastControl.type="";return p;},_hLineToR:function(_d5,_d6){return this._hLineToA(this._adjustRelPos(_d6.x,_d5),_d6);},_vLineToA:function(_d7,_d8){var p=[" l"],x=" "+_d8.x.toFixed(),n=_d7 instanceof Array?_d7:_d7.args,l=n.length;for(var i=0;i<l;++i){p.push(x," ",n[i].toFixed());}this.lastControl.type="";return p;},_vLineToR:function(_d9,_da){return this._vLineToA(this._adjustRelPos(_da.y,_d9),_da);},_curveToA:function(_db){var p=[],n=_db instanceof Array?_db:_db.args,l=n.length,lc=this.lastControl;for(var i=0;i<l;i+=6){p.push(" c");this._addArgs(p,n,i,i+6);}lc.x=n[l-4];lc.y=n[l-3];lc.type="C";return p;},_curveToR:function(_dc,_dd){return this._curveToA(this._adjustRelCrd(_dd,_dc,6));},_smoothCurveToA:function(_de,_df){var p=[],n=_de instanceof Array?_de:_de.args,l=n.length,lc=this.lastControl,i=0;if(lc.type!="C"){p.push(" c");this._addArgs(p,[_df.x,_df.y],0,2);this._addArgs(p,n,0,4);lc.x=n[0];lc.y=n[1];lc.type="C";i=4;}for(;i<l;i+=4){p.push(" c");this._addArgs(p,[2*_df.x-lc.x,2*_df.y-lc.y],0,2);this._addArgs(p,n,i,i+4);lc.x=n[i];lc.y=n[i+1];}return p;},_smoothCurveToR:function(_e0,_e1){return this._smoothCurveToA(this._adjustRelCrd(_e1,_e0,4),_e1);},_qCurveToA:function(_e2){var p=[],n=_e2 instanceof Array?_e2:_e2.args,l=n.length,lc=this.lastControl;for(var i=0;i<l;i+=4){p.push(" qb");this._addArgs(p,n,i,i+4);}lc.x=n[l-4];lc.y=n[l-3];lc.type="Q";return p;},_qCurveToR:function(_e3,_e4){return this._qCurveToA(this._adjustRelCrd(_e4,_e3,4));},_qSmoothCurveToA:function(_e5,_e6){var p=[],n=_e5 instanceof Array?_e5:_e5.args,l=n.length,lc=this.lastControl,i=0;if(lc.type!="Q"){p.push(" qb");this._addArgs(p,[lc.x=_e6.x,lc.y=_e6.y],0,2);lc.type="Q";this._addArgs(p,n,0,2);i=2;}for(;i<l;i+=2){p.push(" qb");this._addArgs(p,[lc.x=2*_e6.x-lc.x,lc.y=2*_e6.y-lc.y],0,2);this._addArgs(p,n,i,i+2);}return p;},_qSmoothCurveToR:function(_e7,_e8){return this._qSmoothCurveToA(this._adjustRelCrd(_e8,_e7,2),_e8);},_arcTo:function(_e9,_ea){var p=[],n=_e9.args,l=n.length,_eb=_e9.action=="a";for(var i=0;i<l;i+=7){var x1=n[i+5],y1=n[i+6];if(_eb){x1+=_ea.x;y1+=_ea.y;}var _ec=g.arc.arcAsBezier(_ea,n[i],n[i+1],n[i+2],n[i+3]?1:0,n[i+4]?1:0,x1,y1);for(var j=0;j<_ec.length;++j){p.push(" c");var t=_ec[j];this._addArgs(p,t,0,t.length);this._updateBBox(t[0],t[1]);this._updateBBox(t[2],t[3]);this._updateBBox(t[4],t[5]);}_ea.x=x1;_ea.y=y1;}this.lastControl.type="";return p;},_closePath:function(){this.lastControl.type="";return ["x"];}});vml.Path.nodeType="shape";_4.declare("dojox.gfx.vml.TextPath",[vml.Path,g.path.TextPath],{constructor:function(_ed){if(_ed){_ed.setAttribute("dojoGfxType","textpath");}this.fontStyle=null;if(!("text" in this)){this.text=d.clone(g.defaultTextPath);}if(!("fontStyle" in this)){this.fontStyle=d.clone(g.defaultFont);}},setText:function(_ee){this.text=g.makeParameters(this.text,typeof _ee=="string"?{text:_ee}:_ee);this._setText();return this;},setFont:function(_ef){this.fontStyle=typeof _ef=="string"?g.splitFontString(_ef):g.makeParameters(g.defaultFont,_ef);this._setFont();return this;},_setText:function(){this.bbox=null;var r=this.rawNode,s=this.text,p=null,t=null,c=r.childNodes;for(var i=0;i<c.length;++i){var tag=c[i].tagName;if(tag=="path"){p=c[i];if(t){break;}}else{if(tag=="textpath"){t=c[i];if(p){break;}}}}if(!p){p=this.rawNode.ownerDocument.createElement("v:path");r.appendChild(p);}if(!t){t=this.rawNode.ownerDocument.createElement("v:textpath");r.appendChild(t);}p.textPathOk=true;t.on=true;var a=vml.text_alignment[s.align];t.style["v-text-align"]=a?a:"left";t.style["text-decoration"]=s.decoration;t.style["v-rotate-letters"]=s.rotated;t.style["v-text-kern"]=s.kerning;t.string=s.text;},_setFont:function(){var f=this.fontStyle,c=this.rawNode.childNodes;for(var i=0;i<c.length;++i){if(c[i].tagName=="textpath"){c[i].style.font=g.makeFontString(f);break;}}}});vml.TextPath.nodeType="shape";_4.declare("dojox.gfx.vml.Surface",gs.Surface,{constructor:function(){gs.Container._init.call(this);},setDimensions:function(_f0,_f1){this.width=g.normalizedLength(_f0);this.height=g.normalizedLength(_f1);if(!this.rawNode){return this;}var cs=this.clipNode.style,r=this.rawNode,rs=r.style,bs=this.bgNode.style,ps=this._parent.style,i;ps.width=_f0;ps.height=_f1;cs.width=_f0;cs.height=_f1;cs.clip="rect(0px "+_f0+"px "+_f1+"px 0px)";rs.width=_f0;rs.height=_f1;r.coordsize=_f0+" "+_f1;bs.width=_f0;bs.height=_f1;for(i=0;i<this.children.length;++i){this.children[i]._setDimensions(_f0,_f1);}return this;},getDimensions:function(){var t=this.rawNode?{width:g.normalizedLength(this.rawNode.style.width),height:g.normalizedLength(this.rawNode.style.height)}:null;if(t.width<=0){t.width=this.width;}if(t.height<=0){t.height=this.height;}return t;}});vml.createSurface=function(_f2,_f3,_f4){if(!_f3&&!_f4){var pos=d.position(_f2);_f3=_f3||pos.w;_f4=_f4||pos.h;}if(typeof _f3=="number"){_f3=_f3+"px";}if(typeof _f4=="number"){_f4=_f4+"px";}var s=new vml.Surface(),p=d.byId(_f2),c=s.clipNode=p.ownerDocument.createElement("div"),r=s.rawNode=p.ownerDocument.createElement("v:group"),cs=c.style,rs=r.style;if(d.isIE>7){rs.display="inline-block";}s._parent=p;s._nodes.push(c);p.style.width=_f3;p.style.height=_f4;cs.position="absolute";cs.width=_f3;cs.height=_f4;cs.clip="rect(0px "+_f3+" "+_f4+" 0px)";rs.position="absolute";rs.width=_f3;rs.height=_f4;r.coordsize=(_f3==="100%"?_f3:parseFloat(_f3))+" "+(_f4==="100%"?_f4:parseFloat(_f4));r.coordorigin="0 0";var b=s.bgNode=r.ownerDocument.createElement("v:rect"),bs=b.style;bs.left=bs.top=0;bs.width=rs.width;bs.height=rs.height;b.filled=b.stroked="f";r.appendChild(b);c.appendChild(r);p.appendChild(c);s.width=g.normalizedLength(_f3);s.height=g.normalizedLength(_f4);return s;};function _f5(_f6,f,o){o=o||d.global;f.call(o,_f6);if(_f6 instanceof g.Surface||_f6 instanceof g.Group){d.forEach(_f6.children,function(_f7){_f5(_f7,f,o);});}};var C=gs.Container,_f8={add:function(_f9){if(this!=_f9.getParent()){var _fa=_f9.getParent();if(_fa){_fa.remove(_f9);}this.rawNode.appendChild(_f9.rawNode);if(!_fa){_f9.setFill(_f9.getFill());_f9.setStroke(_f9.getStroke());}C.add.apply(this,arguments);}return this;},remove:function(_fb,_fc){if(this==_fb.getParent()){if(this.rawNode==_fb.rawNode.parentNode){this.rawNode.removeChild(_fb.rawNode);}C.remove.apply(this,arguments);}return this;},clear:function(){var r=this.rawNode;while(r.firstChild!=r.lastChild){if(r.firstChild!=this.bgNode){r.removeChild(r.firstChild);}if(r.lastChild!=this.bgNode){r.removeChild(r.lastChild);}}return C.clear.apply(this,arguments);},_moveChildToFront:C._moveChildToFront,_moveChildToBack:C._moveChildToBack};var _fd={createGroup:function(){var _fe=this.createObject(vml.Group,null);var r=_fe.rawNode.ownerDocument.createElement("v:rect");r.style.left=r.style.top=0;r.style.width=_fe.rawNode.style.width;r.style.height=_fe.rawNode.style.height;r.filled=r.stroked="f";_fe.rawNode.appendChild(r);_fe.bgNode=r;return _fe;},createImage:function(_ff){if(!this.rawNode){return null;}var _100=new vml.Image(),doc=this.rawNode.ownerDocument,node=doc.createElement("v:rect");node.stroked="f";node.style.width=this.rawNode.style.width;node.style.height=this.rawNode.style.height;var img=doc.createElement("v:imagedata");node.appendChild(img);_100.setRawNode(node);this.rawNode.appendChild(node);_100.setShape(_ff);this.add(_100);return _100;},createRect:function(rect){if(!this.rawNode){return null;}var _101=new vml.Rect,node=this.rawNode.ownerDocument.createElement("v:roundrect");if(d.isIE>7){node.style.display="inline-block";}_101.setRawNode(node);this.rawNode.appendChild(node);_101.setShape(rect);this.add(_101);return _101;},createObject:function(_102,_103){if(!this.rawNode){return null;}var _104=new _102(),node=this.rawNode.ownerDocument.createElement("v:"+_102.nodeType);_104.setRawNode(node);this.rawNode.appendChild(node);switch(_102){case vml.Group:case vml.Line:case vml.Polyline:case vml.Image:case vml.Text:case vml.Path:case vml.TextPath:this._overrideSize(node);}_104.setShape(_103);this.add(_104);return _104;},_overrideSize:function(node){var s=this.rawNode.style,w=s.width,h=s.height;node.style.width=w;node.style.height=h;node.coordsize=parseInt(w)+" "+parseInt(h);}};d.extend(vml.Group,_f8);d.extend(vml.Group,gs.Creator);d.extend(vml.Group,_fd);d.extend(vml.Surface,_f8);d.extend(vml.Surface,gs.Creator);d.extend(vml.Surface,_fd);if(g.loadAndSwitch==="vml"){g.switchTo("vml");delete g.loadAndSwitch;}})();}}};});
