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=win3_1>");

if (Mac()) { document.write("Running Windows 3.1 programs on a Mac: See ");
             document.write("application article.".link("http://askbobrankin.com/run_windows_on_mac.html")); }
  else if (Linux()) { document.write("Running Windows 3.1 programs in Linux: Use ");
              document.write("Wine (Windows Emulator).".link("http://www.macadamian.com/index.php?option=com_techarticle&task=view&id=9")); }
  else if (bit16()) document.write('16 bit system application.');
  else if (Win31()) document.write('Windows 3.1 application');
  else if (Win95()) { document.write("Running Windows 3.1 programs in Windows 95: See ");
              document.write("application article.".link("http://sillydog.org/forum/viewtopic.php?t=5595")); }
  else if (Win98()) { document.write("Running Windows 3.1 programs in Windows 98: See ");
              document.write("application article.".link("http://sillydog.org/forum/viewtopic.php?t=5595")); }
  else if (WinMe()) { document.write("Running Windows 3.1 programs in Windows 95/98/Me: See ");
              document.write("application article.".link("http://sillydog.org/forum/viewtopic.php?t=5595")); }
  else if (WinNT()) { document.write("Running Windows 3.1 programs in Windows NT: See ");
              document.write("application article.".link("http://sillydog.org/forum/viewtopic.php?t=5595")); }
  else if (Win2k()) { document.write("Running Windows 3.1 programs in Windows 2000: See ");
                    document.write("application article".link("http://www.computing.net/answers/windows-31/running-windows-31-portably/12030.html"));}
  else if (WinXP()) { document.write("Running Windows 3.1 programs in Windows XP: See ");
                    document.write("application note.".link("http://answers.yahoo.com/question/index?qid=20070505053622AA82qrU")); }

document.write("<\/div>");
