  function printCoupon(couponID,companyID){
  var couponRowID = 'coupon_' + couponID;
  var couponRow = document.getElementById(couponRowID);
  var couponPrint = "<center><div style=\"width:400px;margin-top:10px;\">" +
                          "<div style=\"float:right\" class=\"noprint\">" + 
                          "<a href=\"javascript:this.focus();this.print()\"><img src=\"/img/btn_printcoupon.gif\" border=\"0\" /></a></div></div><br clear=\"all\">" + 
                          "<div align=\"center\" id=\"couponPage\" style=\"width:400px;margin-top:12px;text-align:left\">" + couponRow.innerHTML + 
                          "<img src=\"/img/coupon_footer.gif\" /><br /></div></center>";                  
     dealPopup(couponPrint);
 }

 	function dealPopup(content) {
	        document.getElementById('dealPopup').style.display="block";
	        dealPosition();
	        frames['dealIframe'].document.body.innerHTML = content;
	}
	function dealPosition() {
	        document.getElementById('masking').style.display="block";
	        document.getElementById('masking').style.height=document.body.scrollHeight + "px";
            document.getElementById('masking').style.width=document.body.scrollWidth + "px";
	        window.onresize=dealPosition;
	        window.onunload=dealPopupClose;
		    var positionX;
	        var positionY;
	        if(window.pageYOffset) {
               positionY=window.pageYOffset + 30;
            }
            else if (document.body.scrollTop) {
               positionY=document.body.scrollTop + 30;
            }
            else {
               positionY=document.documentElement.scrollTop + 30;
            }
            if (navigator.userAgent.match(/MSIE 6/i)) {
               document.getElementById('dealPopup').style.width=document.body.clientWidth+"px";
            }
	        document.getElementById('dealPopup').style.top=positionY + "px";
	}
	function dealPopupClose() {
	        document.getElementById('masking').style.display="none";
	        document.getElementById('dealPopup').style.display="none";
	        window.onresize = function(){void(0)};
	        window.onunload = function(){void(0)};
	}