function printDoc() {
  IE7 = (navigator.appVersion.indexOf("MSIE 7.")==-1) ? false : true;

  if (window.print) {
    if (IE7) {
      window.frames("FRAME1").focus();
      window.frames("FRAME1").document.execCommand('print', false, null);
      
      //frames.FRAME1.focus();
      //frames.FRAME1.document.execCommand('print', false, null);
    } else {    
      frames.FRAME1.focus();
      frames.FRAME1.print();
    }
	//document.FRAME1.focus(); 
	//document.FRAME1.print();    
    //print();
  } else {
    alert('Your browser does not support printing from JavaScript.\n' +
          'You will have to use your browser\'s print feature.');
  }
 }
 
 function temp() {

    parent.frames['FRAME3'].focus();
    parent.frames['FRAME3'].print();
  if (window.print) {
    // Clear out array from last use.
    docs = new Array();

    var doc = getDocFilename();


    if (frames.toc.isList(doc) && top.confirm('To print all the subdocuments as well ' +
                                         'as the current one "click" [OK].\n' +
                                         '"Clicking" [Cancel] will print only the ' +
                                         'current document.')) {
      docs[0] = doc;
      alert('Please be patient. Collating many subdocuments will take some time.\n' +
            '"Click" [OK] to continue.');
      frames.toc.getDocList(docs);

      printFolder = true;
      top.frames.printFrame.document.open();
      top.frames.printFrame.document.writeln('<html>');
      top.frames.printFrame.document.writeln('<head>');
      top.frames.printFrame.document.writeln('<link rel=stylesheet type="text/css" href="../../webcodes.css" title="Web Codes">');
      top.frames.printFrame.document.writeln('</head>');
      top.frames.printFrame.document.writeln('<body>');
      top.frames.printFrame.document.write(top.frames.main.document.body.innerHTML);
      docIndex = 1;
      top.frames.main.location = docs[docIndex];
    } else {
//      top.frames.printFrame.focus();
//      top.frames.printFrame.print();
      top.frames.main.focus();
      top.frames.main.print();
    }
  } else {
    alert('Your browser does not support printing from JavaScript.\n' +
          'You will have to use your browser\'s print feature.');
  }
}

