home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / WindowsServerTrial / server.iso / sources / install.wim / 2 / Windows / System32 / ieframe.dll / HTML / IMGBROWS.JS < prev    next >
Text File  |  2008-01-19  |  2KB  |  62 lines

  1. ∩╗┐function wrapRegionalShortDate(dateIn)
  2. {
  3.     var newDate;
  4.     try
  5.     {
  6.         newDate = regionalShortDate(dateIn);
  7.     }
  8.     catch(e)
  9.     {
  10.         newDate = dateIn;
  11.     }
  12.     return newDate;
  13. }
  14.  
  15. function regionalizeDates() {
  16.     // ie5 changed filecreationdate and filemodifieddate
  17.     // to return 4 characters for the year, in a non-localized format.
  18.     // this code will localize the date according to the system locale setting,
  19.     // so that the properties dialog is not adversely affected.
  20.     // this function should be called from the onload handler.
  21.  
  22.     var    fcDate = _fileCreatedDate.innerText;
  23.     if (fcDate!= "undefined" && fcDate != "")
  24.         _fileCreatedDate.innerText = wrapRegionalShortDate(fcDate);
  25.  
  26.     var fmDate = _fileModifiedDate.innerText;
  27.     if (fmDate != "undefined" && fmDate != "")
  28.         _fileModifiedDate.innerText = wrapRegionalShortDate(fmDate);
  29. }
  30.  
  31. function BodyLoad()
  32. {
  33.     var arrAll = document.all;
  34.  
  35.     regionalizeDates();
  36.     for (i=0; i < arrAll.length; i++)
  37.     {
  38.         var elm = arrAll[i];
  39.         if (elm.id.substring(0,1) == "_")
  40.         {
  41.             if (elm.innerText== "undefined" || elm.innerText == "" || elm.innerText == "-1")
  42.             {
  43.                 elm.innerText = L_NotAvailable_Text;
  44.                 switch (elm.id) // == "_fileSize")
  45.                 {
  46.                 case "_fileSize":
  47.                     spaBytes.innerText = "";
  48.                     break;
  49.                 case "_width":
  50.                 case "_height":
  51.                     spaX.innerText = "";
  52.                     spaPixels.innerText = "";
  53.                     _width.innerText = "";
  54.                     _height.innerText = L_NotAvailable_Text;
  55.                     break;
  56.                 }
  57.             }
  58.         }
  59.     }
  60. }
  61.  
  62.