var HTML2PDF_PDFLET_ROOT = "http://www.html2pdf.biz/pdflet"; Function.prototype.bindFunction = function(object) { var __method = this; var arg = arguments; var f = function() { __method.apply(object, arg); }; return f; }; if (html2pdf_load_script_files == undefined) { var html2pdf_load_script_files = [ HTML2PDF_PDFLET_ROOT + "/js/prototypewindow/javascript/prototype.js", HTML2PDF_PDFLET_ROOT + "/js/prototypewindow/javascript/window.js" ]; } if (html2pdf_load_css_files == undefined) { var html2pdf_load_css_files = [ HTML2PDF_PDFLET_ROOT + "/js/prototypewindow/themes/default.css", HTML2PDF_PDFLET_ROOT + "/js/prototypewindow/themes/mac_os_x.css" ]; } (function() { document.write('HTML2PDF'); for(var i = 0; i < html2pdf_load_script_files.length; i++) { document.write(''); } for(var i = 0; i < html2pdf_load_css_files.length; i++) { document.write(''); } })(); (function() { if (HTML2PDF == undefined) { var HTML2PDF = function(){ this.initialize.apply(this, arguments); }; HTML2PDF.prototype.initialize = function(id, url) { this.isClick = false; this.createPdfUrl = HTML2PDF_PDFLET_ROOT + "/download.php?url=" + encodeURIComponent(url) + "&t=" + (new Date()).getTime(); this.btnElement = document.getElementById(id); if (this.btnElement) { this.btnElement.onclick = this.click.bindFunction(this); } }; HTML2PDF.prototype.onClose = function() { this.isClick = false; }; HTML2PDF.prototype.click = function() { if (!this.isClick) { var options = { className: "mac_os_x", title: "HTML2PDF", width:600, height:400, destroyOnClose: true, recenterAuto:false, onClose:this.onClose.bindFunction(this) }; win = new Window(options); win.setURL(this.createPdfUrl); win.showCenter(); this.isClick = true; } }; } var html2pdfObj4b97ed13e4e2c; setTimeout(function() { html2pdfObj4b97ed13e4e2c = new HTML2PDF("html2pdf-create-btn4b97ed13e4e2c", location.href); }, 0); })();