home *** CD-ROM | disk | FTP | other *** search
/ CorelDRAW! 10 / CD10_CLPART.ISO / Top2.htt < prev    next >
Encoding:
Text File  |  2000-10-03  |  11.3 KB  |  341 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.     <style>
  9.         body        {font: 8pt/10pt verdana; color:#003366;margin: 0}
  10.         #FileList    {position: absolute; left: 30%; width: 70%; height: 100%}
  11.         #Media        {margin-left: 15px}
  12.         #Panel        {position: absolute; width: 30%; height: 100%; overflow: auto}
  13.         #PieChart    {width: 100px; height: 50px; margin-top: 10px}
  14.         #Thumbnail    {width: 160px; height: 160px; margin-top: 0px}
  15.         #Status        {margin-left: 15px}
  16.         #Brand        {position: absolute; left: 30%; width: 70%; height: 100%; overflow: auto}
  17.         p        {font-color:#003366;margin-left: 15px; margin-top: 15px; margin-right: 15px}
  18.         p.Title        {font: 12pt; color:#003366; font-weight: bold; margin-top: 5px}
  19.         p.LogoLine    {margin-left: 0; margin-top: -5px; margin-right: 0; margin-bottom: 20px}
  20.         p.Warning    {font-weight: bold; color: red}
  21.         p.Links        {margin-top: 5px}
  22.         a.Command    {font-weight: bold}
  23.         div.Release     {width: 160px; text-align: right; background: buttonface; padding: 0px, 8px, 4px, 8px}
  24.     </style>
  25.  
  26.     <head>
  27.         <!-- allow references to any resources you might add to the folder -->
  28.         <!-- (a "webbot" is a special wrapper for FrontPage compatibility) -->
  29.         <!-- webbot bot="HTMLMarkup" tag="base" startspan -->
  30.         <base href="%THISDIRPATH%\">
  31.         <!-- webbot bot="HTMLMarkup" endspan -->
  32.  
  33.         <script language="JavaScript">
  34.             var L_Prompt_Text    = "CorelDRAW 10 Graphics Suite CD #2";
  35.             var L_Multiple_Text    = " items selected.";
  36.             var L_Size_Text        = "Size: ";
  37.             var L_FileSize_Text    = "Total File Size: ";
  38.             var L_Delimiter_Text    = ",";
  39.             var L_Bytes_Text    = " bytes";
  40.             var L_Attributes_Text    = "Attributes";
  41.             var L_Codes_Text    = "RHSaCE"; // suppress the Archive flag
  42.             var L_ReadOnly_Text     = "Read-only";
  43.             var L_Hidden_Text    = "Hidden";
  44.             var L_System_Text    = "System";
  45.             var L_Archive_Text    = "Archive";
  46.             var L_Compressed_Text    = "Compressed";
  47.             var L_Encrypted_Text    = "Encrypted";
  48.             var L_NoAttributes_Text = "(normal)";
  49.             var L_Properties_Text    = "P&roperties";
  50.             var timer        = 0;
  51.             var wantMedia        = false; // cool, but may hinder media file manipulation
  52.  
  53.             function FixSize() {
  54.                 // this function handles fixed panel sizing and collapsing when the window resizes
  55.                 var threshold    = 400;
  56.                 var miniHeight    = 32;
  57.                 var ch        = document.body.clientHeight;
  58.                 var cw        = document.body.clientWidth;
  59.  
  60.                 if (cw < threshold) {
  61.                     document.all.MiniBanner.style.visibility = "visible";
  62.                     document.all.Panel.style.visibility = "hidden";
  63.                     document.all.FileList.style.top = miniHeight;
  64.                     document.all.FileList.style.pixelLeft = 0;
  65.                 } else {
  66.                     document.all.MiniBanner.style.visibility = "visible";
  67.                     document.all.Panel.style.visibility = "visible";
  68.                     document.all.FileList.style.top = 0;
  69.                     document.all.FileList.style.pixelLeft = document.all.Panel.style.pixelWidth; 
  70.                 }
  71.                 document.all.FileList.style.pixelWidth = cw - document.all.FileList.style.pixelLeft;
  72.                 document.all.FileList.style.pixelHeight = ch - document.all.FileList.style.pixelTop;
  73.             }
  74.  
  75.             function FormatNumber(n) {
  76.                 var t = "";
  77.                 var i, j = 0;
  78.                 for (i = n.length - 1; i >= 0; i--) {
  79.                     t = n.charAt(i) + t;
  80.                     if (i && ((++j % 3) == 0))
  81.                         t = L_Delimiter_Text + t;
  82.                 }
  83.                 return t;
  84.             }
  85.  
  86.             function Properties() {
  87.                 FileList.SelectedItems().Item(0).InvokeVerb(L_Properties_Text);
  88.             }
  89.  
  90.             function Init() {
  91.                 // call our FixSize() function whenever the window gets resized
  92.                 window.onresize = FixSize;
  93.                 FixSize();
  94.                 Info.innerHTML = L_Prompt_Text;
  95.             }
  96.         </script>
  97.  
  98.         <script language="JavaScript" for="FileList" event="SelectionChanged">
  99.             // this script updates the left info panel when you select icons
  100.             var fldr = FileList.Folder;
  101.             var items;
  102.             var name;
  103.             var data;
  104.             var text;
  105.             var title;
  106.             var size = 0;
  107.             var i;
  108.  
  109.             // cancel any pending status message
  110.             if (timer) {
  111.                 window.clearTimeout(timer);
  112.                 timer = 0;
  113.             }
  114.  
  115.             // erase any visible thumbnail since the selection changed
  116.             document.all.Thumbnail.style.display = "none";
  117.             document.all.Status.style.display = "none";
  118.  
  119.             // stop & destroy any media player
  120.             if (wantMedia)
  121.                 document.all.Media.innerHTML = "";
  122.  
  123.             data = FileList.SelectedItems().Count;
  124.             if (data == 0) {
  125.                 // nothing selected?
  126.                 Info.innerHTML = L_Prompt_Text;
  127.                 return;
  128.             }
  129.             else if (data > 1) {
  130.                 // more than one item selected?
  131.                 text = data + L_Multiple_Text + "<br>";
  132.                 if (data <= 100) {
  133.                     for (i = 0; i < data; i++)
  134.                         size += FileList.SelectedItems().Item(i).Size;
  135.                     if (size)
  136.                         text += "<br>" + L_FileSize_Text + FormatNumber(size.toString()) + L_Bytes_Text + "<br>";
  137.                     if (data <= 16)
  138.                         for (i = 0; i < data; i++)
  139.                             text += "<br>" + FileList.SelectedItems().Item(i).Name;
  140.                 }
  141.                 Info.innerHTML = text;
  142.                 return;
  143.             }
  144.  
  145.             items = FileList.SelectedItems().Item(0);
  146.  
  147.             // name
  148.             name = fldr.GetDetailsOf(items, 0);
  149.             text = "<b>" + name + "</b>";
  150.  
  151.             // type
  152.             data = fldr.GetDetailsOf(items, 2);
  153.             if (data)
  154.                 text += "<br>" + data;
  155.  
  156.             // date
  157.             data = fldr.GetDetailsOf(items, 3);
  158.             if (data)
  159.                 text += "<br><br>" + fldr.GetDetailsOf(null, 3) + ":<br>" + data;
  160.  
  161.             // size
  162.             size = FileList.SelectedItems().Item(0).Size;
  163.             if (size && size < 1000)
  164.                 text += "<br><br>" + L_Size_Text + size + L_Bytes_Text;
  165.             else {
  166.                 data = fldr.GetDetailsOf(items, 1);
  167.                 if (data)
  168.                     text += "<br><br>" + fldr.GetDetailsOf(null, 1) + ": " + data;
  169.                                 else if (size)
  170.                     text += "<br><br>" + L_Size_Text + FormatNumber(size.toString()) + L_Bytes_Text;
  171.             }
  172.  
  173.             // extra details?
  174.             for (i = 4; i < 10; i++) {
  175.                 title = fldr.GetDetailsOf(null, i);
  176.                 if (!title)
  177.                     break;
  178.                 data = fldr.GetDetailsOf(items, i);
  179.                 if (title == L_Attributes_Text) {
  180.                     var code;
  181.                     var s = "";
  182.  
  183.                     text += "<br><br>" + title.link("JavaScript:onClick=Properties()") + ": ";
  184.                     for (i = 0; i < 6; i++) {
  185.                         code = L_Codes_Text.charAt(i);
  186.                         if (data.indexOf(code) > -1) {
  187.                             if (s)
  188.                                 s += ", ";
  189.                             if (i == 0)
  190.                                 s += L_ReadOnly_Text;
  191.                             else if (i == 1)
  192.                                 s += L_Hidden_Text;
  193.                             else if (i == 2)
  194.                                 s += L_System_Text;
  195.                             else if (i == 3)
  196.                                 s += L_Archive_Text;
  197.                             else if (i == 4)
  198.                                 s += L_Compressed_Text;
  199.                             else if (i == 5)
  200.                                 s += L_Encrypted_Text;
  201.                         }
  202.                     }
  203.                     if (!s)
  204.                         s = L_NoAttributes_Text;
  205.                     text += s;
  206.                 }
  207.                 else if (data)
  208.                     text += "<br><br>" + title + ":<br>" + data;
  209.             }
  210.  
  211.             // tip?
  212.             data = fldr.GetDetailsOf(items, -1);
  213.             if (data && data != name) {
  214.                 var start;
  215.                 var end;
  216.                 var theLink;
  217.                 var a;
  218.  
  219.                 // parse lines for Office files without breaking links below
  220.                 a = data.split("\n");
  221.                 data = a.join("<br>\n");
  222.  
  223.                 // look for embedded links
  224.                 text += "<br><br>";
  225.                 start = data.indexOf("http://");
  226.                 if (start < 0)
  227.                     start = data.indexOf("file://");
  228.                 if (start < 0)
  229.                     text += data;
  230.                 else {
  231.                     end = data.indexOf(" ", start);
  232.                     if (end < 0)
  233.                         end = data.length;
  234.                     if (start > 0)
  235.                         text += data.substring(0, start - 1);
  236.                     theLink = data.substring(start, end);
  237.                     text += theLink.link(theLink);
  238.                     if (end < data.length)
  239.                         text += data.substring(end + 1, data.length);
  240.                 }
  241.             }
  242.  
  243.             // replace Info with the new text
  244.             Info.innerHTML = text;
  245.  
  246.             if (wantMedia && size) {
  247.                 // show media preview or thumbnail based on file extension
  248.                 ext = name.substring(name.lastIndexOf(".") + 1, name.length);
  249.                 ext = ext.toLowerCase();        
  250.                 if (ext == 'avi' || ext == 'mov' || ext == 'qt' || ext == 'mpe' || ext == 'mpeg' || ext == 'mpg') {
  251.                     // show a movie player
  252.                     document.all.Media.innerHTML = '<object ID="Player" style="width: 160px; height: 148px" classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A><param name="FileName" value="' + items.Path + '"><param name=ShowDisplay value=0><param name=BorderStyle value=0></object>';
  253.                 } else if (ext == 'aif' || ext == 'aifc' || ext == 'aiff' || ext == 'au' || ext == 'mid' || ext == 'rmi' || ext == 'snd' || ext == 'wav') {
  254.                     // show a sound player
  255.                     document.all.Media.innerHTML = '<object ID="Player" style="width: 160px; height: 28px" classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A><param name="FileName" value="' + items.Path + '"><param name=ShowDisplay value=0></center></object>'
  256.                 }
  257.             }
  258.  
  259.             // try to generate a new thumbnail asynchronously, and delay the status message one second
  260.             if (size && (size < 10000000) && Thumbnail.displayFile(items.Path))
  261.                 timer = window.setTimeout('document.all.Status.style.display = ""', 1000);
  262.         </script>
  263.  
  264.         <script language="JavaScript" for="Thumbnail" event="OnThumbnailReady">
  265.             // when a valid thumbnail has been generated, display it
  266.             window.clearTimeout(timer);
  267.             timer = 0;
  268.             document.all.Status.style.display = "none";
  269.             if (document.all.Thumbnail.haveThumbnail() && document.all.Media.innerHTML == "")
  270.                 document.all.Thumbnail.style.display = "";
  271.         </script>
  272.     </head>
  273.  
  274.     <body scroll=no onload="Init()">
  275.  
  276.         <!-- start mini banner -->
  277.         <div ID="MiniBanner" style="visibility : 'visible'; position: 'absolute'; width: '100%'; height:'150px'; background= #FFFFFF">
  278.             <!-- using a table with nowrap to prevent word wrapping -->
  279.             <table><tr><td nowrap>
  280.                 <p class=Title style="margin-top: 0">
  281.                 <!--webbot bot="HTMLMarkup" startspan alt="<B><I>Web View Folder Title</I></B> " -->
  282.                  %THISDIRNAME%
  283.                 <!--webbot bot="HTMLMarkup" endspan -->
  284.             </td></tr></table>
  285.         </div>
  286.         <!-- end mini banner -->
  287.  
  288.         <!-- start left info panel -->
  289.         <div id=Panel style="background: #FFFFFF URL(file://%TEMPLATEDIR%\draw10_title.gif) no-repeat">
  290.             <p><!--
  291.             <object classid="clsid:E5DF9D10-3B52-11D1-83E8-00A0C90DC849" width=32 height=32>
  292.                 <param name="scale" value=100>
  293.             </object>-->
  294.             <br><br><br>
  295.             <p class=Title>
  296.             <!--webbot bot="HTMLMarkup" startspan alt="<B><I>Web View Folder Title</I></B> " -->
  297.             %THISDIRNAME%
  298.             <!--webbot bot="HTMLMarkup" endspan -->
  299.             <!--
  300.             <p class=LogoLine>
  301.             <img src="%TEMPLATEDIR%\wvline.gif" width=100% height=1px>
  302.             -->
  303.             <p>
  304.             <span id=Info>
  305.                 
  306.             </span>
  307.                 <p>
  308.             <p>Visit Corel on at Web at:
  309.                 <p class=Links>
  310.                 <a href="http://www.corel.com/">Corel.com</a>
  311.                 <br>
  312.                 <a href="http://www.designer.com/">Designer.com</a>
  313.                 </p>
  314.                     
  315.             
  316.             <!-- this is the thumbnail viewer control -->
  317.             <object id=Thumbnail classid="clsid:1D2B4F40-1F10-11D1-9E88-00C04FDCAB92" style="display: none">
  318.             </object>
  319.  
  320.             <!-- this is the status message that pops up during thumbnail generation -->
  321.             <div id=Status style="display: none">
  322.                 Generating preview...
  323.             </div>
  324.             
  325.             <p>
  326.             <!-- this contains any ActiveMovie control created later -->
  327.             <div id=Media>
  328.             </div>
  329.             
  330.         </div>
  331.         <!-- end left info panel -->
  332.  
  333.         <!-- this is the standard file list control -->
  334.         <!-- webbot bot="HTMLMarkup" startspan -->
  335.         <object id=FileList border=0 tabindex=1 classid="clsid:1820FED0-473E-11D0-A96C-00C04FD705A2">
  336.         </object>
  337.         <!-- webbot bot="HTMLMarkup" endspan -->
  338.  
  339.     </body>
  340. </html>
  341.