home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1997 December / dpcb1297.iso / Internet / IE40 / IE4SHLNT.CAB / folder.htt < prev    next >
Text File  |  1997-09-18  |  9KB  |  213 lines

  1. <!-- 
  2.  * This file was automatically generated by Microsoft Internet Explorer 4.0 
  3.  * using the file %THISDIRPATH%\folder.htt (if customized) or
  4.  * %TEMPLATEDIR%\folder.htt (if not customized).
  5.  -->
  6.  
  7. <html>
  8.    <!-- this style defines the appearance of any hyperlinks that get displayed -->
  9.    <style>
  10.       a:link      {font: 8pt/10pt verdana; color: #FF6633}
  11.       a:visited   {font: 8pt/10pt verdana; color: #0099FF}
  12.       a:active    {font: 8pt/10pt verdana; color: black}
  13.    </style>
  14.  
  15.    <head>
  16.       <!-- allow references to any resources you might add to the folder -->
  17.       <!-- (a "webbot" is a special wrapper for FrontPage compatibility) -->
  18.       <!-- webbot bot="HTMLMarkup" tag="base" startspan -->
  19.       <base href="%THISDIRPATH%\">
  20.       <!-- webbot bot="HTMLMarkup" endspan -->
  21.  
  22.       <script language="JavaScript" for="FileList" event="SelectionChanged">
  23.          // this script updates the left info panel when you select icons
  24.          var items = FileList.FocusedItem;
  25.          var fldr  = FileList.Folder;
  26.          var data;
  27.          var text;
  28.  
  29.          // cancel any pending status message
  30.          if (window.timer) {
  31.             window.clearTimeout(window.timer);
  32.             window.timer = 0;
  33.          }
  34.  
  35.          // sanity check
  36.          if (!items || !fldr)
  37.             return;
  38.  
  39.          // name
  40.          text = "<b>" + fldr.GetDetailsOf(items, 0) + "</b>";
  41.  
  42.          // type
  43.          data = fldr.GetDetailsOf(items, 2);
  44.          if (data != "")
  45.             text += "<br>" + data;
  46.  
  47.          // date
  48.          data = fldr.GetDetailsOf(items, 3);
  49.          if (data != "")
  50.             text += "<br><br>" + fldr.GetDetailsOf(null, 3) + ": " + data;
  51.  
  52.          // size
  53.          data = fldr.GetDetailsOf(items, 1);
  54.          if (data != "")
  55.             text += "<br><br>" + fldr.GetDetailsOf(null, 1) + ": " + data;
  56.  
  57.          // tip
  58.          data = fldr.GetDetailsOf(items, -1);
  59.          if (data != "" && data != name) {
  60.             var start;
  61.             var end;
  62.             var theLink;
  63.             var a;
  64.  
  65.             // parse lines for Office files without breaking links below
  66.             a = data.split("\n");
  67.             data = a.join("<br>\n");
  68.  
  69.             // look for embedded links
  70.             text += "<br><br>";
  71.             start = data.indexOf("http://");
  72.             if (start < 0)
  73.                start = data.indexOf("file://");
  74.             if (start < 0)
  75.                text += data;
  76.             else {
  77.                end = data.indexOf(" ", start);
  78.                if (end < 0)
  79.                   end = data.length;
  80.                if (start > 0)
  81.                   text += data.substring(0, start - 1);
  82.                theLink = data.substring(start, end);
  83.                text += theLink.link(theLink);
  84.                if (end < data.length)
  85.                   text += data.substring(end + 1, data.length);
  86.             }
  87.          }
  88.  
  89.          // replace SPAN1 with the new text
  90.          SPAN1.innerHTML = text;
  91.  
  92.          // erase any visible thumbnail since the selection changed
  93.          document.all.Thumbnail.style.display = "none";
  94.          document.all.Status.style.display = "none";
  95.  
  96.          // tell the control to generate the new thumbnail asynchronously
  97.          if (document.all.Thumbnail.displayFile(items.Path))
  98.             window.timer = window.setTimeout('document.all.Status.style.display = ""', 1000);
  99.       </script>
  100.  
  101.       <script language="JavaScript" for="Thumbnail" event="OnThumbnailReady">
  102.          // when a valid thumbnail has been generated, display it
  103.          window.clearTimeout(window.timer);
  104.          window.timer = 0;
  105.          document.all.Status.style.display = "none";
  106.          if (document.all.Thumbnail.haveThumbnail())
  107.             document.all.Thumbnail.style.display = "";
  108.       </script>
  109.  
  110.       <script>
  111.          // this function handles fixed panel sizing and collapsing when the window resizes
  112.          function fixSize() {
  113.             var hideTop = 200
  114.             var hideLeft = 400
  115.             var ch = document.body.clientHeight
  116.             var cw = document.body.clientWidth
  117.  
  118.             if (hideTop > ch) {
  119.                document.all.heading.visibility = "hidden"
  120.                document.all.FileList.style.pixelTop = 0
  121.                document.all.panel.style.pixelTop = 0
  122.             } else {
  123.                document.all.heading.visibility = "visible"
  124.                document.all.FileList.style.top = (document.all.heading.offsetHeight - 32) + "px"
  125.                document.all.panel.style.top = (document.all.heading.offsetHeight) + "px"
  126.                document.all.rule.style.width = (cw - 84) + "px"        
  127.             }
  128.             if (hideLeft > cw) {
  129.                document.all.panel.visibility = "hidden"
  130.                document.all.FileList.style.pixelLeft = 0
  131.                document.all.FileList.style.pixelTop = document.all.panel.style.pixelTop
  132.             } else {
  133.                document.all.panel.visibility = "visible"
  134.                document.all.FileList.style.pixelLeft = document.all.panel.style.pixelWidth 
  135.             }
  136.             document.all.FileList.style.pixelWidth = cw - document.all.FileList.style.pixelLeft
  137.             document.all.FileList.style.pixelHeight = ch - document.all.FileList.style.pixelTop
  138.             document.all.panel.style.pixelHeight = ch - document.all.panel.style.pixelTop
  139.          }
  140.       </script>
  141.    </head>
  142.  
  143.    <body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0 scroll=no onload="fixSize()">
  144.  
  145.       <!-- start heading banner -->
  146.       <div ID="heading" style="position: absolute; width: 100%; height: 88px; background: URL(res://webvw.dll/folder.gif) no-repeat">
  147.          <p style="margin-left: 84px; padding-left: 20px; margin-top: 16px">
  148.          <!-- using a table with nowrap to prevent undesirable word wrapping -->
  149.          <table>
  150.             <tr>
  151.                <td nowrap>
  152.                   <font style="font: 16pt/16pt verdana; font-weight: bold; color: #0099FF">
  153.                      <!--webbot bot="HTMLMarkup" startspan alt="<B><I>Web View Folder Title</I></B> " -->
  154.                      %THISDIRNAME%
  155.                      <!--webbot bot="HTMLMarkup" endspan -->
  156.                   </font>
  157.                </td>
  158.             </tr>
  159.          </table>
  160.          <!-- this is more efficient than a long graphic, but we have to adjust it in FixSize() -->
  161.          <hr ID="rule" style="position: absolute; top: 44px; left: 84px" size=1px color=black>
  162.       </div>
  163.       <!-- end heading banner -->
  164.  
  165.       <!-- start left info panel -->
  166.       <div ID="panel" style="position: absolute; top: 88px; width: 30%; background: window; overflow: auto">
  167.          <p style="margin-left: 20px; margin-top: 8px; margin-right: 8px">
  168.          <font style="font: 8pt/10pt verdana; font-weight: normal; color: text">
  169.             <!-- the initial prompt in this span gets replaced by script -->
  170.             <span id="SPAN1">
  171.                Select an icon to view its description.
  172.             </span>
  173.             <br><br>
  174.  
  175.             <!-- HERE'S A GOOD PLACE TO ADD A FEW LINKS OF YOUR OWN -->
  176.             <!-- (examples commented out)
  177.                <a href="http://www.mylink1.com/">Custom Link 1</a>
  178.                <br>
  179.                <a href="http://www.mylink2.com/">Custom Link 2</a>
  180.                <br><br>
  181.             -->
  182.  
  183.             <!-- this is the thumbnail viewer control, sized optimally for 640x480 -->
  184.             <object id="Thumbnail"
  185.                classid="clsid:1D2B4F40-1F10-11D1-9E88-00C04FDCAB92"
  186.                style="width: 150px; height: 150px; display: none">
  187.             </object>
  188.  
  189.             <div ID="Status" style="margin-left: 20px; margin-top: 0px; margin-right: 8px; display: none">
  190.                Generating thumbnail...
  191.             </div>
  192.          </font>
  193.       </div>
  194.       <!-- end left info panel -->
  195.  
  196.       <!-- this is the standard file list control -->
  197.       <!-- webbot bot="HTMLMarkup" startspan u-src="file:///C:\Program Files\Microsoft FrontPage Express\Data\FoldData.gif" -->
  198.       <object id="FileList" border=0 tabindex=1
  199.          classid="clsid:1820FED0-473E-11D0-A96C-00C04FD705A2"
  200.          style="position: absolute; left: 30%; top: 88px; width: 70%; height: 100%">
  201.       </object>
  202.       <!-- webbot bot="HTMLMarkup" endspan -->
  203.  
  204.       <script language="JavaScript">
  205.          // call our fixSize() function whenever the window gets resized
  206.          window.onresize = fixSize;
  207.          window.timer = 0;
  208.       </script>
  209.  
  210.    </body>
  211. </html>
  212.  
  213.