function Zoom(boxnum, start_time, duration, satellite, plotsize)
{

// Convert duration to seconds

    var hour, min, sec;
    for (var i = 0; i < 3; i++) {
        var tmpStr = duration.substring (0, duration.indexOf (':'));
        duration = duration.substring (duration.indexOf (':') + 1, duration.length);
        if (i == 0) hour = parseInt (tmpStr);
            else
        if (i == 1) min = parseInt (tmpStr);
            else
        if (i == 2) sec = parseInt (duration);
    }
    var timespan = (hour * 3600 + min * 60 + sec) / 26;

// If this is our first time, we set a new start time

    if (first_time < 0) {

// Divide the duration by the number of boxes, multiply by which box was picked
// This is the number of seconds to add to the start time

        timespan *= boxnum;
        timespan = Math.round(timespan);
   
// Add the new time

        var hms_start_time = start_time.substring (start_time.indexOf ('/') + 1, start_time.length);
        for (var i = 0; i < 3; i++) {
            var tmpStr = hms_start_time.substring (0, hms_start_time.indexOf (':'));
            hms_start_time = hms_start_time.substring (hms_start_time.indexOf (':') + 1, hms_start_time.length);
            if (i == 0) hour = parseInt (tmpStr);
                else
            if (i == 1) min = parseInt (tmpStr);
                else
            if (i == 2) sec = parseInt (hms_start_time);
        }
        var new_tspan = hour * 3600 + min * 60 + sec;
        new_tspan += timespan;

        new_start_time = start_time.substring (0, start_time.indexOf ('/') + 1) + 
                             convertTimeString (new_tspan);

        first_time = boxnum;
    } else {

// If this is our second time, we set a duration

        new_duration = timespan * boxnum;
        new_duration = Math.round(new_duration) - Math.round(timespan * first_time);
        if (new_duration < 0) {
            alert ("You went backward in time!  Try again...");
            first_time = -1;
            return;
        }
        new_duration = convertTimeString (new_duration);
        first_time = -1;

        URL = "http://cluster2.atm.swri.edu/clusterii/plotting.cgi/create_plot?counter=0&" +
              "starttime_d=" + new_start_time + "&duration=" +
              new_duration + "&satellite=" + satellite + "&plotsize=" +
              plotsize + "&nswitch=0&back=1";
        var width = parseInt (plotsize.substring (0, plotsize.indexOf ('x'))) + 50;
        var height = parseInt (plotsize.substring (plotsize.indexOf ('x') + 1, plotsize.length)) + 50;
        var paramStr = "menubar=yes,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height;
        open (URL, "targetPlotWindow", paramStr);
    }
}

