﻿function getPrint(print_area) {
    //Creating new page
    var pp = window.open("","Print","width=600,height=500,resizable=yes,scrollbars=yes");
    //Adding HTML opening tag with <HEAD> … </HEAD> portion
    pp.document.writeln('<form  method="post">');
    //Creating two buttons Print and Close within a table
    pp.document.writeln('<TABLE width=100%><TR><TD></TD></TR><TR><TD align=right><INPUT ID="PRINT" type="button" value="Print" onclick="javascript:location.reload(true);window.print();"><INPUT ID="CLOSE" type="button" value="Close" onclick="window.close();"></TD></TR><TR><TD></TD></TR></TABLE>');
    //Writing print area of the calling page
    pp.document.writeln(document.getElementById(print_area).innerHTML); 
    //Ending Tag of </form>, </body> and </HTML>
    pp.document.writeln('</form>');
}			
	
