function showTutorial() {
  showTutorialImp(null, null);
}

function showTutorial(link_id, source_page) {
   if (checkFlash()) {
    /*
     var str = 'menubar=no,status=yes,location=no,toolbar=no,directories=no,resizable=no,outerHeight=' + screen.availHeight + ',outerWidth=' + screen.availWidth + ',top=0,left=0';
     var wnd = window.open('tutorial.html','tutorial', str);
     wnd.moveTo(0,0);
     if (document.all) {
        wnd.resizeTo(screen.availWidth,screen.availHeight);
     }
     else if (document.layers||document.getElementById) {
        if (top.window.outerHeight<screen.availHeight ||
            top.window.outerWidth<screen.availWidth) {
            top.window.outerHeight = screen.availHeight;
            top.window.outerWidth = screen.availWidth;
        }
     }
     */
     str = 'menubar=no,status=yes,location=no,toolbar=no,directories=no,resizable=no,height=500,width=800';
     if (link_id != null && source_page != null) {
     window.open('tutorial.html?link=' + link_id + '&source=' + source_page,'tutorial', str);
     }
     else {
       window.open('tutorial.html','tutorial', str);
     }
   }
   else {
     alert('This feature requires the latest version of the Flash plugin to be installed.');
     document.location = 'http://www.macromedia.com/go/getflashplayer';
   }
}

function checkFlash() {
  flashVersion = 5; //minimum version

  //this will find it in ie
  for (i=7; i>0; i--) {
  try {
    if ( new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i) ) {
      return i >= flashVersion;
    }
  }
  catch(e) {}
  }

  //this will find it in mozilla and some others
  pluginVersion = 0;
  if (navigator.mimeTypes &&
      navigator.mimeTypes["application/x-shockwave-flash"] &&
      navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
    words = navigator.plugins["Shockwave Flash"].description.split(" ");
    for (i = 0; i < words.length; ++i) {
    if ( isNaN( parseInt(words[i]) ) ) {
      continue;
    }
    pluginVersion = words[i];
  }
  return (pluginVersion >= flashVersion);
  }
  return false;
}

