home *** CD-ROM | disk | FTP | other *** search
/ ftp.americansys.com / 2014.06.ftp.americansys.com.tar / ftp.americansys.com / plott / Practice.exe / 1033 / HTML / 1100 next >
Text File  |  2013-06-22  |  41KB  |  1,029 lines

  1. <HTML XMLNS:IE>
  2. <HEAD>
  3. <TITLE>Print Preview</TITLE>
  4. <?IMPORT NAMESPACE="ie" IMPLEMENTATION="#default">
  5. <STYLE TYPE="text/css">
  6. .lorstyle
  7. {
  8.     background:white;
  9.     margin-top:1in;
  10.     margin-left:1in;
  11.     width:6in;
  12.     height:8in;
  13.     border:dashed 1 gray;
  14. }
  15. .pagestyle
  16.     background:white;
  17.     border-left:1 solid black;
  18.     border-top:1 solid black;
  19.     border-right:2 solid black;
  20.     border-bottom:2 solid black;
  21.     width:8.5in;
  22.     height:11in;
  23.     margin:10px;
  24.     overflow:hidden;
  25.     left:-100in;
  26. }
  27. .headerstyle
  28. {
  29.     position:absolute;
  30.     top:.25in;
  31.     width:6in;
  32.     left:1in;
  33.     font-family: Calibri, Arial, Verdana, Times New Roman, Book Antiqua, Palatino, Serif;
  34.     font-size: 10pt;
  35.     border:dashed 1 gray;
  36. }
  37. .footerstyle
  38. {
  39.     position:absolute;
  40.     top:10.5in;
  41.     width:6in;
  42.     left:1in;
  43.     font-family: Calibri, Arial, Verdana, Times New Roman, Book Antiqua, Palatino, Serif;
  44.     font-size: 10pt;
  45.     border:dashed 1 gray;
  46. }
  47. #ui
  48. {
  49.     height:70px;
  50.     background-color:#cbe0ff;
  51.     margin:0px;
  52.     padding:0px; 
  53.     font-family: Calibri, Arial, Verdana, Times New Roman, Book Antiqua, Palatino, Serif;
  54.     font-size: 12pt;
  55.     filter: progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr=#55BACEE7, endColorstr=#FFE6F0FF);
  56. }
  57. #ui button
  58. {
  59.     height:56px;
  60. }
  61. #ui button, #ui td
  62. {
  63.     color:green;
  64.     font-family: Calibri, Arial, Verdana, Times New Roman, Book Antiqua, Palatino, Serif;
  65.     font-size: 12pt;
  66. }
  67. #zoomcontainer
  68. {
  69.     zoom:100%;
  70.     width:100%;
  71.     position:absolute;
  72. }
  73. #pagecontainer
  74. {
  75.    width:100%;
  76.    overflow:auto; 
  77.    border:none; 
  78.    background-color:#e6f0ff;
  79. }
  80. .mmarker
  81. {
  82.     position:absolute;
  83.     top:100;
  84.     left:100;
  85.     background-color: #d4db8f;
  86. }
  87. </STYLE>
  88. <SCRIPT LANGUAGE="JScript">
  89.     var iNextPageToCreate = 1;
  90.     var oPageStyleClass;
  91.     var oLorStyleClass;
  92.     var oHeaderStyleClass;
  93.     var oFooterStyleClass;
  94.     var oMMarkerClass;
  95.     var sSrcID = null
  96.     var iStartingX;
  97.     var iStartingY;
  98.     var bMoveMMarkerLeft = false;
  99.     var bMoveMMarkerRight = false;
  100.     var bMoveMMarkerTop = false;
  101.     var bMoveMMarkerBottom = false;
  102.     var bMoveMMarkerHead = false;
  103.     var bMoveMMarkerFoot = false;
  104.     var iDeltaX = 0;
  105.     var iDeltaY = 0;
  106.     var fZoomNum = 1;
  107.     var iPixelToInchRatio;
  108.     var oPopup;
  109.     var oPopupBody;
  110.  
  111.     var fMinMarginTop;
  112.     var fMinMarginBottom;
  113.     var adjMarginTop;
  114.     var adjMarginBottom;
  115.     
  116.     var adjHeadMargin = 0;
  117.     var adjFootMargin = 0;
  118.     
  119.     var initPrinterMarginTop = 0;
  120.     var initPrinterMarginBottom = 0;
  121.     var initPrinterMarginLeft = 0;
  122.     var initPrinterMarginRight = 0;
  123.  
  124.     var hasPrompted = false;
  125.  
  126.     function MouseDownHandler() {
  127.         if (event.button != 1) return;
  128.  
  129.         sZoomNum = zoomcontainer.style.zoom;
  130.         sZoomNum = sZoomNum.substring(0, sZoomNum.length - 1);
  131.         iZoomNum = sZoomNum.valueOf(sZoomNum, 10);
  132.         fZoomNum = iZoomNum / 100
  133.         sSrcID = event.srcElement.id;
  134.         iPixelToInchRatio = ratiomarker.offsetLeft;
  135.         
  136.         // (a.walling 2010-06-29 11:16) - PLID 39420 - Handle header/footer margins
  137.         var theText = 0.0;
  138.  
  139.         if (sSrcID == "mmarkerLeft") {
  140.             bMoveMMarkerLeft = true;
  141.             iStartingX = event.x;
  142.             iDeltaX = (mmarkerLeft.offsetLeft - event.x);
  143.             iDeltaY = 0;
  144.  
  145.             oPopup = window.createPopup();
  146.             oPopupBody = oPopup.document.body;
  147.             theText = Math.round((100 * (mmarkerLeft.offsetLeft - 5)) / iPixelToInchRatio) / 100;
  148.             oPopupBody.innerHTML = "Left<br/>" + theText.toFixed(2) + " in";
  149.             oPopupBody.style.backgroundColor = "#ffff66";
  150.             oPopupBody.style.border = "1 solid black";
  151.             oPopupBody.style.fontSize = "12px";
  152.             oPopupBody.style.fontFamily = "Consolas, Courier New";
  153.             oPopup.show(fZoomNum * (mmarkerLeft.offsetLeft + 5), fZoomNum * (mmarkerLeft.offsetTop - 20),60, 32, zoomcontainer);
  154.  
  155.             return;
  156.         }
  157.         if (sSrcID == "mmarkerRight") {
  158.             bMoveMMarkerRight = true;
  159.             iStartingX = event.x;
  160.             iDeltaX = (mmarkerRight.offsetLeft - event.x);
  161.             iDeltaY = 0;
  162.  
  163.             oPopup = window.createPopup();
  164.             oPopupBody = oPopup.document.body;
  165.             theText = Math.round((100 * (mmarkerRight.offsetLeft - 5)) / iPixelToInchRatio) / 100;
  166.             oPopupBody.innerHTML = "Right<br/>" + theText.toFixed(2) + " in";
  167.             oPopupBody.style.backgroundColor = "#ffff66";
  168.             oPopupBody.style.border = "1 solid black";
  169.             oPopupBody.style.fontSize = "12px";
  170.             oPopupBody.style.fontFamily = "Consolas, Courier New";
  171.             oPopup.show(fZoomNum * (mmarkerRight.offsetLeft + 5) - 60, fZoomNum * (mmarkerRight.offsetTop - 20), 60, 32, zoomcontainer);
  172.  
  173.             return;
  174.         }
  175.         if (sSrcID == "mmarkerTop") {
  176.             bMoveMMarkerTop = true;
  177.             iStartingY = event.y;
  178.             iDeltaX = 0;
  179.             iDeltaY = (mmarkerTop.offsetTop - event.y);
  180.  
  181.             oPopup = window.createPopup();
  182.             oPopupBody = oPopup.document.body;
  183.             theText = Math.round((100 * (mmarkerTop.offsetTop - 5)) / iPixelToInchRatio) / 100;
  184.             oPopupBody.innerHTML = "Top<br/>" + theText.toFixed(2) + " in";
  185.             oPopupBody.style.backgroundColor = "#ffff66";
  186.             oPopupBody.style.border = "1 solid black";
  187.             oPopupBody.style.fontSize = "12px";
  188.             oPopupBody.style.fontFamily = "Consolas, Courier New";
  189.             oPopup.show(fZoomNum * (mmarkerTop.offsetLeft + 5) - 70, fZoomNum * (mmarkerTop.offsetTop + 5), 60, 32, zoomcontainer);
  190.  
  191.             return;
  192.         }
  193.         if (sSrcID == "mmarkerBottom") {
  194.             bMoveMMarkerBottom = true;
  195.             iStartingY = event.y;
  196.             iDeltaX = 0;
  197.             iDeltaY = (mmarkerBottom.offsetTop - event.y);
  198.  
  199.             oPopup = window.createPopup();
  200.             oPopupBody = oPopup.document.body;
  201.             theText = Math.round(printer.pageHeight - (100 * (mmarkerBottom.offsetTop - 5)) / iPixelToInchRatio) / 100;
  202.             oPopupBody.innerHTML = "Bottom<br/>" + theText.toFixed(2) + " in";
  203.             oPopupBody.style.backgroundColor = "#ffff66";
  204.             oPopupBody.style.border = "1 solid black";
  205.             oPopupBody.style.fontSize = "12px";
  206.             oPopupBody.style.fontFamily = "Consolas, Courier New";
  207.             oPopup.show(fZoomNum * (mmarkerTop.offsetLeft + 5) - 70, fZoomNum * (mmarkerBottom.offsetTop) - 10, 60, 32, zoomcontainer);
  208.  
  209.             return;
  210.         }
  211.         if (sSrcID == "mmarkerHead") {
  212.             bMoveMMarkerHead = true;
  213.             iStartingY = event.y;
  214.             iDeltaX = 0;
  215.             iDeltaY = (mmarkerHead.offsetTop - event.y);
  216.  
  217.             oPopup = window.createPopup();
  218.             oPopupBody = oPopup.document.body;
  219.             theText = Math.round((100 * (mmarkerHead.offsetTop - 5)) / iPixelToInchRatio) / 100;
  220.             oPopupBody.innerHTML = "Header<br/>" + theText.toFixed(2) + " in";
  221.             oPopupBody.style.backgroundColor = "#ffff66";
  222.             oPopupBody.style.border = "1 solid black";
  223.             oPopupBody.style.fontSize = "12px";
  224.             oPopupBody.style.fontFamily = "Consolas, Courier New";
  225.             oPopup.show(fZoomNum * (mmarkerTop.offsetLeft + 5) - 70, fZoomNum * (mmarkerHead.offsetTop + 5), 60, 32, zoomcontainer);
  226.  
  227.             return;
  228.         }
  229.         if (sSrcID == "mmarkerFoot") {
  230.             bMoveMMarkerFoot = true;
  231.             iStartingY = event.y;
  232.             iDeltaX = 0;
  233.             iDeltaY = (mmarkerFoot.offsetTop - event.y);
  234.  
  235.             oPopup = window.createPopup();
  236.             oPopupBody = oPopup.document.body;
  237.             theText = Math.round(printer.pageHeight - (100 * (mmarkerFoot.offsetTop - 5)) / iPixelToInchRatio) / 100;
  238.             oPopupBody.innerHTML = "Footer<br/>" + theText.toFixed(2) + " in";
  239.             oPopupBody.style.backgroundColor = "#ffff66";
  240.             oPopupBody.style.border = "1 solid black";
  241.             oPopupBody.style.fontSize = "12px";
  242.             oPopupBody.style.fontFamily = "Consolas, Courier New";
  243.             oPopup.show(fZoomNum * (mmarkerTop.offsetLeft + 5) - 70, fZoomNum * (mmarkerFoot.offsetTop) - 10, 60, 32, zoomcontainer);
  244.  
  245.             return;
  246.         }
  247.  
  248.         sSrcID = null;
  249.     }
  250.  
  251.     function MouseMoveHandler() {
  252.         iPixelToInchRatio = ratiomarker.offsetLeft;
  253.         fZoomCompensationX = (event.x - iStartingX) * (1 / fZoomNum - 1);
  254.         fZoomCompensationY = (event.y - iStartingY) * (1 / fZoomNum - 1);
  255.  
  256.         // (a.walling 2010-06-29 11:16) - PLID 39420 - Handle header/footer margins        
  257.         var theText = 0.0;
  258.  
  259.         if (bMoveMMarkerLeft) {
  260.             if (event.x + iDeltaX + fZoomCompensationX >= mmarkerRight.offsetLeft - 10) return false;
  261.             if (event.x + iDeltaX + fZoomCompensationX <= iPixelToInchRatio * printer.unprintableLeft / 100 + 5) return false;
  262.             mmarkerLeft.style.left = event.x + iDeltaX + fZoomCompensationX;
  263.             theText = Math.round((100 * (mmarkerLeft.offsetLeft - 5)) / iPixelToInchRatio) / 100;
  264.             oPopupBody.innerHTML = "Left<br/>" + theText.toFixed(2) + " in";
  265.         }
  266.         else if (bMoveMMarkerRight) {
  267.             if (event.x + iDeltaX + fZoomCompensationX >= iPixelToInchRatio * (printer.pageWidth - printer.unprintableRight) / 100 + 5) return false;
  268.             if (event.x + iDeltaX + fZoomCompensationX <= mmarkerLeft.offsetLeft + 10) return false;
  269.             mmarkerRight.style.pixelLeft = event.x + iDeltaX + fZoomCompensationX;
  270.             theText = Math.round((printer.pageWidth - (100 * (mmarkerRight.offsetLeft - 5)) / iPixelToInchRatio)) / 100;
  271.             oPopupBody.innerHTML = "Right<br/>" + theText.toFixed(2) + " in";
  272.         }
  273.         else if (bMoveMMarkerTop) {
  274.             if (event.y + iDeltaY + fZoomCompensationY >= mmarkerBottom.offsetTop - 10) return false;
  275.             if (event.y + iDeltaY + fZoomCompensationY <= mmarkerHead.offsetTop + 10) return false;
  276.             mmarkerTop.style.pixelTop = event.y + iDeltaY + fZoomCompensationY;
  277.             theText = Math.round((100 * (mmarkerTop.offsetTop - 5)) / iPixelToInchRatio) / 100;
  278.             oPopupBody.innerHTML = "Top<br/>" + theText.toFixed(2) + " in";
  279.         }
  280.         else if (bMoveMMarkerBottom) {
  281.             if (event.y + iDeltaY + fZoomCompensationY >= mmarkerFoot.offsetTop - 10) return false;
  282.             if (event.y + iDeltaY + fZoomCompensationY <= mmarkerTop.offsetTop + 10) return false;
  283.             mmarkerBottom.style.pixelTop = event.y + iDeltaY + fZoomCompensationY;
  284.             theText = Math.round((printer.pageHeight - (100 * (mmarkerBottom.offsetTop - 5)) / iPixelToInchRatio)) / 100;
  285.             oPopupBody.innerHTML = "Bottom<br/>" + theText.toFixed(2) + " in";
  286.         }
  287.         else if (bMoveMMarkerHead) {
  288.             if (event.y + iDeltaY + fZoomCompensationY >= mmarkerBottom.offsetTop - 10) return false;
  289.             if (event.y + iDeltaY + fZoomCompensationY <= iPixelToInchRatio * printer.unprintableTop / 100 + 5) return false;
  290.             mmarkerHead.style.pixelTop = event.y + iDeltaY + fZoomCompensationY;
  291.             theText = Math.round((100 * (mmarkerHead.offsetTop - 5)) / iPixelToInchRatio) / 100;
  292.             oPopupBody.innerHTML = "Header<br/>" + theText.toFixed(2) + " in";
  293.         }
  294.         else if (bMoveMMarkerFoot) {
  295.             if (event.y + iDeltaY + fZoomCompensationY >= iPixelToInchRatio * (printer.pageHeight - printer.unprintableBottom) / 100 + 5) return false;
  296.             if (event.y + iDeltaY + fZoomCompensationY <= mmarkerTop.offsetTop + 10) return false;
  297.             mmarkerFoot.style.pixelTop = event.y + iDeltaY + fZoomCompensationY;
  298.             theText = Math.round((printer.pageHeight - (100 * (mmarkerFoot.offsetTop - 5)) / iPixelToInchRatio)) / 100;
  299.             oPopupBody.innerHTML = "Footer<br/>" + theText.toFixed(2) + " in";
  300.         }
  301.  
  302.         return false;
  303.     }
  304.  
  305.     function MouseUpHandler() {
  306.         if (!sSrcID) return;
  307.  
  308.         iPixelToInchRatio = ratiomarker.offsetLeft;
  309.  
  310.         // (a.walling 2010-06-29 11:16) - PLID 39420 - Handle header/footer margins
  311.         try {
  312.             switch (sSrcID) {
  313.                 case "mmarkerLeft":
  314.                     printer.marginLeft = 100 * (mmarkerLeft.offsetLeft - 5) / iPixelToInchRatio;
  315.                     oPopup.hide();
  316.                     break;
  317.  
  318.                 case "mmarkerRight":
  319.                     printer.marginRight = printer.pageWidth - (100 * (mmarkerRight.offsetLeft - 5) / iPixelToInchRatio);
  320.                     oPopup.hide();
  321.                     break;
  322.  
  323.                 case "mmarkerTop":
  324.                     printer.marginTop = (100 * (mmarkerTop.offsetTop - 5) / iPixelToInchRatio) - adjHeadMargin;
  325.                     oPopup.hide();
  326.                     break;
  327.  
  328.                 case "mmarkerBottom":
  329.                     printer.marginBottom = (printer.pageHeight - (100 * (mmarkerBottom.offsetTop - 5) / iPixelToInchRatio)) - adjFootMargin;
  330.                     oPopup.hide();
  331.                     break;
  332.  
  333.                 case "mmarkerHead":
  334.                     adjHeadMargin = (100 * (mmarkerHead.offsetTop - 5) / iPixelToInchRatio) - printer.unprintableTop;
  335.                     oPopup.hide();
  336.                     break;
  337.  
  338.                 case "mmarkerFoot":
  339.                     adjFootMargin = (printer.pageHeight - (100 * (mmarkerFoot.offsetTop - 5) / iPixelToInchRatio)) - printer.unprintableBottom;
  340.                     oPopup.hide();
  341.                     break;
  342.                     
  343.                 default:
  344.                     return;
  345.                     break;
  346.             }
  347.         } catch (err) {
  348.         }
  349.         
  350.         try {        
  351.             oPopup.hide();
  352.             
  353.             InitClasses();
  354.             InitMMarkers();
  355.             iDeltaX = 0;
  356.             iDeltaY = 0;
  357.             bMoveMMarkerLeft = false;
  358.             bMoveMMarkerRight = false;
  359.             bMoveMMarkerTop = false;
  360.             bMoveMMarkerBottom = false;
  361.             bMoveMMarkerHead = false;
  362.             bMoveMMarkerFoot = false;
  363.  
  364.             sSrcID = null;
  365.         } catch (err) {        
  366.         }
  367.     }
  368.  
  369.     function FindStyleRule(styleName) {
  370.         for (i = 0; i < document.styleSheets.length; i++) {
  371.             for (j = 0; j < document.styleSheets(i).rules.length; j++) {
  372.                 if (document.styleSheets(i).rules(j).selectorText == styleName)
  373.                     return document.styleSheets(i).rules(j);
  374.             }
  375.         }
  376.     }
  377.  
  378.     function InitClasses() {
  379.         oPageStyleClass.style.width = printer.pageWidth / 100 + "in";
  380.         oPageStyleClass.style.height = printer.pageHeight / 100 + "in";
  381.  
  382.         adjMarginTop = printer.marginTop;
  383.         adjMarginBottom = printer.marginBottom;
  384.  
  385.         if (adjMarginTop < fMinMarginTop) {
  386.             adjMarginTop = fMinMarginTop;
  387.         }
  388.  
  389.         if (adjMarginBottom < fMinMarginBottom) {
  390.             adjMarginBottom = fMinMarginBottom;
  391.         }
  392.  
  393.         adjMarginTop += printer.unprintableTop;
  394.         adjMarginBottom += printer.unprintableBottom;
  395.  
  396.         // (a.walling 2010-06-29 11:16) - PLID 39420 - Handle header/footer margins        
  397.         adjMarginTop += adjHeadMargin;
  398.         adjMarginBottom += adjFootMargin;
  399.         
  400.         oLorStyleClass.style.marginTop = adjMarginTop / 100 + "in";
  401.         oLorStyleClass.style.marginLeft = printer.marginLeft / 100 + "in";
  402.         oLorStyleClass.style.width = (printer.pageWidth - (printer.marginLeft + printer.marginRight)) / 100 + "in";
  403.         oLorStyleClass.style.height = (printer.pageHeight - (adjMarginTop + adjMarginBottom)) / 100 + "in";
  404.         oHeaderStyleClass.style.left = printer.marginLeft / 100 + "in";
  405.         oHeaderStyleClass.style.top = printer.unprintableTop / 100 + "in";
  406.         oHeaderStyleClass.style.width = oLorStyleClass.style.width;
  407.         oFooterStyleClass.style.left = printer.marginLeft / 100 + "in";
  408.         oFooterStyleClass.style.width = oLorStyleClass.style.width;
  409.         oFooterStyleClass.style.top = null;
  410.         oFooterStyleClass.style.bottom = printer.unprintableBottom / 100 + "in";
  411.         
  412.         oHeaderStyleClass.style.marginTop = adjHeadMargin / 100 + "in";
  413.         oFooterStyleClass.style.marginBottom = adjFootMargin / 100 + "in";
  414.     }
  415.  
  416.     // (a.walling 2009-11-23 12:08) - PLID 36395 - Global array for all document sources + header/footer information
  417.     var allDocuments;
  418.     var currentDocumentIndex;
  419.     var lastCreatedInitialLayoutRectDocumentIndex;
  420.     
  421.     // (a.walling 2010-06-30 09:27) - PLID 39421 - Save initial printer margins and restore saved
  422.     function InitPrinter() {            
  423.         initPrinterMarginTop = printer.marginTop;
  424.         initPrinterMarginBottom = printer.marginBottom;
  425.         initPrinterMarginLeft = printer.marginLeft;
  426.         initPrinterMarginRight = printer.marginRight;
  427.         
  428.         try {
  429.             var wshShell = new ActiveXObject("WScript.Shell");
  430.             var valueString = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\NexTech\\Practice\\Settings\\NxPrintTemplateHeaderMargins");
  431.             var values = valueString.split(";");
  432.             if (values.length == 2) {
  433.                 try {
  434.                     adjHeadMargin = parseFloat(values[0]);
  435.                     adjFootMargin = parseFloat(values[1]);
  436.                 } catch (err) {
  437.                 }            
  438.             }        
  439.         } catch (err) {
  440.         }    
  441.         
  442.         try {
  443.             var wshShell = new ActiveXObject("WScript.Shell");
  444.             var valueString = wshShell.RegRead("HKEY_CURRENT_USER\\Software\\NexTech\\Practice\\Settings\\NxPrintTemplatePageMargins");
  445.             var values = valueString.split(";");
  446.             if (values.length == 4) {
  447.                 try {
  448.                     printer.marginTop = parseFloat(values[0]);
  449.                     printer.marginBottom = parseFloat(values[1]);
  450.                     printer.marginLeft = parseFloat(values[2]);
  451.                     printer.marginRight = parseFloat(values[3]);
  452.                 } catch (err) {
  453.                 }            
  454.             }        
  455.         } catch (err) {
  456.         }    
  457.     }
  458.  
  459.     function Init() {
  460.         lastCreatedInitialLayoutRectDocumentIndex = -1;
  461.         currentDocumentIndex = 0;
  462.         
  463.         InitPrinter();
  464.  
  465.         // (a.walling 2009-11-23 12:09) - PLID 36395 - This special tag will be replaced by the document definition generated by the host
  466.  
  467.         //{{NXDOCUMENTDEFINTION}}//
  468.  
  469.         allDocuments.layoutComplete = false;
  470.         
  471.         document.attachEvent("onmousedown", MouseDownHandler);
  472.         document.attachEvent("onmouseup", MouseUpHandler);
  473.         document.attachEvent("onmousemove", MouseMoveHandler);
  474.         mmarkerLeft.attachEvent("onmousemove", MouseMoveHandler);
  475.         mmarkerRight.attachEvent("onmousemove", MouseMoveHandler);
  476.         mmarkerTop.attachEvent("onmousemove", MouseMoveHandler);
  477.         mmarkerBottom.attachEvent("onmousemove", MouseMoveHandler);
  478.         mmarkerHead.attachEvent("onmousemove", MouseMoveHandler);
  479.         mmarkerFoot.attachEvent("onmousemove", MouseMoveHandler);
  480.  
  481.         AddFirstPage();
  482.  
  483.         zoomcontainer.style.zoom = "100%";
  484.         ui.style.width = document.body.clientWidth;
  485.         //ui.style.height = "60px";
  486.         //the height may change if the screen is too narrow and the ui buttons require two rows,
  487.         //so use the offset height.
  488.         pagecontainer.style.height = document.body.clientHeight - ui.offsetHeight;
  489.  
  490.         oPageStyleClass = FindStyleRule(".pagestyle");
  491.         oLorStyleClass = FindStyleRule(".lorstyle");
  492.         oHeaderStyleClass = FindStyleRule(".headerstyle");
  493.         oFooterStyleClass = FindStyleRule(".footerstyle");
  494.         oMMarkerClass = FindStyleRule(".mmarker");
  495.  
  496.         InitClasses();
  497.         InitMMarkers();
  498.  
  499.         oMMarkerClass.style.display = "none";
  500.         oLorStyleClass.style.border = "dashed 1 white";
  501.         oHeaderStyleClass.style.border = "dashed 1 white";
  502.         oFooterStyleClass.style.border = "dashed 1 white";
  503.         marginbutton.value = "Show Margins";
  504.     }
  505.  
  506.     function InitMMarkers() {
  507.         mmarkerLeft.style.top = oLorStyleClass.style.marginTop;
  508.         mmarkerRight.style.top = oLorStyleClass.style.marginTop;
  509.         mmarkerLeft.style.left = oLorStyleClass.style.marginLeft;
  510.         mmarkerRight.style.left = (printer.pageWidth - printer.marginRight) / 100 + "in";
  511.         mmarkerTop.style.top = oLorStyleClass.style.marginTop;
  512.         mmarkerBottom.style.top = (printer.pageHeight - adjMarginBottom) / 100 + "in";
  513.         mmarkerTop.style.left = oLorStyleClass.style.marginLeft;
  514.         mmarkerBottom.style.left = oLorStyleClass.style.marginLeft;
  515.         
  516.         mmarkerHead.style.top = (printer.unprintableTop + adjHeadMargin) / 100 + "in";
  517.         mmarkerFoot.style.top = (printer.pageHeight - ((printer.unprintableBottom + adjFootMargin))) / 100 + "in";
  518.         mmarkerHead.style.left = oLorStyleClass.style.marginLeft;
  519.         mmarkerFoot.style.left = oLorStyleClass.style.marginLeft;
  520.  
  521.         mmarkerLeft.style.pixelTop -= 2;
  522.         mmarkerLeft.style.pixelLeft += 6;
  523.         mmarkerRight.style.pixelTop -= 2;
  524.         mmarkerRight.style.pixelLeft += 5;
  525.         mmarkerTop.style.pixelTop += 6;
  526.         mmarkerTop.style.pixelLeft -= 2;
  527.         mmarkerBottom.style.pixelTop += 5;
  528.         mmarkerBottom.style.pixelLeft -= 2;
  529.         
  530.         mmarkerHead.style.pixelTop += 6;
  531.         mmarkerHead.style.pixelLeft -= 2;
  532.         mmarkerFoot.style.pixelTop += 5;
  533.         mmarkerFoot.style.pixelLeft -= 2;
  534.     }
  535.  
  536.     function CheckPrint() {
  537.         switch (dialogArguments.__IE_PrintType) {
  538.             case "Prompt":
  539.                 if (hasPrompted) {
  540.                     break;
  541.                 }
  542.                 hasPrompted = true;
  543.                 if (printer.showPrintDialog()) {
  544.                     PrintPrep();
  545.                 } else {
  546.                     window.close();
  547.                 }
  548.                 break;
  549.             case "NoPrompt":
  550.                 if (hasPrompted) {
  551.                     break;
  552.                 }
  553.                 hasPrompted = true;
  554.                 PrintPrep();
  555.                 break;
  556.             case "Preview":
  557.             default:
  558.                 break;
  559.         }
  560.     }
  561.  
  562.     function PrintPrep() {
  563.         if (oLorStyleClass.style.border = "dashed 1 gray") reset = true;
  564.         oLorStyleClass.style.border = "dashed 1 white";
  565.         oHeaderStyleClass.style.border = "dashed 1 white";
  566.         oFooterStyleClass.style.border = "dashed 1 white";
  567.  
  568.         if (layoutrect1.contentDocument.readyState == "complete") {
  569.             // This block will be called when printing with user prompt
  570.             // because the Print dialog box gives time for the content
  571.             // document to complete loading
  572.             layoutrect1.contentDocument.onreadystatechange = null;
  573.             PrintNow();
  574.         }
  575.         else {
  576.             // This block will usually be called when printing w/o user prompt
  577.             // and sets an event handler that listens for the loading of the content
  578.             // document before printing. Sometimes, however, the content document
  579.             // will be loaded in time for the previous block to execute
  580.             layoutrect1.contentDocument.onreadystatechange = PrintWhenContentDocComplete;
  581.         }
  582.  
  583.         if (reset) { 
  584.             oLorStyleClass.style.border = "dashed 1 gray";
  585.             oHeaderStyleClass.style.border = "dashed 1 gray";
  586.             oFooterStyleClass.style.border = "dashed 1 gray";
  587.         }
  588.     }
  589.  
  590.     function PrintWhenContentDocComplete() {
  591.         if (layoutrect1.contentDocument.readyState == "complete") {
  592.             layoutrect1.contentDocument.onreadystatechange = null;
  593.             PrintNow();
  594.         }
  595.     }
  596.  
  597.     function PrintNow() {
  598.         if (layoutrect1.contentDocument.readyState != "complete") {
  599.             layoutrect1.contentDocument.onreadystatechange = PrintWhenContentDocComplete;
  600.         }
  601.         else {            
  602.             layoutrect1.contentDocument.onreadystatechange = null
  603.             InitClasses();
  604.             InitMMarkers();
  605.             var startPage;
  606.             var endPage;
  607.             var oDeviceRectCollection = document.all.tags("DEVICERECT");
  608.  
  609.             if (dialogArguments.__IE_PrintType == "NoPrompt" || printer.selectedPages == false) {
  610.                 startPage = 1;
  611.                 endPage = oDeviceRectCollection.length;
  612.             }
  613.             else if (printer.currentPage == true) {
  614.                 alert("For safety reasons, printing the current page is disabled. Please manually enter a page range or print the entire document.");
  615.                 return;
  616.             }
  617.             else {
  618.                 startPage = printer.pageFrom;
  619.                 endPage = printer.pageTo;
  620.                 if (startPage > endPage) {
  621.                     alert("Error: Start page greater than end page");
  622.                     return;
  623.                 }
  624.                 if (startPage > oDeviceRectCollection.length) {
  625.                     alert("Error: Start page greater than number of pages in print job.");
  626.                     return;
  627.                 }
  628.                 if (endPage > oDeviceRectCollection.length) {
  629.                     alert("Warning: End page greater than number of pages in print job. Continuing Print Job.");
  630.                     endPage = oDeviceRectCollection.length;
  631.                 }
  632.             }
  633.  
  634.             try {
  635.                 printer.startDoc("Printing NexTech Practice EMR Document...");
  636.  
  637.                 for (i = startPage - 1; i < endPage; i++)
  638.                     printer.printPage(oDeviceRectCollection[i]);
  639.  
  640.                 printer.stopDoc();
  641.  
  642.                 window.close();
  643.             } catch (err) {
  644.                 alert("Document could not be printed! (" + err.description + ")");
  645.             }
  646.         }
  647.     }
  648.  
  649.     function AddFirstPage() {
  650.         // (a.walling 2009-11-23 12:09) - PLID 36395 - Use the first document definition's source (may be 'document' for current displayed document)
  651.         
  652.         newHTML = "<IE:DEVICERECT ID='page1' MEDIA='print' CLASS='pagestyle'>";
  653.         newHTML += "<IE:LAYOUTRECT ID='layoutrect1' CONTENTSRC='" + allDocuments[currentDocumentIndex].source + "' ONLAYOUTCOMPLETE='OnRectComplete()' NEXTRECT='layoutrect2' CLASS='lorstyle'/>";
  654.         newHTML += "</IE:DEVICERECT>";
  655.  
  656.         // (a.walling 2009-11-23 12:10) - PLID 36395 - And keep track of the last document for which we have created the initial layout rect
  657.         lastCreatedInitialLayoutRectDocumentIndex = currentDocumentIndex;
  658.  
  659.         zoomcontainer.insertAdjacentHTML("afterBegin", newHTML);
  660.  
  661.         headfoot.textHead = printer.header;
  662.         headfoot.textFoot = printer.footer;
  663.         headfoot.url = dialogArguments.__IE_BrowseDocument.URL;
  664.         headfoot.title = dialogArguments.__IE_BrowseDocument.title;
  665.         headfoot.page = 1;
  666.         AddHeaderAndFooterToPage(1);
  667.  
  668.         iNextPageToCreate = 2;
  669.     }
  670.  
  671.     function OnRectComplete() {
  672.         if (event.contentOverflow == true) {
  673.             AddNewPage();
  674.         } else {
  675.             if (allDocuments.layoutComplete) {
  676.                 // (a.walling 2009-11-23 12:10) - PLID 36395 - the last document in our set, fix up the page totals and etc and print if necessary
  677.                 headfoot.pageTotal = document.all.tags("DEVICERECT").length;
  678.  
  679.                 AddPageTotalToPages();
  680.  
  681.                 ShowFilledPagesAndHideExcessPages();
  682.  
  683.                 setTimeout("CheckPrint();", 100);
  684.             } else if (currentDocumentIndex == (allDocuments.length - 1)) {
  685.                 // (a.walling 2009-11-23 12:10) - PLID 36395 - the last document in our set, fix up the page totals and etc and print if necessary
  686.                 headfoot.pageTotal = document.all.tags("DEVICERECT").length;
  687.  
  688.                 AddPageTotalToPages();
  689.  
  690.                 ShowFilledPagesAndHideExcessPages();
  691.  
  692.                 allDocuments.layoutComplete = true;
  693.                 //TES 5/18/2012 - PLID 50509 - We still need to know what document we're on, there may still be more pages to print
  694.                 //currentDocumentIndex = 0;
  695.                 lastCreatedInitialLayoutRectDocumentIndex = -1;
  696.  
  697.                 setTimeout("CheckPrint();", 100);
  698.             } else {
  699.                 // (a.walling 2009-11-23 12:10) - PLID 36395 - There are other documents; so process the next one
  700.                 currentDocumentIndex = currentDocumentIndex + 1;
  701.                 AddNewPage();
  702.             }
  703.         }
  704.     }
  705.  
  706.     function OnRectCompleteSimple() {
  707.         if (event.contentOverflow == true) {
  708.             return;
  709.         }
  710.         if (currentDocumentIndex == (allDocuments.length - 1)) {
  711.             // (a.walling 2009-11-23 12:10) - PLID 36395 - the last document in our set, fix up the page totals
  712.             headfoot.pageTotal = parseInt(event.srcElement.parentElement.id.substring(4), 10);
  713.  
  714.             AddPageTotalToPages();
  715.  
  716.             ShowFilledPagesAndHideExcessPages();
  717.  
  718.             allDocuments.layoutComplete = true;
  719.             //TES 5/18/2012 - PLID 50509 - We still need to know what document we're on, there may still be more pages to print
  720.             //currentDocumentIndex = 0;
  721.             lastCreatedInitialLayoutRectDocumentIndex = -1;
  722.         }
  723.     }
  724.  
  725.     function ShowFilledPagesAndHideExcessPages() {
  726.         
  727.         for (i = 1; i <= headfoot.pageTotal; i++)
  728.             document.all("page" + i).style.position = "static";
  729.  
  730.         var i = headfoot.pageTotal + 1;
  731.  
  732.         while (document.all("page" + i)) {
  733.             document.all("page" + i).style.position = "absolute";
  734.             i++;
  735.         }
  736.     }
  737.  
  738.     function AddHeaderAndFooterToPage(pageNum) {
  739.         // (a.walling 2009-11-23 12:10) - PLID 36395 - Use the header and footer information for the current document
  740.         var newHeader = allDocuments[currentDocumentIndex].header;
  741.         var newFooter = allDocuments[currentDocumentIndex].footer;
  742.  
  743.         // (a.walling 2009-09-24 10:11) - PLID 33531 - use a global regular expression to replace all occurrences. a string or non-global regexp will only replace the first occurence.
  744.         var modHeader = newHeader.replace(/\{\{NXPAGENUM\}\}/gm, pageNum);
  745.  
  746.         var modFooter = newFooter.replace(/\{\{NXPAGENUM\}\}/gm, pageNum);
  747.  
  748.         document.all("page" + pageNum).insertAdjacentHTML("afterBegin", modHeader);
  749.         document.all("page" + pageNum).insertAdjacentHTML("beforeEnd", modFooter);
  750.  
  751.         if (!fMinMarginTop) {
  752.             if (ratiomarker) {
  753.                 iPixelToInchRatio = ratiomarker.offsetLeft;
  754.                 if (nxheader) {
  755.                     fMinMarginTop = Math.round((100 * (nxheader.offsetHeight)) / iPixelToInchRatio);
  756.                 } else {
  757.                     fMinMarginTop = 0;
  758.                 }
  759.             }
  760.         }
  761.  
  762.         if (!fMinMarginBottom) {
  763.             if (ratiomarker) {
  764.                 iPixelToInchRatio = ratiomarker.offsetLeft;
  765.                 if (nxfooter) {
  766.                     fMinMarginBottom = Math.round((100 * (nxfooter.offsetHeight)) / iPixelToInchRatio);
  767.                 } else {
  768.                     fMinMarginBottom = 0;
  769.                 }
  770.             }
  771.         }
  772.     }
  773.  
  774.     function AddNewPage() {
  775.         document.all("layoutrect" + (iNextPageToCreate - 1)).onlayoutcomplete = OnRectCompleteSimple;
  776.         headfoot.page = iNextPageToCreate;
  777.         newContentSource = "";
  778.  
  779.         // (a.walling 2009-11-23 12:10) - PLID 36395 - The new content source may be blank if we are simply adding a new page to an existing document.
  780.         // However, if we are now printing a new document, we need to create the initial layout rect with the contentsrc explitly defined
  781.         if (lastCreatedInitialLayoutRectDocumentIndex != currentDocumentIndex && !allDocuments.layoutComplete) {
  782.             newContentSource = "CONTENTSRC = '" + allDocuments[currentDocumentIndex].source + "' ";
  783.             
  784.             lastCreatedInitialLayoutRectDocumentIndex = currentDocumentIndex;
  785.         }
  786.         newHTML = "<IE:DEVICERECT ID='page" + iNextPageToCreate + "' MEDIA='print' CLASS='pagestyle'>";
  787.         newHTML += "<IE:LAYOUTRECT ID='layoutrect" + iNextPageToCreate + "' " + newContentSource + "ONLAYOUTCOMPLETE='OnRectComplete()' NEXTRECT='layoutrect" + (iNextPageToCreate + 1) + "'  CLASS='lorstyle'/>";
  788.         newHTML += "</IE:DEVICERECT>";        
  789.  
  790.         zoomcontainer.insertAdjacentHTML("beforeEnd", newHTML);
  791.         AddHeaderAndFooterToPage(iNextPageToCreate);
  792.         headfoot.pageTotal = iNextPageToCreate;
  793.         iNextPageToCreate++;
  794.     }
  795.  
  796.     function AddPageTotalToPages() {
  797.         oSpanCollection = document.all.tags("span");
  798.         for (i = 0; i < oSpanCollection.length; i++) {
  799.             if (oSpanCollection[i].className == "hfPageTotal")
  800.                 oSpanCollection[i].innerText = headfoot.pageTotal;
  801.         }
  802.     }
  803.  
  804.     function ResizeApp() {
  805.         ui.style.width = document.body.clientWidth;
  806.         if (document.body.clientHeight - ui.offsetHeight > 0) {
  807.             pagecontainer.style.height = document.body.clientHeight - ui.offsetHeight;
  808.         } else {
  809.             pagecontainer.style.height = document.body.clientHeight;
  810.         }
  811.     }
  812.  
  813.     function Zoomer(string) {
  814.         if (string == "in") {
  815.             currZoom = zoomcontainer.style.zoom;
  816.             currZoom = currZoom.substring(0, currZoom.length - 1);
  817.             currZoom = parseInt(currZoom, 10);
  818.             newZoom = currZoom + 5;
  819.  
  820.             if (newZoom > 10000) return;
  821.  
  822.             zoomcontainer.style.zoom = newZoom + "%";
  823.             zoomnumber.value = newZoom;
  824.         }
  825.         else if (string == "out") {
  826.             currZoom = zoomcontainer.style.zoom;
  827.             currZoom = currZoom.substring(0, currZoom.length - 1);
  828.             currZoom = parseInt(currZoom, 10);
  829.             newZoom = currZoom - 5;
  830.  
  831.             if (newZoom < 1) newZoom = 1;
  832.  
  833.             zoomcontainer.style.zoom = newZoom + "%";
  834.             zoomnumber.value = newZoom;
  835.         }
  836.         else {
  837.             if (event.srcElement.id != "zoomnumber") return;
  838.             if (event.keyCode != 13) return;
  839.  
  840.             var newZoom = zoomnumber.value;
  841.             numValue = parseInt(newZoom, 10);
  842.  
  843.             if (numValue != newZoom) return;
  844.             if (newZoom > 10000) return;
  845.             if (newZoom < 1) return;
  846.  
  847.             zoomcontainer.style.zoom = newZoom + "%";
  848.         }
  849.     }
  850.  
  851.     function DoPageSetup() {
  852.         printer.showPageSetupDialog();
  853.         InitClasses();
  854.         InitMMarkers();
  855.     }
  856.  
  857.     function DoPrintFromPreview() {
  858.         if (printer.showPrintDialog()) {
  859.             PrintPrep();
  860.         }
  861.     }
  862.  
  863.     function ShowHideMargins() {
  864.         if (marginbutton.value == "Show Margins") {
  865.             oMMarkerClass.style.display = "block";
  866.             oLorStyleClass.style.border = "dashed 1 gray";
  867.             oHeaderStyleClass.style.border = "dashed 1 gray";
  868.             oFooterStyleClass.style.border = "dashed 1 gray";
  869.             marginbutton.value = "Hide Margins";
  870.         }
  871.         else {
  872.             oMMarkerClass.style.display = "none";
  873.             oLorStyleClass.style.border = "dashed 1 white";
  874.             oHeaderStyleClass.style.border = "dashed 1 white";
  875.             oFooterStyleClass.style.border = "dashed 1 white";
  876.             marginbutton.value = "Show Margins";
  877.         }
  878.     }
  879.  
  880.     // (a.walling 2010-06-30 09:27) - PLID 39421 - Save header and page margins
  881.     function PersistMargins() {
  882.         PersistHeaderMargins();
  883.         PersistPageMargins();
  884.         
  885.         alert("Margins have been saved.");
  886.     }
  887.     
  888.     function PersistHeaderMargins() {
  889.         try {
  890.             var initValues=[printer.unprintableTop, printer.unprintableBottom];            
  891.             var values=[adjHeadMargin, adjFootMargin];
  892.             
  893.             var initValueString = initValues.join(";");
  894.             var valueString = values.join(";");
  895.             
  896.             if (initValueString == valueString) {
  897.                 SafeClearHeaderMargins();
  898.                 return;
  899.             }
  900.             
  901.             var wshShell = new ActiveXObject("WScript.Shell");
  902.             wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\NexTech\\Practice\\Settings\\NxPrintTemplateHeaderMargins", values.join(";"), "REG_SZ");
  903.             
  904.         } catch (err) {
  905.             alert(err.description);
  906.         }
  907.     }
  908.     
  909.     function PersistPageMargins() {
  910.         try {
  911.             var initValues=[initPrinterMarginTop, initPrinterMarginBottom, initPrinterMarginLeft, initPrinterMarginRight];
  912.             var values=[printer.marginTop, printer.marginBottom, printer.marginLeft, printer.marginRight];
  913.             
  914.             var initValueString = initValues.join(";");
  915.             var valueString = values.join(";");
  916.             
  917.             if (initValueString == valueString) {
  918.                 SafeClearPageMargins();
  919.                 return;
  920.             }
  921.             
  922.             var wshShell = new ActiveXObject("WScript.Shell");
  923.             wshShell.RegWrite("HKEY_CURRENT_USER\\Software\\NexTech\\Practice\\Settings\\NxPrintTemplatePageMargins", values.join(";"), "REG_SZ");
  924.             
  925.         } catch (err) {
  926.             alert(err.description);
  927.         }
  928.     }
  929.     
  930.     function SafeClearPageMargins() {
  931.         try {
  932.             var wshShell = new ActiveXObject("WScript.Shell");
  933.             wshShell.RegDelete("HKEY_CURRENT_USER\\Software\\NexTech\\Practice\\Settings\\NxPrintTemplatePageMargins");
  934.         } catch (err) {
  935.         }
  936.     }
  937.     
  938.     function SafeClearHeaderMargins() {
  939.         try {
  940.             var wshShell = new ActiveXObject("WScript.Shell");
  941.             wshShell.RegDelete("HKEY_CURRENT_USER\\Software\\NexTech\\Practice\\Settings\\NxPrintTemplateHeaderMargins");
  942.         } catch (err) {
  943.         }
  944.     }
  945.     
  946.     function ResetMargins() {
  947.         try {
  948.             adjHeadMargin = 0;
  949.             adjFootMargin = 0;
  950.             printer.marginTop = initPrinterMarginTop;
  951.             printer.marginBottom = initPrinterMarginBottom;
  952.             printer.marginLeft = initPrinterMarginLeft;
  953.             printer.marginRight = initPrinterMarginRight;
  954.             
  955.             SafeClearPageMargins();
  956.             SafeClearHeaderMargins();
  957.             
  958.         } catch (err) {
  959.         }
  960.         
  961.         try {                                
  962.             InitClasses();
  963.             InitMMarkers();
  964.             iDeltaX = 0;
  965.             iDeltaY = 0;
  966.             bMoveMMarkerLeft = false;
  967.             bMoveMMarkerRight = false;
  968.             bMoveMMarkerTop = false;
  969.             bMoveMMarkerBottom = false;
  970.             bMoveMMarkerHead = false;
  971.             bMoveMMarkerFoot = false;
  972.         } catch (err) {        
  973.         }
  974.  
  975.         alert("Margins have been reset.");
  976.     }
  977.     
  978. </SCRIPT>
  979. <HEAD>
  980. <BODY ONLOAD="Init()" ONRESIZE="ResizeApp()" SCROLL="no">
  981.  
  982.     <IE:TEMPLATEPRINTER ID="printer" MEDIA="print"/>
  983.     <IE:HEADERFOOTER ID="headfoot"/>
  984.  
  985.     <DIV ID="ui" ALIGN="CENTER">
  986.         <TABLE STYLE="text-align:center; width:100%;"><TR>
  987.             <TD><NOBR><SPAN STYLE="color:black; font-size:1.8em;">NexTech EMR</SPAN></NOBR></TD>
  988.             <TD WIDTH='150px'><BUTTON ONMOUSEUP="DoPrintFromPreview()"><TABLE STYLE="text-align:center;"><TR><TD><IMG SRC="nxres://0/PNG/#1057" HEIGHT="46px"></TD><TD><STRONG>Print...</STRONG></TD></TR></TABLE></BUTTON></TD>
  989.             <TD STYLE="text-align:left"><BUTTON ONMOUSEUP="DoPageSetup()" STYLE="width:120px">Page Setup...</BUTTON></TD>
  990.             <TD STYLE="text-align:right">
  991.                 <BUTTON NAME="marginbutton" ONMOUSEUP="ShowHideMargins()" STYLE="width:120px;">Hide Margins</BUTTON>
  992.             </TD>
  993.             <TD>
  994.                 <TABLE STYLE="text-align:center; height:100%"><TR><TD>
  995.                 <BUTTON ONMOUSEUP="PersistMargins()" STYLE="width:120px;height:26px;">Save Margins</BUTTON>
  996.                 </TD></TR><TR><TD>
  997.                 <BUTTON ONMOUSEUP="ResetMargins()" STYLE="width:120px;height:26px;">Reset Margins</BUTTON>
  998.                 </TR></TD></TABLE>
  999.             </TD>
  1000.             <TD STYLE="text-align:left">
  1001.                 <span style="white-space:nowrap;">
  1002.                     <BUTTON ONMOUSEUP="Zoomer('in')" STYLE="width:50px;height:34px;">In</BUTTON>
  1003.                     <span style="width:60px;"><span style="color:black;">Zoom%:</span><br />
  1004.                     <INPUT ID="zoomnumber" TYPE="TEXT" VALUE="100" SIZE="3" MAXLENGTH="4" ONKEYUP="Zoomer('amount')"> </span>
  1005.                     <BUTTON ONMOUSEUP="Zoomer('out')" STYLE="width:50px;height:34px;">Out</BUTTON>
  1006.                 </span>
  1007.             </TD>
  1008.         </TR></TABLE>
  1009.     </DIV>
  1010.  
  1011.     <DIV ID="pagecontainer">
  1012.         <DIV ID="zoomcontainer">
  1013.         <!-- Dynamically created pages go here. -->
  1014.         <IMG ID="mmarkerLeft" CLASS="mmarker" STYLE="cursor:col-resize;" WIDTH="10" HEIGHT="10" BORDER="0"/>
  1015.         <IMG ID="mmarkerRight" CLASS="mmarker" STYLE="cursor:col-resize;" WIDTH="10" HEIGHT="10" BORDER="0"/>
  1016.         <IMG ID="mmarkerTop" CLASS="mmarker" STYLE="cursor:row-resize;" WIDTH="10" HEIGHT="10" BORDER="0"/>
  1017.         <IMG ID="mmarkerBottom" CLASS="mmarker" STYLE="cursor:row-resize;" WIDTH="10" HEIGHT="10" BORDER="0"/>
  1018.         <IMG ID="mmarkerHead" CLASS="mmarker" STYLE="cursor:row-resize;" WIDTH="10" HEIGHT="10" BORDER="0"/>
  1019.         <IMG ID="mmarkerFoot" CLASS="mmarker" STYLE="cursor:row-resize;" WIDTH="10" HEIGHT="10" BORDER="0"/>
  1020.         <IMG ID="ratiomarker" CLASS="mmarker" STYLE="visibility:hidden;left:1in;top:1in" WIDTH="10" HEIGHT="10" BORDER="0"/>
  1021.         </DIV>
  1022.     </DIV>
  1023.  
  1024. </BODY>
  1025. </HTML>
  1026.  
  1027.  
  1028.