function show_mail_form( id, width, height, top, left ) { 
	document.getElementById(id).style.width = width;
	document.getElementById(id).style.height = height;

	var screenCenter = document.body.clientWidth/2; 
	var arr = getScrollXY();
	//alert(arr[1]);
	document.getElementById(id).style.top = arr[1] + 100 + "px";
	//document.getElementById(id).style.top = 500 + "px";
	document.getElementById(id).style.left = screenCenter - 400 + "px";

	if (document.getElementById(id).style.display=='none') {
		document.getElementById(id).style.display = 'inline';
	} else { 
		document.getElementById(id).style.display = 'none';
	}

	//document.getElementById(id).style.top = $(window).scrollTop() + top;
	//document.getElementById(id).style.left = $(window).scrollLeft() + left;
	//document.body.scrollTop
	//$(window).scrollTop()
} 

// http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement &&
      ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}

function printCoupon(){
    //outputCoupon.document.open();
    //outputCoupon.document.writeln("<html><head><style>body,td,p,pre,input,textarea,select,option,a,a:hover {font-size:9pt; font-family:tahoma,굴림;}</style></head><body>"); //스타일등을 지정
    //outputCoupon.document.writeln(window.document.all.contentCoupon.innerHTML)
    //outputCoupon.document.writeln("</body></html>");
    //outputCoupon.document.close();
    //outputCoupon.document.execCommand('Print');
}

function print_flash(uwidth,uheight,usrc) {
	var flash_tag = "";
	flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	flash_tag +='codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
	flash_tag +='WIDTH="'+uwidth+'" HEIGHT="'+uheight+'" >';
	flash_tag +='<param name="movie" value="'+usrc+'">';
	flash_tag +='<param name="quality" value="high">';
	flash_tag +='<param name="wmode" value="transparent">';
	//flash_tag +='<param name="wmode" value="transparent">';
	flash_tag +='<embed src="'+usrc+'" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" ';
	flash_tag +='type="application/x-shockwave-flash" WIDTH="'+uwidth+'" HEIGHT="'+uheight+'" wmode="transparent" ></embed></object>'
	document.write(flash_tag);
}

jQuery(function($){

    //function popup() {
        //if (!window.focus) return true;
        //window.open('/layouts/bki100/img.user/fly1.gif', 'popup1', 'width=400,height=517,left=10, top=10, scrollbars=no');
       // window.open('/layouts/bki100/img.user/fly2.gif', 'popup2', 'width=400,height=517,left=450, top=10, scrollbars=no');
        //return false;
    //}

});

