<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<STYLE type="text/css">
a:link {text-decoration: none; color: #3399FF;}
a:visited {text-decoration: none; color: red;}
a:active {text-decoration: none; color: #3399FF;}
a:hover {text-decoration: none; color: red;}

input.submit  {border:0; color:#3399FF; font-family:helvetica; font-weight:bold;}
input.submit:hover  {border:0; color:red; font-family:helvetica; font-weight:bold;}

a:link img {border:0 none;}
a:hover hover img {position:relative; right:0px; top:0px; border:0; width:70px; margin:0 0 0 -70px}
a:hover hover2 img {position:relative; left:0px; top:0px; border:0; height:25px; margin:0 0 0 -187px}
a:hover hover3 img {position:relative; left:0px; top:0px; border:0; height:25px; margin:0 0 0 -125px}
a:hover hover4 img {position:relative; left:0px; top:0px; border:0; height:25px; margin:0 0 0 -62px}
a:visited img {border:0 none;}

body
{
font-size : 14px;
font-family : Verdana,Helvetica,Arial,sans-serif;
}


table
{ 
border: 0px #000000 solid;
border-collapse: collapse;
border-spacing: 4px; 
font-size : 10px;
font-family : Verdana,Helvetica,Arial,sans-serif;
}

td { padding: 2px; }
th { padding: 2px; }


table.userlists
{
border: 0px #000000 solid;
border-collapse: collapse;
border-spacing: 0px;
}

table.userlists td
{
border: 0px #FFFFFF solid;
border-collapse: collapse;
border-spacing: 0px;
padding: 0px;
font-size : 14px;
font-family : Verdana,Helvetica,Arial,sans-serif;
color : #FFFFFF; 
}

table.userlists th
{
border: 0px #FFFFFF solid;
border-collapse: collapse;
border-spacing: 0px;
padding: 5px;
font-size : 16px;
font-family : Verdana,Helvetica,Arial,sans-serif;
color : #FFFFFF; 
}


table.images
{ 
border: 0px #FFFFFF solid;
background: #424242;
border-collapse: collapse;
border-spacing: 0px; 
font-size : 10px;
font-family : Verdana,Helvetica,Arial,sans-serif;
}

td.images
{
padding: 2px;
display:block;
}

table.forms th, table.forms td
{
border: 0px #FFFFFF solid;
border-collapse: collapse;
border-spacing: 5px;
font-size : 14px;
font-family : Verdana,Helvetica,Arial,sans-serif;
color : #FFFFFF; 
}

 
table.followuplists tbody tr:hover
{
background: #ccc;
}


ul {list-style-type:none;}
img{display:block;}

/* 2012-12-10 KWS Added temporary IDs for Div elements used in page */

#plots {
    width:1206px;
    height:604px;
    margin:0 auto;
    position: relative;
}
#lightcurve {
    width:900px;
    height:600px;
    border:#000 solid;
    border-width:0px 0px 0px 0px;
    position: absolute;
    top: 0;
    left: 0;
}
#lightcurveforced {
    width:900px;
    height:600px;
    border:#000 solid;
    border-width:0px 0px 0px 0px;
    position: absolute;
    top: 0;
    left: 0;
}
#colourplot {
    width:900px;
    height:600px;
    border:#000 solid;
    border-width:0px 0px 0px 0px;
    position: absolute;
    top: 0;
    left: 0;
}
#recurrenceplot {
    width:280px;
    height:280px;
    border:#000 solid;
    border-width:0px 0px 0px 0px;
    /* float:right; */
    position: absolute;
    top: 30px;
    right: 50px;
}
#recurrence {
    width:200px;
    height:299px;
    border:#000 solid;
    border-width:0px 0px 0px 0px;
    position: absolute;
    top: 0;
    left: 0;
}
#locationmap {
    width:200px;
    height:299px;
    border:#000 solid;
    border-width:0px 0px 0px 0px;
    position: absolute;
    bottom: 0;
    right: 80px;
}
</STYLE>

<title>{% block title %}Main Base Title{% endblock %}</title>


<SCRIPT language="JavaScript" type="text/javascript">

    // Division with integer truncation.

    function idiv (n, d) { return Math.floor(n / d); }

    // Get year.
    //
    // N.B. Old browsers do not support getFullYear method so use
    //      plain getYear instead. Also getYear returns a value
    //      (year - 1900) on some browsers and a 4-digit year on
    //      others.

    function GetYear (date) {
        var year = date.getYear();
        if (year < 1900) year += 1900;
        return year;
    }

    // Get Month where January = 1 (not 0).

    function GetMonth (date) {
        return date.getMonth() + 1;
    }

    // Get leap second count.
    //   See http://tycho.usno.navy.mil/leapsec.html
    //   See http://www.boulder.nist.gov/timefreq/pubs/bulletin/leapsecond.htm
    //   See http://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat
    //   "from 1999 January 1, 0h UTC, until further notice : UTC-TAI = - 32 s"

    function LeapSecondCount (date) {
        var year = GetYear(date);
        var month = GetMonth(date);
        if ( (year >= 2009) && (month >= 1) ) return 34;
        if ( (year >= 2006) && (month >= 1) ) return 33;
        if ( (year >= 1999) && (month >= 1) ) return 32;
        if ( (year >= 1997) && (month >= 7) ) return 31;
        if ( (year >= 1996) && (month >= 1) ) return 30;
    }

    // Get elapsed seconds since midnight.

    function GetElapsed (date) {
        var hours = date.getHours();
        var minutes = date.getMinutes();
        var seconds = date.getSeconds();
        var elapsed = (((hours * 60) + minutes) * 60) + seconds;
        return elapsed;
    }

    // Get Modified Julian Date.

    function GetMjd1 (date) {
        var year = GetYear(date);
        var month = GetMonth(date);
        var day = date.getDate();
        return GetMjd3(year, month, day);
    }

    function GetMjd3 (year, month, day) {
        var mjd =
        367 * year
        - idiv(7 * (idiv(month + 9, 12) + year), 4)
        - idiv(3 * (idiv(idiv(month + 9, 12) + year - 1, 100) + 1), 4)
        + idiv(275 * month, 9)
        + day
        + 1721028
        - 2400000;
        return mjd;
    }

    // Get day of year.

    function GetDayOfYear (date) {
        var year = GetYear(date);
        var Doy = GetMjd1(date) - GetMjd3(year, 1, 1) + 1;
        return Doy;
    }

    // Format date/time in yyyy-mm-dd format (ISO 8601).

    function FormatIso8601 (date) {
        var year = GetYear(date);
        var month = GetMonth(date);
        var day = date.getDate();
        var hours = date.getHours();
        var minutes = date.getMinutes();
        var seconds = date.getSeconds();

        var s = "";
        s += Fixed4(year) + "-";
        s += Fixed2(month) + "-";
        s += Fixed2(day) + " ";
        s += Fixed2(hours) + ":";
        s += Fixed2(minutes) + ":";
        s += Fixed2(seconds);
        return s;
    }

    // Format GPS time.

    function FormatGpsTime (date, f) {
        var GpsDayCount = GetMjd1(date) - GetMjd3(1980, 1, 6);
        var GpsWeekCount = Math.floor(GpsDayCount / 7);
        var GpsCycle = Math.floor(GpsWeekCount / 1024);
        var GpsDay = GpsDayCount % 7;
        var GpsWeek = GpsWeekCount % 1024;
        var GpsSecond = (GpsDay * 86400) + GetElapsed(date);

        // N.B. Older browsers do not support switch().
        if (f == 0) {
            return "week " + GpsWeekCount;
        }
        if (f == 1) {
            return GpsSecond + " s";
        }
        if (f == 2) {
            var s = "";
            s += "cycle " + GpsCycle;
            s += " week " + Fixed4(GpsWeek);
            s += " day " + GpsDay;
            return s;
        }
    }

    // Compute Loran Time-Of-Coincidences for GRI 9940.

    function LoranNextToc (date, n) {
        var next = new Date(date.getTime() + (n * 1000));
        var hours = next.getHours();
        var minutes = next.getMinutes();
        var seconds = next.getSeconds();

        var s = "";
        s += Fixed2(hours) + ":";
        s += Fixed2(minutes) + ":";
        s += Fixed2(seconds);
        return s;
    }

    function LoranUntilToc (date) {
        var days = GetMjd1(date) - GetMjd3(1958, 1, 1);
        var seconds = GetElapsed(date);
        var gri = 994;
        var lcm = 2;
        var toc = gri / lcm;
        var nexttoc = (86400 % toc) * days + seconds;
        nexttoc %= toc;
        return toc - nexttoc;
    }

    // Get weekday name.

    function WeekDayName (date) {
        var DayName = new Array ("Sunday", "Monday", "Tuesday",
            "Wednesday", "Thursday", "Friday", "Saturday");
        return DayName[(3 + GetMjd1(date)) % 7];
    }

    // Display timezone offset as hours east of UTC.

    function ShowTimezone (date) {
        if (date.getTimezoneOffset() > 0) {
            return "UTC-" + date.getTimezoneOffset( ) / 60;

        } else {
            return "UTC+" + date.getTimezoneOffset( ) / -60;
        }
    }

    // Create fixed width integer strings.

    function Fixed2 (n) {
        return (n < 10 ? "0" : "") + n;
    }
    function Fixed3 (n) {
        n = Fixed2(n);
        return (n < 100 ? "0" : "") + n;
    }
    function Fixed4 (n) {
        n = Fixed3(n);
        return (n < 1e3 ? "0" : "") + n;
    }
    function Fixed5 (n) {
        n = Fixed4(n);
        return (n < 1e4 ? "0" : "") + n;
    }
    function Fixed6 (n) {
        n = Fixed5(n);
        return (n < 1e5 ? "0" : "") + n;
    }

    var timerID = null;
    var timerRunning = false;

    // Main 1 Hz timer callback.

    function DisplayTime () {

        // N.B. Old browsers do not support getUTC methods.
        var local = new Date();
        utc = new Date(local.getTime() + local.getTimezoneOffset() * 60 * 1000);
        tai = new Date(utc.getTime() + (LeapSecondCount(utc) * 1000));
 
        document.Boxes.row2d.value = GetMjd1(tai) +
           "." + Fixed5(Math.floor(GetElapsed(utc) / 86400 * 1e5));

        //
        // Delay thread until next second trying to align the
        // display to within milliseconds of the PC clock.
        //

        var ms = local.getTime() % 1000;
        if (ms > 500) ms -= 1000;
        timerID = setTimeout("DisplayTime()", 1000 - ms);
        timerRunning = true;
    }

    function TimerThread () {
        if (timerRunning) {
            clearTimeout(timerID);
            timerRunning = false;
        }
        DisplayTime();
    }
</SCRIPT>

{% block lightcurvedataglobal %}
{% endblock %}

{% block lightcurvedata %}
{% endblock %}

{% block lightcurvedataforced %}
{% endblock %}

{% block lightcurvedataforcedflux %}
{% endblock %}

{% block colourplotdataglobal %}
{% endblock %}

{% block colourplotdata %}
{% endblock %}

{% block colourplotdataforced %}
{% endblock %}

{% block recurrenceplotdata %}
{% endblock %}

</head>
{% block content %}
Unset Content
{% endblock %}
</body>
</html>
