//alert('matt  switcher1');
var classFileName = AppClass.substring(0, AppClass.indexOf("."));

//alert("IPlus switcher loaded in non-IPlus Activity Full Name = "+ActivityFullDescription);

document.write("<applet code=\""+AppClass+"\" ");
document.write("codebase=\".\" archive=\"" + AppArchive + "\" ");
document.write("name=\""+classFileName+"\" id=\""+classFileName+"\" ");
document.write("alt=\"TESTING\"");
document.write("width=\""+AppWidth+"\" height=\""+AppHeight+"\" >");
document.write("<param name=\"interactivatePlus\" value=\""+InteractivatePlus+"\">");
document.write("<param name=\"userid\" value=\""+StudentId+"\">");
//document.write("<param name=\"activityid\" value=\""+ActivityId+"\">");
document.write("<param name=\"server\" value=\""+Server+"\">");
document.write("<param name=\"port\" value=\""+Port+"\">");
document.write("<param name=\"uri\" value=\""+Uri+"\">");
// COMMENT OUT OR SET TO FALSE FOR PRODUCTION
// document.write("<param name=\"debug\" value=\"false\">");
document.write("<p><h3>" + ActivityFullName + ": "+ActivityFullDescription+"</h3></p>");


var defaultIEErrorMessage = "<br><h3>We're Sorry.</h3> <p>We have detected Java as not being installed " +
    "on your computer or Java being disabled in your browser.<br>If you would like to " +
    "install the most recent version of Java now, please click the button below.</p><br><br>";

var defaultIEErrorMessage2 = "<br><br><p>If you believe that Java is installed on your machine please " +
    "verify that it is enabled via the following procedures:</p><br><br>" +
    "<h3>Internet Explorer 8.x Users</h3>" +
    "<ol><li>From the Tools Menu, select 'Manage Add-Ons'.</li><li>In the 'Show' drop-down menu in the " +
    "left pane, select 'All Add-Ons'.</li><li>Search the list for entries containing the word 'Java'" +
    " or 'Sun' (the precise entries listed depend on which version of Java you are using) and check " +
    "to make sure they are all enabled.</li><li>If any are disabled, highlight the entry and click " +
    "the 'Enable' button below.</li><li>Click the 'OK' button.</ol><br>" +
    "<h3>Internet Explorer 7.x Users</h3><ol><li>From the tools menu, select 'Manage Add-Ons'" +
    "-&gt; 'Enable or Disable Add-Ons'.</li><li>In the drop down menu next to 'Show' select " +
    "'Add-Ons that have been used by Internet Explorer'.</li><li>Search the list for entries " +
    "containing the word 'Java' or 'Sun' (the precise entries listed depend on which version of Java you " +
    "are using) and check to make sure they are all enabled.</li><li>If any are disabled, " +
    "select the entry and click the 'Enable'" +
    " radio button in the 'Settings' pane below.</li><li>Click the 'OK' button.</li></ol><br><br>" +
    "<h3>Internet Explorer 4.x . 6.x Users</h3><br>" +
    "<ol><li>Click 'Tools' -&gt; 'Internet Options.'</li>" +
    "<li>Select the Advanced Tab, and scroll down to 'Java (Sun).'</li>" +
    "<li>Check the box next to the Java version.</li>" +
    "<li>Next, select the Security Tab, and select the 'Custom Level' button.</li>" +
    "<li>Scroll down to 'Scripting of Java applets'.</li>" +
    "<li>Make sure the 'Enable' radio button is checked.</li>" +
    "<li>Click OK to save your preference.</li><br>";

var restartText = "<p>After completing the Java installation process, we recommend restarting your computer.</p><br><br>";

document.write(defaultIEErrorMessage);
document.write(restartText);
document.write("<button onclick=\"deployJava.installLatestJRE();\">Install Java</button>");
document.write(defaultIEErrorMessage2);
document.write("</applet>");

//document.write("<br>");

//document.write("<blockquote>");
//document.write("<a href=\"./"+dirName+".jar\" target=\"_new\">Click here</a> for a dowloadable version of this application.  Save the file to your hard drive and double click it to load the activity.");
//document.write("</blockquote>");
