  var printHtmlPage = function printPage(printArea, gAutoPrint) {

      if (document.getElementById != null) {
          var html = '<HTML>\n<HEAD>\n<TITLE>\n';
          if (document.getElementsByTagName != null) {
              var titleTags = document.getElementsByTagName("title");
              if (titleTags.length > 0)
                  html += titleTags[0].innerHTML;
          }
          html += '</TITLE>';
          
          html += '<link rel="stylesheet" type="text/css" href="/Content/css/style.css" />';
          html += '<link rel="stylesheet" type="text/css" href="/cBooking/Content/css/layout.css" />\n';
          html += '<link rel="stylesheet" type="text/css" href="/cBooking/Content/css/style.css" />';
          html += '\n</HE' + 'AD>\n<BODY bgcolor="white">\n';
          var printReadyElem = document.getElementById(printArea);

          if (printReadyElem != null) {
              html += printReadyElem.innerHTML;
          }
          else {
              alert("Could not find the printReady section in the HTML");
              return;
          }
          html += '\n</BO' + 'DY>\n</HT' + 'ML>';

          var printWin = window.open("", "printPage", "height=500,width=680,scrollbars=yes");
          printWin.document.open();
          printWin.document.write(html);
          printWin.document.close();
          if (gAutoPrint)
              printWin.print();
      }
      else {
          alert("Sorry, the print ready feature is only available in modern browsers.");
      }
  }

