
function PrintMe(whatView){ 
   
 print_area = whatView;


        //Creating new pagevar 
        pp = window.open("","","location=no, toolbar=yes, scrollbars=1, resizable=yes,  width=600, height=400")
        //Adding HTML opening tag with <HEAD> … </HEAD> portion 
        pp.document.writeln('<HTML><HEAD><title>Print Preview</title>')
        pp.document.writeln('<LINK href=resources/css/eCopyStyles.css type="text/css" rel="stylesheet">')
        pp.document.writeln('<LINK href=resources/css/EspnStyles.css type="text/css" rel="stylesheet">')        
        pp.document.writeln('<LINK href=resources/css/PrintStyle.css type="text/css" rel="stylesheet" media="print">')

        pp.document.writeln('<base target="_self"></HEAD>')
        //Adding Body Tag
        pp.document.writeln('<body MS_POSITIONING="GridLayout" style="overflow:scroll;"');
        
        pp.document.writeln(' leftMargin="0" topMargin="0" rightMargin="0">');
        //Adding form Tag
        pp.document.writeln('<form method="post">');
        pp.document.writeln('<div style="background-color:White; height: 100%;">');        
        //Creating two buttons Print and Close within a HTML table
//        pp.document.writeln('<INPUT ID="PRINT" type="button" value="Print" ');
//        pp.document.writeln('onclick="javascript:location.reload(true);window.print();window.close();">');
//        pp.document.writeln('<INPUT  ID="CLOSE" type="button" value="Close" onclick="window.close();">');
        //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('</div></form></body>');
        //pp.document.writeln('<script language="javascript"  type="text/javascript">window.print();</script>');
        pp.document.writeln('</HTML>'); 
        
        
        
        
        
        
         
  
} 

function PrintPage(){
 window.print();
}
