title: Javascript code not accepted by validator (JSHint)
body: <p>I've written some code to display my bookmarks in IE8. To check it I've used JSHint and I get the following errors : </p>
  
  <ul>
  <li>var files=new Enumerator(FavFolder.Files); 'Enumerator' is not defined. (Line 14)</li>
  <li>Enumerator(FavFolder.SubFolders); 'Enumerator' is not defined. (Line 34)</li>
  <li>ActiveXObject("Scripting.FileSystemObject"); 'ActiveXObject' is not defined. (Lines 46)</li>
  <li>ActiveXObject("WScript.Shell"); 'ActiveXObject' is not defined. (Line 50)</li>
  </ul>
  
  <p>Does someone know why ?</p>
  
  <p>my code :</p>
  
  <pre><code>var i=0;
  var favString="";
  var fso;
  
  
  
  function GetFavourites(Folder)
  {
  var FavFolder=fso.GetFolder(Folder);
  //Gets Favourite Names &amp; URL's for given folder.
  var files=new Enumerator(FavFolder.Files);
  for(; !files.atEnd() ;files.moveNext())
  {
  var fil=files.item();
  if(fil.Type=="Internet Shortcut")
  {
  var textReader=fso.OpenTextFile(fil.Path,1,false,-2);
  var favtext=textReader.ReadAll();
  var start=favtext.indexOf("URL",16);
  var stop=favtext.indexOf("\n",start);
  favString+=fil.Name.replace(/.url/,"");
  favString+=":URL:";
  //to separate favourite name &amp; favorite URL
  favString+=favtext.substring(start+4,stop-1);
  favorites.innerHTML+=favString;
  favString+=":NEXT:"; //to separate favorites.
  i++;
  }
  }
  //Checks any subfolder exists
  var subfolders=new Enumerator(FavFolder.SubFolders);
  for(; !subfolders.atEnd() ;subfolders.moveNext())
  {
  var folder=subfolders.item();
  GetFavourites(folder.Path);
  }
  }
  
  function Import()
  {
  try
  {
  fso=new ActiveXObject("Scripting.FileSystemObject");
  if(fso !==null )
  {
  //Create windows script shell object to access Favorites folder in user system.
  var object=new ActiveXObject("WScript.Shell");
  var favfolderName=object.SpecialFolders("Favorites");
  if(favString==="")
  {
  GetFavourites(favfolderName);
  }
  } 
  }
  catch(err)
  {
  alert("Security settings to be modified in your browser ");
  }
  }
  </code></pre>