function wsp_printCoupon(F){function E(G,H){if(G.addRule){G.addRule("body","background-color: #fff; visibility: hidden; overflow:hidden;");
G.addRule("html","background-color: #fff; visibility: hidden; overflow:hidden;");
G.addRule("body *","visibility: hidden;");
G.addRule("body #"+H,"visibility: visible; position: absolute; top: 10px; left: 10px;");
G.addRule("body #"+H+" *","visibility: visible;")
}else{if(G.insertRule&&G.cssRules){G.insertRule("body, html { background-color: #fff; visibility: hidden; overflow:hidden;}",G.cssRules.length);
G.insertRule("body * {visibility: hidden;}",G.cssRules.length);
G.insertRule("body #"+H+"{ visibility: visible; position: absolute; top: 10px; left: 10px;}",G.cssRules.length);
G.insertRule("body #"+H+" * { visibility: visible;}",G.cssRules.length)
}}}function D(){if(B.removeRule&&B.rules){B.removeRule(B.rules.length-1);
B.removeRule(B.rules.length-1);
B.removeRule(B.rules.length-1);
B.removeRule(B.rules.length-1);
B.removeRule(B.rules.length-1);
window.detachEvent("onafterprint",D)
}else{if(B.deleteRule&&B.cssRules){B.deleteRule(B.cssRules.length-1);
B.deleteRule(B.cssRules.length-1);
B.deleteRule(B.cssRules.length-1);
B.deleteRule(B.cssRules.length-1)
}}}var B=null;
var C=document.styleSheets;
if(C&&C.length){for(var A=0;
A<C.length;
A++){if(C[A].media=="print"||C[A].media.mediaText=="print"){B=C[A];
break
}}}E(B,F);
if(window.attachEvent){if(!window.attachEvent("onafterprint",D)){setTimeout(D,5000)
}window.print()
}else{window.print();
setTimeout(D,5000)
}}
