function DrawingTools(){var t="http://www.w3.org/2000/svg";var p="http://www.w3.org/1999/xlink";function k(h,f){var d=null;if(!Browser.SVG){var e="v";if(f){e=f}d=iDoc.createElement(e+":"+h)}else{d=iDoc.createElementNS(t,h)}return d}this.createElement=function(h,f){return k(h,f)};this.createGroup=function(h,f,d,e,g,j,b,c){var a=null;if(!Browser.SVG){var l=null;if(c){l=c}a=k("group",l);if((f)||(f===0)){a.style.width=f}if((d)||(d===0)){a.style.height=d}if((e)&&(g)){a.setAttribute("coordorigin",e+","+g)}if((j)&&(b)){a.setAttribute("coordsize",j+","+b)}}else{a=k("g")}if(h){a.setAttribute("id",h)}return a};this.createPolyline=function(h,f,d,e,g,j,b,c){var a=k("polyline");if(Browser.SVG){a.setAttributeNS(null,"points",h);if(e){a.setAttribute("fill",e)}else{a.setAttribute("fill","none")}if(f){a.setAttribute("stroke",f)}if((d)||(d===0)){a.setAttribute("stroke-width",d)}if((g)||(g===0)){a.setAttribute("fill-opacity",g)}if((b)||(b===0)){a.setAttribute("stroke-opacity",b)}if(c){a.setAttribute("shape-rendering",c)}}else{a.points=h;if(f){a.setAttribute("strokecolor",f)}if((d)||(d===0)){a.setAttribute("strokeweight",d)}if(e){a.setAttribute("fillcolor",e)}else{a.setAttribute("fill","false")}if((g)||(g===0)){var l=document.createElement("v:fill");l.setAttribute("opacity",g);a.appendChild(l)}if((b)||(b===0)){var m=document.createElement("v:stroke");m.setAttribute("opacity",b);a.appendChild(m)}}return a};this.createLine=function(h,f,d,e,g,j,b){var c=k("line");if(Browser.SVG){c.setAttribute("x1",h);c.setAttribute("y1",f);c.setAttribute("x2",d);c.setAttribute("y2",e);c.setAttribute("stroke",g);c.setAttribute("stroke-width",j);if(b){c.setAttribute("shape-rendering",b)}}else{c.setAttribute("from",h+","+f);c.setAttribute("to",d+","+e);c.setAttribute("strokecolor",g);c.setAttribute("strokeweight",j)}return c};this.createRectangle=function(h,f,d,e,g,j,b,c,a,l,m,q,u){var i=null;if(!Browser.SVG){i=k("roundrect");var n=i.style;n.left=h;n.top=f;n.width=d;n.height=e;var r=0;if(a){r=a}i.setAttribute("arcsize",r);if(g){i.setAttribute("fillcolor",g)}if(j){i.setAttribute("strokecolor",j)}if((b)||(b===0)){var o=k("stroke");o.setAttribute("weight",b);if(b===0){o.setAttribute("opacity",0)}i.appendChild(o)}if((c)||(c===0)){var s=k("fill");s.setAttribute("opacity",c);i.appendChild(s)}}else{i=k("rect");i.setAttribute("x",h);i.setAttribute("y",f);if((l)&&(m)){i.setAttribute("rx",l);i.setAttribute("ry",m)}i.setAttribute("width",d);i.setAttribute("height",e);if(g){i.setAttribute("fill",g)}if(j){i.setAttribute("stroke",j)}if((b)||(b===0)){i.setAttribute("stroke-width",b)}if((c)||(c===0)){i.setAttribute("fill-opacity",c)}if(q){i.setAttribute("shape-rendering",q)}}return i};this.createCircle=function(h,f,d,e,g,j,b,c){var a=null;if(!Browser.SVG){a=k("oval");var l=a.style;l.left=h-d;l.top=f-d;l.width=d*2;l.height=d*2;if(e){a.setAttribute("fillcolor",e)}if(g){a.setAttribute("strokecolor",g)}if((j)||(j===0)){a.setAttribute("strokeweight",j+"pt")}if((b)||(b===0)){var m=k("fill");m.opacity=b;a.appendChild(m)}}else{a=k("circle");a.setAttribute("cx",h);a.setAttribute("cy",f);a.setAttribute("r",d);if(e){a.setAttribute("fill",e)}if(g){a.setAttribute("stroke",g)}if((j)||(j===0)){a.setAttribute("stroke-width",j)}if((b)||(b===0)){a.setAttribute("opacity",b)}if(c){a.setAttribute("shape-rendering",c)}}return a};this.createImage=function(h,f,d,e,g,j){var b=k("image");if(!Browser.SVG){b.setAttribute("src",h);var c=b.style;c.left=f;c.top=d;c.width=e;c.height=g}else{b.setAttributeNS(p,"xlink:href",h);b.setAttribute("x",f);b.setAttribute("y",d);b.setAttribute("width",e);b.setAttribute("height",g)}return b};this.createUse=function(h,f,d){var e=k("use");e.setAttributeNS(p,"xlink:href",h);e.setAttribute("x",f);e.setAttribute("y",d);return e}}var iDrawingTools=new DrawingTools();