home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / progress_alpha.js < prev    next >
Encoding:
Text File  |  2004-03-24  |  1.6 KB  |  43 lines

  1. var isDom = document.getElementById?true:false;
  2. var isIE  = document.all?true:false;
  3. var isNS4 = document.layers?true:false;
  4. var cellCount = 10;
  5.  
  6. function setprogress(pIdent, pValue, pString)
  7. {
  8.         if (isDom)
  9.             prog = document.getElementById(pIdent+'installationProgress');
  10.         if (isIE)
  11.             prog = document.all[pIdent+'installationProgress'];
  12.         if (isNS4)
  13.             prog = document.layers[pIdent+'installationProgress'];
  14.     if (prog != null) 
  15.         prog.innerHTML = pString;
  16.  
  17.         if (pValue == 0) {
  18.         for (i=0; i < cellCount; i++) {
  19.                 if (isDom)
  20.                     document.getElementById(pIdent+'progressCell'+i+'A').style.visibility = "hidden";
  21.                 if (isIE)
  22.                     document.all[pIdent+'progressCell'+i+'A'].style.visibility = "hidden";
  23.                 if (isNS4)
  24.                     document.layers[pIdent+'progressCell'+i+'A'].style.visibility = "hidden";
  25.             }
  26.         }
  27.  
  28.     for (i=pValue-1; i >= 0; i--) {
  29.             if (isDom) {
  30.                 document.getElementById(pIdent+'progressCell'+i+'A').style.visibility = "visible";
  31.                 document.getElementById(pIdent+'progressCell'+i+'A').innerHTML = "o";
  32.             }
  33.             if (isIE) {
  34.                 document.all[pIdent+'progressCell'+i+'A'].style.visibility = "visible";
  35.                 document.all[pIdent+'progressCell'+i+'A'].innerHTML = "o";
  36.             }
  37.             if (isNS4) {
  38.                 document.layers[pIdent+'progressCell'+i+'A'].style.visibility = "visible";
  39.                 document.layers[pIdent+'progressCell'+i+'A'].innerHTML = "o";
  40.             }
  41.         }
  42. }
  43.