function printView()
{
  var elementId = 'printContent';
  
  var defaultHeader = 
	  '<link rel="stylesheet" href="../css/default.css">' 
	  + '<meta http-equiv="cache-control" content="no-cache">'
      + '<meta http-equiv="pragma" content="no-cache">' 
      + '<meta http-equiv="expires" content="0">' 
      
      + '<script type="text/javascript" src="../js/vtgdb.js" ></script>"';

  var ie    = (document.all) ? true:false;                      // IE4+
  var dom   = (document.getElementById)? true:false;            // Netscape 6, etc.

  if (dom)
  { var printwindow = window.open('','printWindow');
    if (printwindow)
    { 
      if (!ie) {
    	  printwindow.document.open();
      }
      var head = document.getElementsByTagName("head")[0].innerHTML; 	      
      printwindow.document.write('<html>');
      printwindow.document.write('<head>');      
      
      //printwindow.document.write(head);
      printwindow.document.write(defaultHeader);
      printwindow.document.write('</head>');

      var pagecontent = "";
      if (document.getElementById(elementId) != null) {
        pagecontent = document.getElementById(elementId).innerHTML;
      } else {
        pagecontent = document.getElementsByTagName("body")[0].innerHTML;
      }
      
      printwindow.document.writeln("<body>");
      printwindow.document.writeln(pagecontent);
      
      printwindow.document.write("<script type=\"text/javascript\" language=\"JavaScript\">window.print();</script>");
      printwindow.document.write("</body></html>");

      if (ie) {
          printwindow.location.reload();
      } else {        	  
    	  printwindow.document.close();     	  
      }
    }
  }
  else
  { window.print();
  }
}


