var noteText;
var theTarget;
var t = "", ht = "";
var visibleLinkNumber = "";
var targetX, targetY;
var viewer, noteViewer, chartViewer;
var theScreenY, theScrollY;


function setNotes()
{
	createNoteViewer();
	createChartViewer();
	bindNotes();
	viewer = noteViewer;
}


function createNoteViewer()
{
	var element = document.createElement('p');
	element.id = "noteViewer";
	noteViewer = document.body.appendChild(element);
	
	noteViewer.onmouseover = dontHideNote;
	noteViewer.onmouseout = hideNote;
}


function createChartViewer()
{
	var element = document.createElement('img');
	element.id = "chartViewer";
	chartViewer = document.body.appendChild(element);
	
	chartViewer.onmouseover = dontHideNote;
	chartViewer.onmouseout = hideNote;
	chartViewer.onclick = openChartWindow;
}


function bindNotes()
{
	var theLinks = document.links;
	var theLink, theClass, theTitle;
	
	for (i = 0; i < theLinks.length; i++)
	{
		theLink = theLinks[i];
		theClass = theLink.className;
		
		if ((theClass == "as") || (theClass == "ah") || (theClass == "ap") || (theClass == "asp") || (theClass == "ae") || (theClass == "apt") || (theClass == "aterm") || (theClass == "aw") || (theClass == "chart") || (theClass == "misc") || (theClass == "footnote") || (theClass == "ext"))
		{
			theLink.onmouseover = delayedShowNote;
			theLink.onmouseout = delayedHideNote;
			
			theLink.linkNumber = i;
			theTitle = theLink.title;
			
			if (theTitle != "")
			{
				theLink.note = theTitle;
				theLink.title = "";
			}
			
			if (theClass == "ext")
			{
				theLink.onclick = new Function("showExternalWindow('" + theLink.href + "'); return false;");
			}
			
			var linksCookie = getaCookie("astroLinks");
			if (linksCookie != "")
			{
				theLink.style.backgroundColor = "lightyellow";
			}
		}
	}
	
	var theImages = document.images;
	var theImage, theHeader;
	
	for (i = 0; i < theImages.length; i++)
	{
		theImage = theImages[i];
		theClass = theImage.className;
		if (theClass == "cs")
		{
			theImage.onmouseover = delayedShowNote;
			theImage.onmouseout = delayedHideNote;
			theImage.linkNumber = i;
			theTitle = theImage.title;
			if (theTitle != "")
			{
				theImage.note = theTitle;
				theImage.title = "";
			}
		}
		else if (theImage.id == "myChart")
		{
			theImage.onclick = new Function("showMyChart('" + theImage.src + "');");
		}
	}
}


function delayedShowNote(e)
{
	var theEvent, thisLinkNumber, ie;
	
	if (e)
	{
		theEvent = e;
		theTarget = theEvent.target;
	}
	else if (event)
	{
		theEvent = event;
		theTarget = theEvent.srcElement;
		ie = "yes";
	}
	
	thisLinkNumber = theTarget.linkNumber;
	
	var notesCookie = getaCookie("astroNotes");
	var shiftDown = theEvent.shiftKey;
	
	if ((shiftDown && notesCookie == "") || (shiftDown == false && notesCookie == "on")) return;
	
	if (thisLinkNumber !== visibleLinkNumber)
	{
		visibleLinkNumber = thisLinkNumber;
		
		var theClientY = theEvent.clientY;   /* except for Safari */
		theScreenY = theEvent.screenY;
		var thePageY = theEvent.pageY;  /* except for IE */
		if (!window.scrollY)
			theScrollY = document.documentElement.scrollTop;  /* except for Safari */
		
		if (document.all && e == "")
		{
			if (submenuExists)
			{
				targetY = theEvent.offsetY + 120;
			}
			else
			{
				if (theEvent.srcElement.className == "cs")
				{
					targetY = theEvent.clientY + 25;
				}
				else
				{
					targetY = theEvent.offsetY + 90;
				}
			}
			targetX = theEvent.offsetX + 50;
		}
		else if (ie == "yes")
		{
			thePageY = theClientY + theScrollY;
			
			if (theEvent.srcElement.className == "cs" && window.location != "http://www.astromusings.com/my-charts/using.html")
			{
				targetY = theEvent.clientY + 25;
				targetX = theEvent.clientX + 15;
			}
			else
			{
				targetY = thePageY + 15;
				targetX = theEvent.offsetX + 80;
			}
		}
		else
		{
			targetX = theEvent.pageX - 10;
			targetY = theEvent.pageY + 5;
			
			if (theScrollY == undefined)
			{
				theScrollY = window.scrollY;
				theClientY = thePageY - theScrollY;
			}
			
		}
				
		if (ht != "")
		{
			clearTimeout(ht);
			ht = "";
		}
		
		if (t != "")
		{
			clearTimeout(t);
		}
		
		t = setTimeout("showNote()", 500);
	}
}


function showNote()
{
	var targetClass = theTarget.className;
	
	var phrase = theTarget.note;
	if (phrase == undefined || phrase == "")
	{
		phrase = theTarget.childNodes[0].nodeValue;
	}
	phrase = uncap(phrase);

	switch (targetClass)
	{
		case "as"	: showSign(phrase); break;
		case "ah"	: showHouse(phrase); break;
		case "ap"	: showPlanet(phrase); break;
		case "asp"	: showAspect(phrase); break;
		case "ae"	: showElement(phrase); break;
		case "apt"	: showPoint(phrase); break;
		case "aterm": showTerm(phrase); break;
		case "aw"	: showWord(phrase); break;
		case "cs"	: showChartSymbol(phrase); break;
		case "chart": showChart(phrase); break;
		case "misc"	: showMisc(phrase); break;
		case "footnote"	: showFootnote(phrase); break;
		case "ext"	: showExternal(phrase); break;
		default		: theTarget = ""; return;
	}
	
	if (targetClass == "chart")
	{
		viewer = chartViewer;
		displayViewer();
	}
	else
	{
		viewer = noteViewer;
		if (noteText != undefined)
		{
			var viewerColor;
			
			switch (targetClass)
			{
				case "aw"		: viewerColor = "#96E3F6"; break;
				case "misc"		: viewerColor = "#CCCCCC"; break;
				case "footnote"	: viewerColor = "#CCCCCC"; break;
				case "ext"		: viewerColor = "#CCCCCC"; break;
				default			: viewerColor = "#FFA07A"; break;
			}
			
			viewer.style.backgroundColor = viewerColor;
			
			viewer.innerHTML = noteText;
			displayViewer();
		}
		else
		{
			viewer.style.visibility = "hidden";
		}
	}
}


function displayViewer()
{
	var theViewerHeight;
	if (viewer.id == "chartViewer")
		theViewerHeight = 404;
	else
		theViewerHeight = viewer.offsetHeight;
		
	var theWindowHeight = 0, theWindowTop = 0;
	
	if (window.outerHeight)
	{
		theWindowHeight = window.outerHeight;
		theWindowTop = window.screenY;
	}
	else  /* IE */
	{
		theWindowHeight = document.documentElement.offsetHeight;
		theWindowTop = window.screenTop;
	}
	
	if ((theScreenY + theViewerHeight + 10) > (theWindowTop + theWindowHeight))
	{
		if (viewer.id == "chartViewer")
			targetY = theScrollY + 150;
		else
			targetY = targetY - theViewerHeight - 30;
	}
	
	viewer.style.left = targetX + "px";
	viewer.style.top = targetY + "px";
	
	viewer.style.visibility = "visible";
}


function delayedHideNote(e)
{
	var theHideEvent, towardsLinkNumber;

	if (e)
	{
		theHideEvent = e;
		towardsLinkNumber = theHideEvent.relatedTarget.linkNumber;
	}
	else if (event)
	{
		theHideEvent = event;
		towardsLinkNumber = theHideEvent.toElement.linkNumber;
	}
	
	if (towardsLinkNumber != visibleLinkNumber)
	{
		ht = setTimeout("hideNote()", 300);
		
		if (t != "")
		{
			clearTimeout(t);
			t = "";
		}
	}
}


function hideNote()
{
	viewer.style.visibility = "hidden";
	visibleLinkNumber = "";
	ht = "";
}


function dontHideNote()
{
	clearTimeout(ht);
	ht = "";
}


function openChartWindow()
{		
	openSeparateWindow("../charts/public/" + chartViewer.source + "-chart.html");
}


function openSeparateWindow(theURL, theWidth, theHeight)
{
	var theWindowName = "W" + Math.round(Math.random() * (10000 - 1)) + 1;
	
	if (theWidth == undefined)
	{
		theWidth = "570";
	}
	
	if (theHeight == undefined)
	{
		theHeight = "570";
	}
	
	if (window.outerWidth)
	{
		var theLeft = window.screenY + window.outerWidth - theWidth + 20;
		var chartWindow = window.open(theURL, theWindowName, "height=" + theHeight + ",width=" + theWidth + ",scrollbars=no,directories=no,location=no,menubar=no,screenx=" + theLeft);
	}
	else
	{
		var chartWindow = window.open(theURL, theWindowName, "height=" + theHeight + ",width=" + theWidth + ",scrollbars=no,directories=no,location=no,menubar=no,status=no,left=500");
	}
}


function showTheChart(chartName)
{
	document.getElementById("navigationBar").document.getElementById("chartsMenu").style.visibility = "hidden";
	openSeparateWindow('../charts/public/' + chartName + '-chart.html');
}

function showExternalWindow(theURL)
{
	openSeparateWindow(theURL, "", "800", "800");
}


function getaCookie(searchName)
{
	var theCookies = document.cookie.split(";");
	var theCookie, j, theCookieName, theCookieData;
	
	for (var i = 0; i < theCookies.length; i++)
	{
		theCookie = unescape(theCookies[i]);
		j = theCookie.indexOf("=")
		theCookieName = theCookie.substring(0, j);
		
		if (theCookieName.charAt(0) == " ")
		{
			theCookieName = theCookieName.substring(1, theCookieName.length);
		}
		
		if (theCookieName == searchName)
		{
			return theCookie.substring(j+1, theCookie.length);
		}
	}
	return "";
}


function uncap(thePhrase)
{
	var theChar
	for (i = 0; i<thePhrase.length; i++)
	{
		theChar = thePhrase.charAt(i);
		theChar = theChar.toLowerCase();
		thePhrase = thePhrase.substring(0,i) + theChar + thePhrase.substring(i+1);
	}
	return thePhrase;
}


function capWord(theWord)
{
	var firstChar = theWord.charAt(0);
	firstChar = firstChar.toUpperCase();
	theWord = firstChar + theWord.substring(1,theWord.length);
	return theWord;
}


function showSign(signName)
{
	var theSign = signs[signName];
	var signRuler = "Ruler - " + theSign.ruler;
	var signElement = "Element - " + theSign.element;
	var signMode = "Mode - " + theSign.mode;
	var signDescription = theSign.description;
	noteText =  signDescription + "<br><br>" + signRuler + ", " + signElement;
}

function showHouse(houseName)
{
	var theHouse = houses[houseName];
	var houseRuler = "Ruler - " + theHouse.ruler;
	var houseTrip = "Triplicity - " + theHouse.trip;
	var houseQuad = "Quadruplicity - " + theHouse.quad;
	var houseDescription = theHouse.description;
	noteText = houseDescription + "<br><br>" + houseRuler;
}

function showPlanet(planetName)
{
	var thePlanet = planets[planetName];
	var planetSigns = thePlanet.signs;
	var planetDescription = thePlanet.description;
	noteText = planetDescription + "<br><br>Ruler of " + planetSigns;
}

function showAspect(aspectName)
{
	noteText = aspects[aspectName].description + "<br><br>" + aspects[aspectName].angle;
}

function showElement(elementName)
{
	var theElement = elements[elementName];
	var elementDescription = theElement.description;
	var elementSigns = theElement.signs;
	noteText = elementDescription + "<br><br>" + capWord(elementName) + " Signs - " + elementSigns;
}

function showPoint(thePoint)
{
	noteText = points[thePoint].description;
}

function showTerm(theTerm)
{
	noteText = terms[theTerm].definition;
}

function showWord(theWord)
{
	if (words[theWord])
	{
		if (words[theWord].archs != "")
		{
			noteText = words[theWord].archs;
			
			if (words[theWord].description != "")
			{
			noteText = noteText + "<br><br>" + words[theWord].description;
			}
		
		}
		else if (words[theWord].description != "")
		{
		noteText = words[theWord].description;
		}
		
	}
	else
	{
		noteText = undefined;
	}
}

function showChartSymbol(symbolName)
{
	var theArchetype = chartSymbols[symbolName];
	var archetypeDescription = theArchetype.description;
	
	symbolName = capWord(symbolName);
	if (symbolName == "North node")
	{
		symbolName = "North Node";
	}
	
	if ((symbolName == "Sun") || (symbolName == "Moon") || (symbolName == "North Node") || (symbolName == "Ascendant"))
	{
		symbolName = "the " + symbolName;
	}
	
	if (symbolName == "the Ascendant")
	{
		var symbolClick = "Click on this symbol to better understand the meaning of " + symbolName + " and its possible signs."
		var linksClick = "Click on the links to the right for a further description of " + symbolName + " and its sign in this chart."
	}
	else
	{
		var symbolClick = "Click on this symbol to better understand the meaning of " + symbolName + " in signs and houses."
		var linksClick = "Click on each of the links to the right for a further description of " + symbolName + "'s archetypes in this chart."
	}
	noteText = archetypeDescription + "<br><br>" + symbolClick + "<br><br>" + linksClick;
}


function showChart(chartName)
{
	var chartSource = charts[chartName].source;
	chartViewer.src = "../charts/public/" + chartSource + ".gif";
	chartViewer.source = chartSource;
}

function showMisc(subject)
{
	noteText = misc[subject].statement;
}

function showFootnote(subject)
{
	noteText = footnotes[subject].statement;
}


function showExternal(externalName)
{
	noteText = externals[externalName].statement;
}


function sign(name, element, mode, ruler, description)
{
	this.name = name;
	this.element = element;
	this.mode = mode;
	this.ruler = ruler;
	this.description = description;
}

function house(name, trip, quad, ruler, description)
{
	this.name = name;
	this.trip = trip;
	this.quad = quad;
	this.ruler = ruler;
	this.description = description;
}

function planet(name, signs, description)
{
	this.name = name;
	this.signs = signs;
	this.description = description;
}

function aspect(name, description, angle)
{
	this.name = name;
	this.description = description;
	this.angle = angle;
}

function element(name, description, signs)
{
	this.name = name;
	this.description = description;
	this.signs = signs;
}

function point(description)
{
	this.description = description;
}

function term(name, definition)
{
	this.name = name;
	this.definition = definition;
}

function word(archs, description)
{
	this.archs = archs;
	this.description = description;
}

function chartSymbol(description)
{
	this.description = description;
}

function chart(source)
{
	this.source = source;
}

function miscItem(statement)
{
	this.statement = statement;
}

function footnote(statement)
{
	this.statement = statement;
}

function external(statement)
{
	this.statement = statement;
}


var signs = new Array();

signs["aries"] = signs["arian"] = signs["aries'"] = new sign("Aries", "fire", "cardinal", "Mars",
				"Thrusting forward, facing challenges, overcoming obstacles. Initiating, pioneering. Daring action.");
signs["taurus"] = signs["taurean"] = signs["taurus's"] = new sign("Taurus", "earth", "fixed", "Venus",
				"Wanting, earning, having - relaxing and enjoying. Methodically building and holding stability. Trusting and relying on self.");
signs["gemini"] = signs["geminian"] = signs["gemini's"] = new sign("Gemini", "air", "mutable", "Mercury",
				"Experiencing, naming, communicating. Questioning, connecting. Networking - creating webs of data and people.");
signs["cancer"] = signs["cancerian"] = signs["cancer's"] = new sign("Cancer", "water", "cardinal", "Moon",
				"Nurturing and protecting self/family. Sympathizing, supporting, accepting. Nesting. Reminiscing. Being.");
signs["leo"] = signs["leonian"] = signs["leo's"] = new sign("Leo", "fire", "fixed", "Sun",
				"Loving, joyful. Actively willful - expressing and creating self. Playful, enjoys being seen. Positive, confident, powerful, dominant.");
signs["virgo"] = signs["virgoan"] = signs["virgo's"] = new sign("Virgo", "earth", "mutable", "Mercury",
				"Analyzing, solving problems. Preventing mistakes, illness, pain through control and mastery. Serving, bowing to necessity.");
signs["libra"] = signs["libran"] = signs["libra's"] = new sign("Libra", "air", "cardinal", "Venus",
				"Noticing and responding to others. Attracted, attracting, fashionable. Pleasing, cooperating, harmonizing.");
signs["scorpio"] = signs["scorpionic"] = signs["scorpio's"] = new sign("Scorpio", "water", "fixed", "Pluto",
				"Changing, transforming. Intimately connecting. Depending, sharing, trusting. Letting go, releasing, dying.");
signs["sagittarius"] = signs["sagittarian"] = signs["sag's"] = new sign("Sagittarius", "fire", "mutable", "Jupiter",
				"Reaching, seeking, transcending. Understanding, knowing, believing, teaching. Righteous action.");
signs["capricorn"] = signs["capricornian"] = signs["capricorn's"] = new sign("Capricorn", "earth", "cardinal",
				"Saturn", "In charge, making decisions. Achieving, accomplishing. Fulfilling expectations. Responsible, contributing to society.");
signs["aquarius"] = signs["aquarian"] = signs["aquarius'"] = new sign("Aquarius", "air", "fixed", "Uranus",
				"Breaking free. Seeing the truth. Independent, impersonal, objective. Innovating the future.");
signs["pisces"] = signs["piscean"] = signs["pisces'"] = new sign("Pisces", "water", "mutable", "Neptune",
				"Flowing, dissolving, surrendering. Sacrificing form for essence. Suffering, forgiving. Envisioning, intending.");

var houses = new Array();

houses["first house"] = houses["first"] = houses["1st"] = houses["1st house"] = new house("First", "fire", "angular", "Mars",
				"The beginning. The direction, the way forward. Emergence from the unconscious, into manifestation. Appearance, persona.");
houses["second house"] = houses["second"] = houses["2nd"] = houses["2nd house"] = new house("Second", "earth", "succedent", "Venus",
				"The stabilization. Building, production. What we enjoy, what we want, what we have. Self-sufficiency, self-worth.");
houses["third house"] = houses["third"] = houses["3rd"] = houses["3rd house"] = new house("Third", "air", "cadent", "Mercury",
				"The here and now. The familar environment, daily life. Words, naming experience, communication. Information, associative thinking.");
houses["fourth house"] = houses["fourth"] = houses["4th"] = houses["4th house"] = new house("Fourth", "water", "angular", "Moon",
				"Inside, personal center, home. Womb, place of acceptance, being. Family, self. Memory, conncetion to the past, roots.");
houses["fifth house"] = houses["fifth"] = houses["5th"] = houses["5th house"] = new house("Fifth", "fire", "succedent", "Sun",
				"The dynamic center, source of creative, outward moving energy. Experience of will and loving impact. The mirror of self.");
houses["sixth house"] = houses["sixth"] = houses["6th"] = houses["6th house"] = new house("Sixth", "earth", "cadent", "Mercury",
				"Boundaries. Limits of personal will. Failure. Necessity. Work, service. Self-discipline, control, mastery, prevention of suffering.");
houses["seventh house"] = houses["seventh"] = houses["7th"] = houses["7th house"] = new house("Seventh", "air", "angular", "Venus",
				"The Other. We, us, relationship, partnership. Interaction and response. Cooperation. Fairness, peace, balance. Mores, fashion.");
houses["eighth house"] = houses["eighth"] = houses["8th"] = houses["8th house"] = new house("Eighth", "water", "succedent", "Pluto",
				"The intimate Other. Passion, deep connection. Social needs, interdependency. Sharing. Transformation, regeneration.");
houses["ninth house"] = houses["ninth"] = houses["9th"] = houses["9th house"] = new house("Ninth", "fire", "cadent", "Jupiter",
				"The Community - those that share one's beliefs, morals, aspirations. Teaching, learning. Assumptions, concepts. Meaning.");
houses["tenth house"] = houses["tenth"] = houses["10th"] = houses["10th house"] = new house("Tenth", "earth", "angular", "Saturn",
				"Authority, hierarchy, rank, status. Role, office, contribution to society. Career. Ambitions, expectations, responsibility.");
houses["eleventh house"] = houses["eleventh"] = houses["11th"] = houses["11th house"] = new house("Eleventh", "air", "succedent", "Uranus",
				"The Observed situation. Objective reality, truth. The underlying pattern. Trends, the future. The unique, different, alternative. Friends, groups.");
houses["twelfth house"] = houses["twelfth"] = houses["12th"] = houses["12th house"] = new house("Twelfth", "water", "cadent", "Neptune",
				"Essence. The envisioned ideal. Imagination. The unconscious. Flow, dissolving. Compassion, sacrifice.");

var planets = new Array();

planets["sun"] = planets["solar"] = new planet("Sun", "Leo, 5th house",
				"Basic energy, vitality, life-force. Will, personal power, self-expression. Loving, playful, creative. Identity, centrality of self.");
planets["moon"] = planets["lunar"] = new planet("Moon", "Cancer, 4th house",
				"Feelings, emotions. Personal needs. Supoorts, protects, nurtures. Identification with home and family.");
planets["mercury"] = planets["mercurial"] = new planet("Mercury", "Gemini, Virgo, 3rd house, 6th house",
				"Personal experience. Verbalizing and communicating. Thinking - both associative and analytical.");
planets["venus"] = planets["venusian"] = new planet("Venus", "Taurus, Libra, 2nd house, 7th house",
				"Attraction, desire. Relationship, complementarity, balance. Affection and appreciation of beauty.");
planets["mars"] = planets["martian"] = new planet("Mars", "Aries, 1st house",
				"Impulse, aggression, forward movement. Initiating, pioneering. Challenging, competitive, courageous.");
planets["jupiter"] = planets["jupiterian"] = new planet("Jupiter", "Sagittarius, 9th house",
				"The urge to grow, to expand. Identification with a greater whole. Understanding, believing, theorizing.");
planets["saturn"] = planets["saturnian"] = new planet("Saturn", "Capricorn, 10th house",
				"Structures and maintains the psyche. Self-other boundary. Prioritizes, makes decisions, channels energy and consciousness, survives. Achieves, conforms to expectations.");
planets["uranus"] = planets["uranian"] = new planet("Uranus", "Aquarius, 11th house",
				"Liberates the self from outmoded limitations. Independent and impersonal. Sudden insight, leaps of awareness.");
planets["neptune"] = planets["neptunian"] = new planet("Neptune", "Pisces, 12th house",
				"Imagination, vision. Transcendence of form, identification with flow and essence.");
planets["pluto"] = planets["plutonic"] = new planet("Pluto", "Scorpio, 8th house",
				"Transformation - death and rebirth. Destroying the old to support the new. The ruthless will of the collective.");
				
var chartSymbols = new Array();

chartSymbols["sun"] = new chartSymbol("The Sun represents the individual's creative will. Its sign represents the nature of the energy expressed through the will, its house the area of life where the will is emphasized.");
chartSymbols["moon"] = new chartSymbol("The Moon represents the individual's feelings, needs, and urge to nurture and protect. Its sign represents the nature of the energy of its feelings, while its house is the area of life where personal emotions and needs are taken care of.");
chartSymbols["mercury"] = new chartSymbol("Mercury represents thinking - both associative and analytical - and communication. Its sign represents the energetic nature of its mental and verbal processes, while its house is the area in life where these functions are emphasized.");
chartSymbols["venus"] = new chartSymbol("Venus represents relationship, attraction, desire, pleasure. Its sign represents the energetic quality of its attractions and desires, while its house is the area of life where relationship and pleasure are emphasized.");
chartSymbols["mars"] = new chartSymbol("Mars represents impulsive and aggressive forward movement. Its sign represents the energetic nature of this forceful movement, while its house is the area of life where courageous competition is emphasized.");
chartSymbols["jupiter"] = new chartSymbol("Jupiter represents the urge to grow and expand, seeking an understanding of life. Its sign represents the energetic quality of this expansive movement, while its house is the area of life where wisdom develops.");
chartSymbols["saturn"] = new chartSymbol("Saturn represents the administrator of the psyche that achieves goals and defends against perceived danger. Its sign represents the energetic nature of this survival instinct, while its house is the area of life where success or failure is experienced.");
chartSymbols["uranus"] = new chartSymbol("Uranus represents  the urge to break free of limitations. Its sign represents the energetic quality of this liberating impulse, while its house is the area of life where complete freedom is demanded.");
chartSymbols["neptune"] = new chartSymbol("Neptune represents the unconscious, essence, and the ways we connect to it through intuition and compassion. Its sign represents the nature of its transcending energy, while its house is the area of life where we are able to move beyond our individual identity.");
chartSymbols["pluto"] = new chartSymbol("Pluto represents transformation - the destruction of the old form that releases energy for the birth of the new. Its sign represents the energetic nature of this transforming process, while its house is the area of life where we must let go.");
chartSymbols["north node"] = new chartSymbol("The North Node represents the direction of our learning and growth. Its sign represents the energy that we must embrace and develop, while its house is the area of life within which our growth unfolds.");
chartSymbols["ascendant"] = new chartSymbol("The Ascendant represents the point of emergence of our impulses into manifestation. It is thus how we appear to others. Its sign represents the energetic nature of our appearance.");

var aspects = new Array();

aspects["conjunction"] = aspects["conjunct"] = aspects["conjuncting"] = aspects["conjuncts"] = new aspect("Conjunction", "The conjunction tends to merge the meanings of the two points into a single archetype. They may resist the process.", "It is formed when two points are close together in the Zodiac.");

aspects["sextile"] = aspects["sextiling"] = aspects["sextiles"] = new aspect("Sextile", "The sextile is a gentle flowing aspect that tends to unconsciously integrate the meanings of the two points.", "It is formed when two points are 60 degrees apart in the Zodiac.");

aspects["square"] = aspects["squaring"] = aspects["squares"] = new aspect("Square", "The square is a strongly challenging aspect where the archetypes of the two points tend to conflict and generate tension and anxiety.", "It is formed when two points are 90 degrees apart in the Zodiac.");

aspects["trine"] = aspects["trining"] = aspects["trines"] = new aspect("Trine", "The trine is flowing aspect that tends to integrate the archetypes of the two points, creating a strong conscious resource.", "It is formed when two points are 120 degrees apart in the Zodiac.");

aspects["inconjunct"] = aspects["inconjuncting"] = aspects["inconjuncts"] = new aspect("Inconjunct", "The inconjunct (or quincunx) is a challenging aspect where the points tend to be weakly in conflict and yet are mostly unaware of one another.", "It is formed when two points are 150 degrees apart in the Zodiac.");

aspects["opposition"] = aspects["opposing"] = aspects["opposes"] = new aspect("Opposition", "The opposition is a strongly challenging aspect where the archetypes of the two points directly oppose one another, generating conflict, tension and anxiety.", "It is formed when two points are 180 degrees apart in the Zodiac.");

var elements = new Array();

elements["fire"] = new element("Fire", "Fire is the active, manifesting principle. It is the impulse of the ideal emerging from the unconscious. It fights to overcome any resistance to itself.", "Aries, Leo, Sagittarius");

elements["earth"] = new element("Earth", "Earth is the stabilizing principle. Fire's thrust is contained, structured and directed towards practical results. Concrete reality is emphasized.", "Taurus, Virgo, Capricorn");

elements["air"] = new element("Air", "Air experiences, abstracts that experience, and links its abstractions. Air also links externally - creating social connections and communication channels.", "Gemini, Libra, Aquarius");

elements["water"] = new element("Water", "Water feels. It distills the essence of action and experience into a felt memory. Water connects to itself and others through these feelings.", "Cancer, Scorpio, Pisces");

var points = new Array();

points["north node"] = points["north node of the moon"] = new point("The North Node of the Moon represents the direction of our development, our learning and growth, our personal evolution and our contribution to society.");
points["south node"] = points["south node of the moon"] = new point("The South Node of the Moon represents a place of familiarity and attachment in the psyche.");
points["nodes"] = points["nodes of the moon"] = new point("The Nodes of the Moon represent the path from comfort and familiarity to excitement, learning and growth.");
points["ascendant"] = points["rising"] = new point("The persona, the external expression of the psyche.");

points["north node in aries"] = points["south node in libra"] = points["aries"] = new point("The Libra South Node is attached to relationship, cooperation, and careful decision-making. This must be balanced by a more individual, competitive and impulsive approach to life.");
points["north node in the 1st"] = points["south node in the 7th"] = points["first house"] = points["1st house"] = new point("The 7th house South Node is attached to relationship, cooperation, and careful decision-making. This must be balanced by a more individual, competitive and impulsive approach to life.");

points["north node in taurus"] = points["south node in scorpio"] = points["taurus"] = new point("The Scorpio South Node is attached to intensity, intimacy, interdependency, struggle and change. Calmness, self-sufficiency, ease and stability must be developed.");
points["north node in the 2nd"] = points["south node in the 8th"] = points["second house"] = points["2nd house"] = new point("The 8th house South Node is attached to intensity, intimacy, interdependency, struggle and change. Calmness, self-sufficiency, ease and stability must be developed.");

points["north node in gemini"] = points["south node in sagittarius"] = points["gemini"] = new point("The Sagittarius South Node is attched to consistent conceptual beliefs, moral judgments and focused action. A greater emphasis and trust of personal experience in variety of settings must be developed.");
points["north node in the 3rd"] = points["south node in the 9th"] = points["third house"] = points["3rd house"] = new point("The 9th house South Node is attched to consistent conceptual beliefs, moral judgments and focused action. A greater emphasis and trust of personal experience in variety of settings must be developed.");

points["north node in cancer"] = points["south node in capricorn"] = points["cancer"] = new point("The Capricorn South Node is attached to achievement and social recognition, living up to the expectations of authority. Greater acceptance, support and nurturance of self and family must be developed.");
points["north node in the 4th"] = points["south node in the 10th"] = points["fourth house"] = points["4th house"] = new point("The 10th house South Node is attached to achievement and social recognition, living up to the expectations of authority. Greater acceptance, support and nurturance of self and family must be developed.");

points["north node in leo"] = points["south node in aquarius"] = points["leo"] = new point("The Aquarius South Node is attached to freedom, and to an impersonal, objective detachment. A personally centered, creative, powerful, loving and joyful outlook must be developed.");
points["north node in the 5th"] = points["south node in the 11th"] = points["fifth house"] = points["5th house"] = new point("The 11th house South Node is attached to freedom, and to an impersonal, objective detachment. A personally centered, creative, loving and joyful outlook must be developed.");

points["north node in virgo"] = points["south node in pisces"] = points["virgo"] = new point("The Pisces South Node is attached to surrender, to compassionate sacrifice and suffering, to a feeling of helplessness. Personal boundaries, self-discipline and a sense of control, and the ability to say no must be developed.");
points["north node in the 6th"] = points["south node in the 12th"] = points["sixth house"] = points["6th house"] = new point("The 12th house South Node is attached to surrender, to compassionate sacrifice and suffering, to a feeling of helplessness. Personal boundaries, self-discipline and a sense of control, and the ability to say no must be developed.");

points["north node in libra"] = points["south node in aries"] = points["libra"] = new point("The Aries South Node is attached to an impulsive, self-directed approach to life, seeing all situations as competitive challenges. A more interactive, coopertaive attitude towards relationships must be developed.");
points["north node in the 7th"] = points["south node in the 1st"] = points["seventh house"] = points["7th house"] = new point("The 1st house South Node is attached to an impulsive, self-directed approach to life, seeing all situations as competitive challenges. A more interactive, coopertaive attitude towards relationships must be developed.");

points["north node in scorpio"] = points["south node in taurus"] = points["scorpio"] = new point("The Taurus South Node is attached to stability, based on self-sufficiency and ownership. A new security through intimate sharing, interdependency and transformation must be embraced.");
points["north node in the 8th"] = points["south node in the 2nd"] = points["eighth house"] = points["8th house"] = new point("The 2nd house South Node is attached to stability, based on self-sufficiency and ownership. A new security through intimate sharing, interdependency and transformation must be embraced.");

points["north node in sagittarius"] = points["south node in gemini"] = points["sagittarius"] = new point("The Gemini South Node is attached to an ever-shifting personal experience, as well as constant questioning. A consistent belief system must be developed that guides life and serves as a basis for judgment.");
points["north node in the 9th"] = points["south node in the 3rd"] = points["ninth house"] = points["9th house"] = new point("The 3rd house South Node is attached to an ever-shifting personal experience, as well as constant questioning. A consistent belief system must be developed that guides life and serves as a basis for judgment.");

points["north node in capricorn"] = points["south node in cancer"] = points["capricorn"] = new point("The Cancer South Node is attached to a home and family focus with a personal needs emphasis. A greater involvement in the outside world must be developed, with more emphasis on achievement and social contribution.");
points["north node in the 10th"] = points["south node in the 4th"] = points["tenth house"] = points["10th house"] = new point("The 4th house South Node is attached to a home and family focus with a personal needs emphasis. A greater involvement in the outside world must be developed, with more emphasis on achievement and social contribution.");

points["north node in aquarius"] = points["south node in leo"] = points["aquarius"] = new point("The Leo South Node is attached to will, self-expression, personal attention, and happiness. A more detached and objective attitude must be developed that discovers freedom in what is.");
points["north node in the 11th"] = points["south node in the 5th"] = points["eleventh house"] = points["11th house"] = new point("The 5th house South Node is attached to will, self-expression, personal attention, and happiness. A more detached and objective attitude must be developed that discovers freedom in what is.");

points["north node in pisces"] = points["south node in virgo"] = points["pisces"] = new point("The Virgo South Node is attached to control, analysis, criticism, and problem-solving. Imagination and intuition must be developed, along with compassion and a willingness to surrender.");
points["north node in the 12th"] = points["south node in the 6th"] = points["twelfth house"] = points["12th house"] = new point("The 6th South Node is attached to control, analysis, criticism, and problem-solving. Imagination and intuition must be developed, along with compassion and a willingness to surrender.");

var terms = new Array();

terms["sign"] = terms["signs"] = terms["sign of the zodiac"] = terms["signs of the zodiac"] = new term("signs", "The signs of the Zodiac represent twelve basic energies or action qualities.");
terms["house"] = terms["houses"] = new term("houses", "The houses represent areas of life, situations within which we act, as well as perceptual orientations.");
terms["planet"] = terms["planets"] = terms["planetary"] = new term("planets", "The planets represent parts of our personality, psyche or being. They focus energy in service of their specific function within the psyche.");
terms["aspect"] = terms["aspects"] = new term("aspects", "The aspects represent the energy flow between parts of our psyche.");

terms["archetypal set"] = new term("archetypal set", "a group of astrological archetypes - the five primary ones are the signs of the Zodiac, the planets, the houses, the aspects, and the Nodes of the Moon");

terms["archetypal cycle"] = new term("archetypal cycle", "the developmental cycle of an entity as manifested through the twelve signs of the Zodiac");

terms["birth chart"] = terms["natal chart"] = terms["chart"] = terms["charts"] = new term("birth chart", "birth chart - a symbolic representation of the moment/place of birth as both the pattern of significant points in the sky and the pattern of the individual psyche/energy field.");

terms["transit chart"] = terms["transits"]  = terms["transiting"] = new term("transit chart", "transit chart - a symbolic representation of the pattern of significant points in the sky as observed from a given time and place, particularly when interfaced with an individual's birth chart.");

terms["ruler"] = terms["rule"] = terms["rules"] = new term("ruler", 'The term "ruler" has two uses in astrology - 1) Each sign and house has a planet called its ruler that shares some of its characteristics. 2) Archetypes that contribute to the pattern of manifestation of a phenomenon are said to rule that phenomenon.');

var words = new Array();

words["archetype"] = new word("", "a primary universal pattern that underlies both objective manifestation and subjective experience");
words["archetypes"] = new word("", "primary universal patterns that underlie both objective manifestation and subjective experience");
words["archetypal"] = new word("", "archetypes - primary universal patterns that underlie both objective manifestation and subjective experience");

words["analyze"] = words["analysis"] = words["analytical"] = new word("Virgo, 6th house", "Virgo carefully and methodically examines a phenomenon in detail. Used particularly in problem-solving to discover the flaw or error.");
words["anesthetize"] = new word("Pisces, Neptune, 12th house", "");
words["attachment"] = words["attachments"] = words["attached"] = new word("Saturn, South Node", "The tendency of the psyche, mediated by Saturn, to hold on to attitudes and behaviors that interfere with personal and collective survival and evolution.");
words["blur"] = new word("Pisces, Neptune, 12th house, Water", "");
words["body"] = new word("Earth, Virgo, Taurus", "");
words["boundary"] = words["boundaries"] = new word("Virgo, 6th house", "Virgo is highly aware of boundaries - the point of separation between different entities.");
words["careful"] = words["carefully"] = new word("Virgo, 6th house", "");
words["causation"] = words["cause"] = words["causal"] = new word("Earth, Saturn", "");
words["center"] = words["centered"] = new word("Cancer, Moon, 4th house, Capricorn, Saturn, 10th house, Leo, Sun, 5th house, Aquarius, Uranus, 11th house", "These archetypes emphasize and focus on center or are a movement out of and away from center.");
words["chaos"] = new word("Uranus, Aquarius, 11th house", "");
words["clean"] = new word("Virgo, 6th house", "");
words["compassion"] = words["compassionate"] = new word("Pisces, Neptune, 12th house", "");
words["contain"] = new word("Earth, Taurus, 2nd house", "");
words["control"] = new word("Virgo, 6th house", "");
words["craft"] = new word("Virgo, Taurus, Earth", "");
words["critical"] = new word("Virgo, 6th house", "");
words["diagnose"] = new word("Virgo, 6th house", "");
words["diet"] = new word("Virgo, 6th house", "");
words["different"] = words["difference"] = new word("Aquarius, 11th house, Uranus, Virgo, 6th house", "");
words["discriminate"] = words["discrimination"] = new word("Virgo, 6th house, Mercury", "");
words["disease"] = new word("Virgo, 6th house", "");
words["emotion"] = words["emotions"] = words["emotional"] = new word("Water, Moon", "");
words["empathy"] = words["empathetic"] = new word("Pisces, 12th house, Water", "");
words["error"] = words["errors"] = new word("Virgo, 6th house", "");
words["escape"] = new word("Pisces, 12th house, Neptune, Aquarius", "");
words["exercise"] = new word("Virgo, 6th house", "");
words["experience"] = words["experiences"] = new word("Gemini, 3rd house, Mercury", "");
words["failure"] = new word("Virgo, 6th house, Capricorn", "");
words["feeling"] = words["feelings"] = new word("Water, Moon", "");
words["fix"] = new word("Virgo, 6th house", "");
words["flaw"] = words["flaws"] = new word("Virgo, 6th house", "");
words["freedom"] = words["free"] = new word("Aquarius, 11th house, Uranus", "");
words["function"] = new word("Earth", "");
words["healing"] = new word("Virgo, 6th house, Pisces, Scorpio", "");
words["health"] = words["healthy"] = new word("Virgo, 6th house", "");
words["helpless"] = words["helplessness"] = new word("Pisces, 12th house", "");
words["hygiene"] = new word("Virgo, 6th house", "");
words["inevitable"] = new word("Pluto", "");
words["innoculation"] = new word("Pisces, 12th house", "");
words["knowledge"] = words["know"] = words["knowing"] = new word("Jupiter, Sagittarius, 9th house", "");
words["logic"] = words["logical"] = new word("Earth, Air, Virgo, Aries", "");
words["maintain"] = words["maintains"] = new word("Earth, Saturn", "");
words["me - not me"] = words["me/not me"] = new word("Virgo, 6th house", "");
words["meaning"] = words["meaningful"] = new word("Jupiter, Sagittarius, 9th house", "");
words["methodical"] = words["methodically"] = new word("Earth, Taurus, Virgo", "");
words["necessary"] = new word("Virgo, 6th house", "");
words["need"] = words["needs"] = new word("Moon, Water", "");
words["no"] = new word("Virgo, 6th house", "");
words["overwhelming"] = words["overwhelm"] = new word("Pisces, 12th house", "");
words["pain"] = new word("Pisces, Virgo", "Pisces sees pain as an inevitable part of life that must be either suffered through or avoided. Virgo sees pain as a problem to be solved and thus prevented.");
words["perception"] = words["perceptions"] = words["percepts"] = words["perceptual"] = words["perceive"] = new word("Gemini, 3rd house, Mercury", "");
words["physical"] = new word("Earth", "");
words["preparation"] = words["prepare"] = new word("Virgo, 6th house", "");
words["prevention"] = words["prevent"] = new word("Virgo, 6th house", "");
words["problem"] = words["problems"] = new word("Virgo, 6th house", "");
words["pure"] = new word("Virgo, 6th house, Fire", "");
words["purpose"] = words["purposeful"] = new word("Taurus, 2nd house", "");
words["reject"] = new word("Virgo, 6th house", "");
words["sensation"] = new word("Earth, Taurus", "");
words["separate"] = new word("Virgo, 6th house", "");
words["solution"] = words["solutions"] = words["solve"] = new word("Virgo, 6th house", "");
words["spaced out"] = new word("Pisces, 12th house, Neptune", "");
words["step by step"] = words["step-by-step"] = new word("Virgo, 6th house", "");
words["suffering"] = words["suffer"] = new word("Pisces, 12th house, Virgo, 6th house", "");
words["surrender"] = new word("Pisces, 12th house, Neptune", "");
words["syntropy"] = new word("Jupiter", "");
words["underlying pattern"] = words["underlying patterns"] = new word("Aquarius, 11th house, Uranus", "");
words["understanding"] = words["understand"] = new word("Jupiter, Sagittarius, 9th house", "");
words["use"] = words["uses"] = new word("Virgo, 6th house", "");
words["withdrawal"] = words["withdraw"] = new word("Pisces, 12th house", "");
words["words"] = words["word"] = new word("Gemini, 3rd house, Mercury", "Words represent experience and the archetypes that shape experience. They link - they communicate - both within the psyche and to others.");
words["work"] = words["works"] = new word("Virgo, 6th house, Earth", "");
words["wrong"] = new word("Virgo, 6th house, Sagittarius, 9th house, Jupiter", "");

words["begin"] = words["begins"] = words["beginning"] = new word("Aries, Mars, 1st house", "The first archetype begins things. It takes an idea and brings it into manifestation, fighting any resistance it encounters.");

var charts = new Array();

charts["united states"] = charts["united states of america"] = charts["u.s.a."] = charts["usa"] = charts["america"] = charts["american"] = charts["americans"] = new chart("usa");
charts["barack obama"] = charts["obama"] = new chart("barack-obama");
charts["joe biden"] = charts["biden"] = new chart("joe-biden");
charts["john mccain"] = charts["mccain"] = new chart("john-mccain");
charts["sarah palin"] = charts["palin"] = new chart("sarah-palin");
charts["george w bush"] = charts["george w. bush"] = charts["george"]  = charts["george w."]= new chart("george-w-bush");
charts["george hw bush"] = charts["george h.w. bush"] = new chart("george-hw-bush");
charts["richard nixon"] = charts["nixon"] = new chart("richard-nixon");
charts["bill clinton"] = charts["clinton"] = new chart("bill-clinton");
charts["ronald reagan"] = charts["reagan"] = new chart("ronald-reagan");
charts["jimmy carter"] = charts["carter"] = new chart("jimmy-carter");
charts["gerald ford"] = charts["ford"] = new chart("gerald-ford");
charts["franklin d roosevelt"] = charts["roosevelt"] = new chart("franklin-d-roosevelt");
charts["marine corps"] = charts["usmc"] = charts["united states marine corps"] = new chart("marine-corps");

var misc = new Array();

misc["pulse of life"] = new miscItem('This model of interacting principles was developed by Dane Rudhyar, who called them the Day-force and the Night-force. See his book - "The Pulse of Life".');

var footnotes = new Array();

footnotes["pulse of life"] = new footnote('This model of interacting principles was developed by Dane Rudhyar, who called them the Day-force and the Night-force. See his book - "The Pulse of Life".');

var externals = new Array();

externals["mimbari"] = new external("The cultural collective, based on the planet 'Mimbar', in Straczynski's 'Babylon 5', that fought and then allied with humanity.");