var bF=new Image();var bE=new Image();var bI=new Image();var bP=new Image();var bJ=new Image();var bL=new Image();var bO=new Image();var bQ=new Image();var bN=new Image();var bG=new Image();var aS=new Image();var aR=new Image();var aQ=new Image();var aV=new Image();var bb=new Image();var ba=new Image();var aU=new Image();var aT=new Image();bF.src='img/back_0.gif';bE.src='img/back_1.gif';bI.src='img/continue_0.gif';bP.src='img/continue_1.gif';bJ.src='img/hand_0.gif';bL.src='img/hand_1.gif';bO.src='img/read_0.gif';bQ.src='img/read_1.gif';bN.src='img/virtual_0.gif';bG.src='img/virtual_1.gif';aS.src='img/readorigtxt_0.gif';aR.src='img/readorigtxt_1.gif';aQ.src='img/readorigtxt_0.gif';aV.src='img/readorigtxt_1.gif';bb.src='img/readorigtxt_0.gif';ba.src='img/readorigtxt_1.gif';aU.src='img/cust_search_0.gif';aT.src='img/cust_search_1.gif';function ag(J,bK){var ae=new Array("777","788","878","887","888","877","787","778");var bs=new Array("1","34","5","26","11","9","14","43","25","51","3","27","24","42","21","17","6","40","29","4","7","59","64","47","33","62","39","52","15","53","56","31","12","16","8","23","2","20","35","45","44","32","48","18","46","57","50","28","13","55","63","22","36","37","30","49","10","54","60","41","19","61","38","58");switch(bK){case 1:J=J.replace(/6/g,"8");J=J.replace(/9/g,"7");break;case 2:J=J.replace(/6/g,"7");J=J.replace(/9/g,"8");break;}for(bt in ae){if(ae[bt]==J.substr(0,3))var bu=bt;if(ae[bt]==J.substr(3,3))var bv=bt;}var eg=parseInt(bu);var ed=parseInt(bv);aC=parseInt(bu);aB=parseInt(bv);return bs[ed+(eg*8)];};function aD(){var cI=Math.floor(Math.random()*2);return cI;};function bC(){if(aD()==0){f="<img src='img/yin.gif' width='40' height='40' title='yin'>";n=2}else{f="<img src='img/yang.gif' width='40' height='40' title='yang'>";n=3}if(aD()==0){f=f+"<img src='img/yin.gif' width='40' height='40' title='yin'>";v=2}else{f=f+"<img src='img/yang.gif' width='40' height='40' title='yang'>";v=3}if(aD()==0){f=f+"<img src='img/yin.gif' width='40' height='40' title='yin'>";w=2}else{f=f+"<img src='img/yang.gif' width='40' height='40' title='yang'>";w=3}return f;};function bD(){switch(ah){case 6:bw="<img src='img/6.gif' title='old yin'>";break;case 7:bw="<img src='img/7.gif' title='young yang'>";break;case 8:bw="<img src='img/8.gif' title='young yin'>";break;case 9:bw="<img src='img/9.gif' title='old yang'>";break;}return bw+"<br />";};function bc(){switch(ah){case 6:av="<img src='img/6.gif' title='old yin'>";V=V+"6";an++;Q=e;e=g;O=g;j=j+"An Old Yin for Line "+g+"<br />";break;case 7:av="<img src='img/7.gif' title='young yang'>";V=V+"7";F=g;break;case 8:av="<img src='img/8.gif' title='young yin'>";V=V+"8";F=g;break;case 9:av="<img src='img/9.gif' title='old yang'>";V=V+"9";an++;Q=e;e=g;K=g;j=j+"An Old Yang for Line "+g+"<br />";break;}return av+"<br />";};function aY(){switch(ah){case 6:ax="<img src='img/6.gif' title='old yin'>";break;case 7:ax="<img src='img/7.gif' title='young yang'>";break;case 8:ax="<img src='img/8.gif' title='young yin'>";break;case 9:ax="<img src='img/9.gif' title='old yang'>";break;}return ax+"<br />";};function aX(){switch(ah){case 6:ay="<img src='img/7.gif'>";break;case 7:ay="<img src='img/7.gif'>";break;case 8:ay="<img src='img/8.gif'>";break;case 9:ay="<img src='img/8.gif'>";break;}return ay+"<br />";};function aW(){switch(ah){case 6:az="<img src='img/8.gif'>";break;case 7:az="<img src='img/7.gif'>";break;case 8:az="<img src='img/8.gif'>";break;case 9:az="<img src='img/7.gif'>";break;}return az+"<br />";};function cg(){if(g<7){document.getElementById('x_wrp'.concat(g)).innerHTML="<img src='img/yinyang.gif' width='40' height='40'><img src='img/yinyang.gif' width='40' height='40'><img src='img/yinyang.gif' width='40' height='40'>";document.getElementById('au').innerHTML="<h1>Push this button six times,<br />to throw the coins virtually.<br />&nbsp;<br />&nbsp;</h1>";}};function bx(){if(g<7){document.getElementById('x_wrp'.concat(g)).innerHTML="";document.getElementById('au').innerHTML="";}};function el(){document.getElementById('x_wrp1').innerHTML="<img alt='' src='img/yinyang.gif' width='40' height='40' /><img alt='' src='img/yinyang.gif' width='40' height='40' /><img alt='' src='img/yinyang.gif' width='40' height='40' />";document.getElementById('au').innerHTML="<h1>Cast three identical coins where you are, and use these coins to register the result.<br />Flip the coins by clicking them.<br />Head is yang and tail is yin.</h1>";};function cE(){if(document.getElementById('bd').style.visibility==""){document.getElementById('x_wrp1').innerHTML='';document.getElementById('au').innerHTML='';}};function bM(){document.getElementById('bo').style.visibility="hidden";document.getElementById('bd').style.visibility="hidden";document.getElementById('au').innerHTML="<h1>Cast three identical coins where you are, and use these coins to register the result.<br />Flip the coins by clicking them.<br />Head is yang and tail is yin.</h1>";dk=0;dj=0;dn=0;dm=0;di=0;df=0;de=0;dh=0;dg=0;dw=0;dv=0;dy=0;dx=0;du=0;dr=0;ds=0;dp=0;dq=0;cf();};function cf(){V="";an=0;e=0;O=0;Q=0;K=0;F=0;j="";g=1;document.getElementById('x_wrp1').innerHTML=am();if(n>0&&v>0&&w>0){document.getElementById('bm').style.visibility="hidden";document.getElementById('x_g1').innerHTML="<img src='img/g1_1.gif' />";ah=(n+v+w);Z();g=2;document.getElementById('x_wrp2').innerHTML=am();if(n>0&&v>0&&w>0){document.getElementById('x_g2').innerHTML="<img src='img/g2_1.gif' />";ah=(n+v+w);Z();g=3;document.getElementById('x_wrp3').innerHTML=am();if(n>0&&v>0&&w>0){document.getElementById('x_g3').innerHTML="<img src='img/g3_1.gif' />";ah=(n+v+w);Z();g=4;document.getElementById('x_wrp4').innerHTML=am();if(n>0&&v>0&&w>0){document.getElementById('x_g4').innerHTML="<img src='img/g4_1.gif' />";ah=(n+v+w);Z();g=5;document.getElementById('x_wrp5').innerHTML=am();if(n>0&&v>0&&w>0){document.getElementById('x_g5').innerHTML="<img src='img/g5_1.gif' />";ah=(n+v+w);Z();g=6;document.getElementById('x_wrp6').innerHTML=am();if(n>0&&v>0&&w>0){document.getElementById('x_g6').innerHTML="<img src='img/g6_1.gif' />";ah=(n+v+w);Z();g=7;aA();}}}}}}};function am(){ap=1;while(ap<4){switch(g){case 1:switch(ap){case 1:f="";if(dk==0){f=f+"<a onclick='l(11,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dk==2){f=f+"<a onclick='l(11,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";n=2;}else{f=f+"<a onclick='l(11,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";n=3;}}break;case 2:if(dj==0){f=f+"<a onclick='l(12,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dj==2){f=f+"<a onclick='l(12,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";v=2;}else{f=f+"<a onclick='l(12,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";v=3;}}break;case 3:if(dn==0){f=f+"<a onclick='l(13,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dn==2){f=f+"<a onclick='l(13,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";w=2;}else{f=f+"<a onclick='l(13,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";w=3;}}break;}break;case 2:switch(ap){case 1:f="";if(dm==0){f=f+"<a onclick='l(21,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dm==2){f=f+"<a onclick='l(21,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";n=2;}else{f=f+"<a onclick='l(21,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";n=3;}}break;case 2:if(di==0){f=f+"<a onclick='l(22,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(di==2){f=f+"<a onclick='l(22,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";v=2;}else{f=f+"<a onclick='l(22,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";v=3;}}break;case 3:if(df==0){f=f+"<a onclick='l(23,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(df==2){f=f+"<a onclick='l(23,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";w=2;}else{f=f+"<a onclick='l(23,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";w=3;}}break;}break;case 3:switch(ap){case 1:f="";if(de==0){f=f+"<a onclick='l(31,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(de==2){f=f+"<a onclick='l(31,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";n=2;}else{f=f+"<a onclick='l(31,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";n=3;}}break;case 2:if(dh==0){f=f+"<a onclick='l(32,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dh==2){f=f+"<a onclick='l(32,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";v=2;}else{f=f+"<a onclick='l(32,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";v=3;}}break;case 3:if(dg==0){f=f+"<a onclick='l(33,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dg==2){f=f+"<a onclick='l(33,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";w=2;}else{f=f+"<a onclick='l(33,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";w=3;}}break;}break;case 4:switch(ap){case 1:f="";if(dw==0){f=f+"<a onclick='l(41,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dw==2){f=f+"<a onclick='l(41,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";n=2;}else{f=f+"<a onclick='l(41,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";n=3;}}break;case 2:if(dv==0){f=f+"<a onclick='l(42,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dv==2){f=f+"<a onclick='l(42,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";v=2;}else{f=f+"<a onclick='l(42,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";v=3;}}break;case 3:if(dy==0){f=f+"<a onclick='l(43,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dy==2){f=f+"<a onclick='l(43,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";w=2;}else{f=f+"<a onclick='l(43,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";w=3;}}break;}break;case 5:switch(ap){case 1:f="";if(dx==0){f=f+"<a onclick='l(51,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dx==2){f=f+"<a onclick='l(51,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";n=2;}else{f=f+"<a onclick='l(51,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";n=3;}}break;case 2:if(du==0){f=f+"<a onclick='l(52,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(du==2){f=f+"<a onclick='l(52,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";v=2;}else{f=f+"<a onclick='l(52,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";v=3;}}break;case 3:if(dr==0){f=f+"<a onclick='l(53,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dr==2){f=f+"<a onclick='l(53,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";w=2;}else{f=f+"<a onclick='l(53,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";w=3;}}break;}break;case 6:switch(ap){case 1:f="";if(ds==0){f=f+"<a onclick='l(61,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(ds==2){f=f+"<a onclick='l(61,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";n=2;}else{f=f+"<a onclick='l(61,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";n=3;}}break;case 2:if(dp==0){f=f+"<a onclick='l(62,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dp==2){f=f+"<a onclick='l(62,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";v=2;}else{f=f+"<a onclick='l(62,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";v=3;}}break;case 3:if(dq==0){f=f+"<a onclick='l(63,2);' href='#'><img alt='' src='img/yinyang.gif' width='40' height='40' title='yin or yang; click to flip coin to yin' /></a>";n=0;}else{if(dq==2){f=f+"<a onclick='l(63,3);' href='#'><img alt='' src='img/yin.gif' width='40' height='40' title='yin; click to flip coin to yang' /></a>";w=2;}else{f=f+"<a onclick='l(63,2);' href='#'><img alt='' src='img/yang.gif' width='40' height='40' title='yang; click to flip coin to yin' /></a>";w=3;}}break;}break;}ap++;}return f;};function l(eh,af){switch(eh){case 11:dk=af;break;case 12:dj=af;break;case 13:dn=af;break;case 21:dm=af;break;case 22:di=af;break;case 23:df=af;break;case 31:de=af;break;case 32:dh=af;break;case 33:dg=af;break;case 41:dw=af;break;case 42:dv=af;break;case 43:dy=af;break;case 51:dx=af;break;case 52:du=af;break;case 53:dr=af;break;case 61:ds=af;break;case 62:dp=af;break;case 63:dq=af;break;}cf();};function ei(){document.location="";return;};function ej(){document.getElementById('bm').style.visibility="hidden";document.getElementById('bd').style.visibility="hidden";if(g<7){bx();document.getElementById('x_g'.concat(g)).innerHTML=("<img src='img/g"+g+"_1.gif' />");document.getElementById('x_wrp'.concat(g)).innerHTML=bC();ah=(n+v+w);Z();g++;cg();}if(g>=7){aA();}};function Z(){document.getElementById('x_lin'.concat(g)).innerHTML=bD();document.getElementById('x_cst'.concat(g)).innerHTML=bc();document.getElementById('x_chg'.concat(g)).innerHTML=aY();document.getElementById('x_trf'.concat(g)).innerHTML=aX();document.getElementById('x_trg'.concat(g)).innerHTML=aW();};function aA(){document.getElementById('I').innerHTML="";document.getElementById('M').innerHTML="";document.getElementById('L').innerHTML="";document.getElementById('aH').style.visibility="";document.getElementById('aq').style.visibility="";document.getElementById('aM').style.visibility="";document.getElementById('bo').style.visibility="hidden";document.getElementById('bA').style.visibility="";o=(ag(V,1));m=parseInt(o);bk=G[aB];if(aB!=aC){aE=G[aC];}else{aE='See Upper Trigram.';}document.getElementById('aw').innerHTML=('<h1>Upper Trigram: </h1>'+bk+'<br /><br /><h1>Lower Trigram: </h1>'+aE);H=(ag(V,2));r=parseInt(H);document.getElementById('cb').innerHTML=('<h1>&nbsp;&nbsp;Cast Hexagram: <b>'+o+'</b></h1>');document.getElementById('bg').innerHTML=('<h1>&nbsp;&nbsp;Cast Hexagram: <b>'+o+'</b></h1>');document.getElementById('bf').innerHTML=('<h1>&nbsp;&nbsp;Cast Hexagram: <b>'+o+'</b></h1>');document.getElementById('bj').innerHTML=('<h1>&nbsp;&nbsp;Transformed Hex: <b>'+H+'</b></h1>');switch(an){case 0:document.getElementById('t').innerHTML=('<h2>Cast Hexagram: </h2><br />'+d[m-1]);document.getElementById('C').innerHTML=('<h2>Changing Lines:</h2><br />There are no Changing Lines.<br /><br />');document.getElementById('D').innerHTML='';document.getElementById('A').innerHTML=('<h2>Transformed Hexagram: </h2><br />No Changing Lines.<br />Only the Cast Hexagram applies.');B=(k(m,0));document.getElementById('I').innerHTML=('for Hexagram '+o+',<br />'+'by Richard Wilhelm.');document.getElementById('aq').style.visibility='hidden';document.getElementById('M').innerHTML='';document.getElementById('aM').style.visibility='hidden';document.getElementById('L').innerHTML='';break;case 1:document.getElementById('t').innerHTML=('<h2>Cast Hexagram: </h2><br />'+d[m-1]);document.getElementById('C').innerHTML=('<h2>Changing Lines:</h2><br />There is One Changing Line.<br /><br />');document.getElementById('D').innerHTML=(c[(m-1)*6+(e-1)]+'<br />');document.getElementById('A').innerHTML=('<h2>Transformed Hexagram: </h2><br />'+d[r-1]);B=(k(m,0));document.getElementById('I').innerHTML=('for Hexagram '+o+',<br />'+'by Richard Wilhelm.');U=(k(m,e));document.getElementById('M').innerHTML=('for Hexagram '+o+', Line '+e+',<br />'+'by Richard Wilhelm.');P=(k(r,0));document.getElementById('L').innerHTML=('for Hexagram '+H+',<br />'+'by Richard Wilhelm.');break;case 2:if(O>0&&K>0){e=O;j=j+'The Old Yin prevails.<br />';}else{j='The Upper Line applies.<br />';}document.getElementById('t').innerHTML=('<h2>Cast Hexagram: </h2><br />'+d[m-1]);document.getElementById('C').innerHTML=('<h2>Changing Lines:</h2><br />There are Two Changing Lines.<br />'+j+'<br />');document.getElementById('D').innerHTML=(c[(m-1)*6+(e-1)]+'<br />');document.getElementById('A').innerHTML=('<h2>Transformed Hexagram: </h2><br />'+d[r-1]);B=(k(m,0));document.getElementById('I').innerHTML=('for Hexagram '+o+',<br />'+'by Richard Wilhelm.');U=(k(m,e));document.getElementById('M').innerHTML=('for Hexagram '+o+', Line '+e+',<br />'+'by Richard Wilhelm.');P=(k(r,0));document.getElementById('L').innerHTML=('for Hexagram '+H+',<br />'+'by Richard Wilhelm.');break;case 3:e=Q;j='The Middle Line applies.<br />';document.getElementById('t').innerHTML=('<h2>Cast Hexagram: </h2><br />'+d[m-1]);document.getElementById('C').innerHTML=('<h2>Changing Lines:</h2><br />There are Three Changing Lines.<br />'+j+'<br />');document.getElementById('D').innerHTML=(c[(m-1)*6+(e-1)]+'<br />');document.getElementById('A').innerHTML=('<h2>Transformed Hexagram: </h2><br />'+d[r-1]);B=(k(m,0));document.getElementById('I').innerHTML=('for Hexagram '+o+',<br />'+'by Richard Wilhelm.');U=(k(m,e));document.getElementById('M').innerHTML=('for Hexagram '+o+', Line '+e+',<br />'+'by Richard Wilhelm.');P=(k(r,0));document.getElementById('L').innerHTML=('for Hexagram '+H+',<br />'+'by Richard Wilhelm.');break;case 4:e=F;j='Read the Upper NON-changing Line.<br />';document.getElementById('t').innerHTML=('<h2>Cast Hexagram: </h2><br />'+d[m-1]);document.getElementById('C').innerHTML=('<h2>Changing Lines:</h2><br />There are Four Changing Lines.<br />'+j+'<br />');document.getElementById('D').innerHTML=(c[(m-1)*6+(e-1)]+'<br />');document.getElementById('A').innerHTML=('<h2>Transformed Hexagram: </h2><br />'+d[r-1]);B=(k(m,0));document.getElementById('I').innerHTML=('for Hexagram '+o+',<br />'+'by Richard Wilhelm.');U=(k(m,e));document.getElementById('M').innerHTML=('for Hexagram '+o+', Line '+e+',<br />'+'by Richard Wilhelm.');P=(k(r,0));document.getElementById('L').innerHTML=('for Hexagram '+H+',<br />'+'by Richard Wilhelm.');break;case 5:e=F;j='Read the Only NON-changing Line.<br />';document.getElementById('t').innerHTML=('<h2>Cast Hexagram: </h2><br />'+d[m-1]);document.getElementById('C').innerHTML=('<h2>Changing Lines:</h2><br />There are Five Changing Lines.<br />'+j+'<br />');document.getElementById('D').innerHTML=(c[(m-1)*6+(e-1)]+'<br />');document.getElementById('A').innerHTML=('<h2>Transformed Hexagram: </h2><br />'+d[r-1]);B=(k(m,0));document.getElementById('I').innerHTML=('for Hexagram '+o+',<br />'+'by Richard Wilhelm.');U=(k(m,e));document.getElementById('M').innerHTML=('for Hexagram '+o+', Line '+e+',<br />'+'by Richard Wilhelm.');P=(k(r,0));document.getElementById('L').innerHTML=('for Hexagram '+H+',<br />'+'by Richard Wilhelm.');break;case 6:if(O>0&&K>0){j='No Changing Line applies.<br />Read only the Transformed Hexagram.<br />';document.getElementById('t').innerHTML=('<h2>Cast Hexagram: </h2><br />All Lines are Changing!!!<br />Read only the Transformed Hexagram.<br />');document.getElementById('aH').style.visibility='hidden';document.getElementById('I').innerHTML='';}else{j='No Changing Line applies.<br />Read both Cast and Transformed Hexagram.<br />';document.getElementById('t').innerHTML=('<h2>Cast Hexagram: </h2><br />'+d[m-1]);if(K>0){B=((k(m,0)+'l'));}else{B=((k(m,0)+'l'));}document.getElementById('I').innerHTML=('for Hexagram '+o+',<br />'+'by Richard Wilhelm.');}document.getElementById('C').innerHTML=('<h2>Changing Lines:</h2><br />All Lines are Changing!!!<br />'+j+'<br />');document.getElementById('D').innerHTML='';document.getElementById('A').innerHTML=('<h2>Transformed Hexagram: </h2><br />'+d[r-1]);document.getElementById('aq').style.visibility='hidden';document.getElementById('M').innerHTML='';P=(k(r,0));document.getElementById('L').innerHTML=('for Hexagram '+H+',<br />'+'by Richard Wilhelm.');break;}};function bq(){document.getElementById('aP').style.visibility="";document.getElementById('aO').style.visibility="hidden";document.getElementById('ak').style.visibility="hidden";document.getElementById('al').style.visibility="hidden";document.getElementById('ai').style.visibility="hidden";document.getElementById('aj').style.visibility="hidden";document.getElementById('x_g1').innerHTML="<img src='img/g1_0.gif' title='First line' />";document.getElementById('x_g2').innerHTML="<img src='img/g2_0.gif' title='Second line' />";document.getElementById('x_g3').innerHTML="<img src='img/g3_0.gif' title='Third line' />";document.getElementById('x_g4').innerHTML="<img src='img/g4_0.gif' title='Fourth line' />";document.getElementById('x_g5').innerHTML="<img src='img/g5_0.gif' title='Fifth line' />";document.getElementById('x_g6').innerHTML="<img src='img/g6_0.gif' title='Sixth line' />";document.getElementById('x_wrp1').innerHTML="";document.getElementById('x_wrp2').innerHTML="";document.getElementById('x_wrp3').innerHTML="";document.getElementById('x_wrp4').innerHTML="";document.getElementById('x_wrp5').innerHTML="";document.getElementById('x_wrp6').innerHTML="";document.getElementById('au').innerHTML="";document.getElementById('cb').innerHTML="";document.getElementById('x_lin1').innerHTML="";document.getElementById('x_lin2').innerHTML="";document.getElementById('x_lin3').innerHTML="";document.getElementById('x_lin4').innerHTML="";document.getElementById('x_lin5').innerHTML="";document.getElementById('x_lin6').innerHTML="";document.getElementById('bg').innerHTML="";document.getElementById('x_cst1').innerHTML="";document.getElementById('x_cst2').innerHTML="";document.getElementById('x_cst3').innerHTML="";document.getElementById('x_cst4').innerHTML="";document.getElementById('x_cst5').innerHTML="";document.getElementById('x_cst6').innerHTML="";document.getElementById('bf').innerHTML="";document.getElementById('x_chg1').innerHTML="";document.getElementById('x_chg2').innerHTML="";document.getElementById('x_chg3').innerHTML="";document.getElementById('x_chg4').innerHTML="";document.getElementById('x_chg5').innerHTML="";document.getElementById('x_chg6').innerHTML="";document.getElementById('bj').innerHTML="";document.getElementById('x_trf1').innerHTML="";document.getElementById('x_trf2').innerHTML="";document.getElementById('x_trf3').innerHTML="";document.getElementById('x_trf4').innerHTML="";document.getElementById('x_trf5').innerHTML="";document.getElementById('x_trf6').innerHTML="";document.getElementById('x_trg1').innerHTML="";document.getElementById('x_trg2').innerHTML="";document.getElementById('x_trg3').innerHTML="";document.getElementById('x_trg4').innerHTML="";document.getElementById('x_trg5').innerHTML="";document.getElementById('x_trg6').innerHTML="";document.getElementById('t').innerHTML="";document.getElementById('C').innerHTML="";document.getElementById('D').innerHTML="";document.getElementById('A').innerHTML="";document.getElementById('aw').innerHTML="";document.getElementById('aN').focus();V="";an=0;e=0;O=0;Q=0;K=0;F=0;j="";g=1;document.getElementById('bB').style.visibility="";document.getElementById('by').style.visibility="hidden";};function bY(){document.getElementById('aP').style.visibility="hidden";document.getElementById('aO').style.visibility="";document.getElementById('ak').style.visibility="hidden";document.getElementById('al').style.visibility="hidden";document.getElementById('ai').style.visibility="hidden";document.getElementById('aj').style.visibility="hidden";aK=escape(document.getElementById('aN').value.replace(/ /g,'+'));T=document.getElementById('aN').value;if(be(T)==false){document.getElementById('aG').style.visibility="hidden";document.getElementById('aZ').innerHTML="";}else{document.getElementById('aG').style.visibility="";document.getElementById('aZ').innerHTML=("Try the "+"<img src='img/poweredby_FFFFFF.gif' alt='Google' style='margin-bottom:-6px' />"+" custom search for the question you entered!");}if(T==""){if(aD()==0){T="You can just concentrate on your I Ching question, but it's better to write it down...";}else{T="It helps concentrating on your question for the I Ching, when you write it down...";}aK="You did not enter a question.";}document.getElementById('bW').innerHTML=T;document.getElementById('ca').innerHTML=T;document.getElementById('bV').innerHTML=T;document.getElementById('bU').innerHTML=T;document.getElementById('bX').innerHTML=T;document.getElementById('bm').style.visibility="";document.getElementById('bo').style.visibility="";document.getElementById('bA').style.visibility="hidden";document.getElementById('bd').style.visibility="";};function R(){document.getElementById('aP').style.visibility="hidden";document.getElementById('aO').style.visibility="hidden";document.getElementById('ak').style.visibility="";document.getElementById('al').style.visibility="hidden";document.getElementById('ai').style.visibility="hidden";document.getElementById('aj').style.visibility="hidden";};function aa(){document.getElementById('aP').style.visibility="hidden";document.getElementById('aO').style.visibility="hidden";document.getElementById('ak').style.visibility="hidden";document.getElementById('al').style.visibility="";document.getElementById('ai').style.visibility="hidden";document.getElementById('aj').style.visibility="hidden";};function X(){document.getElementById('aP').style.visibility="hidden";document.getElementById('aO').style.visibility="hidden";document.getElementById('ak').style.visibility="hidden";document.getElementById('al').style.visibility="hidden";document.getElementById('ai').style.visibility="";document.getElementById('aj').style.visibility="hidden";};function Y(){document.getElementById('aP').style.visibility="hidden";document.getElementById('aO').style.visibility="hidden";document.getElementById('ak').style.visibility="hidden";document.getElementById('al').style.visibility="hidden";document.getElementById('ai').style.visibility="hidden";document.getElementById('aj').style.visibility="";};var aJ=(unescape("%69%63%68%69%6E%67%6F%6E%6C%69%6E%65%2E%6E%65%74"));if(window.location.protocol.indexOf("file")!= -1){ei();}if((document.domain!=aJ)&&(document.domain!=('www.'+aJ))){ei();}function at(){x_NewCast=window.open((B+"?x_srt=Cast%20Hexagram:&x_vrg="+aK),"cast","width=775,height=775,location=no,scrollbars=yes,top=140,left=164");};function as(){x_NewChan=window.open((U+"?x_vrg="+aK),"chan","width=775,height=775,location=no,scrollbars=yes,top=170,left=190");};function ar(){x_NewTran=window.open((P+"?x_srt=Transformed%20Hexagram:&x_vrg="+aK),"tran","width=775,height=775,location=no,scrollbars=yes,top=200,left=216");};function k(bh,cc){bH=((bh*226056)+((100-bh)*114725)+(cc*9783831));return "rw/"+bH+".shtm";};function be(ao){if(ao==null){return false;}if(ao.length==0){return false;}var aF=0;for(var bi=0;bi<ao.length;bi++){if((ao.charAt(bi)>="A"&&ao.charAt(bi)<="Z")||(ao.charAt(bi)>="a"&&ao.charAt(bi)<="z")){aF++;if(aF>2){return true;}}}return false;};document.write(unescape("%3C%73%63%72%69%70%74%20%74%79%70%65%3D%22%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%22%20%73%72%63%3D%22%74%61%62%73%2E%6A%73%22%3E%3C%2F%73%63%72%69%70%74%3E")); 