var platname = window.navigator.appVersion;

function Linux(){
        return(platname.lastIndexOf('Linux') != -1 );
        }
function Mac(){
        return(platname.lastIndexOf('Mac') != -1 );
        }
function bit16(){
          return(platname.lastIndexOf('16bit') != -1 );
          }
function Win31(){
          return((platname.lastIndexOf('Windows 3.1') != -1 ) ||
                 (platname.lastIndexOf('Win16') != -1 ) ||
                 (platname.lastIndexOf('Windows 16-bit') != -1 ));
          }
function WinMe(){
          return(platname.lastIndexOf('Win 9[x\d] 4.90') != -1 );
          }
function Win95(){
          return((platname.lastIndexOf('95') != -1 ) && !WinMe());
          }
function Win98(){
          return((platname.lastIndexOf('98') != -1 ) && 
                (!WinMe()));
          }
function Win2k(){
          return((platname.lastIndexOf('Windows NT 5.0') != -1) || 
                 (platname.lastIndexOf('Windows 2000') != -1)  || 
                 ((platname.lastIndexOf('5.0') != -1) && (platname.lastIndexOf('Windows') != -1)));
          }
function WinXP(){
          return((platname.lastIndexOf('Windows NT 5.1') != -1) || 
                 (platname.lastIndexOf('Windows XP') != -1) || 
                 ((platname.lastIndexOf('5.1') != -1) && (platname.lastIndexOf('Windows') != -1)));
          }
function WinNT(){
          return((platname.lastIndexOf('WinNT') != -1) || 
          ((platname.lastIndexOf('Windows NT') != -1) && 
          (!Win2k()) && (!WinXP())));
          }

document.write("<div class=dos>");

if (Mac())  { document.write("Running DOS programs on a Mac: See ");
                    document.write("application article".link("http://docs.info.apple.com/article.html?artnum=11869")); }
  else if (Linux()) { document.write("DOS programs in Linux: Use ");
              document.write("DOSbox".link("http://linux.softpedia.com/get/System/Emulators/DOSBox-2453.shtml")); }
  else if (bit16()) document.write('DOS runs in 16 bit systems.');
  else if (Win31()) document.write('To run MS-DOS programs in Windows 3.1: Exit the Windows shell and you will be in DOS.');
  else if (Win95()) { document.write("To switch Windows 95 to DOS mode, do ","not".bold()," use the option from the Shut Down menu reading: \"Restart the computer in MS-DOS mode.\" To switch to DOS mode:");
                      document.write("<ol type=1><li>Restart the computer and ","press F8".bold()," just before the full-color Windows logo screen loads. (Look for the text line \"Starting Windows 95\" to appear on the screen.)");
                      document.write("<li>When the menu appears, select ","Command Prompt Only.".bold());
                      document.write("<li>After the system boots into DOS mode, you can type \"A:\" to access the A drive and load these programs per instructions printed on label.<\/ol>");
                      document.write("To return to the Windows 95 graphical interface, restart the computer."); }
  else if (Win98()) { document.write("To switch Windows 98 to DOS mode, do ","not".bold()," use the option from the Shut Down menu reading: \"Restart the computer in MS-DOS mode.\" To switch to DOS mode:");
                      document.write("<ol type=1><li>Restart the computer and ","press F8".bold()," just before the full-color Windows logo screen loads. (Watch for a black screen with a blinking cursor.)");
                      document.write("<li>When the menu appears, select ","Command Prompt Only.".bold());
                      document.write("<li>After the system boots into DOS mode, you can type \"A:\" to access the A drive and load these programs per instructions printed on label.<\/ol>");
                      document.write("To return to the Windows 98 graphical interface, restart the computer."); }
  else if (WinMe()) document.write("Windows 95/98/Me can be configured with a DOS window able to run these programs. You may need to manually set the memory requirement.");
  else if (WinNT()) document.write("Windows NT can be configured with a DOS window able to run these programs. You may need to manually set the memory requirement."); 
  else if (Win2k()) { document.write("Running DOS programs in Windows 2000 or Windows XP: See ");
                    document.write("application article".link("http://www.wikihow.com/Run-Old-or-DOS-Games-in-Windows-XP"));
                    document.write(" for 16 bit applications of MS-DOS."); }
  else if (WinXP()) { document.write("Running DOS programs in Windows XP or Windows 2000:");
                    document.write(" See ","application article".link("http://www.wikihow.com/Run-Old-or-DOS-Games-in-Windows-XP")); 
                    document.write(" for 16 bit applications of MS-DOS."); }

document.write("<\/div>");
