/*	ICC-Hexagrams.js : I Ching Connexion Hexagrams

*/

var Joomla_root = '/';

var ICC_Hexagrams_imgroot = Joomla_root + 'images/icc-generator/hexagrams/';

/*	=== object Hexagram ===	
	holds static data on a Hexagram
*/
//	constructor
function Hexagram( nr, ic_nr, chin_name, eng_name, meaning_url)
{	this.nr = nr;					//	binary
	this.ic_nr = ic_nr;				//	I Ching number
	this.chin_name = chin_name;		//	Chinese name
	this.eng_name = eng_name;		//	English name
	this.meaning_url = meaning_url;	//	MindSports url to Hexagram text
	//	methods
	this.GetEngDescription = HexagramGetEngDescription;
	this.GetShortDescription = HexagramGetShortDescription;
	this.GetDescription = HexagramGetDescription;
	this.GetLinkedDescription = HexagramGetLinkedDescription;
}	//	Hexagram

//	returns short text (English name) describing this Hexagram
function HexagramGetEngDescription()
{
	return this.ic_nr + '. ' + this.eng_name;

}	//	HexagramGetEngDescription

//	returns short text (Chinese name) describing this Hexagram
function HexagramGetShortDescription()
{
	return this.ic_nr + '. ' + this.chin_name;

}	//	HexagramGetShortDescription

//	returns longer text descibing this Hexagram
function HexagramGetDescription()
{
	return this.GetShortDescription() + ' - ' + this.eng_name;

}	//	HexagramGetDescription


//	returns a html snippet: a linked description 
function HexagramGetLinkedDescription()
{
	return '<a target="Hexagram meaning" href="' + this.meaning_url + '">' + this.GetDescription() + '</a>';

}	//	

/*	=== end of object Hexagram ===	*/

//	the list of Hexagrams
var Hexagrams = new Array();

Hexagrams[ 0] = new Hexagram( 0, 1, "Ch'ien", "Creative Principle", Joomla_root + "index.php/i-ching-connexion/hexagrams/215-1-chaien");
Hexagrams[ 63] = new Hexagram( 63, 2, "K'un", "Passive Principle", Joomla_root + "index.php/i-ching-connexion/hexagrams/216-2-kaun");
Hexagrams[ 46] = new Hexagram( 46, 3, "Chun", "Initial Difficulties", Joomla_root + "index.php/i-ching-connexion/hexagrams/217-3-chun");
Hexagrams[ 29] = new Hexagram( 29, 4, "Meng", "Youthful Inexperience", Joomla_root + "index.php/i-ching-connexion/hexagrams/218-4-meng");
Hexagrams[ 40] = new Hexagram( 40, 5, "Hsü", "Delay", Joomla_root + "index.php/i-ching-connexion/hexagrams/219-5-hsue");
Hexagrams[ 5] = new Hexagram( 5, 6, "Sung", "Conflict", Joomla_root + "index.php/i-ching-connexion/hexagrams/220-6-sung");
Hexagrams[ 61] = new Hexagram( 61, 7, "Shih", "The Army", Joomla_root + "index.php/i-ching-connexion/hexagrams/221-7-shih");
Hexagrams[ 47] = new Hexagram( 47, 8, "Pi", "Seeking Unity", Joomla_root + "index.php/i-ching-connexion/hexagrams/222-8-pi");
Hexagrams[ 8] = new Hexagram( 8, 9, "Hsiao Ch'u", "Minor Restraint", Joomla_root + "index.php/i-ching-connexion/hexagrams/223-9-hsiao-chau");
Hexagrams[ 4] = new Hexagram( 4, 10, "Lü", "Treading carefully", Joomla_root + "index.php/i-ching-connexion/hexagrams/224-10-lue");
Hexagrams[ 56] = new Hexagram( 56, 11, "T'ai", "Peace", Joomla_root + "index.php/i-ching-connexion/hexagrams/225-11-taai");
Hexagrams[ 7] = new Hexagram( 7, 12, "P'i", "Stagnation", Joomla_root + "index.php/i-ching-connexion/hexagrams/226-12-pai");
Hexagrams[ 2] = new Hexagram( 2, 13, "T'ung Jen", "Companionship", Joomla_root + "index.php/i-ching-connexion/hexagrams/227-13-taung-jen");
Hexagrams[ 16] = new Hexagram( 16, 14, "Ta Yu", "Great Possessions", Joomla_root + "index.php/i-ching-connexion/hexagrams/228-14-ta-yu");
Hexagrams[ 59] = new Hexagram( 59, 15, "Ch'ien", "Modesty", Joomla_root + "index.php/i-ching-connexion/hexagrams/229-15-chaien");
Hexagrams[ 55] = new Hexagram( 55, 16, "Yü", "Enthusiasm", Joomla_root + "index.php/i-ching-connexion/hexagrams/230-16-yue");
Hexagrams[ 38] = new Hexagram( 38, 17, "Sui", "Allegiance", Joomla_root + "index.php/i-ching-connexion/hexagrams/231-17-sui");
Hexagrams[ 25] = new Hexagram( 25, 18, "Ku", "Arresting Decay", Joomla_root + "index.php/i-ching-connexion/hexagrams/232-18-ku");
Hexagrams[ 60] = new Hexagram( 60, 19, "Lin", "Approaching", Joomla_root + "index.php/i-ching-connexion/hexagrams/233-19-lin");
Hexagrams[ 15] = new Hexagram( 15, 20, "Kuan", "Contemplation", Joomla_root + "index.php/i-ching-connexion/hexagrams/234-20-kuan");
Hexagrams[ 22] = new Hexagram( 22, 21, "Shih Ho", "Biting through", Joomla_root + "index.php/i-ching-connexion/hexagrams/235-21-shih-ho");
Hexagrams[ 26] = new Hexagram( 26, 22, "Pi", "Grace", Joomla_root + "index.php/i-ching-connexion/hexagrams/236-22-pi");
Hexagrams[ 31] = new Hexagram( 31, 23, "Po", "Disintegration", Joomla_root + "index.php/i-ching-connexion/hexagrams/237-23-po");
Hexagrams[ 62] = new Hexagram( 62, 24, "Fu", "The Turning Point", Joomla_root + "index.php/i-ching-connexion/hexagrams/238-24-fu");
Hexagrams[ 6] = new Hexagram( 6, 25, "Wu Wang", "Innocence", Joomla_root + "index.php/i-ching-connexion/hexagrams/239-25-wu-wang");
Hexagrams[ 24] = new Hexagram( 24, 26, "Ta Ch'u", "Restraining Force", Joomla_root + "index.php/i-ching-connexion/hexagrams/240-26-ta-chau");
Hexagrams[ 30] = new Hexagram( 30, 27, "I", "Nourishment", Joomla_root + "index.php/i-ching-connexion/hexagrams/241-27-i");
Hexagrams[ 33] = new Hexagram( 33, 28, "Ta Kuo", "Excess", Joomla_root + "index.php/i-ching-connexion/hexagrams/242-28-ta-kuo");
Hexagrams[ 45] = new Hexagram( 45, 29, "K'an", "The Abyss", Joomla_root + "index.php/i-ching-connexion/hexagrams/243-29-kaan");
Hexagrams[ 18] = new Hexagram( 18, 30, "Li", "Clinging Brightness", Joomla_root + "index.php/i-ching-connexion/hexagrams/244-30-li");
Hexagrams[ 35] = new Hexagram( 35, 31, "Hsieh", "Influence", Joomla_root + "index.php/i-ching-connexion/hexagrams/245-31-hsien");
Hexagrams[ 49] = new Hexagram( 49, 32, "Heng", "Endurance", Joomla_root + "index.php/i-ching-connexion/hexagrams/246-32-heng");
Hexagrams[ 3] = new Hexagram( 3, 33, "Tun", "Withdrawal", Joomla_root + "index.php/i-ching-connexion/hexagrams/247-33-tun");
Hexagrams[ 48] = new Hexagram( 48, 34, "Ta Chuang", "Strength of Greatness", Joomla_root + "index.php/i-ching-connexion/hexagrams/248-34-ta-chuang");
Hexagrams[ 23] = new Hexagram( 23, 35, "Chin", "Progress", Joomla_root + "index.php/i-ching-connexion/hexagrams/249-35-chin");
Hexagrams[ 58] = new Hexagram( 58, 36, "Ming I", "Sinking Light", Joomla_root + "index.php/i-ching-connexion/hexagrams/250-36-ming-i");
Hexagrams[ 10] = new Hexagram( 10, 37, "Chia Jen", "The Family", Joomla_root + "index.php/i-ching-connexion/hexagrams/251-37-chia-jen");
Hexagrams[ 20] = new Hexagram( 20, 38, "K'uei", "Opposition", Joomla_root + "index.php/i-ching-connexion/hexagrams/252-38-kauei");
Hexagrams[ 43] = new Hexagram( 43, 39, "Chien", "Obstacles", Joomla_root + "index.php/i-ching-connexion/hexagrams/253-39-chien");
Hexagrams[ 53] = new Hexagram( 53, 40, "Hsieh", "Deliverance", Joomla_root + "index.php/i-ching-connexion/hexagrams/254-40-hsieh");
Hexagrams[ 28] = new Hexagram( 28, 41, "Sun", "Decrease", Joomla_root + "index.php/i-ching-connexion/hexagrams/255-41-sun");
Hexagrams[ 14] = new Hexagram( 14, 42, "I", "Increase", Joomla_root + "index.php/i-ching-connexion/hexagrams/256-42-i");
Hexagrams[ 32] = new Hexagram( 32, 43, "Kuai", "Resolution", Joomla_root + "index.php/i-ching-connexion/hexagrams/257-43-kuai");
Hexagrams[ 1] = new Hexagram( 1, 44, "Kou", "Coming on", Joomla_root + "index.php/i-ching-connexion/hexagrams/258-44-kou");
Hexagrams[ 39] = new Hexagram( 39, 45, "Ts'ui", "Congregation", Joomla_root + "index.php/i-ching-connexion/hexagrams/259-45-tsaui");
Hexagrams[ 57] = new Hexagram( 57, 46, "Sheng", "Moving upward", Joomla_root + "index.php/i-ching-connexion/hexagrams/260-46-sheng");
Hexagrams[ 37] = new Hexagram( 37, 47, "K'un", "Exhaustion", Joomla_root + "index.php/i-ching-connexion/hexagrams/261-47-kaun");
Hexagrams[ 41] = new Hexagram( 41, 48, "Ching", "The Well", Joomla_root + "index.php/i-ching-connexion/hexagrams/262-48-ching");
Hexagrams[ 34] = new Hexagram( 34, 49, "Ko", "Revolution", Joomla_root + "index.php/i-ching-connexion/hexagrams/263-49-ko");
Hexagrams[ 17] = new Hexagram( 17, 50, "Ting", "The Cauldron", Joomla_root + "index.php/i-ching-connexion/hexagrams/264-50-ting");
Hexagrams[ 54] = new Hexagram( 54, 51, "Chen", "Thunderclap", Joomla_root + "index.php/i-ching-connexion/hexagrams/265-51-chen");
Hexagrams[ 27] = new Hexagram( 27, 52, "Ken", "Inaction", Joomla_root + "index.php/i-ching-connexion/hexagrams/266-52-ken");
Hexagrams[ 11] = new Hexagram( 11, 53, "Chien", "Gradual Progress", Joomla_root + "index.php/i-ching-connexion/hexagrams/267-53-chien");
Hexagrams[ 52] = new Hexagram( 52, 54, "Kuei Mei", "Marriageable Maiden", Joomla_root + "index.php/i-ching-connexion/hexagrams/268-54-kuei-mei");
Hexagrams[ 50] = new Hexagram( 50, 55, "Feng", "Abundance", Joomla_root + "index.php/i-ching-connexion/hexagrams/269-55-feng");
Hexagrams[ 19] = new Hexagram( 19, 56, "Lü", "The Wanderer", Joomla_root + "index.php/i-ching-connexion/hexagrams/270-56-lue");
Hexagrams[ 9] = new Hexagram( 9, 57, "Sun", "Gentle Penetration", Joomla_root + "index.php/i-ching-connexion/hexagrams/271-57-sun");
Hexagrams[ 36] = new Hexagram( 36, 58, "Tui", "Joy", Joomla_root + "index.php/i-ching-connexion/hexagrams/272-58-tui");
Hexagrams[ 13] = new Hexagram( 13, 59, "Huan", "Dispersal", Joomla_root + "index.php/i-ching-connexion/hexagrams/273-59-huan");
Hexagrams[ 44] = new Hexagram( 44, 60, "Chien", "Restraint", Joomla_root + "index.php/i-ching-connexion/hexagrams/274-60-chien");
Hexagrams[ 12] = new Hexagram( 12, 61, "Chung Fu", "Inner Truth", Joomla_root + "index.php/i-ching-connexion/hexagrams/275-61-chung-fu");
Hexagrams[ 51] = new Hexagram( 51, 62, "Hsiao Kuo", "Small Excess", Joomla_root + "index.php/i-ching-connexion/hexagrams/276-62-hsiao-kuo");
Hexagrams[ 42] = new Hexagram( 42, 63, "Chi Chi", "Completion and After", Joomla_root + "index.php/i-ching-connexion/hexagrams/277-63-chi-chi");
Hexagrams[ 21] = new Hexagram( 21, 64, "Wei Chi", "Before Completion", Joomla_root + "index.php/i-ching-connexion/hexagrams/278-64-wei-chi");

