/*****************************************************************************************************
File Name: Script.js
Purpose:Generating Pop-up Print Preview page
Created By: Ben Chen
Created On: 11/13/2008
Last Modified: 03/02/2010
******************************************************************************************************/
//function getPrint(print_area)
function getPrint(print_area, _PageTitle)
{	
	//Creating new page
	var pp = window.open();

	pp.document.writeln('<html>')
	pp.document.writeln(' <head>')
	pp.document.writeln('  <title>' + _PageTitle + '</title>')
	pp.document.writeln('  <link href="../../../App_Themes/common/PrintStyle.css" type="text/css" rel="stylesheet" media="all"><base target="_self">')
	pp.document.writeln(' </head>')
	pp.document.writeln(' <body MS_POSITIONING="GridLayout" bottomMargin="0" style="text-align:center;" topMargin="0" m rightMargin="auto">');
	pp.document.writeln('  <form method="post">');
	pp.document.writeln('   <input id="PRINT" type="button" value="Print" onclick="javascript:location.reload(true);window.print();">');
	pp.document.writeln('   <input id="CLOSE" type="button" value="Close" onclick="window.close();">');
	pp.document.writeln(    document.getElementById(print_area).innerHTML);
	pp.document.writeln('  </form>');			
	pp.document.writeln(' </body>');			
	pp.document.writeln('</html>');			
}

function show_alert(message) {
    alert(message);
    window.onbeforeunload = null; window.close();
}
		