(function(t){var e=t.getElementsByTagName("script"),n=e[e.length-1],i=n.getAttribute("src").replace(/[^\/]+$/,"save.php");window.canvas2png=function(e){var n=e.tagName.toLowerCase();if("canvas"===n)if("undefined"!=typeof FlashCanvas)FlashCanvas.saveImage(e);else{var a=t.createElement("form"),o=t.createElement("input");a.setAttribute("action",i),a.setAttribute("method","post"),o.setAttribute("type","hidden"),o.setAttribute("name","dataurl"),o.setAttribute("value",e.toDataURL()),t.body.appendChild(a),a.appendChild(o),a.submit(),a.removeChild(o),t.body.removeChild(a)}}})(document);