var cdName = "ISLSCP2_1";var currentWin = window;    //global variablevar picWinHold = null;         // global variablevar tutorial = null;             // global variablevar mac = 0;                         //global variableif (navigator.appVersion.indexOf("Mac") >= 0) mac = 1;var ie = 0;if (navigator.appName.indexOf("Explorer") >= 0) ie = 1;<!------------------------------------------------------------------>   function swapDisk(diskName,newPath)  {  newPage(newPath);}<!------------------------------------------------------------------>function newPage(newPath,sameWindow) {  var currentPath = new String(window.location);  //check for HTML-link page off of a directory listing (starts with "-_")  //and  don't call checkWindowCookie(), it bombs, no "document" to call  if (currentPath.indexOf("-_") > 0) windowMode = "multiple";    else var windowMode = checkWindowCookie();  if ((newPath.indexOf(".csv") > 0) || (sameWindow) || (windowMode == "single")){      //no new window for a .csv data file      location = newPath;    }  else {    var scx = screen.availWidth;  //screen size    var scy = screen.availHeight;    var x = window.screenX;  //window location    var y = window.screenY;    var dx = window.outerWidth;  //window width and height    var dy = window.outerHeight;    var newX = x + 16;   //window offset    var newY = y + 23;    //random name based on the time    var now=new Date();    var min=now.getMinutes();    var sec=now.getSeconds();    var winName = min * 100 + sec;    var newWin = window.open(newPath,winName, "toolbar,menubar,location,scrollbars,status,resizable,screenX="+newX+",screenY="+newY);    //make sure window is on screen    if (newX + dx > scx) newWin.outerWidth = scx - newX;    if (newY + dy > scy) newWin.outerHeight = scy - newY;    newWin.focus();  }}<!------------------------------------------------------------------>function pictureWindow(imagePath,caption,imageX,imageY) {  var scx = screen.availWidth;  //screen size  var scy = screen.availHeight;  var x = window.screenX;  //window location  var y = window.screenY;  var dx = imageX + 40;  //window width and height  if (dx < 300) dx = 300;  var dy = imageY + 44 + (caption.length*10/imageX) * 16;  var newX = x + 16;   //window offset  var newY = y + 23;  if ((picWinHold != null) && (! picWinHold.closed)) picWinHold.close();  var pictureWin = window.open("","picture", "scrollbars,resizable,screenX="+newX+",screenY="+newY+",width="+dx+",height="+dy);  picWinHold = pictureWin;  //make sure window is on screen  if (newX + dx > scx) pictureWin.outerWidth = scx - newX;  if (newY + dy > scy) pictureWin.outerHeight = scy - newY;  var HTMLstr = "<html>\n<head>\n<title>Picture Viewer</title>\n</head>\n<body>\n<center>\n";  HTMLstr += "<table border=1 cellpadding=2 bgcolor='white'>\n";  HTMLstr += "<tr><td align='center'><img src='" + imagePath + "'></td></tr>\n"; HTMLstr += "<tr><td><table width=100% border=0 cellpadding=0 cellspacing=0>\n"; HTMLstr += "<tr><td width=5% valign=bottom><B><A HREF='javascript:window.close()'>Close</A></B></td>\n"; HTMLstr += "<td width=1%> </td>\n";	HTMLstr += "<td align='center'><font size=4>" + caption + "</font></td>\n"; HTMLstr += "<td width=6%> </td></tr>\n";	HTMLstr += "</table></td></tr>\n";	HTMLstr += "</table>\n</center>\n";	HTMLstr += "</body>\n</html>";  pictureWin.document.writeln(HTMLstr);  pictureWin.focus();}<!------------------------------------------------------------------><!------------------------------------------------------------------>function readNameCookie() {  //Reads cookie storing the Disc name  var cdNameCookie= getCookie("ISLSCPdiskName");  if (cdNameCookie == null) cdNameCookie = setNameCookie(cdName);  return cdNameCookie;}<!--------------------------------------->function setNameCookie(newName) {  //Creates cookie storing the Disc name  setCookie("ISLSCPdiskName", newName, null, "");  //null expiration date means it gets deleted at the end of every session  //path is set to "" so all Disc's can use it  return newName;}<!------------------------------------------------------------------>function checkWindowCookie() {  //Checks cookie storing the windowing mode -- 'multiple' or 'single'  //If missing (first time used), then set global 'tutorial'  var windowMode = getCookie("ISLSCPwindowMode");  tutorial = windowMode;  if (windowMode == null) {    //set the windowMode the first time thru    windowMode = "multiple";    var machine = new String(navigator.platform);    if (machine.indexOf("Win") >= 0) windowMode = "single";    setWindowCookie(windowMode);  }  return windowMode;}<!--------------------------------------->function setWindowCookie(windowMode) {  //Creates cookie storing the windowing mode -- 'multiple' or 'single'  var newDate = new Date(2100,1,1);  setCookie("ISLSCPwindowMode", windowMode, newDate, "");  //path is set to "" so all Disc's can use it  return windowMode;}<!------------------------------------------------------------------>function getCookie(name) {    var arg = name + "=";    var alen = arg.length;    var clen = document.cookie.length;  var i = 0;    while (i < clen) {        var j = i + alen;        if (document.cookie.substring(i, j) == arg)            return getCookieVal(j);        i = document.cookie.indexOf(" ", i) + 1;        if (i == 0) break;     }    return null;}<!--------------------------------------->function setCookie(name, value) {    var argv = setCookie.arguments;    var argc = setCookie.arguments.length;    var expires = (argc > 2) ? argv[2] : null;    var path = (argc > 3) ? argv[3] : null;    var domain = (argc > 4) ? argv[4] : null;    var secure = (argc > 5) ? argv[5] : false;    document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) +  ((domain == null) ? "" : ("; domain=" + domain)) +    ((secure == true) ? "; secure" : "");}<!--------------------------------------->function getCookieVal(offset) {  var endstr = document.cookie.indexOf (";", offset);  if (endstr == -1)    endstr = document.cookie.length;  return unescape(document.cookie.substring(offset, endstr));}<!--------------------------------------->function deleteCookie(name) {    var exp = new Date();    exp.setTime(exp.getTime() - (25*60*60*1000));    var cval = getCookie(name);    document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString() + "; path=''";}