rem: var objShell = new ActiveXObject("Shell.Application"); objShell.Open(lfn); 
add: if (!TryShellExec(lfn)) { var objShell = new ActiveXObject("Shell.Application"); objShell.Open(lfn); } 
context: function parser(fn){  var X, Y, sl, a, ra, re;  ra = /:/;  a = location.href.search(ra);  if (a == 2)    X = 14;  else    X = 7;  sl = "\\";  Y = location.href.lastIndexOf(sl) + 1;/*@cc_on @*//*@if (@_jscript_version >= 5)  try  {    var fso = new ActiveXObject("Scripting.FileSystemObject");  }  catch(e)  {    if (fn.substring(0, 3) == "../")    {      fn = fn.substring(3);    }  }  @else @*/  if (fn.substring(0, 3) == "../")  {    fn = fn.substring(3);  }/*@end @*/  lfn = location.href.substring(X, Y) + fn;  re = /%20/g;  lfn = lfn.replace(re, " ");  re = /\//g;  lfn = lfn.replace(re, "\\");  if (FolderExists(lfn))  {    var objShell = new ActiveXObject("Shell.Application");    objShell.Open(lfn);  }  else if (FileExists(lfn))  {    execed = false;    htmlre = /\.html?$/;    txtre = /\.txt$/;    if (!lfn.match(htmlre) && !lfn.match(txtre))    {      execed = TryShellExec(lfn);    }    if (!execed)    {      re = /\\/g;      lfn = lfn.replace(re, "/");      re = /\ /g;      lfn = lfn.replace(re, "%20");      location.href = 'file:///' + lfn;    }  }  else if (fn.substring(0, 3) == "../")  {    parser(fn.substring(3));  }  else  {    alert(fn + " doesn't exist");  }}
meta: 2777	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2777/0a61167f2498546c001be99cb144e69e869171c5/chmlink.js/clean/trunk/Docs/src/chmlink.js