home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2002 June / VPR0206A.BIN / plyr_err.chm / redirect.js < prev    next >
Text File  |  2001-04-23  |  365b  |  26 lines

  1.  
  2.  
  3. function parser(fn) 
  4. {
  5.  
  6.     var X, Y, sl, a, ra, link;
  7.     var sFileName = "wmerr.htm"
  8.     ra = /:/;
  9.     a = location.href.search(ra);
  10.     if (a == 2)
  11.     {
  12.         X = 14;
  13.     }
  14.     else
  15.     {
  16.         X = 7;
  17.     }
  18.  
  19.     sl = "\\";
  20.     Y = location.href.lastIndexOf(sl) + 1;
  21.     link = 'file:///' + location.href.substring(X, Y) + sFileName;
  22.     window.open(link);
  23.     //location.href = link;
  24. }
  25.  
  26.