function changeOver()
{  var e, selected;
   e = window.event.srcElement;
   if (e.className == "Link1")
   {  e.className = "Link1Hot";
   } else if (e.className == "Link2txt" || e.className == "Link2img")
   { selected = e.id;
     selected = selected.substr(0, selected.length - 3);
     document.all(selected + "img").filters.alpha.opacity=100;
     document.all(selected + "txt").style.color = "red";
   }
}

document.onmouseover = changeOver;

function MouseOut()
{  var e, selected;
   e = window.event.srcElement;
   if (e.className == "Link1Hot")
   { e.className = "Link1";
   } else if (e.className == "Link2txt" || e.className == "Link2img")
   { selected = e.id;
     selected = selected.substr(0, selected.length - 3);
     document.all(selected + "img").filters.alpha.opacity=20;
     document.all(selected + "txt").style.color = "magenta";
   }
}

document.onmouseout = MouseOut;


function GetEmailAddress()
{ // Returns my email address We do it this way so that page scanners can't
  // find my email address in mailto tags. :) 
  var Part1, Part2, Part3;
  Part1="mailto:";
  Part2="Paul_Martinsen";
  Part3="@hotmail.com";
  return Part1+Part2+Part3;
}

function CheckMFCVersion()
{ // Function to check the installed versions of MFC files
  // are high enough. Returns html text describing the outcome.
  var fso = new ActiveXObject("Scripting.FileSystemObject");
  var strResult;
  
  
  strResult = "";
  strResult += CheckVersion(fso, "mfc42.dll", "6.0.8665.0");
  strResult += CheckVersion(fso, "msvcirt.dll", "6.1.8637.0");
  strResult += CheckVersion(fso, "msvcp60.dll", "6.0.8168.0");
  strResult += CheckVersion(fso, "msvcrt.dll", "6.1.8637.0");
  
  if (strResult == "")
    return "<p> <img src='Images/bullet2.gif' height=20 width=20>You already have the mfc files needed. Download the smaller setup file</p>";
  else
    return "<p> You will need to download the full version:</p>" + strResult;
}

function CheckVersion(fso, strFile, strVersion)
{ // Checks that the version of the given file is greater than th
  // requested version. returns 0 if the file version isn't high enough,
  // or the file doesn't exist. and 1 if the file version is okay.
  
  var TestVersion;
  var strSysFolder;
  
  strSysFolder = fso.GetSpecialFolder(1); // System folder
  TestVersion = fso.GetFileVersion(fso.BuildPath(strSysFolder, strFile));
  
  if (TestVersion >= strVersion)
    return "";
  
  if (TestVersion == "")
    return "<p> The file <i>" + strFile + "</i> was not found. You need version " + strVersion + ".</p>";
  
  return "<p> You need version " + strVersion + " of <i>" + strFile + "</i>. You currently have version " + TestVersion + "</p>";
  
}
