// Author: Qam1
// Name: Solar System Screensaver
// License: Public Domain
// Version: 300-1
// Shortcut: Ctrl+D,0
// Description: Screensaver of various happenings in the Solar System. 300 events in all!

// Made on Stellarium Version 0.16.1



// This is the pause in seconds between each event
// feel free to change to your likeing

spd = 7;

// 

core.setDeltaTAlgorithm("WithoutCorrection"); 

LabelMgr.deleteAllLabels();

// Number of Events
l = 300;


degstring = "\u00B0";
SolarSystem.setFlagLightTravelTime(true);
StelSkyDrawer.setFlagLuminanceAdaptation(false);
SolarSystem.setLabelsAmount(20);   	
SolarSystem.setFlagMoonScale(4);  
LandscapeMgr.setFlagAtmosphere(true);



y = core.getScreenHeight()/768;
x = core.getScreenWidth()/1024;


eg = GridLinesMgr.getFlagEquatorGrid();


ob = SolarSystem.getFlagOrbits();


	

id = new Array(length=l);
for(i=1; i<l+1; i++)
{
id[i] = i;
}

// mix 'em up - A Swap command would be nice
for(i=0; i<l*20; i++)
{
var r = Math.floor(Math.random()*l)+1;
var rr = Math.floor(Math.random()*l)+1;


s = id[r];
ss = id[rr];

id[r] = ss;
id[rr] = s;

}




r = 1


while (1)
{

r = r + 1
if (r==l+1)
{
r = 1
}


dir = 0;

sfn = 0;

txt1 = LabelMgr.labelScreen(id[r], 10 * x, 600 * y, false, 40 * x, "#78FF17");
// LabelMgr.setLabelShow(txt1, true);


d1 = ""; d2 = "";
d2 = ""; c2 = "";



if (id[r] == 1)
{
// Gan De's Gandymede
core.setObserverLocation(116.87, 37.19, 20, 1, "", "Earth");
core.setDate("-365-05-28T17:00:51", "utc");

core.selectObjectByName("Ganymede", pointer = true);

StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*2)+3;
StelMovementMgr.zoomTo(pick/10, 1);

d1 = "Gan De may have discovered Gandymede summer 365 B.C."; 
c1 = "#7ADAFF"


}

if (id[r] == 2)
{
// Jupiter/Sun from Saturn
core.setObserverLocation(-15, -90, 2700, 1, "", "Saturn");
core.setDate("-85-09-16T19:43:03", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.random()*200+7;
pick = pick * 0.001;
StelMovementMgr.zoomTo(pick);



d1 = "The last Jupiter Transit of the Sun as seen from Saturn 9/16/-85";  
c1 = "#FFF1FF"
c2 = c1

}


if (id[r] == 3)
{
// Uranus  Hipparchos

core.setObserverLocation(29.721, 40.4286, 99, 1, "Nicaea", "Earth");
core.setDate("-128-03-21T23:47:07", "utc");

core.selectObjectByName("Uranus", pointer = true);
var pick = Math.floor(Math.random()*45+15);

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(pick, 1);


d1 = "Hipparchos Records Uranus as a Star 128 BC"
c1 = "#24F82C"

}



if (id[r] == 4)
{
// Mars - Jupiter - Saturn   12/22/1503 & 12/26/1503
core.setObserverLocation(-0.71, 40.50, 26, 1, "", "Earth");
core.setDate("1503-12-26T00:00:10", "utc");

core.selectObjectByName("Mars", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
core.setDate("1503-12-22T00:00:10", "utc");
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
StelMovementMgr.zoomTo(44.9, 1);
	
d1 = "Jupiter Opposition and then Mars + Saturn same day Oppositions"
c1 = "#EFEE01"
d2 = "4 days later 12/22/1503 and 12/26/1503"
c2 = "#EFEE01"

}



if (id[r] == 5)
{
// Columbus' Eclipse
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-76.8, 17.9833, 45, 1, "", "Earth");
core.setDate("1504-03-01T00:29:07", "utc");

core.selectObjectByName("Moon", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4)+1
StelMovementMgr.zoomTo(pick, 1);

d1 = "Columbus predicts lunar eclipse for the Jamaicans 2/29/1504"
c1 = "#FAFAFF"


SolarSystem.setFlagMoonScale(0);   	
}


if (id[r] == 6)
{
// Jupiter Galileo Galilei
core.setObserverLocation(43.75, 11.3333, 26, 1, "", "Earth");
core.setDate("1610-01-07T18:36:07", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", false);

StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*5);
if (pick == 0)
{
core.selectObjectByName("Callisto", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Io", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Europa", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Ganymede", pointer = true);
}

StelMovementMgr.zoomTo(0.333, 1);

d1 = "Galileo Galilei Discovers his namesake Satellites 1/7/1610"
c1 = "#19AF77"


}


if (id[r] == 7)
{
//  Galileo Misses Neptune


core.setObserverLocation(-0.71, 40.50, 26, 1, "", "Earth");
core.setDate("1613-01-27T02:24:01", "utc");

core.selectObjectByName("Neptune", pointer = true);
var pick = Math.floor(Math.random()*2+4);

LandscapeMgr.setFlagAtmosphere(false);

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(pick/10, 1);


d1 = "Galileo Misses Discovering Neptune when researching his recently discovered moons."
c1 = "#74A8AC"

d2 = "He incorrectly labeled it a star."
c2 = c1

}




if (id[r] == 8)
{
// Uranus Discovery 

core.setObserverLocation(2.367, 51.3825, 34, 1, "Bath", "Earth");
core.setDate("1781-03-13T22:39:07", "utc");

core.selectObjectByName("Uranus", pointer = true);
var pick = Math.floor(Math.random()*40+20);

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(pick, 1);


d1 = "William Herschel Discovers Uranus 3/13/1781"
c1 = "#74A82C"

}



if (id[r] == 9)
{
//  Giuseppe Piazzi discovers Ceres 


core.setObserverLocation(13.3, 38.1, 14, 1, "Palermo", "Earth");
core.setDate("1801-01-01T21:24:01", "utc");

core.selectObjectByName("(1) Ceres", pointer = true);
var pick = Math.floor(Math.random()*30+15);

StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(pick, 1);


d1 = "Giuseppe Piazzi Discovers Ceres"
c1 = "#74A8AC"

d2 = "New Years Day 1801"
c2 = c1

}



if (id[r] == 10)
{
// Neptune Discovery 

core.setObserverLocation(13.3777, 52.516, 39, 1, "Berlin", "Earth");
core.setDate("1846-09-23T22:39:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
var pick = Math.floor(Math.random()*10+10);

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(pick, 1);


d1 = "Johann Galle and/or Urbain Le Verrier Discover Neptune 9/23/1846"
c1 = "#7468FC"

}




if (id[r] == 11)
{
// Einstein's Eclipse
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(6.601181, 0.515789, 45, 1, "", "Earth");
core.setDate("1919-05-29T14:15:18", "utc");

core.selectObjectByName("Moon", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*6)+1
StelMovementMgr.zoomTo(pick, 1);

d1 = "That Solar eclipse that proved Einstein's Theory of Reletivity 5/29/1919"
c1 = "#FAFAFF"


SolarSystem.setFlagMoonScale(0);   	
}


if (id[r] == 12)
{
// Pluto Discovery
core.setObserverLocation(-111.66, 35.203, 2210, 1, "", "Earth");
core.setDate("1930-01-23T01:45:07", "utc");

core.selectObjectByName("Pluto", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(.28, 1);

d1 = "Clyde Tombaugh photographs Pluto for the 1st time 1/23/1930"
c1 = "#52D1FC"


}




if (id[r] == 13)
{
// Earth from Apollo 11  07/20/1969
core.setObserverLocation(23.472969, 0.674081, 4, 1, "", "Moon");
core.setDate("1969-07-20T20:17:40", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = false);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
var pick = Math.floor(Math.random()*2+1)*6
StelMovementMgr.zoomTo(pick, 1);
	
d1 = "Earth as the Apollo 11 Astronauts viewed it  07/20/1969"
c1 = "#F1FAFF"


}


if (id[r] == 14)
{
// Carley's Eclipse
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-60.0, 45.133, 1, 1, "", "Earth");
core.setDate("1972-07-10T20:41:05", "utc");

core.selectObjectByName("Moon", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4)+1
StelMovementMgr.zoomTo(pick, 1);

d1 = "And you flew your private jet up to Nova Scotia for the Total Eclispe of the Sun"
c1 = "#FAFAFF"

d2 = "You're so vain - I bet you think this script is about you. Don't you."
c2 = "#FFFFFF" 

 	
}



if (id[r] == 15)
{
// Voyager II - 8/20/1977

core.setObserverLocation(25.71, 44.24, 1126, 1, "", "Earth");
core.setDate("1977-08-20T13:13:07", "utc");
var pick = Math.floor(Math.random()*4);
core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);

core.selectObjectByName("Saturn", pointer = true);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Neptune", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Uranus", pointer = true);
}

SolarSystem.setLabelsAmount(20);   	

StelMovementMgr.zoomTo(163, 1);

d1 = "Planets at Voyager II launch 8/20/1977"
c1 = "#FFFFFF"


}


if (id[r] == 16)
{
// Uranus - Neptune Conjunction 8/19/1993
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("1993-08-19T01:50:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Uranus", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(17, 1);

d1 = "Uranus - Neptune Conjunction 8/19/1993"
c1 = "#FF14FA"


}

if (id[r] == 17)
{
// 2002 Planet Grouping 
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2002-05-06T01:15:07", "utc");

core.selectObjectByName("Vesta", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*5);
if (pick == 0)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.zoomTo(60, 1);

d1 = "Planetary Grouping 5/6/2002"
c1 = "#791BC9"


}


if (id[r] == 18)
{
// Mars - Closest Approach in 65,000 Years 08/27/2003

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2003-08-27T05:09:07", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(61, 1);


d1 = "Mars - Closest Approach in 65000 Years 08/27/2003"
c1 = "#FF0000"


}


if (id[r] == 19)
{
// Venus brightest 21st century
core.setObserverLocation(-24.5, 40.5, 1738, 1, "", "Earth");
core.setDate("2005-12-10T19:59:36", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(28, 1);
SolarSystem.setFlagOrbits(true);

d1 = "Brightest Venus of the 21st Century  12/10/2005 (-4.885 mag)";
c1 = "#B5FFA7"



SolarSystem.setFlagOrbits(false);   
}


if (id[r] == 20)
{
// Smiley
SolarSystem.setFlagMoonScale(4);   	
StelSkyDrawer.setFlagLuminanceAdaptation(true);
core.setObserverLocation(151.12, -33.52, 64, 1, "", "Earth");
core.setDate("2008-12-01T09:45:07", "utc");

core.selectObjectByName("Venus", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4)+3;
StelMovementMgr.zoomTo(pick*5, 1);

d1 = "The Sydney Smile --> Venus-Jupiter-Moon 12/1/2008"
c1 = "#FFFFFF"


StelSkyDrawer.setFlagLuminanceAdaptation(false);
}



if (id[r] == 21)
{
// 4 Planet Grouping 2010
core.setObserverLocation(-73.71, 7.50, 26, 1, "", "Earth");
core.setDate("2010-08-13T00:01:07", "utc");

core.selectObjectByName("Moon", pointer = true);
var pick = Math.floor(Math.random()*5);
if (pick == 0)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*30)+44;

StelMovementMgr.zoomTo(pick, 1);

d1 = "Four planet and Moon Grouping 8/13/2010"
c1 = "#A95F3A"


}

if (id[r] == 22)
{
// Jupiter - Uranus Opposition Together 9/21/2010

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2010-09-21T03:39:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Uranus", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(22, 1);


d1 = "Jupiter - Uranus come into Opposition on the same day 9/21/2010"
c1 = "#74A82C"


}


if (id[r] == 23)
{
// Gandymede's Greatest Elongation 09/23/2010
core.setObserverLocation(-145.5, 15, 64, 1, "", "Earth");
core.setDate("2010-09-23T14:12:53", "utc");

core.selectObjectByName("Ganymede", pointer = true);

StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*2)+3;
StelMovementMgr.zoomTo(pick/10, 1);

SolarSystem.setFlagOrbits(true);

d1 = "Gandymede Greatest Elongation away from Jupiter (0.1049 Degrees)"; 
c1 = "#7ADAFF"

d2 = "in the 21st century as seen from Earth 09/23/2010";
c2 = "#7ADAFF"



}


if (id[r] == 24)
{
// Brightest Ganymede from Callisto 


long = -170.40
lat = 0;
alt = 116
dir = 1
p1 = "Callisto";
p2 = "Ganymede"

	
core.setObserverLocation(long, lat, alt, 0, "", p1);
core.setDate("2011-04-21T14:41:57", "UTC");

core.selectObjectByName(p2, pointer = true);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.floor(Math.random())+.8
StelMovementMgr.zoomTo(pick, 1);

d1 = "Brightest Ganymede of the 21st Century -9.478 Mag."
c1 = "#BABABF"

d2 = "From Callisto 4/21/2011"
c2 = c1


  	
}





if (id[r] == 25)
{
// Grouping 2011

core.setObserverLocation(-73.71, -35.24, 1126, 1, "", "Earth");
core.setDate("2011-05-11T10:32:08", "utc");
var pick = Math.floor(Math.random()*4);

core.selectObjectByName("Venus", pointer = true);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Mercury", pointer = true);
}

StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   	

StelMovementMgr.zoomTo(29, 1);

d1 = "Nice little morning planet Grouping 2011"
c1 = "#B22FAA"

}


if (id[r] == 26)
{
// Jupiter from Mars 
core.setObserverLocation(-73.71, 45.25, 1176, 1, "", "Mars");
core.setDate("2011-05-19T06:32:30", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(74, 1);

d1 = "Jupiter closest 21st century opposition from Mars 5/19/2011";
c1 = "#F7714F"



}




if (id[r] == 27)
{
// Vesta

core.setObserverLocation(-74, 40.24, 16, 1, "", "Earth");
core.setDate("2011-08-01T05:42:07", "utc");

core.selectObjectByName("Vesta", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*75+25;
StelMovementMgr.zoomTo(pick, 1);


d1 = "Extremely close Vesta Opposition 8/1/2011"
c1 = "#A0A0A0"

sfn = 1;

}


if (id[r] == 28)
{
// Venus Transit

core.setObserverLocation(-125.3, 40.24, 36, 1, "", "Earth");
core.setDate("2012-06-06T01:55:56", "utc");


core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*6)+1;
pick = pick / 10 
StelMovementMgr.zoomTo(pick, 1);


d1 = "The last Venus Transit of the Sun 6/6/2012"
c1 = "#000007"

}


if (id[r] == 29)
{
// Jup & Venus
core.setObserverLocation(-74.5, 16.5, 126, 1, "", "Earth");
core.setDate("2012-07-09T09:00:07", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);
SolarSystem.setLabelsAmount(20);   

var pick = Math.floor(Math.random()*2)+1;
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}

StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(30, 1);

d1 = "Jupiter & Venus in Taurus 7/9/2012"
c1 = "#FFFFFF"


}


if (id[r] == 30)
{
// Jupiter Spread
core.setObserverLocation(-175.33, 44.24, 1126, 1, "", "Earth");
core.setDate("2012-11-23T16:00:07", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", false);

StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*5);
if (pick == 0)
{
core.selectObjectByName("Callisto", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Io", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Europa", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Ganymede", pointer = true);
}

StelMovementMgr.zoomTo(0.355, 1);

d1 = "All 4 Galilean Satellites at their Extreme Elongations at the same time 11/23/2012"
c1 = "#FFFFFF"


}

if (id[r] == 31)
{
// Uranus

core.setObserverLocation(36.3, 4.24, 36, 1, "", "Earth");
core.setDate("2013-05-23T02:32:07", "utc");

core.selectObjectByName("Uranus", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*6+1;
pick = pick * 0.001;
StelMovementMgr.zoomTo(pick);

d1 = "Uranus Occulted some 9th Mag Star in Pisces  05/23/2013"
c1 = "#33FF4F"


}




if (id[r] == 32)
{
// Lunar Eclipse near Spica & mars
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-76.8, 17.9833, 45, 1, "", "Earth");
core.setDate("2014-04-15T07:15:07", "utc");

core.selectObjectByName("Moon", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4)+13
StelMovementMgr.zoomTo(pick, 1);

d1 = "Lunar eclipse near Spica and Mars 4/15/2014"
c1 = "#FAFAFF"


SolarSystem.setFlagMoonScale(0);   	
}


if (id[r] == 33)
{
// Vesta - Ceres 7/5/2014
core.setObserverLocation(116.36, -4.28, 126, 1, "", "Earth");
core.setDate("2014-07-05T11:19:07", "utc");

core.selectObjectByName("Vesta", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("(1) Ceres", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*70)+10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "A very close 0.166" + degstring + " Ceres - Vesta Conjunction 07/13/2014"
c1 = "#F0F0F0"


sfn = 1;

}





if (id[r] == 34)
{
// Moon Transits Earth 7/6/2014
core.setObserverLocation(-92.90, 40.25, 126, 1, "", "Mars");
core.setDate("2014-07-06T01:36:52", "utc");

SolarSystem.setFlagMoonScale(0);   

core.selectObjectByName("Earth", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.01, 1);

var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Moon", pointer = false);
}
d1 = "Moon Transits Earth as seen from Mars 7/06/2014"
SolarSystem.setFlagMoonScale(0);   	
c1 = "#0F0FFF"
	
}



if (id[r] == 35)
{
// Total Eclipse of the sun by Europa from Ganymede 

dir = 4
long = 0
lat = -55.5
alt =26
p1 = "Ganymede"
p2 = "Europa"



core.setObserverLocation(long, -55.5, 26, 0, "", "Ganymede");
core.setDate("2015-03-28T18:28:41", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Europa", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*3)+1.5;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Total Eclipse of the sun by Europa from Ganymede 3/28/2015"
c1 = "#FFFF07"
sfn = 1;


}

if (id[r] == 36)
{
// Grouping 2015

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2015-11-07T09:44:07", "utc");
var pick = Math.floor(Math.random()*3);

core.selectObjectByName("Venus", pointer = true);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   	

StelMovementMgr.zoomTo(63, 1);

d1 = "Nice little morning planet Grouping 2015"
c1 = "#F2FFFF"


}

if (id[r] == 37)
{
// Saturn Venus Antares 1/8/2016
core.setObserverLocation(27.66, 10.66, 36, 1, "", "Earth");
core.setDate("2016-01-09T03:02:35", "UTC");

core.selectObjectByName("Saturn", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

var pick = (Math.random()*9+20);
StelMovementMgr.zoomTo(pick, 1);



d1 = "Close Venus - Saturn Conjunction 0.06" + degstring + " 1/9/2016";
c1 = "#F331F1"

}


if (id[r] == 38)
{
// Mercury & Pluto 
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2016-01-30T11:19:30", "utc");

SolarSystem.setLabelsAmount(20);   	
core.selectObjectByName("Mercury", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Pluto", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(24.7, 1);

d1 = "Mercury - Pluto conjunction 1/30/2016";
c1 = "#BB4234"



}

if (id[r] == 39)
{
// Mars & Saturn & Antares 
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2016-08-24T01:50:07", "utc");

core.selectObjectByName("Saturn", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("HIP 80763", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(42, 1);

d1 = "Mars - Saturn - Antares 8/24/2016"
c1 = "#FF1B00"


}


if (id[r] == 40)
{
// 3 Planet Grouping 2016
core.setObserverLocation(-73.39, -40.50, 26, 1, "", "Earth");
core.setDate("2016-08-27T23:53:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Mercury", pointer = true);
}


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*50)+10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Close 0.06" + degstring + " Jupiter and Venus Conjunction with Zavijava and Mercury nearby 8/27/2016"
c1 = "#F611FA"


}


if (id[r] == 41)
{
// Earth Circlet

core.setObserverLocation(-19.499,15.5 , 40.6, 1, "", "Mercury");
core.setDate("2016-09-07T00:04:07", "utc");

core.selectObjectByName("Earth", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*10+10;

StelMovementMgr.zoomTo(pick);

d1 = "Earth in Circlet from Mercury 09/06/2016"
c1 = "#BBBBFF"

LandscapeMgr.setFlagAtmosphere(false);


}



if (id[r] == 42)
{
// Moon Mars and Venus
SolarSystem.setFlagMoonScale(4);   	
StelSkyDrawer.setFlagLuminanceAdaptation(true);
core.setObserverLocation(-73.710, 44.235, 1121, 1, "", "Earth");
core.setDate("2017-01-31T23:45:07", "utc");

core.selectObjectByName("Venus", pointer = true);

var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}


StelMovementMgr.setFlagTracking(true);



var pick = Math.floor(Math.random()*10)+20;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Venus-Mars-Moon 1/31/2017"
c1 = "#FFFFFF"


StelSkyDrawer.setFlagLuminanceAdaptation(false);
}




if (id[r] == 43)
{
// Venus - Earth - Jupiter - Spica 02/27/2017
core.setObserverLocation(98, 32.27, 16, 1, "", "Mars");
core.setDate("2017-02-27T13:25:42", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}
StelMovementMgr.setFlagTracking(true);




var pick = Math.floor(Math.random()*20)+20;
StelMovementMgr.zoomTo(pick, 0);

d1 = "Venus, Earth, Jupiter and Spica from Mars 02/27/2017"
c1 = "#1DFFB0"


}







if (id[r] == 44)
{
// Phobos from Deimos //@#@

long = -26.6
lat = 37.5
alt = 26
p1 = "Deimos"
p2 = "Phobos"

dir = -1

core.setObserverLocation(long, lat, alt,  0, "", p1);
core.setDate("2017-04-26T18:54:55", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName(p2, pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(5.43, 1);

d1 = "Phobos transits the sun before Mars eclipses it - from Deimos 4/26/2017"
c1 = "#F0F0F0"

sfn = 1;

}



if (id[r] == 45)
{
// Uranus Greatest Brillancy
core.setObserverLocation(-160.25, 20.25, 126, 1, "", "Neptune");
core.setDate("2017-05-01T07:07:11", "UTC");

core.selectObjectByName("Uranus", pointer = true);
StelMovementMgr.setFlagTracking(true);
SolarSystem.setFlagOrbits(true);

StelMovementMgr.zoomTo(43, 1);


d1 = "Uranus Greatest Brillancy of the 21st century from Neptune 05/01/2017  +7.4711 Mag"; 
c1 = "#11FF18"

}



if (id[r] == 46)
{
// Saturn Jupiter 6/20/2017

dir = -1

long = -178
lat = 19.66
alt = 36
p1 = "Pluto";


core.setObserverLocation(long, lat, alt, 0, "", p1);
core.setDate("2017-06-20T23:42:35", "UTC");

p2 = "Saturn";
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
p2 = "Jupiter";
}

core.selectObjectByName(p2, pointer = true);


StelMovementMgr.setFlagTracking(true);

var pick = (Math.random()*200+200)/10000;
StelMovementMgr.zoomTo(pick, 1);

LandscapeMgr.setFlagAtmosphere(false);


d1 = "Closest Jupiter - Saturn Conjunction 0.011" + degstring + " of the Millennium from Pluto 6/20/2017";
c1 = "#F331F1"

sfn = 1;


}



if (id[r] == 47)
{
// Jupiter from Saturn GE




core.setObserverLocation(-74.5, -10.5, 200000, 1, "", "Saturn");
core.setDate("2017-08-24T09:20:28", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("HIP 32246", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(46.3, 1);
SolarSystem.setFlagOrbits(true);

SolarSystem.setLabelsAmount(20);   
core.selectObjectByName("Jupiter", pointer = true);

d1 = "Jupiter Greatest Elongation (32.92 Degrees) from Saturn 8/24/2017"
c1 = "#B5FFA7"


SolarSystem.setLabelsAmount(20);
SolarSystem.setFlagOrbits(true);   

}



if (id[r] == 48)
{
// Jup Ple from Callisto 08/28/2017

dir = -1

long = -10.5
lat = 30
alt = 0
p1 = "Callisto";
p2 = "Jupiter";


core.setObserverLocation(-10.5, 30, 0, 0, "", "Callisto");
core.setDate("2017-08-28T22:57:37", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", pointer = false);
var pick = (Math.random()*2);

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(pick*7+7, 1);

d1 = "Pleiades above a cresent Jupiter from Callisto 08/28/2017"
SolarSystem.setFlagMoonScale(0);   	
c1 = "#FF0007"

sfn = 1;

 	
}







if (id[r] == 49)
{
// Earth Transit from Pluto


dir = 1

long = -73.71
lat = 10.25
alt = 40
p1 = "Pluto";
p2 = "Sun";




core.setObserverLocation(-73.71, 10.25, 40, 1, "", "Pluto");
core.setDate("2018-07-12T15:20:30", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.00613);

d1 = "Earth Transits Sun as seen from Pluto 7/12/2018";
c1 = "#11777F"



}




if (id[r] == 50)
{
// Nice Ceres Grouping 7/21/2018

long = 74
lat = 40.5
alt = 16
p1 = "(1) Ceres";
p2 = "Mercury";

dir = -2

core.setObserverLocation(74.3, 40.5, 16, 1, "", "(1) Ceres");
core.setDate("2018-07-21T01:00:07", "utc");

LandscapeMgr.setFlagAtmosphere(false);


core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Mars", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(37, 1);


d1 = "A nice grouping of Mercury, Venus, Earth, Mars and Neptune"
c1 = "#FF2222"

d2 = "From Ceres 7/21/2018"
c2 = "#FF2222"



}


if (id[r] == 51)
{
// Mars - Closest (although not as close) to Earth since 2003  7/27/2018

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2018-07-27T05:09:07", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(51, 1);


d1 = "Mars closest (although not as close) to Earth since 2003 - 7/27/2018"
c1 = "#FF0F00"


}


if (id[r] == 52)
{
// Uranus Greatest Elongation
core.setObserverLocation(-33.00, 22.5, 126, 1, "", "Neptune");
core.setDate("2018-09-20T12:52:20", "UTC");

core.selectObjectByName("Uranus", pointer = true);
StelMovementMgr.setFlagTracking(true);
SolarSystem.setFlagOrbits(true);

StelMovementMgr.zoomTo(34, 1);


d1 = "Uranus Greatest Elongation from Neptune 09/20/2018 - 41.50" + degstring; 
c1 = "#11FF18"

SolarSystem.setFlagOrbits(false);

}




if (id[r] == 53)
{
// Venus Dimmest 
core.setObserverLocation(61.1, 9.25, 1738, 1, "", "Earth");
core.setDate("2019-05-30T00:54:36", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*140)+19
StelMovementMgr.zoomTo(pick, 1);


SolarSystem.setFlagOrbits(true);

d1 = "The Dimmest Illumination that Venus gets (-3.725 mag) 5/30/2019";
c1 = "#B5FFA7"
 
}



if (id[r] == 54)
{
// Jupiter's Moons - Triple Transit

core.setObserverLocation(26.1, 23.24, 1126, 1, "", "Earth");
core.setDate("2019-10-31T16:36:00", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);
var pick = Math.floor(Math.random()*4);
if (pick == 1)
{
core.selectObjectByName("Io", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Europa", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Callisto", pointer = true);
}
d1 = "Triple (2 True - 1 Gazing) Jupiter Moon Transit 8/17/2032"
c1 = "#CC7802"

SolarSystem.setFlagMoonScale(0);  

sfn = 1;


}




if (id[r] == 55)
{
// Mercury Next  Transit

core.setObserverLocation(-74.3, 41.24, 1126, 1, "", "Earth");
core.setDate("2019-11-11T15:47:56", "utc");


core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*3)+1;
pick = pick / 10 
StelMovementMgr.zoomTo(pick, 1);


d1 = "The next Mercury Transit of the Sun 11/11/2019"
c1 = "#000007"

}




if (id[r] == 56)
{
// Mars Conjunction Pluto 3/23/2020
core.setObserverLocation(1.80, 12.75, 12, 1, "", "Earth");
core.setDate("2020-03-23T05:20:51", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Pluto", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Mars", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


var pick = Math.random()*460+40;
pick = pick /1000
StelMovementMgr.zoomTo(pick);

d1 = "A close 0.013" + degstring + " Mars Pluto Conjuncton 12/2/2020"

c1 = "#FF0007"
 	
}


if (id[r] == 57)
{
// Mars - Jupiter - Saturn - Pluto Conjunction 3/26/2020
core.setObserverLocation(-73.71, 45.24, 1126, 1, "", "Earth");
core.setDate("2020-03-26T09:16:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Saturn", pointer = true);
}

if (pick == 1)
{
core.selectObjectByName("Mars", pointer = true);
}

if (pick == 2)
{
core.selectObjectByName("Pluto", pointer = true);
}

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(37, 1);

d1 = "Saturn - Mars - Pluto - Jupiter Grouping 3/26/2020"
c1 = "#47B75D"


}

if (id[r] == 58)
{
// Earth - Antares 04/15/2020
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(165.37, 40.52, 50000, 1, "", "Venus");
core.setDate("2020-04-15T20:29:33", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*2)+1;
if (pick == 2)
{
core.setDate("-6 hours");
core.selectObjectByName("Moon", pointer = true);
StelMovementMgr.setFlagTracking(true);

}

var pick = pick *( Math.floor(Math.random()*9)+1);
pick = pick/5;
StelMovementMgr.zoomTo(pick, 1);
d1 = "Earth and Moon and Antares 0.082 degrees apart 04/15/2020"
c1 = "#771FFF"
d2 = "from Venus";
c2 = "#771FFF"


SolarSystem.setFlagMoonScale(4);   	
}







if (id[r] == 59)
{
// Moon Greatest Elongation from Mars 6/6/2020
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-74.33, 33.5, 50, 1, "", "Mars");
core.setDate("2020-06-06T11:27:16", "utc");

core.selectObjectByName("Moon", pointer = true);
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = true);
}

StelMovementMgr.setFlagTracking(true);
pick = Math.floor(Math.random()*6)+1;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Moon's Greatest Elongation away from Earth (0.158 Degrees) in the"; 
c1 = "#FF1177"

d2 = "21st century during Greatest Elongation as seen from Mars 6/06/2020";
c2 = "#FF1177"
SolarSystem.setFlagOrbits(true);


SolarSystem.setFlagOrbits(false);


}

if (id[r] == 60)
{
// 4 Planet Grouping Venus 2020
core.setObserverLocation(104.350, 63.44, 50000, 1, "", "Venus");
core.setDate("2020-08-30T14:15:44", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Pluto", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Jupiter", pointer = true);
}


StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(52, 1);

d1 = " 4 Planet cross Grouping 8/30/2020 from Venus"
c1 = "#AFAAFF"


}



if (id[r] == 61)
{
// Saturn from Jupiter 11/2/2020
core.setObserverLocation(163.9, 34.5, 1, 1, "", "Europa");
core.setDate("2020-11-02T16:32:07", "utc");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(96.5, 1);

d1 = "The next Saturn Opposition from Jupiter 11/02/2020"
c1 = "#FFF6F8"

sfn = 1;

}



if (id[r] == 62)
{
// Mercury from Venus 
core.setObserverLocation(-154.3, 2.5, 10, 1, "", "Venus");
core.setDate("2020-12-15T09:59:36", "utc");

core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*30+60);
StelMovementMgr.zoomTo(pick, 1);


d1 = "Mercury's best Greatest Elongation of the 21st Century as seen from Venus"
c1 = "#FF7700"

d2 = "Elongation 40.26 Degrees       12/15/2020"
c2 = "#FF7700"



SolarSystem.setLabelsAmount(20);   
}



if (id[r] == 63)
{
// Jupiter - Saturn Conjunction 12/21/2020

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2020-12-21T22:34:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(32, 1);

d1 = "Jupiter - Saturn Conjunction 12/21/2020"
c1 = "#96AA22"


}

if (id[r] == 64)
{

core.setDate("2021-01-02T04:57:40", "utc");
core.setObserverLocation(-132.94, 18.2, 27012, 0, "Olympus Mons", "Mars");
core.selectObjectByName("Phobos", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(2, 1);

d1 = "Phobos Eclipse from the summit of Olympus Mons 1/2/2021"
c1 = "#FF7071"




}

if (id[r] == 65)
{
// Grouping 2021

core.setObserverLocation(-73.71, -9.24, 11, 1, "", "Earth");
core.setDate("2021-02-25T10:10:07", "utc");
var pick = Math.floor(Math.random()*3);

core.selectObjectByName("Saturn", pointer = true);
if (pick == 0)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*40+ 25);
StelMovementMgr.zoomTo(pick, 1);

d1 = "Saturn, Mercury and Jupiter morning Grouping 2021"
c1 = "#F2FFFF"


}





if (id[r] == 66)
{
// Earth - Lagoon 6/03/2021
core.setObserverLocation(7, 7.24, 50000, 1, "", "Venus");
core.setDate("2021-06-03T14:40:07", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(1.57, 1);

var pick = Math.floor(Math.random()*24);
pick = pick +1;
pick = pick/50;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Earth in the Lagoon Nebulea from Venus 6/3/2021";
c1 = "#1122FF"
LandscapeMgr.setFlagAtmosphere(false);


}


if (id[r] == 67)
{
// Jupiter's Moons - Triple Transit

core.setObserverLocation(129.4, -19.49, 1126, 1, "", "Earth");
core.setDate("2021-08-15T15:40:01", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);
var pick = Math.floor(Math.random()*4);
if (pick == 1)
{
core.selectObjectByName("Europa", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Ganymede", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Callisto", pointer = true);
}
d1 = "The Next Total Triple Jupiter Moon Transit 8/17/2032"
c1 = "#CC7802"


}


if (id[r] == 68)
{
// Ceres - Hyades 11/22/2021
core.setObserverLocation(-3.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2021-11-17T00:11:07", "utc");

core.selectObjectByName("(1) Ceres", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*12)+8
StelMovementMgr.zoomTo(pick, 1);


d1 = "Ceres in Hyades 11/6/2021 - 11/21/2021"
c1 = "#777777"


SolarSystem.setFlagMoonScale(0); 
}



if (id[r] == 69)
{
// Jupiter's Moons - Triple Transit from Mars

core.setObserverLocation(177.1, 19.24, 1126, 1, "", "Mars");
core.setDate("2022-02-16T17:06:01", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);
var pick = Math.floor(Math.random()*4);
if (pick == 1)
{
core.selectObjectByName("Io", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Europa", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Callisto", pointer = true);
}
d1 = "Triple Jupiter Moon Transit from Mars 8/15/2021"
c1 = "#CC78CC"

}



if (id[r] == 70)
{
// 4 Planet Grouping 2022
core.setObserverLocation(1.80, -18.27, 26, 1, "", "Earth");
core.setDate("2022-02-27T04:38:07", "utc");

core.selectObjectByName("Moon", pointer = true);
var pick = Math.floor(Math.random()*5);

if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Vesta", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Pluto", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagMoonScale(4);   

var pick = Math.random()*10+13;
StelMovementMgr.zoomTo(pick, 1);


d1 = "The Moon Venus, Mars, Vesta and Pluto 3/28/2022"
c1 = "#C6CCFA"


}




if (id[r] == 71)
{
// 5 Planet Grouping 2022
core.setObserverLocation(1.80, -18.27, 26, 1, "", "Earth");
core.setDate("2022-03-28T05:18:07", "utc");

core.selectObjectByName("Moon", pointer = true);
var pick = Math.floor(Math.random()*5);

if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(123, 1);

SolarSystem.setFlagMoonScale(4);   
d1 = "Five planets, Asteroids and Moon Grouping 3/28/2022"
c1 = "#C6CCFA"


}



if (id[r] == 72)
{
// Opposition Grouping 9/23/2022
core.setObserverLocation(-175.1, 14.25, 26, 1, "", "Mercury");
core.setDate("2022-09-23T10:15:07", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Neptune", pointer = true);
}
StelMovementMgr.setFlagTracking(true);



var pick = Math.random()*100+60;

StelMovementMgr.zoomTo(pick, 1);




d1 = "Earth, Jupiter and Neptune opposition with 24 hours"
c1 = "#FD2CF0"

d2 = "from Mercury"
c2 = "#FD2CF0"


}




if (id[r] == 73)
{
// Earth - Mars from Mercury
core.setObserverLocation(-72.9, 49.5, 26, 1, "", "Mercury");
core.setDate("2022-11-29T20:28:07", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Mars", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.0145, 1);

d1 = "Earth Occultation of Mars from Mercury 11/29/2022"
c1 = "#0AAFFF"


}

if (id[r] == 74)
{
// Earth from Moon 
core.setObserverLocation(19.71, 39.0, 50, 1, "", "Moon");
core.setDate("2023-01-21T20:57:30", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(12.9, 1);

d1 = "Brightest Full Earth from the Moon 1/21/2023"
c1 = "#FFFFFF"



}

if (id[r] == 75)
{
// Jupiter - Venus Conjunction 2023

core.setObserverLocation(-88, 34.24, 1126, 1, "", "Earth");
core.setDate("2023-03-02T00:42:17", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(82, 1);

d1 = "The next good Venus-Jupiter Evening Conjunction"
c1 = "#1FAFF2"

d2 = "3/20/2023 (yes, it really is that far away!)"
c2 = c1


}

if (id[r] == 76)
{
// Moon In Auriga 21st century
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-46.22, -16.31, 1126, 1, "", "Earth");
core.setDate("2023-03-28T22:50:07", "utc");

core.selectObjectByName("Moon", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*24)+19
StelMovementMgr.zoomTo(pick, 1);

d1 = "Moon in Auriga 3/28/2023 - First time since 2007"
c1 = "#FAFAFF"


	
}



if (id[r] == 77)
{
// Jupiter Aries 
core.setObserverLocation(44.80, 45.50, 7, 1, "", "Earth");
core.setDate("2023-08-21T22:44:49", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = (Math.random()*10+1);

StelMovementMgr.zoomTo(pick/100, 1);

d1 = "Jupiter Occultation of Sigma Aries 08/21/2023";
c1 = "#B5FFA7"


}


if (id[r] == 78)
{
// Moon in Pleiades

core.setObserverLocation(18.8, -26.56, 0, 1, "", "Earth");
core.setDate("2024-02-16T20:50:51", "utc");

core.selectObjectByName("Moon", pointer = false);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.random()*14+1;
StelMovementMgr.zoomTo(pick);

d1 = "The next land visible Moon Occulation of the Pleiades Cluster 02/16/2024"
c1 = "#FF33FF"

d2 = "Only visible from parts of Southern Africa ";
c2 = c1

SolarSystem.setFlagMoonScale(0);  

}



if (id[r] == 79)
{
// Saturn - Moon 5/31/2024
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-73.01, -52.07, 126, 1, "", "Earth");
core.setDate("2024-05-31T07:30:55", "UTC");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*2000)+10;
pick = pick / 1000 
StelMovementMgr.zoomTo(pick, 1);


d1 = "Moon Occultation of Saturn 05/31/2024 - 1st of two in this year"
c1 = "#FFA1A7"

}


if (id[r] == 80)
{
// Saturn - Moon 8/21/2024
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-48.00, 22.75, 126, 1, "", "Earth");
core.setDate("2024-08-21T02:45:33", "UTC");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*2000)+10;
pick = pick / 1000 
StelMovementMgr.zoomTo(pick, 1);


d1 = "Moon Occultation of Saturn 08/21/2024 - 2nd of year"
c1 = "#FFA118"

}


if (id[r] == 81)
{
// Jup Ple from Callisto 08/25/2024

dir = 3
long = 0
lat = 40
alt =0
p1 = "Callisto"
p2 = "Jupiter"


core.setObserverLocation(long, 40, 0, 0, "", "Callisto");
core.setDate("2024-08-25T09:04:37", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", pointer = false);
var pick = (Math.random()*2);

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(pick*7+7, 1);

d1 = "Pleiades above a Full Jupiter from Callisto 08/25/2024"
SolarSystem.setFlagMoonScale(0);   	
c1 = "#FF0007"

sfn = 1;

 	
}




if (id[r] == 82)
{
// Saturn latest opposition 9/08/2024

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2024-09-08T04:03:00", "utc");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(148, 1);

d1 = "Saturn - Opposition 9/24/2024"
c1 = "#DEE267"

d2 = "The latest first planetary opposition of the year in the 21st century"
c2 = "#DEE267"



}



if (id[r] == 83)
{
// Mars - Earth - Venus


long = 140.0
lat = 43.5
alt = 0.6
p1 = "(1) Ceres";
p2 = "Mars";

dir = -2

core.setObserverLocation(148, 43.5, 0.6, 1, "", "(1) Ceres");
core.setDate("2024-12-13T04:10:07", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Mars", pointer = true);
}

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.floor(Math.random()*28)+20;
StelMovementMgr.zoomTo(pick, 0);

StelMovementMgr.setFlagTracking(true);

d1 = "Venus, Earth and Mars lined up in reverse from Ceres"
c1 = "#FFF34F"

d2 = " 12/13/2024"
c2 = c1

sfn = 1;


}



if (id[r] == 84)
{
// Venus Circlet

core.setObserverLocation(-77.499,15.5 , 36, 1, "", "Earth");
core.setDate("2025-04-07T10:04:07", "utc");

core.selectObjectByName("Venus", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*10+1;
pick = pick * 10;
StelMovementMgr.zoomTo(pick);

d1 = "Venus in Circlet  04/07/2025"
c1 = "#BBBBFF"


}



if (id[r] == 85)
{
// Uranus

core.setObserverLocation(-105.6, 31.5, 36, 1, "", "Earth");
core.setDate("2025-04-08T02:32:07", "utc");

core.selectObjectByName("Uranus", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*6+1;
pick = pick * 0.002;
StelMovementMgr.zoomTo(pick);

d1 = "Uranus Occults HIP 16271 (in Taurus)   04/08/2025"
c1 = "#33FF4F"


}




if (id[r] == 86)
{
// Dione Eclipses

dir = 4

long = 4.36666
lat = -38.28333
alt = 381
p1 = "Titan"
p2 = "Dione"

core.setObserverLocation(-32.36666, -38.28333, 381, 1, "", "Titan");
core.setDate("2025-04-21T05:05:04", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Dione", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*1.5+.1;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Dione Eclipses the sun at the edge of Saturn's rings"
d2 = "from Titan 4/21/2025"
c1 = "#0AAA0A"
c2 = c1

sfn = 1;


}




if (id[r] == 87)
{
// 4 Planet Grouping 2025
core.setObserverLocation(-74.23, 3.50, 26, 1, "", "Earth");
core.setDate("2025-04-25T10:04:44", "utc");

core.selectObjectByName("Venus", pointer = true);
var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Neptune", pointer = true);
}


StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(52, 1);

d1 = " 4 Planet and Moon Grouping 4/25/2025"
c1 = "#FFAAFF"


}



if (id[r] == 88)
{
// Earth - Neptune - Saturn 08/09/2025
core.setObserverLocation(135, 32.27, 16, 1, "", "Mars");
core.setDate("2025-08-09T21:23:07", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Neptune", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*20)+20;
StelMovementMgr.zoomTo(pick, 0);

d1 = "Triple Conjunction of Earth, Saturn and Neptune from Mars 08/09/2025"
c1 = "#1DFFB0"


}







if (id[r] == 89)
{
// Saturn's Moons - Quadruple Transit

core.setObserverLocation(-72.00, 44.75, 1126, 1, "", "Earth");
core.setDate("2025-08-22T06:11:59", "utc");

core.selectObjectByName("Saturn", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.009, 1);
var pick = Math.floor(Math.random()*5);
if (pick == 1)
{
core.selectObjectByName("Rhea", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Dione", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Tethys", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Mimas", pointer = true);
}
d1 = "The Next Land Visible Quadruple Saturn Moon Transit 8/22/2025"
c1 = "#F1FBD9"


}

if (id[r] == 90)
{
core.setDate("2025-11-21T15:40:04", "utc");
core.setObserverLocation(206.49, -3.45, 12, 0, "The Place to be", "Mars");
core.selectObjectByName("Phobos", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = (Math.random()*14+6)/10;
StelMovementMgr.zoomTo(pick, 1);



d1 = "The Next Phobos & Diemos Double Eclipse"
c1 = "#A10107"

d2 = "from Mars 11/21/2025"
c2 = c1

sfn = 1;

}


if (id[r] == 91)
{
// Earth Transits while Callisto Eclipses  
core.setObserverLocation(-40.2842, -38.2319, 500000, 1, "", "Jupiter");
core.setDate("2026-01-10T10:07:08", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*150+100)/1000;
StelMovementMgr.zoomTo(pick, 1);

LandscapeMgr.setFlagAtmosphere(false);


d1 = "Earth Transits the Sun at the same time Callisto Eclipses it";
c1 = "#00FFF3"

d2 = "From Jupiter - 01/10/2026"
c2 = c1


}






if (id[r] == 92)
{
// Nice Grouping 4/20/2026
core.setObserverLocation(-74.4, -37.51, 16, 1, "", "Earth");
core.setDate("2026-04-20T10:30:07", "utc");

core.selectObjectByName("Mercury", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(27, 1);

d1 = "Triple Conjunction of Mercury, Mars and Saturn 4/20/2026"
c1 = "#BD2CB0"


}











if (id[r] == 93)
{
// Jupiter - Mars Conjunction Opposition 2/19/2027

core.setObserverLocation(3.71, 44.24, 1126, 1, "", "Earth");
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
core.setDate("2027-02-10T00:34:07", "utc");
}
if (pick == 1)
{
core.selectObjectByName("Mars", pointer = true);
core.setDate("2027-02-19T00:34:07", "utc");
}


StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(44, 1);

d1 = "Mars and Jupiter oppositions within 10 days of each other 02/10/2027 + 02/19/2027"
c1 = "#FF2F00"


}


if (id[r] == 94)
{
// Worst Mars 

core.setObserverLocation(0, 44.24, 1126, 1, "", "Earth");
core.setDate("2027-02-19T00:09:07", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*70)+10;
StelMovementMgr.zoomTo(pick, 1);


d1 = "Mars - Lamest Opposition of the 21st Century 2/19/2027"
c1 = "#FF0000"


}


if (id[r] == 95)
{
// Venus and Atlas 
core.setObserverLocation(29.6, 40.5, 10, 1, "", "Earth");
core.setDate("2028-04-04T17:36:45", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagOrbits(true);


StelMovementMgr.zoomTo(0.108, 1);


d1 = "Venus Between Atlas and Pleione 4/4/2028"
c1 = "#FFFFFF"


}



if (id[r] == 96)
{
// Venus and Earth conjunction
core.setObserverLocation(-72.7, 40, 50, 1, "", "Mercury");
core.setDate("2028-06-01T23:32:19", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}

StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
var pick = Math.floor(Math.random()*5+7)*10;
StelMovementMgr.zoomTo(pick, 1);
	
d1 = "Venus and Earth Opposition when they are closest from Mercury 06/01/2028"
c1 = "#F7F8AA"


}

if (id[r] == 97)
{
// Venus - Hyades 7/11/2028
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2028-07-11T08:11:07", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(34.2, 1);

d1 = "Venus in Hyades 7/11/2028"
c1 = "#F1AFF8"


}

if (id[r] == 98)
{
// Earth - Orion Nebula 01/31/2029
SolarSystem.setFlagMoonScale(0);   	

long = 0
lat = 0.52
alt = 20
p1 = "(2) Pallas"
p2 = "Earth"

dir = 2


core.setObserverLocation(158.37, 0.52, 20, 1, "", "(2) Pallas");
core.setDate("2029-02-01T08:29:33", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*2)+1;
if (pick == 2)
{
core.selectObjectByName("Moon", pointer = true);
StelMovementMgr.setFlagTracking(true);

}

var pick = pick *( Math.floor(Math.random()*7)+1);
pick = pick/10 + 0.7;
StelMovementMgr.zoomTo(pick, 1);
d1 = "Earth in Orion's Nebula from Pallas 02/01/2029"
c1 = "#F700FF"


}


if (id[r] == 99)
{
// Mars - Jupiter - Spica   07/29/2029
core.setObserverLocation(0.00, 40.50, 26, 1, "", "Earth");
core.setDate("2029-07-29T20:56:10", "utc");

core.selectObjectByName("Spica", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
StelMovementMgr.zoomTo(14.9, 1);
	
d1 = "Mars - Jupiter - Spica 07/29/2029"
c1 = "#FFEE07"


}

if (id[r] == 100)
{
// Uranus best rings

core.setObserverLocation(74.3, 40.56, 36, 1, "", "Earth");
core.setDate("2029-08-22T22:00:18", "utc");

core.selectObjectByName("Uranus", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*6+1;
pick = pick * 0.001+0.002;
StelMovementMgr.zoomTo(pick);

d1 = "Uranus Maximum Geocentric Ring Tilt - 82.18"+degstring + "   08/22/2029"
c1 = "#33FF47"


}


if (id[r] == 101)
{
// Moon Greatest Elongation from Venus 1/10/2030
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-100.33, 23.5, 50000, 1, "", "Venus");
core.setDate("2030-01-10T23:07:16", "utc");

core.selectObjectByName("Moon", pointer = true);
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = true);
}


StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(5, 1);

var pick = Math.floor(Math.random()*6);
pick = pick + 5;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Moon's Greatest Elongation away from Earth (0.569 Degrees)"; 
c1 = "#AADAFF"

d2 = "in the 21st century as seen from Venus 1/10/2030";
c2 = "#AADAFF"




}

if (id[r] == 102)
{
// Double - Double
core.setObserverLocation(116.2, 42.1, 6, 0, "", "Mercury");
core.setDate("2031-07-26T15:54:20", "utc");

core.selectObjectByName("HIP 100064", pointer = false);
StelMovementMgr.setFlagTracking(true);



core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*4);

if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Venus", pointer = true);
}

LandscapeMgr.setFlagAtmosphere(false);



var pick = Math.random()*4+121;
StelMovementMgr.zoomTo(pick, 1);


d1 = "Double Double Conjunction: Venus & Earth + Mars & Jupiter";
c1 = "#FFFFFF"


d2 = "From Mercury 7/26/2031";
c2 = "#FFFFFF"


}


if (id[r] == 103)
{
// Pluto and some 10 mag star 2031
core.setObserverLocation(-74.33, -74.33, 36, 1, "", "Earth");
core.setDate("2031-09-03T00:43:00", "utc");

core.selectObjectByName("Pluto", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.002, 1);

var pick = Math.floor(Math.random()*5);
pick = pick +1;
pick = pick/1000;
StelMovementMgr.zoomTo(pick, 1);



d1 = "Pluto Occultation of some 10 mag star in Capicorn 9/3/2031"
c1 = "#AADDFF"


}


if (id[r] == 104)
{
// Earth from Saturn 
core.setObserverLocation(-73.71, 9.24, 200000, 1, "", "Saturn");
core.setDate("2031-09-15T02:50:00", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(34, 1);
SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = false);
SolarSystem.setLabelsAmount(-20);   
SolarSystem.setFlagOrbits(false);
}
d1 = "Earth's Greatest Elongation of the 21st Century as seen from Saturn"
c1 = "#A0FF07"

d2 = "6.392" + degstring

c2 = "#A0FF09"


SolarSystem.setLabelsAmount(20);
SolarSystem.setFlagOrbits(true);   

}

if (id[r] == 105)
{
// Saturn - Earth from Venus   
core.setObserverLocation(-51.28, 69.50, 50000, 1, "", "Venus");
core.setDate("2032-01-12T10:07:51", "utc");

core.selectObjectByName("Saturn", pointer = false);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*3);
StelMovementMgr.zoomTo(0.0301,1);

if (pick == 1)
{
StelMovementMgr.zoomTo(0.0149,1);

}
if (pick == 2)
{
StelMovementMgr.zoomTo(0.102,1);

core.selectObjectByName("Saturn", pointer = false);


SolarSystem.setFlagMoonScale(0);  
}
SolarSystem.setLabelsAmount(18);   	
StelMovementMgr.setFlagTracking(true);

d1 = "Earth Occultation of Saturn from Venus 1/12/2032"
c1 = "#AAAAFF"


}

if (id[r] == 106)
{
// Mars - Saturn - Uranus


long = 0
lat = 1.52
alt = 0.6
p1 = "Callisto"
p2 = "Mars"

dir = 4


core.setObserverLocation(long, 1.5, 0.6, 0, "", "Callisto");
core.setDate("2032-02-07T16:28:44", "utc");

core.selectObjectByName("Mars", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Uranus", pointer = true);
}

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.floor(Math.random()*14)+31;
StelMovementMgr.zoomTo(pick, 0);

StelMovementMgr.setFlagTracking(true);

d1 = "Triple conjunction Saturn, Mars, Uranus during a Jupiter Eclispe";
c1 = "#FFFFF4"

d2 = " from Callisto 2/7/2032"
c2 = c1


}



if (id[r] == 107)
{
// Saturn - 105 Tauri 4/7/2032
core.setObserverLocation(-131.33, 46.5, 36, 1, "", "Earth");
core.setDate("2032-04-07T05:24:20", "utc");

core.selectObjectByName("Saturn", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);

var pick = Math.floor(Math.random()*5);
pick = pick +1;
pick = pick/100;
StelMovementMgr.zoomTo(pick, 1);


var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.setDate("+2 hours"); 
}

d1 = "Saturn Double Ring Occultation of 15 (105?) Tauri 4/7/2032"
c1 = "#FFDDFF"


}


if (id[r] == 108)
{
// Uranus from Saturn 
core.setObserverLocation(43.71, 14.24, 30268000, 1, "", "Saturn");
core.setDate("2032-07-23T03:44:30", "utc");

core.selectObjectByName("Uranus", pointer = true);
StelMovementMgr.setFlagTracking(true);

core.selectObjectByName("Uranus", pointer = true);
StelMovementMgr.zoomTo(94.9, 1);

d1 = "Urauns Opposition from Saturn 7/23/2032";
c1 = "#11FF01"



}

if (id[r] == 109)
{
// Mars from Saturn 

long = 0
lat = -9
alt = 17
p1 = "Enceladus"
p2 = "Mars"

dir = -2



core.setObserverLocation(long, -9, 17, 0, "", "Enceladus");
core.setDate("2032-11-26T06:14:02", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*17+10);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true); 
LandscapeMgr.setFlagAtmosphere(false);


d1 = "Mars' best Greatest Elongation of the 21st Century as seen from Saturn"
c1 = "#FF1101"

d2 = "Elongation 10.60 Degrees       11/25/2032"
c2 = "#DFF7FF"

SolarSystem.setLabelsAmount(20); 

  
}



if (id[r] == 110)
{
// Saturn opposition 12/24/2032

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2032-12-24T02:00:07", "utc");

core.selectObjectByName("Saturn", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.03, 1);

d1 = "Saturn's best ring view of the 21st century 12/24/2032"
c1 = "#DEE267"


}

if (id[r] == 111)
{
// Saturn in Orion


dir = 3
long = 0
lat = 56.92
alt = 381
p1 = "Iapetus";
p2 = "Saturn"



core.setObserverLocation(0, 56.92, 381, 1, "", "Iapetus");
core.setDate("2033-06-24T01:22:12", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("HIP 26311", pointer = false);
StelMovementMgr.setFlagTracking(true);

core.selectObjectByName("Saturn", pointer = false);
var pick = Math.floor(Math.random()*10)+30;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Saturn in Orion from Iapetus 6/24/2033"
c1 = "#FFFFFF"


}

if (id[r] == 112)
{
// Lowest Mars 

core.setObserverLocation(95.3, 57.6, 1126, 1, "", "Earth");
core.setDate("2033-07-22T15:36:00", "utc");

core.selectObjectByName("HIP 86742", pointer = true);
StelMovementMgr.setFlagTracking(true);

core.selectObjectByName("Mars", pointer = true);
var pick = Math.floor(Math.random()*70)+70;
StelMovementMgr.zoomTo(pick, 1);

d1 = ""
c1 = "#000000"
d2 = "Mars - Lowest Declination -28.632" + degstring + " of the 21st Century 7/22/2033"
c2 = "#FF0000"


}

if (id[r] == 113)
{
// Mercury from Mars 
core.setObserverLocation(144.1, -33.5, 10, 1, "", "Mars");
core.setDate("2033-09-21T20:42:36", "utc");

core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*20+15);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true);   

d1 = "Mercury's best Greatest Elongation of the 21st Century as seen from Mars"
c1 = "#FF7700"

d2 = "Elongation 19.73 Degrees       09/21/2033"
c2 = "#FF7700"



}


if (id[r] == 114)
{
// 5 Planet Grouping 2034
core.setObserverLocation(-74, 43, 26, 1, "", "Earth");
core.setDate("2034-05-21T01:21:07", "utc");

core.selectObjectByName("Moon", pointer = true);
var pick = Math.floor(Math.random()*6);
if (pick == 0)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Uranus", pointer = true);
}
if (pick == 5)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(61, 1);

d1 = "Five planet and Moon Grouping 5/20/2034"
c1 = "#C6CCFA"


}




if (id[r] == 115)
{
// Callisto longest 21st century from Ceres


dir = 3
long = 148
lat = 40
alt =38
p1 = "(1) Ceres"
p2 = "Callisto"


core.setObserverLocation(long, lat, 38, 0, "", "(1) Ceres");
core.setDate("2035-02-05T04:46:00", "utc");

core.selectObjectByName("Callisto", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4);
if (pick == 1)
{
core.selectObjectByName("Io", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Europa", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Ganymede", pointer = true);
}
var pick = Math.floor(Math.random()*5+10)/10;
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true);

LandscapeMgr.setFlagAtmosphere(true);

d1 = "All 4 Galilean Satellites at their Extreme Elongations and best 21st century elongations";
c1 = "#FFB5A7"


d2 = "From Ceres 2/5/2035";
c2 = "#FFB5A7"


SolarSystem.setFlagOrbits(true);   
}



if (id[r] == 116)
{
// Jupiter brightest 21st century from Ceres

dir = 3
long = 100.5
lat = 0.5
alt =1738
p1 = "(1) Ceres"
p2 = "Jupiter"

core.setObserverLocation(100.5, 0.5, 1738, 0, "", "(1) Ceres");
core.setDate("2035-02-11T02:01:00", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*10+27);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true);

LandscapeMgr.setFlagAtmosphere(true);

d1 = "Brightest Jupiter of the 21st Century 02/11/2035 (-4.288 mag)";
c1 = "#B5FFA7"


d2 = "From Ceres";
c2 = "#B5FFA7"


SolarSystem.setFlagOrbits(false);   
}


if (id[r] == 117)
{
// Jupiter from Saturn Gi (fixed ver.238)
core.setObserverLocation(-13.5, 39.0, 200000, 1, "", "Saturn");
core.setDate("2035-07-08T12:24:43", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("HIP 108036", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(50.3, 1);
SolarSystem.setFlagOrbits(false);

SolarSystem.setLabelsAmount(20);   
core.selectObjectByName("Jupiter", pointer = true);

d1 = "Jupiter Greatest 21st Century illumination from Saturn 7/8/2035"
c1 = "#B5FFA7"


SolarSystem.setFlagOrbits(false);   

}

if (id[r] == 118)
{
// Ceres from Earth 
core.setObserverLocation(168.00, 48.75, 5, 1, "", "Earth");
core.setDate("2035-12-16T12:06:00", "utc");

core.selectObjectByName("(1) Ceres", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*37+60);
StelMovementMgr.zoomTo(pick, 1);


d1 = "The Brightest Ceres of the 21st Century";
c1 = "#FF7770"

d2 = "12/16/2035"
c2 = c1


}



if (id[r] == 119)
{
// Venus - Pleiades conjunction

core.setObserverLocation(-169.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2036-04-04T08:29:47", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4)+1;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Venus passes through the Pleiades cluster 4/4/2036"
c1 = "#05A8F4"

}

if (id[r] == 120)
{
//  Mars from Jupiter

long = 0
lat = -17.25
alt = 7
p1 = "Europa"
p2 = "Mars"

dir = -2

core.setObserverLocation(long, -17.25, 7, 0, "", "Europa");
core.setDate("2036-06-17T09:51:00", "utc");
LandscapeMgr.setFlagAtmosphere(false);

SolarSystem.setFlagOrbits(true);

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.zoomTo(31, 1);

StelMovementMgr.setFlagTracking(true);

d1 = "Mars Farthest Greatest Elongation from Jupiter of the 21st century"  
c1 = "#FFF0F1"

d2 = "19.20 degrees  6/17/2036"
c2 = c1;

SolarSystem.setFlagOrbits(true);


}


if (id[r] == 121)
{
// Venus & Saturn & Regulus 
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2036-10-02T08:50:07", "utc");

core.selectObjectByName("Saturn", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("HIP 49669", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(9.2, 1);

d1 = "Venus - Saturn and Regulus 10/2/2036"
c1 = "#BF9150"


}

if (id[r] == 122)
{
// Jupiter - Hyades 4/1/2037

dir = 2
long = -73.71
lat = 33.24
alt =16
p1 = "(1) Ceres"
p2 = "Jupiter"


core.setObserverLocation(-73.71, 33.24, 16, 0, "","(1) Ceres");
core.setDate("2037-04-01T01:11:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*40+16;
StelMovementMgr.zoomTo(pick);

d1 = "Jupiter in Hyades 4/01/2037 from Ceres"
c1 = "#F1AF18"


}


if (id[r] == 123)
{
// Saturn Mercury 9/15/2037
core.setObserverLocation(112.6, 13.75, 36, 1, "", "Earth");
core.setDate("2037-09-15T21:30:35", "UTC");

core.selectObjectByName("Saturn", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Mercury", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

var pick = (Math.random()*9+1)/100;
StelMovementMgr.zoomTo(pick, 1);



d1 = "A Very Close Mercury - Saturn Conjunction 0.005" + degstring
d2 = "9/15/2037";
c1 = "#F3F1F1"
c2 = c1
}







if (id[r] == 124)
{
// Mars and Pleiades 
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2038-02-05T23:57:30", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(14.9, 1);

d1 = "Mars Near the Pleiades 2/5/2038"
c1 = "#FF1101"



}

if (id[r] == 125)
{
// Earth - Venus - Jupiter from Ceres


dir = 2
long = -151.5
lat = 20.5
alt =0.6
p1 = "(1) Ceres"
p2 = "Venus"


core.setObserverLocation(-151, 20.5, 0.6, 0, "", "(1) Ceres");
core.setDate("2038-02-27T10:51:44", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.floor(Math.random()*4)+15;
StelMovementMgr.zoomTo(pick, 0);

StelMovementMgr.setFlagTracking(true);

d1 = "Gemini's Belt of Venus, Earth and Jupiter from Ceres";
c1 = "#5F3FF4"

d2 = " 2/27/2038"
c2 = c1


}



if (id[r] == 126)
{
// Triple Coquadrature

core.setObserverLocation(-74, 40.24, 16, 1, "", "Earth");
core.setDate("2038-05-16T01:36:07", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*75+25;
StelMovementMgr.zoomTo(pick, 1);

var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Uranus", pointer = true);
}



d1 = "Triple Conjunction / Coquadrature 5/15/2038"
c1 = "#FAA0A0"


}



if (id[r] == 127)
{
// Nice Grouping 8/25/2038
core.setObserverLocation(74.1, 14.25, 16, 1, "", "Earth");
core.setDate("2038-08-25T00:15:07", "utc");

core.selectObjectByName("Venus", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Mercury", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(37, 1);

d1 = "A nice line of Venus, Jupiter and Mercury 8/25/2038"
c1 = "#FD2CF0"
}




if (id[r] == 128)
{
// Jupiter & Regulus
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2038-11-20T09:30:07", "utc");

core.selectObjectByName("Jupiter", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(10, 1);

d1 = "Jupiter and Regulus Conjunction 11/20/2038"
c1 = "#E6B823"


}

if (id[r] == 129)
{
// Sun through Saturn rings from Titan  01/13/2039

dir = 1
long = 180.0
lat = -66.24
alt = 34
p1 = "Titan"
p2 = "Sun"



core.setObserverLocation(long, lat, alt, 0, "", "Titan");
core.setDate("2039-01-13T04:58:08", "utc");

core.selectObjectByName("Sun", pointer = false);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
var pick = Math.floor(Math.random()*7)*0.57+0.7;
StelMovementMgr.zoomTo(pick, 1);
	
d1 = "Sun through Saturn rings from Titan  01/13/2039"
c1 = "#000070"

SolarSystem.setFlagMoonScale(4);   	

}


if (id[r] == 130)
{
// Mars Shortest co 5/31/2039

core.setObserverLocation(-73.01, 40.24, 126, 1, "", "Earth");
core.setDate("2039-05-31T08:00:07", "UTC");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(47, 1);
	

d1 = "Mars Shortest Coquadrature Angle of 21st century"
c1 = "#FF3118"

d2 = "5/31/2039 - 53.7 Degrees"
c2 = "#FF3118"



}







if (id[r] == 131)
{
// Highest Mars 

core.setObserverLocation(-131.3, 27.5, 1126, 1, "", "Earth");
core.setDate("2040-01-22T07:00:00", "utc");

core.selectObjectByName("HIP 25606", pointer = true);
StelMovementMgr.setFlagTracking(true);

core.selectObjectByName("Mars", pointer = true);
var pick = Math.floor(Math.random()*70)+100;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Mars - Highest Declination 27.207" + degstring +" of the 21st Century 1/22/2040"
c1 = "#FF0000"


}


if (id[r] == 132)
{
// Saturn from Uranus 
core.setObserverLocation(-62.3, 31.5, 10, 1, "", "Uranus");
core.setDate("2040-02-13T23:47:36", "utc");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*20+35);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true);   

d1 = "Saturns's best Greatest Elongation of the 21st Century as seen from Uranus"
c1 = "#777700"

d2 = "Elongation 30.77 Degrees       02/13/2040"
c2 = "#777700"



}



if (id[r] == 133)
{
// Fullest Uranus in the Little Dipper 

dir = 1
long = 0
lat = 34.33
alt =1738
p1 = "Oberon"
p2 = "Uranus"


core.setObserverLocation(long, 34.33, 7, 0, "", "Oberon");
core.setDate("2040-08-11T16:06:47", "utc");
LandscapeMgr.setFlagAtmosphere(false);



core.selectObjectByName("Uranus", pointer = true);


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*40)+20;

StelMovementMgr.zoomTo(pick, 1);


d1 = "A Full (Well as full as it gets) Uranus in the Little Dipper from Oberon 08/11/2040";
c1 = "#ABFF99"
 
}




if (id[r] == 134)
{
// 5 Planet Grouping 2040
core.setObserverLocation(-0.39, 4.50, 26, 1, "", "Earth");
core.setDate("2040-09-08T18:41:07", "utc");

core.selectObjectByName("Moon", pointer = true);
var pick = Math.floor(Math.random()*6);
if (pick == 0)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 5)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(31, 1);

d1 = "Five planet and Moon Grouping 9/8/2040"
c1 = "#C6CCFA"


}



if (id[r] == 135)
{
// Jupiter - Saturn - Moon - Spica Conjunction 4/16/2041

core.setObserverLocation(-0.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2041-04-16T00:00:00", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(15, 1);

d1 = "Jupiter - Saturn - Full Moon - Spica Grouping 4/16/2041"
c1 = "#9FAA92"


}

if (id[r] == 136)
{
// Moon Greatest Elongation from Mercury 6/6/2041
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-151.7, 33.5, 64, 1, "", "Mercury");
core.setDate("2041-06-06T13:48:25", "utc");

core.selectObjectByName("Moon", pointer = true);
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = true);
}


StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(5, 1);

var pick = Math.floor(Math.random()*12)+1;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Moon's Greatest Elongation away from Earth (0.282 Degrees)"; 
c1 = "#DADAFF"

d2 = "in the 21st century as seen from Mercury 6/6/2041";
c2 = "#DAAAFF"




}

if (id[r] == 137)
{
// Neptune best 10/29/2041

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2041-10-29T05:00:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(22, 1);

d1 = "Neptune's Closest Opposition of 21st Century 10/29/2041"
c1 = "#0E2FFC"


}

if (id[r] == 138)
{
// Mars - Moon   02/06/2042
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-73.71, 40.24, 34, 1, "", "Earth");
core.setDate("2042-02-05T06:13:58", "utc");

core.selectObjectByName("Mars", pointer = false);
var pick = Math.floor(Math.random()*2);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
var pick = Math.floor(Math.random()*4+1);
StelMovementMgr.zoomTo(pick, 1);
	
d1 = "Moon Occultation of Mars during it's closest approach 02/05/2042"
c1 = "#FF7AA7"

 	

}

if (id[r] == 139)
{
// Venus-Mars-Saturn 09/14/2042
 	
core.setObserverLocation(-70.3, -40.516, 26, 1, "", "Earth");
core.setDate("2042-09-14T00:23:19", "utc");

core.selectObjectByName("Venus", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}

StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*20)+30;


StelMovementMgr.zoomTo(pick, 1);


d1 = "Venus, Mars, Saturn lineup above Spica 9/14/2042"
c1 = "#FFDAFF"


	
}



if (id[r] == 140)
{
// Trifid Nebula 

core.setObserverLocation(74, 12.24, 16, 1, "", "Earth");
core.setDate("2043-03-10T22:11:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*20+1;
StelMovementMgr.zoomTo(pick/10, 1);


d1 = "Jupiter in Trifid Nebula 03/11/2043 - 1st of 2 in 2043"
c1 = "#9FAA92"

}



if (id[r] == 141)
{
// Brightest Jupiter of 21st Century 2/1/2035 Juno

dir = 3
long = 69.71
lat = -6.75
alt = 16
p1 = "(3) Juno"
p2 = "Jupiter"


core.setObserverLocation(69.71, -6.75, 16, 0, "", "(3) Juno");
core.setDate("2043-04-19T00:50:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*40)+10;
StelMovementMgr.zoomTo(pick, 1);



d1 = "Brighest Jupiter of the 21st Century from Juno 04/19/2043"
c1 = "#CC7802"
}
 



if (id[r] == 142)
{
// Trifid Nebula 

core.setObserverLocation(74, 12.24, 16, 1, "", "Earth");
core.setDate("2043-05-30T22:23:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*2+1;
StelMovementMgr.zoomTo(pick/10+.2, 1);


d1 = "Jupiter in Trifid Nebula 05/30/2043 - 2nd of 2 in 2043"
c1 = "#FFFF9F"

}




if (id[r] == 143)
{
// Mars Longest Retro 4/23/2044

core.setObserverLocation(-3.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2044-04-23T00:00:07", "UTC");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*6+6)*10;
StelMovementMgr.zoomTo(pick, 1);
	


d1 = "Mars Ends retograde Motion after 81 Days 12 Hours 34 Minutes"
c1 = "#FF3118"

d2 = "4/23/2044 - Longest of the 21st century"
c2 = "#FF3118"



}


if (id[r] == 144)
{
// Venus - Regulus 10/1/2044
core.setObserverLocation(100.90, 44.24, 126, 1, "", "Earth");
core.setDate("2044-10-01T21:57:07", "utc");

core.selectObjectByName("Venus", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);

var pick = Math.floor(Math.random()*12);
pick = pick +1;
pick = pick/100;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Venus Occultation of Regulus 10/01/2044"
c1 = "#FFDDFF"


}



if (id[r] == 145)
{
// Jupiter - Saturn from Neptune
core.setObserverLocation(168.7, 57.5, 26, 1, "", "Neptune");
core.setDate("2046-04-29T09:25:50", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = false);
}

StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*7) +1;
pick = pick / 2; 
pick = pick /100;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Jupiter Occults Saturn as seen from Neptune 4/29/2046"
c1 = "#A291FF"



}

if (id[r] == 146)
{
// Callisto - Neptune from Saturn
core.setObserverLocation(48.37, 11.3, 56000, 1, "", "Saturn");
core.setDate("2046-04-29T22:22:50", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Callisto", pointer = false);


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*7) +1;
pick = pick / 2; 
pick = pick /1600;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Callisto Occults Neptune as seen from Saturn 4/29/2046"
c1 = "#FFF9FF"

LandscapeMgr.setFlagAtmosphere(false);


}


if (id[r] == 147)
{
// Jupiter - Neptune from Saturn
core.setObserverLocation(-28.37, -48.4, 56000, 1, "", "Saturn");
core.setDate("2046-04-29T05:52:50", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Neptune", pointer = false);


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*7) +1;
pick = pick / 2; 
pick = pick /200;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Jupiter Occults Neptune as seen from Saturn 4/29/2046"
c1 = "#FF91FF"

}

if (id[r] == 148)
{
// Jupiter - Closest opposition of 21st Century 10/07/2046

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2046-10-07T03:39:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(61, 1);


d1 = "Jupiter - Closest opposition of 21st Century 10/07/2046"
c1 = "#CC7802"


}

if (id[r] == 149)
{
// Brightest Ganymede from Europa 


dir = 1
long = 179.5
lat = 0.0
alt =116
p1 = "Europa"
p2 = "Ganymede"
	
core.setObserverLocation(-179.40, 0, 116, 1, "", "Europa");
core.setDate("2047-05-17T14:41:57", "UTC");

core.selectObjectByName("Ganymede", pointer = true);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.floor(Math.random())+.8
StelMovementMgr.zoomTo(pick, 1);

d1 = "Brightest Ganymede of the 21st Century -10.924 Mag."
c1 = "#BABABF"

d2 = "From Europa 5/17/2047"
c2 = c1


 	
}




if (id[r] == 150)
{
// 2048 Planet Grouping 
core.setObserverLocation(-73.71, -40.24, 1126, 1, "", "Earth");
core.setDate("2048-08-11T23:11:07", "utc");

core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Uranus", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Moon", pointer = true);
}

StelMovementMgr.zoomTo(20.1, 1);

d1 = "Mercury - Venus - Uranus Triple Conjunction and Moon 8/11/2048"
c1 = "#79FFC9"


}

if (id[r] == 151)
{
// Neso GE from Neptune from Earth 
core.setObserverLocation(-101, 42, 10, 1, "", "Earth");
core.setDate("2048-11-13T08:28:00", "utc");

core.selectObjectByName("Neso", pointer = true);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagOrbits(true);

var pick = Math.random() + 1.5;
StelMovementMgr.zoomTo(pick, 1);


d1 = "Neso best Greatest Elongation from Neptune of the 21st Century as seen"
c1 = "#0FFF0F"

d2 = "From Earth - Elongation 1.047" + degstring + " 11/13/2048"
c2 = "#0FFF0F";
   
}




if (id[r] == 152)
{
//  Callisto's Greatest Elongation 11/26/2048
core.setObserverLocation(-113, 15, 64, 1, "", "Earth");
core.setDate("2048-11-26T09:04:25", "utc");

core.selectObjectByName("Callisto", pointer = true);

StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*2)+3;
StelMovementMgr.zoomTo(pick/10, 1);

d1 = "Callisto Greatest Elongation away from Jupiter (0.187 Degrees)"; 
c1 = "#7ADAFF"

d2 = "in the 21st century as seen from Earth 11/26/2048";
c2 = "#7ADAFF"




}

if (id[r] == 153)
{
// Brightest Titania from Oberon 

dir = 3
long = -180
lat = 0
alt = 116
p1 = "Oberon"
p2 = "Titania"
	
core.setObserverLocation(long, 0, 116, 0, "", "Oberon");
core.setDate("2049-12-06T00:50:05", "UTC");

core.selectObjectByName("Titania", pointer = true);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.floor(Math.random()*10)+6
StelMovementMgr.zoomTo(pick, 1);

d1 = "Brightest Titania of the 21st Century -7.22 Mag."
c1 = "#BABABF"

d2 = "From Oberon 12/6/2049"
c2 = c1

  	
}





if (id[r] == 154)
{
// Earth - Jup _ Regulus
core.setObserverLocation(-73.71, 30.24, 1126, 1, "", "Mars");
core.setDate("2050-11-05T05:19:07", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*12+30);
StelMovementMgr.zoomTo(pick, 1);



d1 = "Earth Greatest Brillancy and Jupiter and Regulus Conjunction" 
c1 = "#7777FF"



d2 = "on Mars 11/05/2050"
c2 = "#7777FF"




}



if (id[r] == 155)
{
// Uranus opposition 03/14/2051

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2051-03-14T02:00:07", "utc");

core.selectObjectByName("Uranus", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(32, 1);

d1 = "Uranus' Closest Opposition of the 21st Century 03/14/2051"
c1 = "#41BA17"


}


if (id[r] == 156)
{


// Mars from Venus 
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(69, 18.3, 50000, 1, "", "Venus");
core.setDate("2052-07-20T21:44:07", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*6)+2;
StelMovementMgr.zoomTo(pick*pick, 1);

d1 = "Brightest Mars of the 21st Century from Venus -1.231 Mag"
c1 = "#FF0002"

d2 = "07/20/2052"
c2 = "#FF0700"

  
}




if (id[r] == 157)
{
// Mars from Venus 
core.setObserverLocation(69.31, 40.5, 50000, 1, "", "Venus");
core.setDate("2052-07-20T16:53:02", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(67, 1);

var pick = Math.floor(Math.random()*37+60);
StelMovementMgr.zoomTo(pick, 1);


d1 = "Mars best Opposition of the 21st Century as seen from Venus"
c1 = "#FF0700"

d2 = "07/20/2052"
c2 = "#FF0700"

   
}


if (id[r] == 158)
{
// Brightest full moon 21st century
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2052-12-06T04:41:07", "utc");

core.selectObjectByName("Moon", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4)+3
StelMovementMgr.zoomTo(pick, 1);

d1 = "Brightest Full Moon of the 21st Century 12/6/2052"
c1 = "#FAFAFF"


SolarSystem.setFlagMoonScale(4);   	
}







if (id[r] == 159)
{
// Saturn's Moons - Quadruple Transit

core.setObserverLocation(136.8, 37.5, 26, 1, "", "Earth");
core.setDate("2054-12-04T10:24:11", "utc");

core.selectObjectByName("Saturn", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.009, 1);
var pick = Math.floor(Math.random()*5);
if (pick == 1)
{
core.selectObjectByName("Mimas", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Enceladus", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Tethys", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Titan", pointer = true);
}
d1 = "The Next Quadruple Saturn Moon Transit that includes Titan 12/04/2054"
c1 = "#1FBFD9"



}





if (id[r] == 160)
{
// Jupiter from Uranus 
core.setObserverLocation(80.52, 79.3, 1700, 1, "", "Uranus");
core.setDate("2055-04-01T06:49:02", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*17+10);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true); 

d1 = "Jupiter's best Greatest Elongation of the 21st Century as seen from Uranus"
c1 = "#FF7700"

d2 = "Elongation 16.80 Degrees       06/04/2063"
c2 = "#DFF7FF"



SolarSystem.setLabelsAmount(20);   
}



if (id[r] == 161)
{
// Eros from Earth 
core.setObserverLocation(8.00, 18.75, 5, 1, "", "Earth");
core.setDate("2056-01-27T21:46:00", "utc");

core.selectObjectByName("Eros", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*37+60);
StelMovementMgr.zoomTo(pick, 1);


d1 = "The Eros' closest approach of the 21st Century";
c1 = "#FF7770"

d2 = "~14 million miles  01/27/2056"
c2 = c1


}



if (id[r] == 162)
{
// Earth from Jupiter 

dir = 2
long = 0
lat = 22.24
alt = 7
p1 = "Europa"
p2 = "Jupiter"
	

core.setObserverLocation(long, 22.24, 7, 0, "", "Europa");
core.setDate("2058-07-15T03:11:22", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(34, 1);
SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
SolarSystem.setLabelsAmount(-20);   
}
d1 = "Earth's Greatest Elongation (11.83" +degstring + ") of the 21st Century as seen from Jupiter"
c1 = "#A0FFFF"


d2 = "07/15/2058"
c2 = "#A0FFFF"


SolarSystem.setLabelsAmount(20);

}


if (id[r] == 163)
{
// Earth Transits from Ceres


dir = 1
long = 0
lat = 4.24
alt =36
p1 = "(1) Ceres";
p2 = "Earth";




core.setObserverLocation(long, 4.24, 36, 0, "", "(1) Ceres");
core.setDate("2058-12-13T13:22:00", "utc");
SolarSystem.setFlagMoonScale(0);  

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);


var pick = Math.floor(Math.random()*2)+2;
pick = pick / 10 
StelMovementMgr.zoomTo(pick, 1);


d1 = "Earth & Moon Transit the Sun 12/13/2058"
c1 = "#707070"

d2 = "from Ceres"
c2 = c1


}





if (id[r] == 164)
{
// Mercury best GE *
core.setObserverLocation(-0.5, -40.5, 7, 1, "", "Earth");
core.setDate("2059-04-02T04:45:28", "utc");

core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+10;
StelMovementMgr.zoomTo(pick, 1);
SolarSystem.setFlagOrbits(true);

d1 = "Mercury Greatest Elongation (27.8298 Degrees)";
c1 = "#78FF17"
d2 = "of the 21st century 4/2/2059";
c2 = "#78FF17"


SolarSystem.setFlagOrbits(true);   

}


if (id[r] == 165)
{
// Solar Eclipse with Saturn and Jupiter near by 05/11/2059
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-116.75, -24.4, 126, 1, "", "Earth");
core.setDate("2059-05-11T18:27:19", "utc");

core.selectObjectByName("Moon", pointer = true);
var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Jupiter", pointer = true);
}

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(17.6, 1);

d1 = "Solar Eclipse with Saturn and Jupiter near by 05/11/2059"
c1 = "#FFDAFF"


SolarSystem.setFlagMoonScale(0);   	
}



if (id[r] == 166)
{
// Saturn from Jupiter 2/6/2060

dir = 3
long = 0
lat = 30
alt = 16
p1 = "Callisto"
p2 = "Saturn"
	

core.setObserverLocation(long, 30, 16, 0, "", "Callisto");
core.setDate("2060-02-01T06:20:07", "utc");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(66.5, 1);

d1 = "Saturn Opposition from Jupiter 2/1/2060 (Closest of 21st century)"
c1 = "#FFF6AA"

}


if (id[r] == 167)
{
// Nice Grouping 4/5/2060
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2060-04-06T00:30:07", "utc");

core.selectObjectByName("Venus", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(14, 1);

d1 = "Just a nice grouping of Venus, Jupiter, Saturn and the Pleiades 4/5/2060"
c1 = "#BD2CB0"
}



if (id[r] == 168)
{
// Saturn/Sun from Neptune

dir = 1
long = 0;
lat = 37
alt = 7
p1 = "Triton";
p2 = "Saturn";


core.setObserverLocation(93.5, 37, 7, 0, "", "Triton");
core.setDate("2061-05-29T17:12:14", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Saturn", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*6)+2;
StelMovementMgr.zoomTo(pick/100, 1);
SolarSystem.setFlagOrbits(false);

d1 = "Saturn Transits the Sun as seen from Neptune / Triton 5/29/2061";
c1 = "#22F5FF"

}


if (id[r] == 169)
{
// Earth from Mercury 
core.setObserverLocation(141.80, 44.24, 7, 1, "", "Mercury");
core.setDate("2061-05-31T04:00:30", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(14, 1);

d1 = "Earth closest 21st century opposition from Mercury 5/31/2061";
c1 = "#E03857"



}

if (id[r] == 170)
{
// Jupiter's Moons - Only one moon visible

core.setObserverLocation(-123.11, 44.637, 1126, 1, "", "Earth");
core.setDate("2062-05-01T06:34:01", "utc");

core.selectObjectByName("Ganymede", pointer = true);
StelMovementMgr.setFlagTracking(true);

pick = (Math.random()*800 + 300 )/1000
 
StelMovementMgr.zoomTo(pick, 1);


SolarSystem.setFlagOrbits(true);

d1 = "Jupiter - only one Galilean moon visible"
c1 = "#CC7802"

d2 = "5/1/2062";
c2 = ""; 


}



if (id[r] == 171)
{
// Jupiter & Mars & Regulus 
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2062-09-29T08:50:07", "utc");

core.selectObjectByName("Mars", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("HIP 49669", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(41, 1);

d1 = "Mars - Jupiter and Regulus 09/29/2062"
c1 = "#BF9150"


}







if (id[r] == 172)
{
// Crab Neptune 

core.setObserverLocation(4, 40.24, 16, 1, "", "Earth");
core.setDate("2064-03-31T21:42:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*2+1;
StelMovementMgr.zoomTo(pick/10, 1);


d1 = "Neptune in the Crab Nebula 03/31/2061"
c1 = "#1234FF"


}

if (id[r] == 173)
{
// Saturn from Jupiter 2064-05-12T20:03:09

dir = 2
long = 0
lat = 4.24
alt = 17
p1 = "Callisto";
p2 = "Saturn"

core.setObserverLocation(-3.71, 4.24, 17, 0, "", "Callisto");
core.setDate("2064-05-12T20:03:09", "utc");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.03, 1);

d1 = "Saturn's greatest ring tilt of the 21st century"
c1 = "#DEE267"
d2 = "from Jupiter 5/12/2064 - 27.43" + degstring
c2 = "#DEE267"


}



if (id[r] == 174)
{
// Dimmest Jupiter 21st century
core.setObserverLocation(-128.9, -8.25, 1738, 1, "", "Earth");
core.setDate("2064-10-01T02:57:36", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

pick = Math.random()*40 + 30
 

StelMovementMgr.zoomTo(pick, 1);



SolarSystem.setFlagOrbits(true);

d1 = "Dimmest Jupiter of the 21st Century  10/01/2064 (-1.6623 mag)";
c1 = "#9A7035"


SolarSystem.setFlagOrbits(false);   
}



if (id[r] == 175)
{
// Mars from Pallas 

dir = -2
long = 113
lat = 40.52
alt = 17
p1 = "(2) Pallas";
p2 = "Mars"



core.setObserverLocation(long, 40.52, 17, 0, "", "(2) Pallas");
core.setDate("2064-10-06T07:37:19", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*17+77);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true); 
LandscapeMgr.setFlagAtmosphere(false);


d1 = "Brightest Mars of the 21st Century from Pallas"
c1 = "#FF1101"

d2 = "Magnitude 1.82       10/06/2064"
c2 = "#DFF7FF"
  
}


if (id[r] == 176)
{
// Mars - Jupiter 12/18/2064
core.setObserverLocation(174.33, 40.5, 126, 1, "", "Earth");
core.setDate("2064-12-18T18:23:35", "UTC");

core.selectObjectByName("Mars", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*70)+10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Extremely Close (0.09 Degrees) Mars and Jupiter Conjunction 12/18/2064";
c1 = "#FF31F1"

}



if (id[r] == 177)
{
// Earth Full - Venus New 

dir = 2
long = 90.12
lat = 1.25
alt =7
p1 = "Callisto"
p2 = "Earth"

core.setObserverLocation(90.12, 1.25, 7, 0, "", "Callisto");
core.setDate("2065-11-22T11:14:36", "utc");
LandscapeMgr.setFlagAtmosphere(false);



core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*500)+500;

pick = pick / 100000
StelMovementMgr.zoomTo(pick, 1);


d1 = "A close Full Earth - New Venus Conjunction from Callisto 11/22/2065";
c1 = "#B59918"
 
}





if (id[r] == 178)
{
// Mars so far 
core.setObserverLocation(176.12, 8.33, 7, 1, "", "Earth");
core.setDate("2066-08-25T00:21:00", "utc");
LandscapeMgr.setFlagAtmosphere(true);



core.selectObjectByName("Mars", pointer = true);


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+5;

StelMovementMgr.zoomTo(pick, 1);


d1 = "Mars' farthest point (2.6763 AU) away from Earth of the 21st Century 08/25/2066";
c1 = "#CBBBD9"
 
}





if (id[r] == 179)
{
// Latest 1st full moon 21st century
	
core.setObserverLocation(-179.40, 44.24, 116, 1, "", "Earth");
core.setDate("2067-01-30T10:30:07", "UTC");

core.selectObjectByName("Moon", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*24)+14
StelMovementMgr.zoomTo(pick, 1);

d1 = "Latest First Full Moon of the year in the 21st Century 1/30/2067"
c1 = "#BABABF"


SolarSystem.setFlagMoonScale(4);   	
}








if (id[r] == 180)
{
// Mercury & Earth 


dir = 3
long = 0
lat = 64.31
alt = 26
p1 = "Triton"
p2 = "Mercury"



core.setObserverLocation(31.5, 64.31, 26, 0, "", "Triton");
core.setDate("2067-07-15T16:03:48", "utc");

SolarSystem.setLabelsAmount(20);   	
core.selectObjectByName("Mercury", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = true);
}

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.000277, 1);

d1 = "Mercury Transits Earth from Triton 7/15/2067";
c1 = "#BB4234"

LandscapeMgr.setFlagAtmosphere(false);


}


if (id[r] == 181)
{
// Mercury & Neptune 
core.setObserverLocation(-103.22, 4.31, 26, 1, "", "Earth");
core.setDate("2067-07-15T11:54:30", "utc");

SolarSystem.setLabelsAmount(20);   	
core.selectObjectByName("Mercury", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Neptune", pointer = true);
}

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.00747, 1);

d1 = "The Closest Mercury - Neptune conjunction 0.010" + degstring +" of the Millennium 7/15/2067";
c1 = "#BB4234"

}




if (id[r] == 182)
{
// Brightest Titan from Hyperion 

dir = 3
long = 0
lat = 0
alt = 116
p1 = "Hyperion"
p2 = "Titan"
	
core.setObserverLocation(-170.40, 0, 116, 1, "", "Hyperion");
core.setDate("2067-07-25T03:15:06", "UTC");

core.selectObjectByName("Titan", pointer = true);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.random() + 2.8
StelMovementMgr.zoomTo(pick, 1);

d1 = "Brightest Titan of the 21st Century -8.805 Mag."
c1 = "#FF5F35"

d2 = "From Hyperion 7/25/2067"
c2 = c1


  	
}





if (id[r] == 183)
{
// Mars Dimmest 
core.setObserverLocation(-160.12, 4.25, 1738, 1, "", "Earth");
core.setDate("2068-07-22T05:42:36", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*140)+19
StelMovementMgr.zoomTo(pick, 1);


SolarSystem.setFlagOrbits(true);

d1 = "Mars Dimmest Illumination of 21st Century (1.844 mag) 7/22/2068";
c1 = "#B59918"
 
}


if (id[r] == 184)
{
// Mars from Ceres 

dir = -2
long = 0
lat = -30
alt = 10
p1 = "(1) Ceres"
p2 = "Mars"

core.setObserverLocation(long, -30, 10, 0, "", "(1) Ceres");
core.setDate("2068-08-24T06:52:02", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*27+69);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true);  

LandscapeMgr.setFlagAtmosphere(false);  
 

d1 = "Mars best Greatest Elongation of the 21st Century as seen from Ceres"
c1 = "#F00090"

d2 = "Elongation 39.992 Degrees       08/24/2068"
c2 = "#F00090"


}






if (id[r] == 185)
{
// Venus - Zavijava 2069

core.setObserverLocation(-33.00, -69.5, 1126, 1, "", "Earth");
core.setDate("2069-08-11T20:25:27", "utc");

core.selectObjectByName("Venus", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Zavijava", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.0387, 1);

d1 = "Venus - Zavijava Occultation 8/11/2069"
c1 = "#AAAAFF"


}

if (id[r] == 186)
{
// Earth from Eros

dir = -2
long = 0
lat = -41.5
alt = 2
p1 = "(433) Eros"
p2 = "Earth"


core.setObserverLocation(long, -41.5, 2, 0, "", "(433) Eros");
core.setDate("2070-02-26T03:06:00", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth");
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(120, 1);
SolarSystem.setFlagOrbits(true);


d1 = "Earth's best 21st Greatest Elongation 60.778" + degstring 
c1 = "#15FFF7"

d2 = "From Eros" 
c2 = c1



}



if (id[r] == 187)
{
// Jupiter from Venus 
core.setObserverLocation(73.71, 5.25, 50000, 1, "", "Venus");
core.setDate("2070-06-17T15:57:30", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.random()*30+30;
StelMovementMgr.zoomTo(pick);

d1 = "Jupiter closest 21st century opposition from Venus 6/17/2070";
c1 = "#FFFF4F"



}



if (id[r] == 188)
{
// Earth - Alpha Capicorn 08/3/2071
core.setObserverLocation(-100, 7.24, 50000, 1, "", "Venus");
core.setDate("2071-08-03T15:40:07", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(2.57, 1);

d1 = "Earth Closest Conjunction of Alpha-Alpha Capicorn";
c1 = "#11D2FF"

d2 = "of the 20th century 08/03/2071 from Venus  0.168"+degstring;
c2 = "#11D2FF"


}



if (id[r] == 189)
{
// Earth from Ceres 


dir = -2
long = 0
lat = 3.5
alt = 10
p1 = "(1) Ceres"
p2 = "Earth"

core.setObserverLocation(long, lat, 10, 0, "", "(1) Ceres");
core.setDate("2078-05-18T16:09:03", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*27+39);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true); 

LandscapeMgr.setFlagAtmosphere(false);  

d1 = "Earth's best Greatest Elongation of the 21st Century as seen from Ceres"
c1 = "#999999"

d2 = "Elongation 23.209 Degrees       05/18/2078"
c2 = "#909090"



}




if (id[r] == 190)
{
// Venus from Mars 
core.setObserverLocation(-93.37, -5.5, 17, 1, "", "Mars");
core.setDate("2078-12-02T03:47:02", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(67, 1);

var pick = Math.floor(Math.random()*37+40);
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true); 

d1 = "Venus best Greatest Elongation of the 21st Century as seen from Mars"
c1 = "#FFF7FF"

d2 = "Elongation 31.776 Degrees       12/02/2078"
c2 = "#DFF7FF"



SolarSystem.setLabelsAmount(20);   
}





if (id[r] == 191)
{
// Venus from Mercury 
core.setObserverLocation(-74.80, 40.50, 7, 1, "", "Mercury");
core.setDate("2079-06-24T10:40:30", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(60, 1);

d1 = "Venus closest 21st century approach to Mercury 6/24/2079";
c1 = "#E03857"

d2 = "Magnitude -7.9387 - The Brightest of any planet seen from another";
c2 = "#E03857"

}




if (id[r] == 192)
{
// Saturn - Uranus Opposition Together 7/23/2079

core.setObserverLocation(0, 34.24, 1126, 1, "", "Earth");
core.setDate("2079-07-23T00:00:00", "utc");

core.selectObjectByName("Uranus", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Saturn", pointer = true);
core.setDate("+1 days");
}
StelMovementMgr.setFlagTracking(true);

pick = Math.floor(Math.random()*27)+3;
StelMovementMgr.zoomTo(pick, 1);


d1 = "Uranus and Saturn come into opposition 1 day apart"; 
c1 = "#71FF11"

d2 = "7/22/2079 and 7/23/2079";
c2 = "#71FF11"





}

if (id[r] == 193)
{
// Nice Grouping 2/18/2080
core.setObserverLocation(118.3, 8.5, 220, 1, "", "Earth");
core.setDate("2080-02-18T21:23:07", "utc");

LandscapeMgr.setFlagAtmosphere(true);


core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Uranus", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


var pick = Math.random()*7+20;

StelMovementMgr.zoomTo(pick, 1);


d1 = "A nice grouping of Venus, Jupiter, Saturn, Uranus and the Moon 2/18/2080"
c1 = "#FF22FF"

}



if (id[r] == 194)
{

// Triton Eclispe

dir = 4
long = 90
lat = 0
alt = 7
p1 = "Nereid"
p2 = "Triton"


core.setObserverLocation(long, lat, 7, 0, "", p1);
core.setDate("2080-03-23T13:56:01", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Triton", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*3)+1;
StelMovementMgr.zoomTo(pick/3 +.75, 1);

d1 = "Triton's next Eclispe from Nereid 3/23/2080"
d2 = ""

c1 = "#007FF7"
c2 = c1




}




if (id[r] == 195)
{
// Jupiter/Sun from Iapetus


dir = 1
long = 0
lat = -7.7
alt = 27
p1 = "Iapetus"
p2 = "Jupiter"



core.setObserverLocation(long, -7.7, 27, 0, "", "Iapetus");
core.setDate("2080-05-19T10:03:03", "utc");


LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", pointer = false);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*9)+1;

pick = pick/10

StelMovementMgr.zoomTo(pick, 1);
SolarSystem.setFlagOrbits(false);

d1 = "Jupiter Transits the Sun as seen from Iapetus 5/19/2080"; 
c1 = "#78FF17"
}




if (id[r] == 196)
{
// Jupiter/Sun from Titan

dir = 1
long = 0
lat = 30
alt = 27
p1 = "Titan"
p2 = "Jupiter"


core.setObserverLocation(long, 30, 27, 0, "", "Titan");
core.setDate("2080-05-20T20:30:03", "utc");


LandscapeMgr.setFlagAtmosphere(true);

core.selectObjectByName("Jupiter", pointer = false);
StelMovementMgr.setFlagTracking(true);


StelMovementMgr.zoomTo(.15, 1);
SolarSystem.setFlagOrbits(false);

d1 = "Jupiter partially Transits the Sun as seen from Titan 5/20/2080"; 
c1 = "#131200"
}


if (id[r] == 197)
{

// 7 planets & 3 Asteroids lined up  
core.setObserverLocation(-7.2, 27.75, 1126, 1, "", "Earth");
core.setDate("2081-01-12T18:13:07", "utc");
core.selectObjectByName("HIP 109472", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*9);
core.selectObjectByName("Mercury", pointer = true);

if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Uranus", pointer = true);
}

if (pick == 3)
{
core.selectObjectByName("Venus", pointer = true);
}

if (pick == 4)
{
core.selectObjectByName("Mars", pointer = true);
}

if (pick == 5)
{
core.selectObjectByName("(1) Ceres", pointer = true);
}

if (pick == 6)
{
core.selectObjectByName("Moon", pointer = true);
}

if (pick == 7)
{
core.selectObjectByName("Pluto", pointer = true);
}


SolarSystem.setLabelsAmount(20);   	

StelMovementMgr.zoomTo(79, 1);

d1 = "7 Planets, The Moon and 3 Asteroids lined up - 1/12/2081"
c1 = "#FF2FF0"

}





if (id[r] == 198)
{
// Neptune so far 
core.setObserverLocation(-126.12, 4.33, 7, 1, "", "Uranus");
core.setDate("2084-03-06T19:37:36", "utc");
LandscapeMgr.setFlagAtmosphere(false);



core.selectObjectByName("Neptune", pointer = true);


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+5;

StelMovementMgr.zoomTo(pick, 1);


d1 = "Neptune's farthest point (49.87909 AU) away from Uranus 03/06/2084";
c1 = "#1899B6"
 
}



if (id[r] == 199)
{
// Earth from Mars 
core.setObserverLocation(-14, 34.48, 17, 1, "", "Mars");
core.setDate("2084-07-15T19:30:00", "utc");

core.selectObjectByName("Earth", pointer = true);
SolarSystem.setFlagOrbits(true);  
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(67, 1);

var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
StelMovementMgr.zoomTo(67.39, 1);

}
d1 = "Earth's farthest greatest elongation of the 21st Century as seen from Mars"
c1 = "#1170FF"
d2 = "47.378" + degstring +"       07/15/2084";
c2 = "#1170FF"

   
}





if (id[r] == 200)
{
// Earth Transit from Mars

core.setObserverLocation(95.3, 4.24, 36, 1, "", "Mars");
core.setDate("2084-11-10T09:29:00", "utc");

SolarSystem.setFlagMoonScale(0);  
core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);


var pick = Math.floor(Math.random()*2)+2;
pick = pick / 5 
StelMovementMgr.zoomTo(pick, 1);


d1 = "Earth & Moon Transit the Sun 11/10/2084"
c1 = "#777070"

d2 = "from Mars"
c2 = c1


}



if (id[r] == 201)
{
// Venus from Ceres 

dir = -2
long = 0
lat = 2.5
alt = 10
p1 = "(1) Ceres"
p2 = "Venus"


core.setObserverLocation(long, 2.5, 10, 0, "", "(1) Ceres");
core.setDate("2087-06-10T17:43:00", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*30+60);
StelMovementMgr.zoomTo(pick, 1);


d1 = "Venus' best Greatest Elongation of the 21st Century as seen"
c1 = "#0FFF0F"

d2 = "From Ceres - Elongation 16.437" + degstring + " 06/10/2087"
c2 = "#0FFF0F";
   
}








if (id[r] == 202)
{
// Fullest Neptune in Big Dipper 


dir = 1
long = 0
lat = 3.33
alt = 7
p1 = "Triton"
p2 = "Neptune"


core.setObserverLocation(long, lat, 7, 0, "", "Triton");
core.setDate("2090-11-09T04:51:08", "utc");
LandscapeMgr.setFlagAtmosphere(true);



core.selectObjectByName("Neptune", pointer = true);


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*40)+20;

StelMovementMgr.zoomTo(pick, 1);


d1 = "A Full Neptune in the Big Dipper from Triton 11/09/2090";
c1 = "#ABBBFF"
 
}




if (id[r] == 203)
{
//  Titan's Greatest Elongation 12/28/2091
core.setObserverLocation(112, 40, 64, 1, "", "Earth");
core.setDate("2091-12-28T16:12:25", "utc");

core.selectObjectByName("Titan", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*3)+1;
StelMovementMgr.zoomTo(pick/10, 1);

d1 = "Titan's Greatest Elongation away from Saturn (0.0599 Degrees)"; 
c1 = "#7ADA01"

d2 = "in the 21st century as seen from Earth 12/28/2091";
c2 = "#AADA0F"




}

if (id[r] == 204)
{
// Neptune - Regulus Conjunction
core.setObserverLocation(-0, 44, 114, 1, "", "Earth");
core.setDate("2092-10-08T05:03:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*10)+1;
pick = pick / 10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Neptune 0.03 Degrees from Regulus 10/08/2092"
c1 = "#0A0AFF"


}


if (id[r] == 205)
{
// Earth from Venus 
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-84.7, 40.3, 50000, 1, "", "Venus");
core.setDate("2093-12-17T12:00:07", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*6)+2;
StelMovementMgr.zoomTo(pick*pick, 1);

d1 = "Earth's Brightest 21st Century opposition from Venus "
c1 = "#0070FF"


d2 = "12/17/2093"
c2 = "#0070FF"

SolarSystem.setLabelsAmount(20); 
SolarSystem.setFlagMoonScale(4);   	  
}




if (id[r] == 206)
{
// South Pole Eclipse
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(0, -90, 5, 1, "", "Earth");
core.setDate("2094-01-16T18:49:47", "utc");

core.selectObjectByName("Moon", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+10
StelMovementMgr.zoomTo(pick, 1);

d1 = "The Next Total Eclipse at the South Pole 01/26/2094"
c1 = "#FAFAFF"


}






if (id[r] == 207)
{
// Mercury From Ceres 



dir = -2
long = 0
lat = 18
alt = 10
p1 = "(1) Ceres"
p2 = "Mercury"


core.setObserverLocation(long, 18, 10, 0, "", "(1) Ceres");
core.setDate("2096-10-26T13:14:00", "utc");

core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);


LandscapeMgr.setFlagAtmosphere(false);

SolarSystem.setFlagOrbits(true);

var pick = Math.random() *20 + 20;
StelMovementMgr.zoomTo(pick, 1);


d1 = "Mercury best Greatest Elongation of the 21st Century as seen"
c1 = "#03FF3F"

d2 = "From Ceres - Elongation 10.456" + degstring + " 10/26/2096"
c2 = "#0FFF0F";
   
}


if (id[r] == 208)
{
// Venus best GE
core.setObserverLocation(-74.5, 40.5, 1738, 1, "", "Earth");
core.setDate("2096-12-19T22:38:28", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+10;
StelMovementMgr.zoomTo(pick, 1);
SolarSystem.setFlagOrbits(true);

d1 = "Venus' Farthest Greatest Elongation (47.293 Degrees)";
c1 = "#B5FFA7"
d2 = "of the 21st century";
c2 = "#B5FFA7"


}

if (id[r] == 209)
{
// Eris from Pluto 


dir = 3
long = 0
lat = 40.25
alt = 701
p1 = "Pluto"
p2 = "Eris"


core.setObserverLocation(long, 40.25, 701, 0, "", "Pluto");
core.setDate("2097-12-15T23:57:37", "utc");

core.selectObjectByName("Eris", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(124, 1);

d1 = "Eris Opposition from Pluto 12/15/2097";
c1 = "#A1A1FF"

}




if (id[r] == 210)
{
// Earth from Mars 
core.setObserverLocation(-175.399994, -14.48, 17, 1, "", "Mars");
core.setDate("2099-07-26T04:16:00", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(67, 1);

var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
StelMovementMgr.zoomTo(7.39, 1);

}
d1 = "Earth's Greatest Illumination of the 21st Century as seen from Mars"
c1 = "#1170FF"

d2 = "Mag -2.393       07/26/2099"
c2 = "#1170FF"



SolarSystem.setLabelsAmount(20);   
}



if (id[r] == 211)
{
// Polaris Furthest North Star

core.setObserverLocation(0, 45, 4, 1, "", "Earth");
GridLinesMgr.setFlagEquatorGrid(true);
core.setDate("2100-03-24T00:00:07", "utc");

core.selectObjectByName("HIP 11767", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*14)+2;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Polaris closest to Celestial North Pole 3/24/2100"
c1 = "#AAAAF8"



}

if (id[r] == 212)
{
// Neptune - Leo

core.setObserverLocation(64.8, 48.75, 36, 1, "", "Earth");
core.setDate("2100-10-22T23:58:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*5+2;
pick = pick * 0.001;
StelMovementMgr.zoomTo(pick);

d1 = "Neptune Occults some 7th Mag Star in Leo  10/22/2100"
c1 = "#33AFFF"


}


if (id[r] == 213)
{
// Earth - Mars Conjunction 12/15/2101

core.setObserverLocation(-90.71, 24, 50000, 1, "", "Venus");
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = true);
core.setDate("2101-12-16T00:39:07", "utc");
}
if (pick == 1)
{
core.selectObjectByName("Mars", pointer = true);
core.setDate("2101-12-14T03:11:07", "utc");
}

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(44, 1);

d1 = "Earth and Mars oppositions within 2 days of each other 12/16/2101 + 12/14/2101"
c1 = "#FF2F00"
d2 = "From Venus"
c2 = "#FF2F00"


}


if (id[r] == 214)
{
// Eris - Pluto 2/17/2104
core.setObserverLocation(147.69, 64.85, 126, 1, "", "Earth");
core.setDate("2104-02-17T09:07:45", "UTC");

core.selectObjectByName("Pluto", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Eris", pointer = true);
}
StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(72, 1);


d1 = "The Next Pluto and Eris Conjunction 02/17/2104";
c1 = "#7F31FF"

}






if (id[r] == 215)
{
// Pluto Aphelion
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2114-02-19T01:45:07", "utc");

core.selectObjectByName("Pluto", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(28, 1);

d1 = "Pluto's Next Aphelion 2/19/2114"
c1 = "#52D1FC"


}

if (id[r] == 216)
{
// Earth - Circlet 10/14/2114
core.setObserverLocation(-66.60, 27.24, 6, 1, "", "Venus");
core.setDate("2114-10-14T20:30:07", "utc");

core.selectObjectByName("Earth", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);

var pick = Math.floor(Math.random()*5);
pick = (pick +1)*10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Earth in Circlet from Venus 10/14/2114";
c1 = "#11DDFF"

}



if (id[r] == 217)
{
// Venus - Antares 10/19/2117
core.setObserverLocation(-28.33, 34.50, 1126, 1, "", "Earth");
core.setDate("2117-10-19T20:45:07", "utc");

core.selectObjectByName("Venus", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*9)+1;
pick = pick/10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Venus and Antares 0.050 degrees apart 10/17/2117"
c1 = "#F1FFF8"


}


if (id[r] == 218)
{
// Venus Next  Transit

core.setObserverLocation(123.3, 41.24, 360, 1, "", "Earth");
core.setDate("2117-12-11T02:47:56", "utc");


core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*6)+1;
pick = pick / 10 
StelMovementMgr.zoomTo(pick, 1);


d1 = "The next Venus Transit of the Sun 12/11/2117"
c1 = "#000007"

}


if (id[r] == 219)
{
// Neptune - Virgo

core.setObserverLocation(-4.5, 9.02, 16, 1, "", "Earth");
core.setDate("2120-08-05T20:27:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*5+2;
pick = pick * 0.001;
StelMovementMgr.zoomTo(pick);

d1 = "Neptune Occults 82 Virgo 08/06/2120"
c1 = "#33AFFF"


}


if (id[r] == 220)
{
// Venus - Jupiter   9/14/2123
core.setObserverLocation(51.00, -0.50, 26, 1, "", "Earth");
core.setDate("2123-09-14T15:29:12", "utc");

core.selectObjectByName("Jupiter", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Venus", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02,1);

SolarSystem.setLabelsAmount(18);   	
d1 = "Venus  Occultation of Jupiter 9/14/2123"
c1 = "#CCDDFF"


}

if (id[r] == 221)
{
// Earth and Moon in Pleiades conjunction
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(116.50, 40, 50000, 1, "", "Venus");
core.setDate("2125-10-08T18:53:08", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Moon", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
var pick = Math.floor(Math.random()*15+16)/10;
StelMovementMgr.zoomTo(pick, 1);
	
d1 = "Earth and Moon in the Pleiades from Venus 10/08/2125"
c1 = "#77AAFF"

SolarSystem.setFlagMoonScale(4);   	

}


if (id[r] == 222)
{
// Mars - Antares 10/29/2041

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2127-08-02T02:00:07", "utc");

core.selectObjectByName("Mars", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(22, 1);

d1 = "Mars comes within 0.8 degrees of Antares 08/02/2127"
c1 = "#D81B0B"


}

if (id[r] == 223)
{
// Pluto so far 
core.setObserverLocation(116.12, 8.33, 7, 1, "", "Neptune");
core.setDate("2131-09-19T06:13:00", "utc");
LandscapeMgr.setFlagAtmosphere(false);



core.selectObjectByName("Pluto", pointer = true);


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+5;

StelMovementMgr.zoomTo(pick, 1);


d1 = "Pluto's farthest point (78.429 AU) away from Neptune 09/19/2131";
c1 = "#18BBD9"
 
}





if (id[r] == 224)
{
// Venus Transits Earth 12/2/2123
core.setObserverLocation(-8.24, -33.50, 1126, 1, "", "Mercury");
core.setDate("2133-12-03T14:06:23", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.0135, 1);

d1 = "Venus Occults Earth as seen from Mercury 12/2/2123"
SolarSystem.setFlagMoonScale(0);   	
c1 = "#A2C9FA"



}

if (id[r] == 225)
{
//  Venus Crab
core.setObserverLocation(17.1, 35.25, 70, 1, "", "Earth");
core.setDate("2137-07-22T02:37:00", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Venus", pointer = true);

var pick = (Math.random()*8+3);
StelMovementMgr.zoomTo(pick/100, 1);


StelMovementMgr.setFlagTracking(true);

d1 = "Venus in the Crab Nebula 7/22/2137"  
c1 = "#0FF001"


}



if (id[r] == 226)
{
// Mars & Saturn & Beehive 
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2152-10-16T09:02:07", "utc");

core.selectObjectByName("Saturn", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(6, 1);

d1 = "Mars - Saturn - Beehive 10/16/2152"
c1 = "#BF1B0B"


}


if (id[r] == 227)
{
// Ceres in Gemeni's head 
core.setObserverLocation(168.00, 48.75, 5, 1, "", "Earth");
core.setDate("2156-01-14T16:17:07", "utc");

core.selectObjectByName("(1) Ceres", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*7+6);
StelMovementMgr.zoomTo(pick, 1);


d1 = "Ceres Opposition between Gemini's heads";
c1 = "#FF7770"

d2 = "1/14/2156"
c2 = c1


}





if (id[r] == 228)
{
// Neptune from Urauns 
core.setObserverLocation(-81.0, 69.25, 25559000, 1, "", "Uranus");
core.setDate("2164-12-31T22:21:30", "utc");

core.selectObjectByName("Neptune", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(124, 1);

d1 = "Neptune Opposition from Uranus 12/31/2164";
c1 = "#010FFF"



}

if (id[r] == 229)
{
// Uranus - Neptune Conjunction 1/17/2165
core.setObserverLocation(-73.71, 40.24, 1126, 1, "", "Earth");
core.setDate("2165-01-17T21:59:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Uranus", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(15, 1);

d1 = "The Next Uranus - Neptune Conjunction 1/17/2165"
c1 = "#FFFFFF"
}



if (id[r] == 230)
{
// Uranus - Neptune from Pluto

dir = +2
long = 90
lat = -10
alt = 6
p1 = "Pluto"
p2 = "Uranus"



core.setObserverLocation(long, lat, 6, 0, "", "Pluto");
core.setDate("2171-10-30T20:30:07", "utc");

core.selectObjectByName("Uranus", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Neptune", pointer = true);
}

StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*17)+1;
pick = pick /10 + .7 
StelMovementMgr.zoomTo(pick, 1);

d1 = "Uranus - Neptune Closest Conjunction 0.011" + degstring
c1 = "#02A1A5"

d2 = "in 5000 years from Pluto 10/30/2171 "
c2 = "#02A1A5"
}






if (id[r] == 231)
{
// Jupiter/Sun from Neptune
core.setObserverLocation(-88.5, 40.5, 24764000, 1, "", "Neptune");
core.setDate("2188-08-08T18:32:28", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+1;
StelMovementMgr.zoomTo(pick/100, 1);
SolarSystem.setFlagOrbits(false);

d1 = "Jupiter and its moons Transit the Sun as seen from Neptune 8/8/2188";
c1 = "#78A1F7"


}

if (id[r] == 232)
{
// Venus brightest Millennium
core.setObserverLocation(-24.5, 40.5, 1738, 1, "", "Earth");
core.setDate("2192-12-29T19:59:36", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(28, 1);
SolarSystem.setFlagOrbits(true);

d1 = "Brightest Venus of the Millennium 12/29/2192 (-4.88839 mag)";
c1 = "#B5FFA7"



SolarSystem.setFlagOrbits(false);   
}

if (id[r] == 233)
{
// Venus - Spica 09/2/2197
core.setObserverLocation(-179.90, 23.24, 126, 1, "", "Earth");
core.setDate("2197-09-02T08:05:07", "utc");

core.selectObjectByName("Venus", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);

var pick = Math.floor(Math.random()*12);
pick = pick +1;
pick = pick/100;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Venus Occultation of Spica 9/02/2197"
c1 = "#77DDFF"


}

if (id[r] == 234)
{
// Saturn's Moons - Quintuple Transit

core.setObserverLocation(1.8, 47.25, 16, 1, "", "Earth");
core.setDate("2203-01-07T19:43:09", "utc");

core.selectObjectByName("Saturn", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.008, 1);
var pick = Math.floor(Math.random()*6);
if (pick == 1)
{
core.selectObjectByName("Rhea", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Dione", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Tethys", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Mimas", pointer = true);
}
if (pick == 5)
{
core.selectObjectByName("Enceladus", pointer = true);
}
d1 = "The Next rare Quintuple Saturn Moon Transit 1/07/2203"
c1 = "#D9FBF1"


}




if (id[r] == 235)
{
// Eris


dir = 1
long = 0
lat = -62.60
alt = 16
p1 = "(136199) Eris"
p2 = "Sun"




core.setObserverLocation(35.25, -62.60, 16, 0, "", "Eris");
core.setDate("2208-06-23T00:19:56", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Sun", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(114, 1);

SolarSystem.setFlagOrbits(true);

d1 = "High above the solar system from Eris during Perhelion 6/23/2208"
c1 = "#A1AFA0"


SolarSystem.setFlagOrbits(true);


}



if (id[r] == 236)
{
// Saturn Crab Neptune 

core.setObserverLocation(23.3, 40.24, 36, 1, "", "Earth");
core.setDate("2208-08-15T01:48:07", "utc");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);


StelMovementMgr.zoomTo(0.122, 1);


d1 = "Saturn in the Crab Nebula 08/15/2208"
c1 = "#F3F34F"


}



if (id[r] == 237)
{
// North Pole Eclipse
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(0, 90, 5, 1, "", "Earth");
core.setDate("2214-07-08T14:32:07", "utc");

core.selectObjectByName("Moon", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+50
StelMovementMgr.zoomTo(pick, 1);

d1 = "The Next Total Eclipse at the North Pole 07/08/2214"
c1 = "#FAFAFF"


}



if (id[r] == 238)
{
// Opposition grouping
core.setObserverLocation(1.23, 48.50, 26, 1, "", "Earth");
core.setDate("2217-03-05T02:54:44", "utc");

core.selectObjectByName("Saturn", pointer = true);
var pick = Math.floor(Math.random()*5);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Uranus", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Vesta", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Pluto", pointer = true);
}

StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(91, 1);

d1 = "Opposition Grouping 3/5/2217"
c1 = "#AAAAFF"


}


if (id[r] == 239)
{
// Jupiter - Mars   12/02/2223
core.setObserverLocation(94.61, 44.50, 26, 1, "", "Earth");
core.setDate("2223-12-02T12:33:15", "utc");

core.selectObjectByName("Jupiter", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*2);
StelMovementMgr.zoomTo(0.03,1);

if (pick == 1)
{
StelMovementMgr.zoomTo(0.0136,1);

}
SolarSystem.setLabelsAmount(18);   	
d1 = "Mars Occultation of Jupiter 12/02/2223"
c1 = "#FF0700"
}



if (id[r] == 240)
{
// Mars Transits Earth 12/2/2223

dir = 1
long = 0
lat = 56.50
alt = 12
p1 = "Callisto"
p2 = "Earth"

core.setObserverLocation(long, 56.50, 12, 0, "", "Callisto");
core.setDate("2223-12-02T06:49:11", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Mars", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.003, 1);

d1 = "Mars Transits of Earth as seen from Callisto 12/2/2223"
SolarSystem.setFlagMoonScale(0);   	
c1 = "#FF0007"
 	
}


if (id[r] == 241)
{
// Earth - Jupiter   4/24/2230
core.setObserverLocation(35.1, -42, 50000, 1, "", "Venus");
core.setDate("2230-04-24T18:42:51", "utc");

SolarSystem.setFlagMoonScale(0);   	
core.selectObjectByName("Jupiter", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*5)+1;
StelMovementMgr.zoomTo(pick/100, 1);

SolarSystem.setLabelsAmount(20);   	
d1 = "Earth Occultation of Jupiter 4/24/2230 from Venus"
c1 = "#2C66FF"


}

if (id[r] == 242)
{
// Earth from Pluto 

dir = 1
long = 0
lat = 45.24
alt = 12
p1 = "Pluto"
p2 = "Earth"

core.setObserverLocation(long, 45.24, alt, 0, "", "Pluto");
core.setDate("2237-08-05T04:31:00", "utc");
LandscapeMgr.setFlagAtmosphere(false);

SolarSystem.setLabelsAmount(10);   
core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(16, 1);
SolarSystem.setFlagOrbits(true);

var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
SolarSystem.setLabelsAmount(-20);   
}
d1 = "Earth's Greatest Elongation as seen from Pluto during it's next perihelion"

d2 = "8/5/2237"
c1 = "#00FFFF"
c2 = "#00FFFF"


SolarSystem.setLabelsAmount(20);
 

}



if (id[r] == 243)
{
// Pluto Perihelion 9/15/2237

core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2237-09-15T01:50:07", "utc");

core.selectObjectByName("Pluto", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(38, 1);

d1 = "Pluto's Next Perihelion 9/15/2237"
c1 = "#2677DE"


}

if (id[r] == 244)
{


// Pluto from Eris 

dir = -2
long = 0
lat = 2.25
alt = 12
p1 = "(136199) Eris"
p2 = "Pluto"
	
core.setObserverLocation(long, 2.25, 12, 0, "", "(136199) Eris");
core.setDate("2247-12-27T00:03:00", "utc");

core.selectObjectByName("Pluto", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(79, 1);

d1 = "Pluto's best greatest elongation 46.46"+degstring+ " from Eris of the Millennium"
c1 = "#FF0002"
SolarSystem.setFlagOrbits(true);

  
}



if (id[r] == 245)
{
// Full Moon and Earth from Venus 
SolarSystem.setFlagMoonScale(0);   	
core.setObserverLocation(-27.5352,35.5845, 50000, 1, "", "Venus");
core.setDate("2263-06-06T22:48:28", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*3)+2;
StelMovementMgr.zoomTo(pick/100, 1);

var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Moon", pointer = true);
StelMovementMgr.setFlagTracking(true);

}
d1 = "Full Moon cuts across a full opposition Earth from Venus";
c1 = "#11F1FF"

d2 = "During a Total Eclipse";
c2 = "#11F1FF"


}


if (id[r] == 246)
{
// Jupiter - Saturn Conjunction Opposition 2/19/2279

core.setObserverLocation(3.71, 44.24, 1126, 1, "", "Earth");
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
core.setDate("2279-05-13T22:59:07", "utc");
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
core.setObserverLocation(-77.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2279-05-14T07:27:07", "utc");
}


StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(44, 1);

d1 = "Jupiter and Saturn oppositions within 8 hours of each other 05/13/2279 + 05/14/2279"
c1 = "#FF2F00"

}



if (id[r] == 247)
{
// Earth & & Venus & Jup & Saturn  6/11/2279
core.setObserverLocation(133.6, 12.1, 6, 1, "", "Mercury");
core.setDate("2279-06-11T17:49:20", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*4);

if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Venus", pointer = true);
}

LandscapeMgr.setFlagAtmosphere(false);


StelMovementMgr.setFlagTracking(true);

var pick = Math.random()*10+20;
StelMovementMgr.zoomTo(pick, 1);


d1 = "Venus, Earth, Jupiter and Saturn all in Libra's Box";
c1 = "#AD2CF0"


d2 = "From Mercury 6/11/2279"
c2 = "#AD2CF0"

}


if (id[r] == 248)
{
// Mars & Jup & Saturn & Moon  2279
core.setObserverLocation(21.6, -40.6, 26, 1, "", "Earth");
core.setDate("2279-10-09T18:14:20", "utc");

core.selectObjectByName("Moon", pointer = true);
var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Mars", pointer = true);
}


StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(35, 1);

d1 = "Moon, Mars, Jupiter and Saturn all in Libra's Box 10/09/2279"
c1 = "#AD2CF0"


}


if (id[r] == 249)
{
// Jupiter's Moons - Double Eclipse II 

dir = 1
long = -0.416
lat = -26.572
alt = 244
p1 = "Europa"
p2 = "Callisto"

core.setObserverLocation(long, -26.572, 244, 0, "", "Europa");
core.setDate("2306-02-09T06:12:23", "utc");

core.selectObjectByName("Callisto", pointer = true);
StelMovementMgr.setFlagTracking(true);

pick = Math.random()*30 
pick = 1.5 + pick / 100 

StelMovementMgr.zoomTo(pick, 1);
var pick = Math.floor(Math.random()*2);

if (pick == 1)
{
core.selectObjectByName("Ganymede", pointer = true);
}

d1 = "Ganymede / Callisto double Grazing Eclipse 9/02/2436"
c1 = "#CC78F2"

d2 = "from Europa"
c2 = c1

LandscapeMgr.setFlagAtmosphere(false);


}




if (id[r] == 250)
{
// Nereid Eclispe 

dir = 4
long = 0
lat = -28
alt = 7
p1 = "Triton"
p2 = "Nereid"


core.setObserverLocation(long, lat, 7, 0, "", "Triton");
core.setDate("2324-12-15T11:19:52", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Nereid", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*40)+1;
StelMovementMgr.zoomTo(pick/10, 1);

d1 = "Nereid's next Eclispe from Triton 12/15/2324"
d2 = ""

c1 = "#007FF7"
c2 = c1

} 





if (id[r] == 251)
{
// Earth - Jupiter   12/17/2331

core.setObserverLocation(135.3, 18, 17, 1, "", "Mars");
core.setDate("2331-12-17T07:15:20", "utc");

SolarSystem.setFlagMoonScale(0);   	
core.selectObjectByName("Jupiter", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*5)+1;
StelMovementMgr.zoomTo(pick/100, 1);

SolarSystem.setLabelsAmount(20);   	
d1 = "Earth Occultation of Jupiter 12/17/2331 from Mars"
c1 = "#2C66FF"


}






if (id[r] == 252)
{
// Jupiter - Saturn Conjunction 4/7/2339


dir = 2
long = 0

alt = 1126
p1 = "(1) Ceres"
p2 = "Jupiter"


lat = Math.floor(Math.random()*40)-20;

core.setObserverLocation(long, lat, 1126, 0, "", "(1) Ceres");
core.setDate("2339-04-07T00:52:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


LandscapeMgr.setFlagAtmosphere(false);
var pick = Math.floor((Math.random()*200) + 200) /10000 ;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Jupiter Partially Occults Saturn 4/7/2339"
c1 = "#AAAA22"

d2 = "From Ceres"
c2 = c1

}





if (id[r] == 253)
{
// Earth from Ceres


dir = 2
long = 0
lat = 9.75
alt = 36
p1 = "(1) Ceres"
p2 = "Earth"

core.setObserverLocation(long, 9.75, 36, 0, "", "(1) Ceres");
core.setDate("2369-05-09T16:19:51", "utc");

core.selectObjectByName("Earth", pointer = false);
StelMovementMgr.setFlagTracking(true);

SolarSystem.setFlagMoonScale(0);   
LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.random()*2+5;
pick = pick * 0.01;
StelMovementMgr.zoomTo(pick);

d1 = "Earth Occults Aldebaran"
c1 = "#FF334F"

d2 = "From Ceres 05/09/2369";
c2 = c1

}





if (id[r] == 254)
{
// Neptune - Pluto Conjunction 9/16/2383
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2383-09-16T06:00:07", "utc");

core.selectObjectByName("Neptune", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Pluto", pointer = true);
SolarSystem.setLabelsAmount(18);   	
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(32, 1);

d1 = "The Next Neptune - Pluto Conjunction 9/16/2383"
c1 = "#616898"


}

if (id[r] == 255)
{
// Pluto opposition from Neptune 01/29/2386

core.setObserverLocation(-0.71, 0.24, 24764000, 1, "", "Neptune");
core.setDate("2386-01-29T06:11:07", "utc");

core.selectObjectByName("Pluto", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(32, 1);

d1 = "Pluto opposition from Neptune 1/29/2386"
c1 = "#4100AA"


}

if (id[r] == 256)
{
// Mercury Grazing Transit

core.setObserverLocation(159.3, -48.24, 36, 1, "", "Earth");
core.setDate("2391-05-11T05:26:03", "utc");


core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*500)+500;
pick = pick / 10000 
StelMovementMgr.zoomTo(pick, 0);


d1 = "Mercury Grazing Transit of the Sun 5/11/2391"
c1 = "#000007"

}






if (id[r] == 257)
{
// Venus - Alpha Capicorn 03/1/2428
core.setObserverLocation(120.60, 7.24, 6, 1, "", "Earth");
core.setDate("2428-03-01T21:15:07", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);

var pick = Math.floor(Math.random()*12);
pick = pick +1;
pick = pick/10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Venus Closest Conjunction of Alpha-Alpha Capicorn";
c1 = "#FFDDFF"

d2 = "of the Millennium 03/01/2428";
c2 = "#FFDDFF"


}




if (id[r] == 258)
{
// Jupiter's Moons - Double Eclipse 

dir = 4
long = 0
lat = -52.75
alt = 244
p1 = "Callisto"
p2 = "Europa"


core.setObserverLocation(long, -52.75, 244, 0, "", "Callisto");
core.setDate("2436-09-02T02:50:02", "utc");

core.selectObjectByName("Europa", pointer = true);
StelMovementMgr.setFlagTracking(true);

pick = Math.random()*200 + 134 
pick = pick / 100

StelMovementMgr.zoomTo(pick, 1);
var pick = Math.floor(Math.random()*2);

if (pick == 1)
{
core.selectObjectByName("Ganymede", pointer = true);
}

d1 = "Europa / Ganymede double Grazing Eclipse 9/02/2436"
c1 = "#CC7802"

d2 = "from Callisto"
c2 = c1

LandscapeMgr.setFlagAtmosphere(false);


}



if (id[r] == 259)
{
// Mars - Jupiter - Saturn - Antares
core.setObserverLocation(33.75, 1.3333, 26, 1, "", "Earth");
core.setDate("2458-08-28T16:36:07", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", false);

StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}

StelMovementMgr.zoomTo(38, 1);

d1 = "Mars- Jupiter - Saturn - Antares 8/28/2458"
c1 = "#F9AF77"


}


if (id[r] == 260)
{
// Saturn from Uranus 2484-10-11T23:03:09

core.setObserverLocation(102.5, -9.99, 1126, 1, "", "Uranus");
core.setDate("2484-10-11T23:03:09", "utc");

core.selectObjectByName("Saturn", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.03, 1);

d1 = "Saturn's greatest ring tilt of the Millennium"
c1 = "#1EE267"
d2 = "from Uranus 5/12/2064 - 29.70" + degstring
c2 = "#1EE267"


}



if (id[r] == 261)
{
// Neptune Greatest Brillancy

dir = 2
long = 0
lat = -30.25
alt = 126
p1 = "Pluto"
p2 = "Neptune"



core.setObserverLocation(long, 20.25, 126, 0, "", "Pluto");
core.setDate("2496-06-26T23:38:03", "UTC");

core.selectObjectByName("Neptune", pointer = true);
StelMovementMgr.setFlagTracking(true);
SolarSystem.setFlagOrbits(true);


var pick = (Math.random()*20+20);
StelMovementMgr.zoomTo(pick, 1);


d1 = "Neptune Greatest Brillancy of the Millennium from Pluto 06/26/2496   +8.439 Mag"; 
c1 = "#11FFF8"

}



if (id[r] == 262)
{
// Earth - Antares 4/24/2506
core.setObserverLocation(-70, 78, 49736, 1, "", "Venus");
core.setDate("2506-04-24T04:44:07", "utc");

core.selectObjectByName("Earth", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*8)+2;
pick = pick/100;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Earth Occultation of Antares from Venus 04/24/2506"
c1 = "#F1FFF8"


}

if (id[r] == 263)
{
// Venus Conjunction Pluto 2/24/2513
core.setObserverLocation(125.27, -30.0, 12, 1, "", "Earth");
core.setDate("2513-02-24T20:21:15", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Pluto", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


var pick = Math.random()*400+60;
pick = pick /1000
StelMovementMgr.zoomTo(pick);

d1 = "A close 0.033" + degstring + " Venus Pluto Conjuncton 2/24/2513"

c1 = "#FFFF10"
 	
}






if (id[r] == 264)
{
// Mars - Jupiter - Saturn   07/29/2029
core.setObserverLocation(-7.71, 40.50, 26, 1, "", "Earth");
core.setDate("2556-09-30T00:00:10", "utc");

core.selectObjectByName("Mars", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
core.setDate("2556-10-11T00:00:10", "utc");
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
core.setDate("2556-10-07T00:00:10", "utc");
}
StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
StelMovementMgr.zoomTo(44.9, 1);
	
d1 = "Mars - Jupiter - Saturn in Opposition within 11 days of each other"
c1 = "#EFEE01"

d2 = "09/30/2556 + 10/07/2556 +10/11/2556"
c2 = "#EFEE01"


}

if (id[r] == 265)
{
// Jupiter - Acrab 3/3/2564
core.setObserverLocation(96.36, 40.5, 126, 1, "", "Earth");
core.setDate("2564-03-03T20:37:07", "utc");

core.selectObjectByName("Jupiter", pointer = false);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);

var pick = Math.floor(Math.random()*12);
pick = pick +1;
pick = pick/100;
StelMovementMgr.zoomTo(pick+.02, 1);

d1 = "Jupiter and its moons Occultation of Acrab and Beta2 Scorpio 03/03/2564"
c1 = "#FFDD7A"


}


if (id[r] == 266)
{
// Earth Jupiter Uranus Lagoon 9/05/2577
core.setObserverLocation(-74.3, 55.52, 126, 1, "", "Mars");
core.setDate("2577-09-05T05:02:35", "UTC");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 1)
{
core.selectObjectByName("Uranus", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Earth", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*10)+2;
StelMovementMgr.zoomTo(pick, 0);





d1 = "Earth, Jupiter and Uranus in the Lagoon Nebula from Mars 9/05/2577 ";
c1 = "#1FFF21"

LandscapeMgr.setFlagAtmosphere(false);


}




if (id[r] == 267)
{
// Jupiter Uranus Lagoon 9/23/2577
core.setObserverLocation(-74.33, 40.5, 126, 1, "", "Earth");
core.setDate("2577-09-23T01:02:35", "UTC");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Uranus", pointer = true);
}
StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(3, 1);

d1 = "Jupiter and Uranus in the Lagoon Nebula 9/23/2577";
c1 = "#FF31F1"

}



if (id[r] == 268)
{
// Jupiter from Saturn Gi
core.setObserverLocation(-13.5, 39.0, 200000, 1, "", "Saturn");
core.setDate("2592-08-02T17:57:43", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(50.3, 1);
SolarSystem.setFlagOrbits(false);

SolarSystem.setLabelsAmount(20);   
core.selectObjectByName("Jupiter", pointer = true);

d1 = "Jupiter Greatest illumination of the Millennium from Saturn 08/02/2592"
c1 = "#B5FFA7"


d2 = "0.165 Magnitude"
c2 = "#B5FFA7"

SolarSystem.setFlagOrbits(false);   
}



if (id[r] == 269)
{
// Earth Transit from Callisto


dir = 1
long = 0
lat = 60
alt = 4
p1 = "Callisto"
p2 = "Earth"


core.setObserverLocation(long, 60, 4, 0, "", "Callisto");
core.setDate("2595-01-06T18:25:30", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*5)+.5
StelMovementMgr.zoomTo(pick/10, 1);


d1 = "Earth Transits the Sun behind a dark Jupiter from Callisto 1/6/2595";
c1 = "#99FF00"

}



if (id[r] == 270)
{
// Jupiter - Mars Opposition Together 5/10/2599

core.setObserverLocation(-43.71, 44.24, 1126, 1, "", "Earth");
core.setDate("2599-05-10T01:39:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*6+1)*10;
StelMovementMgr.zoomTo(pick, 1);
	



d1 = "Mars - Jupiter come into Opposition on the same day 5/10/2599"
c1 = "#E63118"
}


if (id[r] == 271)
{
// Mercury Grazing North Pole Transit

core.setObserverLocation(-88.3, 90.00, 36, 1, "", "Earth");
core.setDate("2608-05-13T08:00:03", "utc");


core.selectObjectByName("Mercury", pointer = true);
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*500)+500;
pick = pick / 10000 
StelMovementMgr.zoomTo(pick, 0);


d1 = "North Pole Mercury Grazing Transit of the Sun 5/11/2391"
c1 = "#000007"

}



if (id[r] == 272)
{
// Mars Transit from Ceres


dir = 1
long = 0
lat = 2.24
alt = 36
p1 = "(1) Ceres"
p2 = "Mars"


core.setObserverLocation(long, 2.24, 36, 0, "", "(1) Ceres");
core.setDate("2618-05-26T18:43:13", "utc");

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);


var pick = Math.floor(Math.random()*2)+2;
pick = pick / 10 
StelMovementMgr.zoomTo(pick, 1);


d1 = "Mars Transits the Sun 05/26/2618"
c1 = "#FF3737"

d2 = "from Ceres"
c2 = c1


}



if (id[r] == 273)
{
// Jupiter in Pleiades from Ceres 

dir = -2
long = 0
lat = 23.25
alt = 1
p1 = "(1) Ceres"
p2 = "Jupiter"


core.setObserverLocation(52.6, 23.25, 1, 0, "", "(1) Ceres");
core.setDate("2628-05-01T09:32:57", "utc");

core.selectObjectByName("Jupiter", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*2)+0.5;
StelMovementMgr.zoomTo(pick, 1);

SolarSystem.setFlagOrbits(true); 
LandscapeMgr.setFlagAtmosphere(false);


d1 = "Jupiter in the Pleiades from Ceres 05/01/2628"
c1 = "#BF1B0B"


  
}



if (id[r] == 274)
{
// 3 Planet Grouping 2646
core.setObserverLocation(30.39, 40.50, 26, 1, "", "Earth");
core.setDate("2646-06-15T20:01:07", "utc");

core.selectObjectByName("Mars", pointer = true);
var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Uranus", pointer = true);
}

if (pick == 2)
{
core.selectObjectByName("Moon", pointer = true);
}


StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*50)+10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Moon, Mars, Jupiter, Uranus and Spica 6/16/2646"
c1 = "#F611FA"


}



if (id[r] == 275)
{
// Saturn/Sun from Uranus
core.setObserverLocation(93.5, -15, 24764000, 1, "", "Uranus");
core.setDate("2669-04-08T09:13:14", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Saturn", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*6)+2;
StelMovementMgr.zoomTo(pick/100, 1);
SolarSystem.setFlagOrbits(false);

d1 = "Saturn Transits the Sun as seen from Uranus 4/8/2669";
c1 = "#78FF17"

}




if (id[r] == 276)
{
// Mars - Jupiter - Saturn 12/01/2755
core.setObserverLocation(-87.4, 32.27, 16, 1, "", "Earth");
core.setDate("2755-12-01T23:43:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


var pick = Math.floor(Math.random()*20)+20;
StelMovementMgr.zoomTo(pick, 0);





d1 = "Triple Conjunction of Mars, Jupiter and Saturn 12/01/2755"
c1 = "#1DFFB0"


}



if (id[r] == 277)
{
// Earth - Alpha Capicorn 09/6/2766
core.setObserverLocation(144.60, 42, 6, 1, "", "Venus");
core.setDate("2768-09-06T20:30:07", "utc");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(0.02, 1);

var pick = Math.floor(Math.random()*5);
pick = pick +1;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Alpha-Alpha Capicorn pass between Earth & moon";
c1 = "#11DDFF"

d2 = "From Venus 09/06/2768";
c2 = "#11DDFF"
}



if (id[r] == 278)
{
// Jupiter - Saturn   5/28/2815
core.setObserverLocation(-126.50, 57.1, 50000, 1, "", "Venus");
core.setDate("2815-05-28T13:35:04", "utc");

core.selectObjectByName("Jupiter", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Saturn", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

var pick = (Math.random()*100+300)/10000
StelMovementMgr.zoomTo(pick, 1);



SolarSystem.setLabelsAmount(18);   	
d1 = "Jupiter near Occultation of Saturn 5/14/2815 from Venus"
c1 = "#CCDDFF"


}


if (id[r] == 279)
{
// Neptune latest opposition 10/16/2854

core.setObserverLocation(-3.71, 42.24, 1126, 1, "", "Earth");
core.setDate("2854-10-16T00:37:20", "utc");

core.selectObjectByName("Neptune", pointer = true);
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(148, 1);

d1 = "Neptune - Opposition 10/16/2854"
c1 = "#1EE2D7"

d2 = "The latest first planetary opposition of the year in the Millennium"
c2 = c1


//script:  "2854-10-16T00:00:04"
//script:  "Neptune"


}






if (id[r] == 280)
{ 
// Merc and Venus trans Sun from Neptune

var pick = Math.random()*140-70;
StelMovementMgr.zoomTo(0.0302);

core.setObserverLocation(-74.3, pick, 27000, 1, "", "Neptune");
core.setDate("2865-12-19T17:59:03", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Venus", pointer = true);


var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Mercury", pointer = true);
}
StelMovementMgr.setFlagTracking(true);


d1 = "Mercury and Venus double Transit of the Sun as seen from Neptune 12/19/2865";  
c1 = "#7817FF"


}





if (id[r] == 281)
{
// Best Jupiter - Saturn Conjunction 12/25/2874

core.setObserverLocation(-109.71, -17.24, 1126, 1, "", "Earth");
core.setDate("2874-12-25T02:46:07", "utc");

core.selectObjectByName("Jupiter", pointer = true);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(32, 1);

d1 = "Closest Jupiter - Saturn Conjunction of the Millennium 12/25/2874"
c1 = "#FFAAFF"

d2 = "0.039 Degrees"
c2 = "#FFAAFF"



}




if (id[r] == 282)
{
// Titan and Europa  conjunction
core.setObserverLocation(-77.7, 77, 50000, 1, "", "Uranus");
core.setDate("2875-10-27T23:37:29", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Titan", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Europa", pointer = false);
}

StelMovementMgr.setFlagTracking(true);

SolarSystem.setLabelsAmount(20);   
var pick = Math.floor(Math.random()*4+2);
StelMovementMgr.zoomTo(pick/10000, 1);
	
d1 = "Europa occults Titan from Uranus 10/27/2875"
c1 = "#17AAF7"


}

if (id[r] == 283)
{
// Earth Occuts Rigel from Pallas 


dir = 2
long = 0
lat = -8.25
alt = 36
p1 = "(2) Pallas"
p2 = "Earth"
	
core.setObserverLocation(long, -8.25, 36, 0, "", "(2) Pallas");
core.setDate("2892-03-06T08:34:43", "UTC");

core.selectObjectByName("Earth", pointer = true);
StelMovementMgr.setFlagTracking(true);

LandscapeMgr.setFlagAtmosphere(false);

var pick = Math.floor(Math.random()*4)+1
StelMovementMgr.zoomTo(pick, 1);

d1 = "Earth Occults Rigel from Pallas 3/6/2892"
c1 = "#FAFA5A"

c2 = c1

  	
}




if (id[r] == 284)
{
// Saturn - Earth from Jupiter   
core.setObserverLocation(-134.1, -42.5, 50000, 1, "", "Jupiter");
core.setDate("2904-07-06T18:50:51", "utc");

core.selectObjectByName("Saturn", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Earth", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*2);
StelMovementMgr.zoomTo(0.0101 * pick + 0.01,1);


SolarSystem.setLabelsAmount(18);   	
StelMovementMgr.setFlagTracking(true);

d1 = "Earth Very Close 0.004" + degstring + " Saturn Conjunction from Jupiter 7/6/2904"
c1 = "#AAAAFF"

SolarSystem.setFlagMoonScale(0);   

LandscapeMgr.setFlagAtmosphere(false);


}



if (id[r] == 285)
{
// Ceres from Mars 
core.setObserverLocation(57.0, 18.75, 50, 1, "", "Mars");
core.setDate("2910-10-09T01:43:00", "utc");

core.selectObjectByName("(1) Ceres", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*37+60);
StelMovementMgr.zoomTo(pick, 1);


d1 = "Ceres best Opposition of the Millennium";
c1 = "#FF0730"

d2 = "From Mars - 10/09/2910"
c2 = c1


}





if (id[r] == 286)
{
// Nice Grouping on Mars Plea 9/30/2913
core.setObserverLocation(-73.4, 30.1, 16, 1, "", "Mars");
core.setDate("2913-09-30T16:32:07", "utc");

core.selectObjectByName("Earth", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(10, 1);

d1 = "Earth, Jupiter, Saturn and the Pleiades from Mars 9/30/2913"
c1 = "#ADFCF0"


}






if (id[r] == 287)
{
// 3066 Planet Grouping 
core.setObserverLocation(-73.71, -40.24, 1126, 1, "", "Earth");
core.setDate("3066-05-14T10:28:07", "utc");

core.selectObjectByName("Venus", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*4);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Moon", pointer = true);
}
StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(56.1, 1);

d1 = "An extremely close (0.8 degrees) Venus - Mars - Jupiter Triple Conjunction 5/14/3066"
c1 = "#F9FFCF"


}

if (id[r] == 288)
{
// 5 Planet Grouping 3194
core.setObserverLocation(-69.23, 8.50, 26, 1, "", "Earth");
core.setDate("3194-06-04T09:28:44", "utc");

core.selectObjectByName("Moon", pointer = true);
var pick = Math.floor(Math.random()*5);
if (pick == 0)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Mars", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Uranus", pointer = true);
}
if (pick == 4)
{
core.selectObjectByName("Neptune", pointer = true);
}

StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(23, 1);

d1 = " 5 Planet Conjunction 6/4/3194"
c1 = "#AAAAFF"


}

if (id[r] == 289)
{
// Saturn - Mars   07/09/3332
core.setObserverLocation(-50.00, 44.50, 26, 1, "", "Earth");
core.setDate("3332-07-10T00:37:15", "utc");

core.selectObjectByName("Saturn", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("Mars", pointer = false);
}
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
StelMovementMgr.zoomTo(0.03,1);

}
if (pick == 1)
{
StelMovementMgr.zoomTo(0.0136,1);

}
SolarSystem.setLabelsAmount(18);   	
d1 = "Mars Occultation of Saturn 07/09/3332"
c1 = "#FFAA00"

}



if (id[r] == 290)
{
// Uranus, Neptune and Pluto Conjunction  9/16/3367
core.setObserverLocation(-73.71, 44.24, 1126, 1, "", "Earth");
core.setDate("3367-09-17T06:14:07", "utc");

core.selectObjectByName("HIP 18724", pointer = false);
StelMovementMgr.setFlagTracking(true);

core.selectObjectByName("Neptune", pointer = true);
var pick = Math.floor(Math.random()*3);
if (pick == 0)
{
core.selectObjectByName("Pluto", pointer = true);
}
if (pick == 1)
{
core.selectObjectByName("Uranus", pointer = true);
}
StelMovementMgr.zoomTo(31, 1);

SolarSystem.setLabelsAmount(18);   	
d1 = "Uranus, Neptune and Pluto Conjunction 9/17/3367"
c1 = "#0CDDFC"


}




if (id[r] == 291)
{
// Jupiter - Saturn 4523
core.setObserverLocation(-337.33, -20.00, 26, 1, "", "Earth");
core.setDate("4523-03-09T03:34:07", "utc");

core.selectObjectByName("Jupiter", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Saturn", pointer = false);
}

StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*2) +1;
pick = pick / 2; 
pick = pick /10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Jupiter - Saturn Closest Great Conjunction in 5000 years 3/09/4523"
c1 = "#A29165"


}



if (id[r] == 292)
{ 
// Merc and Earth trans Sun from Uranus

var pick = Math.random()*12 + 29;
StelMovementMgr.zoomTo(pick/1000);

core.setObserverLocation(-12.93, -68.2, 27000, 1, "", "Uranus");
core.setDate("5337-06-12T02:18:03", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Sun", pointer = true);
StelMovementMgr.setFlagTracking(true);

core.selectObjectByName("Earth", pointer = true);


var pick = Math.floor(Math.random()*2);
if (pick == 1)
{
core.selectObjectByName("Mercury", pointer = true);
}


SolarSystem.setFlagMoonScale(0);  


d1 = "Mercury and Earth and Moon Transit of the Sun as seen from Uranus 6/12/5337";  
c1 = "#7817FF"


}




if (id[r] == 293)
{
// Zues as North Star
core.setObserverLocation(-70, 90, 4, 1, "", "Earth");
GridLinesMgr.setFlagEquatorGrid(true);
core.setDate("6016-12-24T00:00:07", "utc");

var pick = Math.floor(Math.random()*22)+1;
core.setDate("+" + pick + " hours");
core.selectObjectByName("HIP 112724", pointer = false);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*5)+2;
pick = pick * 10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Cepheus on top of world 6016"
c1 = "#AAAAF8"



}




if (id[r] == 294)
{
// Jupiter/Sun from Titan

dir = 1
long = 0
lat = 40.5
alt = 27
p1 = "Titan"
p2 = "Jupiter"


core.setObserverLocation(long, 40.5, 27, 0, "", "Titan");
core.setDate("7541-03-23T08:43:03", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Jupiter", pointer = false);
StelMovementMgr.setFlagTracking(true);


StelMovementMgr.zoomTo(.1, 1);
SolarSystem.setFlagOrbits(false);

d1 = "Jupiter Transits the Sun as seen from Titan 3/17/7541"; // Stellarium is 6 days off
c1 = "#78FF17"


}

if (id[r] == 295)
{
// All 9 Planets lined up 8335
core.setObserverLocation(-167.5, 44.5, 26, 1, "", "Sun");
core.setDate("8335-04-03T04:03:07", "utc");
LandscapeMgr.setFlagAtmosphere(false);

core.selectObjectByName("Mars", pointer = true);
StelMovementMgr.setFlagTracking(true);
SolarSystem.setLabelsAmount(20);   

var pick = Math.floor(Math.random()*9)+1;
if (pick == 1)
{
core.selectObjectByName("Mercury", pointer = true);
}
if (pick == 2)
{
core.selectObjectByName("Venus", pointer = true);
}
if (pick == 3)
{
core.selectObjectByName("Earth", pointer = true);
}
if (pick == 5)
{
core.selectObjectByName("Jupiter", pointer = true);
}
if (pick == 6)
{
core.selectObjectByName("Saturn", pointer = true);
}
if (pick == 7)
{
core.selectObjectByName("Uranus", pointer = true);
}
if (pick == 8)
{
core.selectObjectByName("Neptune", pointer = true);
}
if (pick == 9)
{
core.selectObjectByName("Pluto", pointer = true);
}
StelMovementMgr.zoomTo(51, 1);

d1 = "All planets lined up within 40 Degrees 4/3/8335"
c1 = "#FFFFFF"


}

if (id[r] == 296)
{
// Alpha Centauri rises in New York City
core.setObserverLocation(-73.98592, 40.74831, 381, 1, "", "Earth");
core.setDate("8743-07-12T08:29:12", "utc");

core.selectObjectByName("HIP 71683", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*30)+7;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Alpha Centuri is visible from the Empire State Building for the 1st time 7/12/8743"
c1 = "#0AAAFA"

}




if (id[r] == 297)
{
//  Neptune orion

dir = 2
long = 0
lat = 25.25
alt = 70
p1 = "Pluto"
p2 = "Neptune"

core.setObserverLocation(long, 25.25, 70, 0, "", "Pluto");
core.setDate("10169-12-25T12:20:00", "utc");
LandscapeMgr.setFlagAtmosphere(false);

SolarSystem.setFlagOrbits(false);

core.selectObjectByName("Neptune", pointer = true);

var pick = (Math.random()*3+1);
StelMovementMgr.zoomTo(pick, 1);


StelMovementMgr.setFlagTracking(true);

d1 = "Neptune in the Orion Nebula from Pluto, Xmas 10169"  
c1 = "#0FFFF1"


}


 
if (id[r] == 298)
{
// Vega as North Star

core.setObserverLocation(-70, 90, 4, 1, "", "Earth");
GridLinesMgr.setFlagEquatorGrid(true);
core.setDate("13676-12-24T00:00:07", "utc");

var pick = Math.floor(Math.random()*22)+1;
core.setDate("+" + pick + " hours");
core.selectObjectByName("HIP 91262", pointer = true);
StelMovementMgr.setFlagTracking(true);

var pick = Math.floor(Math.random()*5)+1;
pick = pick * 10;
StelMovementMgr.zoomTo(pick, 1);

d1 = "Vega as the North Star Year 13676"
c1 = "#AAAAF8"


}


if (id[r] == 299)
{
// Uranus Transit

core.setObserverLocation(2.367, 51.3825, 17000, 1, "", "Neptune");
core.setDate("46915-08-07T02:24:01", "utc");

core.selectObjectByName("Uranus", pointer = true);
var pick = Math.floor(Math.random()*4+2);

LandscapeMgr.setFlagAtmosphere(false);

StelMovementMgr.setFlagTracking(true);

StelMovementMgr.zoomTo(pick/100, 1);


d1 = "An extremely rare Uranus Transit from Neptune 8/7/46915"
c1 = "#74A8AC"

}


if (id[r] == 300)
{
// Arcturus and Spica 
core.setObserverLocation(132.71, -44.24, 1126, 1, "", "Earth");
core.setDate("76451-07-19T09:44:07", "utc");

core.selectObjectByName("HIP 65474", pointer = false);
var pick = Math.floor(Math.random()*2);
if (pick == 0)
{
core.selectObjectByName("HIP 65474", pointer = false);
}
StelMovementMgr.setFlagTracking(true);
var pick = Math.floor(Math.random()*30+30);
StelMovementMgr.zoomTo(pick, 1);
	
d1 = "Arcturus and Spica conjunction (0.253 Degrees)  7/19/76451"
c1 = "#FA3118"
}




//last



b = 0
fu = 0

while (b == 0)
{

fu =  fu + 1

n = d1.substring(fu,fu+1)


if (n == "")
{
b = 7
}

} //b


fu = 512 * x - (fu / 4) * 20 * x 



txt1 = LabelMgr.labelScreen(d1, fu, 660 * y, false, 20 * x, c1);
LabelMgr.setLabelShow(txt1, true);



if (d2 != "N")
{


b = 0
fu = 0

while (b == 0)
{

fu =  fu + 1

n = d2.substring(fu,fu+1)


if (n == "")
{
b = 7
}

}

fu = 512 * x - (fu / 4) * 20 * x  

txt1 = LabelMgr.labelScreen(d2, fu, 690 * y, false, 20 * x, c2);
LabelMgr.setLabelShow(txt1, true);

}





if (Math.abs(dir) > 0)
{


// Dir = 1 , just put it above the horizon





if (Math.abs(dir) == 1 || dir == 4) 
{

ag = 0
au = 0

while (ag == 0)
{


au = au + 1;

core.setObserverLocation(long, lat, alt, 0, "", p1);
core.wait(0.1);

pData = core.getObjectInfo(p2);
palt = pData["altitude"];


if (palt > 20)
{
ag = 7
}


long = long + 45 

if (long > 180)
{
long = -179 
}

if (au == 10)
{
lat = -lat
}


} 
}
// Dir = 1, just put it above the horizon



// Sun below horizon just after dark / before dawn

if (Math.abs(dir) == 2)
{

d = dir / Math.abs(dir); 

 
q = 0




while (q == 0) // sun up
{



core.wait(.1);

pData = core.getObjectInfo("Sun");
palt = pData["altitude"];

if (palt > 5)
{
q = 1
}
else
{
long = long + 75 * d

if (long > 180)
{
long = -179 
}

if (long < -180)
{
long = 179;
}



}

 
 
core.setObserverLocation(long, lat, alt, 0, "", p1);

} //q0





while (q == 1) // sun down
{
core.wait(.1);

pData = core.getObjectInfo("Sun");
palt = pData["altitude"];

if (palt < -20)
{
q = 2
}
else
{
long = long + 25 * d

if (long > 180)
{
long = -179 
}

if (long < -180)
{
long = 179;
}

}

 
 
core.setObserverLocation(long, lat, alt, 0, "", p1);

} //q1





while (q == 2) // sun back to -18
{
core.wait(0.1);

pData = core.getObjectInfo("Sun");
palt = pData["altitude"];

if (palt > -19)
{
q = 3
}
else
{
long = long + 1 * -d


if (long > 180)
{
long = -179 
}

if (long < -180)
{
long = 179;
}


} // else 
 
core.setObserverLocation(long, lat, alt, 0, "", p1);

} //q2





while (q == 3) // Planet up
{

core.wait(0.1);
pData = core.getObjectInfo(p2);
palt = pData["altitude"];


if (palt > 5)
{
q = 4
}
else
{


long = long - d*2

if (palt < -5)
{
long = long - d*2
}


if (long > 180)
{
long = -179 
}

if (long < -180)
{
long = 179;
}


} // else 
 
core.setObserverLocation(long, lat, alt, 0, "", p1);

} //q3


} // Sun below horizon just after dark / before dawn





// Oppositionish


if (dir == 3)
{

q = 0


while (q == 0) // below horizon
{


core.setObserverLocation(long, lat, alt, 0, "", p1);

core.wait(.1);
pData = core.getObjectInfo(p2);
palt = pData["altitude"];


if (palt < 0)
{
q = 1
}

else
{
long = long + 45

if (long > 180)
{
long = -179 
}
}

}

while (q == 1) // above horizon
{

long = long + 45

if (long > 180)
{
long = -179 
}

core.setObserverLocation(long, lat, alt, 0, "", p1);
core.wait(.1);
pData = core.getObjectInfo(p2);
palt = pData["altitude"];

if (palt > 0)
{
q = 2
}


}

lalt = 0;


while (q == 2) // goto top
{

long = long + 20

if (long > 180)
{
long = -179 
}

core.setObserverLocation(long, lat, alt, 0, "", p1);
core.wait(.1);

pData = core.getObjectInfo(p2);
palt = pData["altitude"];

if (palt < lalt)
{
q = 3
}


lalt = palt

}




while (q == 3) // goto slow
{

long = long - 5

if (long < -180)
{
long = 179 
}

core.setObserverLocation(long, lat, alt, 0, "", p1);
core.wait(.1);

pData = core.getObjectInfo(p2);
palt = pData["altitude"];

if (palt < lalt)
{
q = 4
}


lalt = palt

}

} //dir3


long = long + 20

if (long > 180)
{
long = -179 
}

// Oppositionish



// Eclispe

if (dir == 4)
{


core.setObserverLocation(long, lat, alt, 0, "", p1);
core.wait(.1);

core.wait(0.1);
pData = core.getObjectInfo(p2);
alpha1 = pData["ra"];
sData = core.getObjectInfo("Sun");
alpha2 = sData["ra"];

if (alpha1 < 0)
{
alpha1 = 360 + alpha1;
}

if (alpha2 < 0)
{
alpha2 = 360 + alpha2;
}

dir = 1

if (alpha1 < alpha2)
{
dir = -1
}

bd = Math.abs(alpha1 - alpha2);
blong = long;
q = 0



while (q < 2)
{





long  = long + dir

core.setObserverLocation(long, lat, alt, 0, "", p1);
core.wait(.1);

pData = core.getObjectInfo(p2);
alpha1 = pData["ra"];
sData = core.getObjectInfo("Sun");
alpha2 = sData["ra"];

if (alpha1 < 0)
{
alpha1 = 360 + alpha1;
}

if (alpha2 < 0)
{
alpha2 = 360 + alpha2;
}

plex = Math.abs(alpha1 - alpha2);

if (plex < bd)
{
bd = plex
blong = long
q = 0
}
else
{
q = q + 1
}

} //q<2 


core.setObserverLocation(blong, lat, alt, 0, "", p1);


} //dir4





// Eclispe




} // dir >0







if (dir < 5)
{
core.wait(spd);
}






SolarSystem.setFlagOrbits(ob);

LandscapeMgr.setFlagAtmosphere(true);


GridLinesMgr.setFlagEquatorGrid(eg);

LabelMgr.deleteAllLabels();

}
