﻿var gAutoPrint = true; // Call print function
function printhis()
{
 if (document.getElementById != null)
 {
  var html = '<HTML>\n<HEAD>';
	 
  html += '\n<title>Bupa</title>\n';

  html += '\n<link rel="stylesheet" rev=stylesheet href="/Style Library/includes/en-us/Print.css" media="Print" type="text/css">\n';
  
  html += '\n<link rel="stylesheet" rev=stylesheet href="/Style Library/includes/en-us/Print.css" type="text/css">\n';
  
  html += '\n</HE' + 'AD>\n<BODY>\n';
  
  html += '\n<table border="0" width="100%" class="PrintContainer" align="center"><tr><td>\n';
  html += '\n<div class="PrintLogo"><img alt="Bupa" src="/Style Library/images/en-us/LogoSml.gif" vspace="5"></div>\n';

  var printReadyElem = document.getElementById("printArea");
  
  if (printReadyElem != null)
  {
    html += printReadyElem.innerHTML;
  }
  else
  {
   alert("There is nothing to Print");
   return;
  }
  html += '\n<div class="PrintFtr">(C) Bupa</div>\n';

  html += '\n</td></tr></table>\n';

  html += '\n</BO' + 'DY>\n</HT' + 'ML>';
  
  var printWin = window.open("","printhis");
  printWin.document.open();
  printWin.document.write(html);
  printWin.document.close();
  if (gAutoPrint)
   printWin.print();
 }
 else
 {
  alert("Your Browser Doesn't Support This Feature");
 }
}

