
function askForName(name) {
  name = "Broken";//prompt("You've gotten a new high score! Enter you name below...",name);
  return name;
}
function showScoresMode(game, mode, name, score) {
  //var w = window.open("/viewScores.jsp?game="+game+"&mode="+mode+"&name="+name+"&score="+score,"NetivesHighScores","directories=no,fullscreen=no,height=430,width=500,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no",true);
  //w.focus();
}
function showScores(game) {
  //var w = window.open("/viewScores.jsp?game="+game,"NetivesHighScores","directories=no,fullscreen=no,height=430,width=500,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no",true);
  //w.focus();
}

function outputApplet( className, urlDir, archiveName,
                       appletWidth, appletHeight, userName,
                       highContrast, modes, scores ) {
 var _app = "blah";//navigator.appName;
 var useEmbed = false;
 var useObject = false;

  if (_app == 'Mozilla') {
    useEmbed = true;
document.write('<embed code="' + className + '" type="application/x-java-applet" ');
  }
  else if (_app == 'Microsoft Internet Explorer') {
    useObject = true;
document.write('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_5-windows-i586.cab#Version=1,5,0,0" ');
  }
  else
  {
document.write('<APPLET CODE = "'+className+'" CODEBASE = "'+urlDir+'" ARCHIVE = "'+urlDir+archiveName+'" ' );
  }
  
  document.write('WIDTH ="'+appletWidth+'" HEIGHT ="'+appletHeight+'" MAYSCRIPT>');
  document.write('<PARAM NAME="MAYSCRIPT" VALUE="MAYSCRIPT">');
  document.write('<PARAM NAME="CODE" VALUE="' + className +'">');
  document.write('<PARAM NAME="CODEBASE" VALUE="' + urlDir +'">');
  document.write('<PARAM NAME="ARCHIVE" VALUE="' + urlDir + archiveName + '">');

  document.write('<PARAM NAME="userName" VALUE="'+userName+'">');

  var idx1a = document.cookie.indexOf("JSESSIONID=");
  var idx2a = document.cookie.indexOf(";", idx1a);
  if ( idx2a == -1 ) idx2a = document.cookie.length;
  var idx1b = document.cookie.indexOf("browserId=");
  var idx2b = document.cookie.indexOf(";", idx1b);
  if ( idx2b == -1 ) idx2b = document.cookie.length;

  var cookie = document.cookie.substring(idx1a,idx2a)+';'+document.cookie.substring(idx1b,idx2b);
  document.write('<PARAM NAME="cookie" VALUE="'+cookie+'">');
  for ( var x = 0; x < modes.length; x++ )
  {
    document.write('<PARAM NAME="'+modes[x]+'Score" VALUE="'+scores[x]+'">');
  }
if (highContrast) { 
   document.write("<PARAM NAME=\"highContrast\" VALUE=\"true\">");
 }
 document.write("If you are seeing this message, then your browser either does not support Java, or Java is disabled.");
 document.write("Your browser must have Java enabled in order to play.<br>");
 document.write("Please read the <a href='/Help/FAQs.shtml'>FAQs</a> for more information,");
 document.write("or download Java for Windows or Macs from <a href='http://www.java.com'>here</a>.");
if ( useEmbed )
 document.write("</EMBED>");
else if ( useObject )
 document.write("</OBJECT>");
else
 document.write("</APPLET>");
}

