window.onload = function(){window.onfocus = function(){try{ if(docprint && docprint.open && !docprint.closed){ docprint.close();}}catch(e){}}}