var question = "";function submitQuestion(asked){if (asked == null || asked ==""){alert("You must ask a question to receive a reading!"); return false; } else { question = "&quot;"+asked+"&quot;"; return true; } }function writeHeader(){ header ="<H4>The answer to your question, <I><FONT color = 'red'>" + question +"</FONT></I> is: </H4>" +" <P ALIGN = 'right'>" +month +" " +day +", "+year+""; return header }function getRandom(num) { randomNum = Math.random()*400; randomNum = (randomNum % num); randomNum = Math.floor(randomNum);if ((randomNum >=0) && (randomNum <=6)){ thrown = 2; } else if ((randomNum >=7) && (randomNum <=11)){ thrown = 1; } else if ((randomNum >=12) && (randomNum <=14)){ thrown = 3; } else if ((randomNum = 15)){ thrown = 4; } return thrown; }function changes() { this.length = 6; for (i = 0; i<6; i++){ this[i] = getRandom(16); } return this; }var line = new changes();function mark(num){ if (num == 1 || num == 2) { return "" } else if (num == 3){ return "+" } else if (num == 4){ return "-" } }var change = new Array(); var changed = new Array();function yourFate() { theHex = "<IMG SRC='"+line[5]+".gif' BORDER='0'><BR><IMG SRC='"+line[4]+".gif' BORDER='0'><BR><IMG SRC='"+line[3]+".gif' BORDER='0'><P><IMG SRC='"+line[2]+".gif' BORDER='0'><BR><IMG SRC='"+line[1]+".gif' BORDER='0'><BR><IMG SRC='"+line[0]+".gif' BORDER='0'>"; for(i=0;i<6;i++){ if (line[i] == 1){ change[i] = 1; changed[i] = 1 } if (line[i] == 2){ change[i] = 2; changed[i] = 2 } if (line[i] == 3){ change[i] = 1; changed[i] = 2 } if (line[i] == 4){ change[i] = 2; changed[i] = 1 } }var fateLink = "Text/" +change[0]+""+change[1]+""+change[2]+""+change[3]+""+change[4]+""+change[5]+".html"; fate = "<A HREF ='"+ fateLink +"' TARGET = 'Reading'>"; fate += theHex + "</A>"; Main.Reading.location.href = fateLink; return fate; }function changeLines() { var changeLink = "Text/" +changed[0]+""+changed[1]+""+changed[2]+""+changed[3]+""+changed[4]+""+changed[5]+".html"; lines = "<A HREF ='"+ changeLink +"' TARGET = 'Reading'>"; lines += "<IMG SRC='"+changed[5]+".gif' BORDER='0'><BR><IMG SRC='"+changed[4]+".gif' BORDER='0'><BR><IMG SRC='"+changed[3]+".gif' BORDER='0'><P><IMG SRC='"+changed[2]+".gif' BORDER='0'><BR><IMG SRC='"+changed[1]+".gif' BORDER='0'><BR><IMG SRC='"+changed[0]+".gif' BORDER='0'>"; lines += "</A>"; return lines; } hexArray = new Array("111111", "222222", "122212", "212221", "111212", "212111", "212222", "222212", "111211", "112111", "111222", "222111", "121111", "111121", "221222", "222122", "122112", "211221", "112222", "222211", "122121", "121221", "222221", "122222", "122111", "111221", "122221", "211112", "212212", "121121", "221112", "211122", "221111", "111122", "222121", "121222", "121211", "112121", "221212", "212122", "112221", "122211", "111112", "211111", "222112", "211222", "212112", "211212", "121112", "211121", "122122", "221221", "221211", "112122", "121122", "221121", "211211", "112112", "212211", "112212", "112211", "221122", "121212", "212121"); namesArray = new Array("Chien - The Creative", "Kun - The Receptive", "Chun - Difficulty at the Beginning", "Moeng - Youthful Folly", "Hsu - Waiting (Nourishment)", "Sung - Conflict", "Shih - The Army", "Pi - Holding Together (union)", "Hsiao Chu - The Taming Power of the Small", "Lu - treading (conduct)", "Tai - Peace", "Pi - standstill (stagnation)", "Tung Jo en - fellowship with men", "Ta Yu - possession in great measure", "Chien - Modesty", "Yu - enthusiasm", "Sui - Following", "Ku - Work on What Has Been Spoiled (Decay)", "Lin - Approach", "Kuan - Contemplation (View)", "Shih Ho - Biting Through", "Pi - Grace", "Po - Splitting Apart", "Fu - return - the turning point", "Wu Wang - innocence (the unexpected)", "Ta Chu  -the taming power of the great", "I - the corners of the mouth (providing nourishment)", "Ta Chu  -the taming power of the great", "Kan - the abysmal (water)", "Li - the clinging (fire)", "Hsien - influence (wooing)", "Hoeng - duration", "Tun - Retreat", "Ta Chuang - the power of the great", "Chin - Progress", "Ming I - Darkening of the light", "Chai Joen - the family (the clan)", "Kuei - opposition", "Chien - Obstruction", "Hsieh - Deliverance", "Sun - Decrease", "I - Increase", "Kuai - Break -through (Resoluteness)", "Kou - Coming to Meet", "Tsui - Gathering Together (Massing)", "Shoeng - pushing upward", "Kun - oppression (exhaustion)", "Ching - The Well", "Ko - Revolution (Molting)", "Ting - The Cauldron", "Cho^en - the arousing (shock - thunder)", "Koen - keeping still - mountain", "Chien - Development (Gradual Progress)", "Kuei Mei - The Marrying Maiden", "Foeng - abundance (fullness)", "Lu - The Wanderer", "Sun - The Gentle (The Penetrating - Wind)", "Tui - The Joyous - Lake", "Huan - Dispersion (Dissolution)", "Chieh - Limitation", "Chung Fu - Inner Truth", "Hsiao Kuo - Preponderance of the Small", "Chi Chi - After Completion", "Wei Chi - Before Completion");function getHexagrams(){ y=0; theHex="<table cellpadding='1' cellspacing = '0'><tr>"; if (y!=1 && (((y+1) % 7) == 1)){ theHex += "<tr>"; } while (y <= 63){ hexStr = hexArray[y]; a = hexStr.charAt(0); b = hexStr.charAt(1); c = hexStr.charAt(2); d = hexStr.charAt(3); e = hexStr.charAt(4); f = hexStr.charAt(5);theHex += "<td >"+(y+1); theHex += "<br><a href ='Text/"+ hexStr +".html' Target = 'Reading' Title='"+ namesArray[y]+"'>"; theHex += "<IMG SRC='"+f+"small.gif' width='25'height='4' BORDER='0'><BR><IMG SRC='"+e+"small.gif' width='25'height='4'  BORDER='0'><BR><IMG SRC='"+d+"small.gif' width='25'height='4'  BORDER='0'><br><IMG SRC='"+c+"small.gif' width='25'height='4'  BORDER='0'><BR><IMG SRC='"+b+"small.gif' width='25'height='4'  BORDER='0'><BR><IMG SRC='"+a+"small.gif' width='25'height='4'  BORDER='0'></td>"; theHex += "</a>"; if (y!=0 && (((y+1) % 6) == 0)){ theHex += "</tr>"; } y++; } theHex += "</tr></table>"; return theHex;}function writeSystem(){ hexSystem = getHexagrams(); return hexSystem; }