//************************************************************
//    DT HMS     
//    -------------------------------------------
//************************************************************


//Global Constants
CWIDTH=50
CHEIGHT=105
FANH=15
FANV=20
PACKED='P'
VERTFAN='V'
HORIZFAN='H'
FLOATIMGS=30;

//Pile Rules Constants
NONE='N'
ANY='Y'
FIXED='X'
BOTH='B'
UP='U'
DOWN='D'
SUIT='S'
RANK='R'
COLOR='C'
ALTCOLOR='A'

//Constant Arrays
SUITS=new Array("H");
RANKS=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V");

//Global Variables

var FirstHouse=new Array("<b><i>The Magician:</i></b>  New beginning.  Power  over events.  Possible new business opportunity.  (For a female seeker, a man will have a positive influence in her life, business or love).  Protection in all areas, including your health.",
"<b><i>The High Priestess:</i></b>  For a male seeker, positive influence from a woman  concerning his love life.  For the female seeker, new possibilities emerge concerning her goals.",
"<b><i>The Empress:</i></b> Positive  news by mail.  Possible short trip.  Help or luck from your surroundings.",
"<b><i>The Emperor:</i></b>  Power over others.  Positive time to impose your will upon others.  Possible promotion.  For a female seeker:  success from or for a man in her surroundings.", 
"<b><i>The Pope:</i></b>  Spiritual protection and development.  Favorable time for partnership.  Luck or help from family.",
"<b><i>The Lovers:</i></b>  Period of hesitation,  concession, or choice.  Possible opportunity in business or love, followed by an important decision. ",
"<b><i>The Chariot:</i></b>  Period of progress.  Favorable time for any social activities (artistic, political, creative, etc.).  Possible trip in the near future. ",
"<b><i>The Justice:</i></b>  Possible settlement (legal or interpersonal).  New equilibrium.  Honesty brings about a  positive result; dishonesty may result in trial or trouble with the law.",
"<b><i>The Hermit:</i></b>  Period of delay, with a tendency for loneliness. ", 
"<b><i>The Wheel of Fortune:</i></b>  Regardless of your life situation, the near future will bring movement and improvement.  New  possibilities lead to positive outcomes.  Change or renewal for the better. ", 
"<b><i>The Strength:</i></b>  Period of fulfillment and success concerning your goals.  For the seeker,  a new relationship which will change your destiny. ",
"<b><i>The Hanged Man:</i></b>  Period of deception.  The seeker may face an ordeal (business or love).  Possible nervous exhaustion.  Caution needed in all areas.  Risk of illusion.",
"<b><i>The Death:</i></b>  Period of change.  End of one situation, (protection, love, or problem).  Rebirth or renewal of another situation.",  
"<b><i>The Temperance:</i></b>  Slow change leading to progress.  New stability ahead.  Favorable time with others or for negotiations. ", 
"<b><i>The Devil:</i></b>  Power over others due to your cunning, seduction or manipulation.  For the single one, a new passionate relationship (in secret  or without an outcome).",  
"<b><i>The Broken House:</i></b>  Caution needed in the near future.  Risk of sudden difficulties.  Serious conflict, break-up, or accident.  ",
"<b><i>The Star:</i></b>  Period of luck.  Fulfillment of your desires.  ",
"<b><i>The Moon:</i></b>  Positive influence from a woman.  Increased clientele.  Period of fertility.",  
"<b><i>The Sun:</i></b>  Period of  spontaneous success and luck.  Favorable time for creative endeavors.  For the single one, a new relationship, union or marriage.  Happiness for the married one.",
"<b><i>The Judgment:</i></b>  An unexpected event or news may bring a sudden change. ",
"<b><i>The World:</i></b>  Period of success.  Luck from others (media, associates, friends, etc.).  ",
"<b><i>The Fool:</i></b>  Period of instability.  Risk of  regrettable mistake due to your impulsive behavior.  Time to get your feet back on the ground!")   

var SecondHouse=new Array("<b><i>The Magician:</i></b>  Increase of money from your effort or initiative.  A favorable time for a new business opportunity.",  
"<b><i>The High Priestess:</i></b>  Increase of money.  Favorable time for any speculations.  Luck from a significant woman.", 
"<b><i>The Empress:</i></b>  Money through the mail.  Possible increase of money  through advertising, writing, publishing, etc.",  
"<b><i>The Emperor:</i></b>  Significant financial gain.  Period of fulfillment concerning your financial goals.  Help or luck from an important man.",
"<b><i>The Pope:</i></b>  Protection concerning your financial life.  Favorable time for real estate matters.  ",
"<b><i>The Lovers:</i></b>  Possibility of money from two sources.  A gift may be received.",
"<b><i>The Chariot:</i></b>  Financial progress.  Luck from a distance or with the media.  Contract or partnership.",
"<b><i>The Justice:</i></b>  New equilibrium concerning your financial life.  Possible legal settlement.  Distribution of assets.  ",
"<b><i>The Hermit:</i></b>  Period of delay concerning your financial goals or  requests.  ",
"<b><i>The Wheel of Fortune:</i></b>  Financial luck.  Movement and progress.  ",
"<b><i>The Strength:</i></b>  Period of fulfillment concerning your financial life.  Luck from new activities or opportunities.  Increased money.",
"<b><i>The Hanged Man:</i></b>  Financial loss.  Risk of reversal or bankruptcy.",
"<b><i>The Death:</i></b>  End of a financial situation with  the beginning of another.  Favorable time for an inheritance, gift, donation, etc. ",
"<b><i>The Temperance:</i></b>  Period of slow progress concerning your financial life.  Favorable time for negotiations.",
"<b><i>The Devil:</i></b>  Increase of money from your intuition or cunning.  ",
"<b><i>The Broken House:</i></b>  Risk of sudden financial difficulties, loss or reversal. ", 
"<b><i>The Star:</i></b>  Financial luck.  Help from your surroundings.",
"<b><i>The Moon:</i></b>  Increase of money.  Favorable time for new clientele.  ",
"<b><i>The Sun:</i></b>  Period of financial success.  Large increase of money  through a gift or from a loved one. ", 
"<b><i>The Judgment:</i></b>  Unexpected change in your financial life.  Sudden increase of money (lottery, settlement, etc..).", 
"<b><i>The World:</i></b>  Tremendous financial gain.  Luck from others (media, lottery, friends, associates, etc.).", 
"<b><i>The Fool:</i></b>  Period of instability concerning your financial life arising from carelessness or neglect.")  


var ThirdHouse=new Array("<b><i>The Magician:</i></b>  Unexpected trip.  Possible professional opportunity from existing or new contacts. ", 
"<b><i>The High Priestess:</i></b>  Luck from a distance concerning your business goals.  Possible contract.",
"<b><i>The Empress:</i></b>  Happiness from your surroundings.  New encounters.  Possible short trip. ", 
"<b><i>The Emperor:</i></b>  Possible meeting or contact with an important man in your surroundings.  Help or luck from this man.  ",
"<b><i>The Pope:</i></b>  Period of peace and tranquility with others.  Protection on the road.  Family trip.",
"<b><i>The Lovers:</i></b>  Uplifting trip with others (loved one, etc.).  For the single one, a new love encounter during a short trip or from the media.  News from a lover or admirer.",  
"<b><i>The Chariot:</i></b>  Luck from a distance concerning your goals or creations.  Period of popularity.  Favorable time for travel.  ",
"<b><i>The Justice:</i></b>  News regarding a legal document, followed by a settlement.  Caution needed on the road.  Misfortune with the law.  ",
"<b><i>The Hermit:</i></b>  Important news ahead concerning your desires or requests. Possible feeling of isolation.  ",
"<b><i>The Wheel of Fortune:</i></b>  Change or renewal regarding your surroundings.  Period of progress, help or luck from others.  ",
"<b><i>The Strength:</i></b>  Power over others.  Luck from your determination regarding your goals. ",  
"<b><i>The Hanged Man:</i></b>  Misfortune on the road.  Deception from others.  Risk  of stress or nervous exhaustion.  ",
"<b><i>The Death:</i></b>  Period of change.  Possible trip.  New contacts from a distance.  ",
"<b><i>The Temperance:</i></b>  Period of stability and happiness with others in your surroundings.  ",
"<b><i>The Devil:</i></b>  Caution needed concerning your contacts with others.  Risk of betrayal.  Unfavorable time to depend on others.  ",
"<b><i>The Broken House:</i></b>  Risk of accident during a trip or sporting event.  Possible conflict with others in  your surroundings (break-up, disagreement, etc.).  ",
"<b><i>The Star:</i></b>  Luck from others.  Possible trip.  Positive and beneficial news.  ",
"<b><i>The Moon:</i></b>  Help or luck from a woman in your surroundings.  Possible trip.  Luck with clientele.",
"<b><i>The Sun:</i></b>  Love letter or honeymoon.  Success or union for a significant person in your life.  Happy times with others. ",
"<b><i>The Judgment:</i></b>  Unexpected trip.  New contacts or surroundings.  Sudden and positive news.  ",
"<b><i>The World:</i></b>  Luck  or success from others.  Favorable time for a new creation.   Possible trip or voyage.",
"<b><i>The Fool:</i></b>  Caution needed concerning your contacts with others.  Risk of regrettable mistake or trouble due to their impulsive behavior.  Misfortune during a trip.") 

var FourthHouse=new Array("<b><i>The Magician:</i></b>  A positive event or news ahead.  Possible move or change concerning real estate matters.  A new beginning at home or with your family.",
"<b><i>The High Priestess:</i></b>  Possible move or real estate transaction.  For a single man, a new relationship.",  
"<b><i>The Empress:</i></b>  News from your extended family.  Possible trip.  You may acquire a new or additional residence. ",
"<b><i>The Emperor:</i></b>  Luck concerning real estate matters.  Good fortune from an important man or  male family member. ",   
"<b><i>The Pope:</i></b>  Good fortune for your parents or family.  Possible union or marriage if desired. ", 
"<b><i>The Lovers:</i></b>  Period of happiness at home. For the single one; new relationship followed by union or marriage.  Financial or material gain from family.",
"<b><i>The Chariot:</i></b>  Possible move.  Fulfillment concerning your projects or desires. ",   
"<b><i>The Justice:</i></b>  Possible inheritance or real estate transaction.  ",
"<b><i>The Hermit:</i></b>  Period of delay concerning your projects.  Stability at home.",
"<b><i>The Wheel of Fortune:</i></b> At home, improvement through modification.  Renewal with your family or mate.  Favorable time for a move.",
"<b><i>The Strength:</i></b>  Period of fulfillment at home, with your mate or family.  Luck concerning real estate matters.",
"<b><i>The Hanged Man:</i></b>  Family ordeals.  Risk of family illness or disintegration.  Misfortune with real estate matters.  ",
"<b><i>The Death:</i></b>  Sudden change at home.  Possible move.  Risk of loss of family member.  ",
"<b><i>The Temperance:</i></b>  Period of improvement toward stability with family and at home.   Company arriving.  Family trip or reunion. ",  
"<b><i>The Devil:</i></b>  Risk of family disintegration.  Misfortune and deception with real estate matters.  Possible robbery at home.  ",
"<b><i>The Broken House:</i></b>  Risk of break-up, divorce or serious conflict at home or with family.  Possible unexpected move.",
"<b><i>The Star:</i></b>  Fulfillment at home.  Period of happiness with your family.  For a single man, a new relationship.",
"<b><i>The Moon:</i></b>  Positive change at home.  Period of fertility or birth.  Good fortune with real estate matters.",
"<b><i>The Sun:</i></b>  Period of happiness at home, with your mate and family.  For the single one, a new relationship, followed by union or marriage. ", 
"<b><i>The Judgment:</i></b>  Unexpected change at home.  Possible move or settlement with your family, mate or real estate matters.",
"<b><i>The World:</i></b>  Help or luck from your extended family.  Good fortune concerning real estate matters.",  
"<b><i>The Fool:</i></b>   Risk of unexpected move.  Period of difficulties regarding your family or mate due to their lack of effort. ") 

var FifthHouse=new Array("<b><i>The Magician:</i></b>  For the single one, a love encounter or beginning of a love relationship.  Luck concerning your creations and speculations.  For a female seeker, possible birth.  ", 
"<b><i>The High Priestess:</i></b>  For the male seeker, a new relationship.  For a female seeker, possible pregnancy.  Favorable time for your creations, contracts, or speculations. ", 
"<b><i>The Empress:</i></b>  News from a lover or admirer.  Favorable time for your creations.",
"<b><i>The Emperor:</i></b>  For the female seeker, a new relationship.  For a male seeker, help or luck from an important man concerning his creations, speculations, or goals.",
"<b><i>The Pope:</i></b>  For the single one; new relationship or legalization of a relationship.  Happiness at home and with your children.  ",
"<b><i>The Lovers:</i></b>  Opportunity for two propositions of love.  Period of indecision concerning your love life.  Favorable time for your creations, speculations, or any new endeavors.",
"<b><i>The Chariot:</i></b>  Love encounter during a trip or voyage.  Period of popularity.  Favorable time for your creations or speculations.  ",
"<b><i>The Justice:</i></b>  Stability with your love life. Concerning your child, possible settlement or trouble with the law.   ",
"<b><i>The Hermit:</i></b>  Period of delay concerning your love life or ability to conceive. ", 
"<b><i>The Wheel of Fortune:</i></b>  Period of change or renewal concerning your love life.  For the single one, a serendipitous relationship.  Luck with speculations and creations.",  
"<b><i>The Strength:</i></b>  Period of fulfillment concerning your love life.  For the single one, a new love relationship.  Good fortune concerning your speculations and creations.",
"<b><i>The Hanged Man:</i></b>  End of a love relationship.  Caution needed concerning any speculations.  Risk of loss or reversal.  Possible trouble concerning a child.  ",
"<b><i>The Death:</i></b>  Period of change or renewal.  End of a relationship and an immediate beginning of another. ",   
"<b><i>The Temperance:</i></b>  Period of improvement concerning your love life.  Slow progress with concessions regarding speculations or creations.  ",
"<b><i>The Devil:</i></b>  Passionate relationship with risk of no outcome.  Risk of jealousy, control and betrayal.  ",
"<b><i>The Broken House:</i></b>  Risk of break-up or end of liaison.  Possible trouble concerning a child.  ",
"<b><i>The Star:</i></b>  Fulfillment of your desires regarding your love life.  Period of happiness.  ",
"<b><i>The Moon:</i></b>  Period of fertility and popularity.  For the female seeker, possible birth. ", 
"<b><i>The Sun:</i></b>  Period of happiness.  For the single one, a new relationship followed by union or marriage.  Favorable time for your creations and speculations.  ",
"<b><i>The Judgment:</i></b>  New love under strange circumstances.  Unexpected developments concerning your love life.  ",
"<b><i>The World:</i></b>  Soul-mate connection.  Period of fulfillment concerning your creations or speculations.",
"<b><i>The Fool:</i></b>  Period of deception or illusion concerning your love life.  Lack of effort from your loved one.   Possible trouble concerning a child.  ")

var SixthHouse=new Array("<b><i>The Magician:</i></b>  New beginning at work.  Possible promotion or change.  Help or luck from your associates, co-workers, etc.  For the single one, a possible love encounter at work.  Good health or recovery.",
"<b><i>The High Priestess:</i></b>   Possible contract, relating to your work.  Your hard work leads to fruition.  Greater independence/freedom will come from your inner strength and courage.  Good health or recovery.",
"<b><i>The Empress:</i></b>  Low energy and possible nervous exhaustion.  Correspondence or news may provoke a change at work. ",
"<b><i>The Emperor:</i></b>  High energy and good health.  Period of progress and luck at work.  For a female seeker, a strong connection with an important man (or superior) who brings promotion or advancement.  ",
"<b><i>The Pope:</i></b>  Resurgence of good health.  At work, spiritual protection and stability.  ",
"<b><i>The Lovers:</i></b>  Possible love encounter at work.  New possibilities emerge.  Period of indecision.  Emotions lead to unstable energy. ", 
"<b><i>The Chariot:</i></b>  Travel connected with your professional life.    Period of progress or new beginning at work. Good health or improvement.",
"<b><i>The Justice:</i></b>  New equilibrium at work.  Possible business or legal settlement.  Stabilization of health dependent upon your lifestyle.  ",  
"<b><i>The Hermit:</i></b>  Period of  limited stability at work.  Luck may come from being efficient and practical.    Care needed regarding your health.  ",
"<b><i>The Wheel of Fortune:</i></b>  More independence at work.  Excellent time for creativity.  Period of progress. Good health or recovery.",
"<b><i>The Strength:</i></b>  Good health and return of energy.  Excellent time for your professional life.  Period of fulfillment.  ",
"<b><i>The Hanged Man:</i></b>  Health problems.  Tendency to neglect your responsibilities at work.  Risk of unemployment or difficulties at work.  ",
"<b><i>The Death:</i></b>  Possible hiatus at work.   End of one situation; beginning of another.  Your professional life will be transformed.  Recovery after illness.  ",  
"<b><i>The Temperance:</i></b>  Period of movement toward a new stability at work or with your health.",
"<b><i>The Devil:</i></b>  Risk of betrayal at work.  Caution needed concerning your business contacts with others.  Possible passionate love encounter relating to your work.  Medical check-up needed.",
"<b><i>The Broken House:</i></b>   Difficulties concerning your health (accident or surgery).  Risk of conflict, break-up or ending at work. ",
"<b><i>The Star:</i></b>  New possibilities ahead concerning your professional life.  Period of happiness.  Healing and recovery from  health problems.",
"<b><i>The Moon:</i></b>  Period of change at work.  Excellent time for new clientele.  Help or luck from an influential woman.  Health may show fluctuations, but results in stability.  ",     
"<b><i>The Sun:</i></b>  Health improves dramatically.  Possible promotion concerning your professional life (more freedom, independence, etc.).  You may have a new love encounter at work.  ",
"<b><i>The Judgment:</i></b>  Unexpected event or news concerning your professional life.  Excellent time for change or settlement.  Good health and improved energy.  ",
"<b><i>The World:</i></b>  Period of fulfillment concerning your professional life.  Luck from others (media, clientele, associates, etc.).  Good health and improved energy.  ",
"<b><i>The Fool:</i></b>  Risk of unemployment or trouble with a co-worker. Caution needed concerning your health. Possible burn-out.") 

var SeventhHouse=new Array("<b><i>The Magician:</i></b>  Birth or rebirth of a relationship.  Possible business partnership.  Excellent time for  new activity, clientele or contact with public.",     
"<b><i>The High Priestess:</i></b>  For the single one, union or marriage. For others; period of success concerning an activity with the public.  ",
"<b><i>The Empress:</i></b>  Proposition of partnership or relationship.  Positive news leading to contacts within a new milieu.  Excellent time for creativity.  ",
"<b><i>The Emperor:</i></b>  Important time concerning your professional and social life.  Success or help from an important man. Excellent time for acceptance of your proposals.  Diplomacy needed with influential people .",
"<b><i>The Pope:</i></b>  For the single one, marriage.  If married, period of happiness and satisfaction. Mutual agreement concerning your differences with others.  ",
"<b><i>The Lovers:</i></b>  Possible change concerning your love life.  For the single one, proposition of union or marriage.  In case of conflict, favorable time for negotiations. ", 
"<b><i>The Chariot:</i></b>  Period of popularity or success with others.  For the single one, movement or proposition of union, marriage, etc.  ",
"<b><i>The Justice:</i></b>  Risk of legal settlement or trial concerning your relationship or partnership.  Caution needed with the law.  ", 
"<b><i>The Hermit:</i></b>  For the single one, a relationship with an older person, or a delay concerning union or marriage.  If married, period of stability.  ",
"<b><i>The Wheel of Fortune:</i></b>  Movement toward union or marriage (if desired).  Period of renewal concerning your relationship.  Excellent time for any new financial activity.  ", 
"<b><i>The Strength:</i></b>  Period of fulfillment concerning your relationship.  For the single one, union or marriage. Your creative endeavors will materialize. ", 
"<b><i>The Hanged Man:</i></b>  Unfavorable time for relationship or partnership.   If married, you may suffer neglect from your mate.  Risk of  deception (business or love).",
"<b><i>The Death:</i></b>  Risk of end of  relationship (business or love) .  Possible crisis with others.",
"<b><i>The Temperance:</i></b>  For the single one, a new relationship.  If married, period of stability and happiness.  Excellent time for your social life.  Expansion of personal contacts.  ",
"<b><i>The Devil:</i></b>  Unfavorable time concerning your relationship or partnership.  Risk of betrayal, aggravation, or jealousy.  For the single one, risk of illusion concerning a new love. ", 
"<b><i>The Broken House:</i></b>  Risk of conflict, break-up, divorce, etc. (partnership or relationship).  For the single one, discord with others (associates, friends, superiors, etc.). ", 
"<b><i>The Star:</i></b>  Period of happiness with the loved one. For the single one, a new relationship.  Positive time concerning your contact with others. Popularity.  ",
"<b><i>The Moon:</i></b>  Period of expansion concerning your social life.  For the single one, a new relationship.  If married, a period of fertility.  ",
"<b><i>The Sun:</i></b>  For the married one, period of happiness.  For the single one, a new love relationship followed by union or marriage.  Excellent time for creativity, happiness, success, etc.",  
"<b><i>The Judgment:</i></b>  For the single one, an unexpected relationship.  For the married one, period of novelty.  Promotion, positive change, etc.  ",
"<b><i>The World:</i></b>  Contact with others will bring the materialization of your goals.  Period of success.  For the single one, a new relationship. ",   
"<b><i>The Fool:</i></b>  Period of instability concerning your relationship or partnership.  Risk of unexpected departure of your mate or partner.  Promises made to you may not be kept. ")

    
var EighthHouse=new Array("<b><i>The Magician:</i></b>  Period of luck concerning your financial life (credit, loan, etc.).  For a female seeker, risk of passage of a loved one.",
"<b><i>The High Priestess:</i></b>  Period of modification concerning your financial or emotional life.  Financial help from an influential woman.  Possible loss of affection.",
"<b><i>The Empress:</i></b>  Risk of trouble concerning your financial life (credit, debt, etc.).  Powerless over financial and emotional issues. ", 
"<b><i>The Emperor:</i></b>  Help or luck from an important man concerning your financial goals.  Period of financial responsibilities. ", 
"<b><i>The Pope:</i></b>  Spiritual evolution.  Protection or help concerning your financial life.  ",
"<b><i>The Lovers:</i></b>  Period of insrability or dissatisfaction concerning your love life.  Unfavorable time for or from a partner.  ",
"<b><i>The Chariot:</i></b>  Danger on the road.  Change from single-mindedness (material or spiritual).  Favorable time for spiritual matters (studying, teaching, etc.).  ",
"<b><i>The Justice:</i></b>  Possible inheritance or financial/legal settlement.  Resolution of your financial situation.  ",
"<b><i>The Hermit:</i></b>  Risk of passage of an elderly person (grandparent, uncle, etc.).  Favorable time for loan, mortgage, etc.  ",
"<b><i>The Wheel of Fortune:</i></b>  Excellent time for loan, mortgage, investment, etc.  Increase of money from your interests or from additional sources.  ",
"<b><i>The Strength:</i></b>  Your cunning and intuition will bring financial success or power over your enemies.  Excellent time for metaphysical studies and spiritual evolution.  ",
"<b><i>The Hanged Man:</i></b>  Risk of deception regarding your financial matters.  Caution needed with your mate or partner (possibility of fraud or dishonesty).  Period of fatigue or poor decision-making.",  
"<b><i>The Death:</i></b>  Inheritance.  Release of money from a previously stagnant situation.  ",
"<b><i>The Temperance:</i></b>  Financial luck from your intuition or cunning.  Excellent time for spiritual studies.",
"<b><i>The Devil:</i></b>  Intuition or cunning may bring financial success.  ",
"<b><i>The Broken House:</i></b>  Caution needed concerning your finances.  Risk of sudden loss or difficulties.  Possible surgery or accident. ", 
"<b><i>The Star:</i></b>   Love or financial problems will be alleviated. Help or support from others. ",
"<b><i>The Moon:</i></b>  Unfavorable time for family members.  Risk of health problems or worries for them.  Favorable time for real estate matters (buying, selling, etc.).  ",
"<b><i>The Sun:</i></b>  Loss of affection.  Unfavorable time for your love life.  Risk of break-up.  Favorable time for loans, investments, etc.).  ",
"<b><i>The Judgment:</i></b>  Risk of possible shake-up of your financial life.  Unexpected support given.  ",
"<b><i>The World:</i></b>  Excellent period concerning credit, funds, loans, etc.  A possible inheritance or important gift.",
"<b><i>The Fool:</i></b>  Neglectful behavior or inability to think or act clearly regarding your finances.  Risk of burn-out. ") 

var NinethHouse=new Array("<b><i>The Magician:</i></b>  Luck regarding your profession, from a distance or due to your knowledge.  Possible trip or move.  For a single woman:</i></b> love encounter during a trip or with a foreigner.  Excellent time for your finals, contest, etc.  ",
"<b><i>The High Priestess:</i></b>  For a single man love encounter during a trip or with a foreigner.  For a single seeker, marriage or union, if desired.   Possible trip or voyage.",
"<b><i>The Empress:</i></b>  News  or correspondence from a distance.  Improvement of skills through study, classes, etc.   ",
"<b><i>The Emperor:</i></b>  Excellent time for your contacts from a distance concerning your goals.  For a single woman, possible marriage or union.  ",
"<b><i>The Pope:</i></b>  Spiritual evolution through knowledge or study.  Contacts with others are favorable and harmonious.  ",
"<b><i>The Lovers:</i></b>  Possible love encounter with a foreigner or from a distance.  For the single one, a new relationship.  Honeymoon.  Marriage or union.  Period of happiness.  ",
"<b><i>The Chariot:</i></b>  Trip or voyage.  Luck from a distance.  Excellent time for the media, publicity, etc.  ",
"<b><i>The Justice:</i></b>  New stability.  End of disagreement or legal matter/trial.  ",
"<b><i>The Hermit:</i></b>  Favorable time for teaching, learning or research.  Period of delay concerning a trip.  ",
"<b><i>The Wheel of Fortune:</i></b>  Luck from a distance. Period of movement or renewal.  A new beginning for education, study, or desire (business or love).  ",
"<b><i>The Strength:</i></b>  For the single one, relationship from a distance or with a foreigner.  Favorable time for a settlement, research, study, etc.",
"<b><i>The Hanged Man:</i></b>  Contact with others (most often, from a distance) will not bring the expected results.  Period of confusion concerning your goals.  Risk of mental exhaustion.  Misfortune during a trip. ", 
"<b><i>The Death:</i></b>  Ideas or emotions may be completely modified.  Unexpected news from a distance (risk of fatality, loss of contract or break-up). ",
"<b><i>The Temperance:</i></b>  Possible trip or voyage.  Favorable time for a new contact, intellectual evolution, research, or study.   ",
"<b><i>The Devil:</i></b>  Possible passionate love from a distance or with a foreigner.  Favorable time for discovery or research.  ",
"<b><i>The Broken House:</i></b>  Risk of difficulties with the law.  Possible trial.  Unfavorable time for relationships with others or travelling.     ",
"<b><i>The Star:</i></b>  Luck from a distance. Possible trip.  Excellent time for marriage or remarriage, if  desired.  For the single one, a new love encounter during a trip or from a distance.",
"<b><i>The Moon:</i></b>  Favorable time for travelling.  Period of popularity.  Increase of clientele.",
"<b><i>The Sun:</i></b>  Love encounter during a trip or voyage, followed by union or marriage.  Excellent time for study, research, or personal interests.  ",
"<b><i>The Judgment:</i></b>  Unexpected trip or voyage.  Favorable time for creativity, new techniques, studying, or spiritual development.   ",
"<b><i>The World:</i></b>  Success from others (media, clientele, associates, co-workers, etc.).   Possible trip or voyage.   ",
"<b><i>The Fool:</i></b>  Poor judgment.  Risk of failure concerning your studies (most often due to lack of effort).  Misfortune during a trip or voyage. ")

var TenthHouse=new Array("<b><i>The Magician:</i></b>  Important period ahead.  For a female seeker, a new relationship (business or love).  Positive events may come quickly in your life.  ",
"<b><i>The High Priestess:</i></b>  For a male seeker, a new relationship (business or love).   Possible promotion or access to higher responsibilities.  Excellent time for a business project or contract.",  
"<b><i>The Empress:</i></b>  Period of stability concerning your professional life, but  projects may be delayed.  A letter may enable you to attain your goals.",
"<b><i>The Emperor:</i></b>  Period of advancement.  Possible promotion.  Luck from an important man.  For a single woman, a new relationship. ",
"<b><i>The Pope:</i></b>  Spiritual protection.  Healing energy or end of an illness.  Stability concerning your  professional life.  ",
"<b><i>The Lovers:</i></b>  New possibilities ahead (business or love).  Possible change at work.  For the single one, a new relationship.",
"<b><i>The Chariot:</i></b>  Period of progress, success and popularity.  You have the Midas touch!",
"<b><i>The Justice:</i></b>  Possible legal settlement (positive or negative).  Luck will come from honesty.  Difficulties acquiring independence and freedom.",    
"<b><i>The Hermit:</i></b>  Time is on your side.  Slow, but important, results concerning your professional life.",
"<b><i>The Wheel of Fortune:</i></b>  Period of movement.  Important events may come quickly.  ",
"<b><i>The Strength:</i></b>  Period of fulfillment.  Luck from your efforts.  For the single one, a new relationship.",
"<b><i>The Hanged Man:</i></b>  Period of disillusion.  Risk of loss or reversal.  Difficulties from family or professional life.  ",
"<b><i>The Death:</i></b>  Period of change.  End of one situation and the beginning of another (business or love).   ",
"<b><i>The Temperance:</i></b>  Period of slow progress, but with improvement regarding your professional goal. d.",
"<b><i>The Devil:</i></b>  Possible relationship, with risk of illusion.  Caution needed concerning a project or your professional life.  Chance of betrayal.",
"<b><i>The Broken House:</i></b>  Risk of conflict or radical change (divorce, break-up, loss of employment, etc.).",
"<b><i>The Star:</i></b>  Period of luck and improvement.  Excellent time for contacts with others, with help or luck from them.  ",
"<b><i>The Moon:</i></b>  Period of fertility.  Excellent time for new clientele.  Luck from a significant woman.",
"<b><i>The Sun:</i></b>  Excellent period ahead.  New love encounter.   Luck concerning your professional life, creations or goals.",
"<b><i>The Judgment:</i></b>  Unexpected change for the better.  Sudden and positive news ahead.  Excellent time for a settlement.  ",
"<b><i>The World:</i></b>  Great fulfillment!  Luck from others (media, clientele, associates, friends, etc.).  ",
"<b><i>The Fool:</i></b>  Period of instability.  Risk of betrayal or abandonment.  Caution needed concerning your contacts with others.  Promises may not be kept.  ")

var EleventhHouse=new Array("<b><i>The Magician:</i></b>  Social success.  Help or luck from your circle of friends.",
"<b><i>The High Priestess:</i></b>  Excellent time for new clientele or project.  Help or luck from your circle of friends.",
"<b><i>The Empress:</i></b>  Renewal of your social life.  Possible travel to/from friends.  ",
"<b><i>The Emperor:</i></b>  Help or luck from a man in your surroundings.  Favorable time concerning your social life.  Power over others.",
"<b><i>The Pope:</i></b>  Metaphysical interests due to your spiritual friends.  Possible marriage or union for one of your children.",  
"<b><i>The Lovers:</i></b>  Period of popularity and social success.  A friendship may develop into a love relationship.  ",
"<b><i>The Chariot:</i></b>  You find the right person at the right time.  Excellent period for a project with others. Luck from friends. ",
"<b><i>The Justice:</i></b>  Help or support from friends.  ",
"<b><i>The Hermit:</i></b>  Restriction concerning your social life.  Few, but important friends.  ",
"<b><i>The Wheel of Fortune:</i></b>  Period of change and luck through your friends and social life.   Excellent time for your project.",
"<b><i>The Strength:</i></b>  Luck or fulfillment from friends.  Excellent time for your project.  Possibility of a love relationship with someone from your surroundings.  ",
"<b><i>The Hanged Man:</i></b>  Period of deception or disappointment from friends.  Risk of betrayal.  Caution needed concerning your projects and contacts with others.",
"<b><i>The Death:</i></b>  Period of change concerning your social life.  Luck from new contacts. Risk of break-up regarding your friends or projects.  ",
"<b><i>The Temperance:</i></b>  Improved social life.  Respect and luck from friends.  Your projects will be realized due to the altruism of others. ",
"<b><i>The Devil:</i></b>  Disloyalty from friends.  Risk of betrayal.  Caution needed concerning your projects.  ",
"<b><i>The Broken House:</i></b>  Break-up or conflict with friends.  Risk of collapse concerning projects.",
"<b><i>The Star:</i></b>  Period of happiness concerning your social life.  Period of popularity and respect.",
"<b><i>The Moon:</i></b>  New female friends.  Help or luck from a woman in your surroundings concerning your project.",
"<b><i>The Sun:</i></b>  Important help from friends.  Fulfillment of your projects.  For a female seeker, a friendship may turn into a love relationship.",  
"<b><i>The Judgment:</i></b>  Unexpected change concerning your social life.  Sudden luck concerning your projects.",
"<b><i>The World:</i></b>  Significant help from friends.  Protection.  Accomplishment of your goals.  Your social life will bring increased satisfaction.",
"<b><i>The Fool:</i></b>  Many untrue friends.  Your projects may not manifest. ") 

var TwelfthHouse=new Array("<b><i>The Magician:</i></b>  Risk of stress or burn-out  relating to your professional life.", 
"<b><i>The High Priestess:</i></b>  Possible difficulty concerning a contract or your business goal.  For a female seeker, risk of problems concerning female organs. ", 
"<b><i>The Empress:</i></b>  Numerous insignificant problems.  Stress.  ",
"<b><i>The Emperor:</i></b>  Significant enemy.  Difficulties with a superior.  ",
"<b><i>The Pope:</i></b>  Protection concerning your ordeals and health.  ",
"<b><i>The Lovers:</i></b>  Possible secret love or risk of emotional ordeals. ", 
"<b><i>The Chariot:</i></b>  Period of delay concerning your desire or goal.  Protection regarding your health. ", 
"<b><i>The Justice:</i></b>  Risk of difficulties or trouble with the law.  Possible cure or surgery concerning your health. . ", 
"<b><i>The Hermit:</i></b>  Difficulties with a tendency to last.  Effort, time and patience will be necessary.",
"<b><i>The Wheel of Fortune:</i></b>   End of your difficulties.  New beginning.  ",
"<b><i>The Strength:</i></b>  Power or protection over the difficulties (business, love or health). ",  
"<b><i>The Hanged Man:</i></b>  Risk of burn-out or depression.  Effort needed to reset your goal and get back on your feet.   ",
"<b><i>The Death:</i></b>  End of your difficulties.  Employment hiatus (most often, for health problems).",
"<b><i>The Temperance:</i></b>  Time and patience will be necessary concerning your goal or desire. Difficulties will fade away with time.  ",
"<b><i>The Devil:</i></b>  Possible secret love affair.  Risk of trouble from jealousy or passion. Caution needed regarding your health.  ",
"<b><i>The Broken House:</i></b>  Risk of accident or injury.  Danger concerning your health or professional life. ",
"<b><i>The Star:</i></b>  For a male seeker, risk of illness for his mate.  For the seeker (male or female), minor emotional ordeals.  For a single man: possibility of a secret love or difficulties to legalizing a relationship.",       
"<b><i>The Moon:</i></b>  Risk of difficulties at home, from your family or circle of friends. ",
"<b><i>The Sun:</i></b>  For the female seeker, risk of illness for her mate.  For the seeker (male or female), minor emotional ordeals.   For a single woman: possibility of a secret love or difficulties to legalizing a relationship.",
"<b><i>The Judgment:</i></b>  Risk of unexpected difficulties (business or health).  Possible sudden change.  Protection, intuition, and spiritual development.",  
"<b><i>The World:</i></b>  Luck and protection regarding your health or ordeals.  ",
"<b><i>The Fool:</i></b>  Risk of trouble (business, love or health) due to neglect or from your impulsive behavior.  Unstable health.  Necessity for structure and order to stabilize your life.")

CurrPile=1;
Dragging=false;
InitLeft=0;
InitTop=0;
InitElleft=0;
InitElTop=0;
SourceI=0;
SourceCard=0;
TargetCard=0;
cards2drag=0;
BaseCard='';
NumDeals=0;
CurrDeal=0;
CompletionURL='';
UndoOK=false;
UndoSrc=0;
UndoTgt=0;
InUndo=false;
SaveNumDeals=0;
results=''
var l = '' 
issame=''
c1=''
c2=''
c3=''
c4=''
c5=''
c6=''
c7=''
c8=''
c9=''
c10=''
c11=''
c12=''
var testit = 1

//Global Arrays
aPiles=new Array();
aPileNames=new Array();
aBehaviours=new Array();
aBuild=new Array();
aGroup=new Array();
aDrag=new Array();
aAutoTgt=new Array();
aMaxLength=new Array();
aUndoSrc=new Array();
aUndoTgt=new Array();

//Global Event Handlers
document.onmousedown=DragStart;
document.onmouseup=DragEnd;
document.onmousemove=DoDrag;
document.onclick=DoClick;
document.ondblclick=AutoTarget;
document.onkeydown=DoCommand;
document.onhelp=DefHelp;

function DefHelp(){
event.returnValue=false;
showHelp('solhelp.htm');
}


function DoCommand(){
CommandKey=event.keyCode;
switch(CommandKey){
	case 85:DoUndo();break;// U for Undo
	case 77:
 	   if(confirm('Change game mode to '+(NumDeals==-1?'TOURNAMENT?':'PRACTICE?')))	
           {NumDeals==-1?NumDeals=SaveNumDeals:NumDeals=-1;break;}
            //M to switch between practice and tourney modes
	}
}

function SaveUndo(thesrc,thetgt,inDrag){
setTimeout("InUndo=false",50);
UndoSrc=thesrc;UndoTgt=thetgt;
aUndoSrc.length=0;aUndoTgt.length=0;
for(q=0;q<aPiles[thesrc].length;q++)
   aUndoSrc[q]=aPiles[thesrc][q];
if(inDrag){
   	for(q=0;q<aDrag.length;q++)
		aUndoSrc[aUndoSrc.length]=aDrag[q];
	}
for(q=0;q<aPiles[thetgt].length;q++)
   aUndoTgt[q]=aPiles[thetgt][q];
UndoOK=true;
}

function DoUndo(){
if(!UndoOK) return;
aPiles[UndoSrc].length=0;aPiles[UndoTgt].length=0;
for(i=0;i<aUndoSrc.length;i++)
   aPiles[UndoSrc][i]=aUndoSrc[i];
for(i=0;i<aUndoTgt.length;i++)
  aPiles[UndoTgt][i]=aUndoTgt[i];
PaintCards(UndoSrc);PaintCards(UndoTgt);
UndoOK=false;
}


function Check4Completion(){
//Default completion handler - Game over when all foundations have reached their Maxlength
GameComplete=true;
for(i=0;i<aPileNames.length;i++){
	if(aPileNames[i].substr(0,1)=='F'){ //Foundation


            if(!(aPiles[i].length==aMaxLength[i])) GameComplete=false;
		}
	
//**************************
//alert("ziad is here")  
//DoEffect();
//deadend
//************************

}

//alert("c9   {" +c9+ "}")

//if(c1 !== ''){DoEffect();}
//if(c2 !== ''){DoEffect();}
//if(c3 !== ''){DoEffect();}
//if(c4 !== ''){DoEffect();}
//if(c5 !== ''){DoEffect();}
//if(c6 !== ''){DoEffect();}
//if(c7 !== ''){DoEffect();}
//if(c8 !== ''){DoEffect();}
//if(c9 !== ''){DoEffect();}
//if(c10 !== ''){DoEffect();}
//if(c11 !== ''){DoEffect();}
//if(c12 !== ''){DoEffect();}



//if(GameComplete){location.href=CompletionURL;}

}





//Turn card up if down
function AutoFlip(fpile){
FlipCard=(aPiles[SourceI].length>0)?aPiles[fpile][aPiles[fpile].length-1]:"";
if(FlipCard.length==2)      /// changed to 1 from 2  hms
	aPiles[fpile][aPiles[fpile].length-1]=FlipCard+"U";
//*************hms
//testit = testit+1
					
//*****

//alert(TargetI+" | "+ testit+"  "+)

					//****
}

function AutoTarget(){
el=event.srcElement;
if(!(el.tagName=='IMG')){return}
clickdiv=el.parentElement.id.substr(1);
if(clickdiv==0) return; //Deck does not support AutoTargeting
if(!(aAutoTgt[clickdiv].charAt(0)=='Y')) return;//not an Autotgt source

AutoCard=aPiles[SourceI][SourceCard];
if(AutoCard.length<3) return; //Face Down Card // changed to 4 from 3 hms

//Cycle through AutoTgt targets to see which can accomodate the AutoCard
for(i=1;i<aAutoTgt.length;i++){
	if(aAutoTgt[i].charAt(1)=='Y'){ //Valid AutoTgt target
		if(i==SourceI) continue; //Target should not be same as source
		TargetI=i;
		//TargetCard=aPiles[TargetI][aPiles[TargetI].length-1]
		if(IsValidTarget()){//Move Autocard to target
			SaveUndo(SourceI,TargetI,false);
			aPiles[i][aPiles[i].length]=aPiles[SourceI][aPiles[SourceI].length-1];
			aPiles[SourceI].length--;
			FlipCard=(aPiles[SourceI].length>0)?aPiles[SourceI][aPiles[SourceI].length-1]:"";
			if(FlipCard.length==2)
  				aPiles[SourceI][aPiles[SourceI].length-1]=FlipCard+"U";
			PaintCards(i);PaintCards(SourceI);
			Check4Completion();
			break;
			}
		
		}
	}


}

function DoClick(){
el=event.srcElement;
if(!(el.tagName=='IMG')){return}
clickdiv=el.parentElement.id.substr(1);

if(event.shiftKey){ //Cheat key support
  // alert(aPiles[clickdiv].join("\n"))
   }
else{
   if((clickdiv==0)&&(aPiles[0].length>0)&&(aPiles[0][0].substr(2,1)=='')){//clicked on Face-down Deck
      if(!(aAutoTgt[0]=='')){ //If deck has AutoDealing
		for(i=0;i<aPileNames.length;i++){
                  	if(aPileNames[i]==aAutoTgt[0]){ //found target
				//Undo Support
				SaveUndo(0,i,false);
                        	//Transfer card, turning face up
                        	for(j=1;(j<=aMaxLength[0])&&(aPiles[0].length>0);j++){
					aPiles[i][aPiles[i].length]=aPiles[0][aPiles[0].length-1]+'U';
         				aPiles[0].length--;
                        	PaintCards(0);PaintCards(i);
					

					}
				}
			}
               }
       }
    else{
    //Redeal support-only for single waste pile
    if((clickdiv==0)&&(aPiles[0].length==0)&&!(NumDeals==CurrDeal)){
      CurrDeal++;
      //First find the waste pile
      wp=-1;
      for(i=0;i<aPileNames.length;i++)
          {if(aPileNames[i]==aAutoTgt[0]){wp=i}}
      if(wp>0){
		SaveUndo(wp,0,false);
		//Transfer cards from Waste to Deck
		for(i=0;i<aPiles[wp].length;i++){
                  aPiles[0][i]=aPiles[wp][aPiles[wp].length-i-1].substr(0,2);
 			}
            aPiles[wp].length=0;
            PaintCards(0);PaintCards(wp);
		



}
	}
	}
    
   
    }


}

function IsValidSource(){
retval=true;
tmpRank=aGroup[SourceI].substr(0,1);
tmpSuit=aGroup[SourceI].substr(1,1);
//Check if group movement allowed 
if((tmpRank==NONE)||(tmpSuit==NONE)){
   if(aPiles[SourceI].length==SourceCard+1)//Single card movement
    	{return true}
   else
	{return false} 
   }
if((tmpRank=='')||(tmpSuit=='')){return false}

//CurrCard=aPiles[SourceI][SourceCard].substr(0,2);
for(i=SourceCard+1;i<aPiles[SourceI].length;i++){
	ar=GetAllowableRanks(aPiles[SourceI][i-1].substr(0,1),tmpRank);
      if(ar.lastIndexOf(aPiles[SourceI][i].substr(0,1))<0){return false};
      as=GetAllowableSuits(aPiles[SourceI][i-1].substr(1,1),tmpSuit);
      if(as.lastIndexOf(aPiles[SourceI][i].substr(1,1))<0){return false};
	
	}

return retval;
}

function GetAllowableRanks(tgtrank,piledir,pilelast){
retstr='';
tmpRankStr=RANKS.join('');
if(piledir==ANY){return tmpRankStr}
if(tgtrank==pilelast){return ''}
tmpTgtPos=tmpRankStr.lastIndexOf(tgtrank);
if((piledir==UP)||(piledir==BOTH)){
	retstr+=(tmpTgtPos==tmpRankStr.length-1)?tmpRankStr.charAt(0):tmpRankStr.charAt(tmpTgtPos+1);
    	}
if((piledir==DOWN)||(piledir==BOTH)){
	retstr+=(tmpTgtPos==0)?tmpRankStr.charAt(tmpRankStr.length-1):tmpRankStr.charAt(tmpTgtPos-1);
    	}
return retstr;
}

function GetAllowableSuits(tgtsuit,pilemode){
retstr='';
if(pilemode==SUIT){return tgtsuit}
if(pilemode==ANY){return 'HDCS'}
if(pilemode==COLOR){
   if((tgtsuit=='H')||(tgtsuit=='D')){return 'HD'}
   else{return 'CS'}
   }
if(pilemode==ALTCOLOR){
   if((tgtsuit=='H')||(tgtsuit=='D')){return 'CS'}
   else{return 'HD'}
   }
return '';
}

function IsValidTarget(){
if(TargetI<=0){return false}
tmpBase=aBuild[TargetI].substr(0,1);
tmpDir=aBuild[TargetI].substr(1,1);
tmpMode=aBuild[TargetI].substr(2,1);
tmpLast=aBuild[TargetI].substr(3,1);
srcSuit=aDrag[0].substr(1,1);
srcRank=aDrag[0].substr(0,1);

//******HMSTargetCard**************************************************%%%%%%%%%%%%%%%%%%%%%%%%%***
//alert(TargetCard+TargetI + srcRank+ dgif)

//if(testit == 0){return false}
//else{it = testit+1}

//alert(TargetI)

//************************************************************************
ValTgt=true;
//If Target Pile is packed, Targetcard will not hold right value
if(aBehaviours[TargetI].substr(0,1)==PACKED)
   {TargetCard=aPiles[TargetI].length-1}

//Check for violations of MaxLength and Grouping Rules
if(aMaxLength[TargetI]>0){
	if(aPiles[TargetI].length+aDrag.length>aMaxLength[TargetI])
		 {return false;}
	}
if(cards2drag>1){
      grpRank=aGroup[TargetI].substr(0,1);
      grpSuit=aGroup[TargetI].substr(1,1);
	if((grpRank=='')||(grpSuit=='')||(grpRank==NONE)||(grpSuit==NONE))
           {return false}
	}








//Check if Target Pile is empty-apply empty rule
if(aPiles[TargetI].length==0){
   //if  Empty, Piles are not allowed to be filled...
   if(tmpBase==NONE){return false}
   if(tmpBase==ANY){return true}
   if(tmpBase==FIXED){
      if(BaseCard==''){BaseCard=srcRank;return true;}
      else{return srcRank==BaseCard?true:false} 
	}
   //Not NONE, ANY or FIXED
   if(!(srcRank==tmpBase)){return false}
   }
else {//Target Pile not empty - apply build rule
     //Dont allow build on face down cards
    if(aPiles[TargetI][TargetCard].substr(2,1)==''){return false}

    tgtSuit=aPiles[TargetI][TargetCard].substr(1,1);
    tgtRank=aPiles[TargetI][TargetCard].substr(0,1);

   
   ar=GetAllowableRanks(tgtRank,tmpDir,tmpLast);
   if(ar.lastIndexOf(srcRank)<0){return false};
   as=GetAllowableSuits(tgtSuit,tmpMode);
   if(as.lastIndexOf(srcSuit)<0){return false};

   }


//******************DD


return ValTgt;




}

function DragStart(){
if((event.button==2)&&(NumDeals==-1)){
	clickdiv=event.srcElement.parentElement.id.substr(1);
	if (aPiles[clickdiv])
	   //   alert(aPiles[clickdiv].join("\n"));
	return;
	}
   
el=event.srcElement;
//Ignore event if el is not an image
//Note-don't use any images in doc apart from card imgs
if(!(el.tagName=='IMG')){return}

//Get SourceI - index of card to move
pel=el.parentElement;
SourceI=parseInt(pel.id.substr(1));
if(aBehaviours[SourceI].substr(0,1)=='V')
   {SourceCard=el.offsetTop/FANV;}
if(aBehaviours[SourceI].substr(0,1)=='H')
   {SourceCard=el.offsetLeft/FANH;}
if(aBehaviours[SourceI].substr(0,1)=='P')
   {SourceCard=aPiles[parseInt(pel.id.substr(1))].length-1;}

cards2drag=1;

if(el.draggable){
    if(!IsValidSource()){return;}

    InitLeft=event.clientX;
    InitTop=event.clientY;
    Dragging=true;
    //Align the floating DIV
    floater.style.pixelTop=el.style.pixelTop+el.parentElement.style.pixelTop;
    InitEltop=floater.style.pixelTop;
    floater.style.pixelLeft=el.style.pixelLeft+el.parentElement.style.pixelLeft;
    InitElleft=floater.style.pixelLeft;
    //Get Source elements image
    floater.children[0].src=el.src;
    floater.children[0].style.visibility='visible';
    el.style.visibility='hidden';
    //Get how may cards to move
    chels=el.parentElement.children;
    for(i=1;i<chels.length;i++){
      if((i>SourceCard)&&(!(chels[i].style.visibility=='hidden'))){
	    floater.children[cards2drag].src=chels[i].src;
	    floater.children[cards2drag].style.visibility='visible';
		//chels visibility
          chels[i].style.visibility='hidden';    
	    cards2drag++;
          }
      }
    //Finally move cards to temporary aDrag array
    for(i=0;i<cards2drag;i++)
	  aDrag[i]=aPiles[SourceI][SourceCard+i]
    aDrag.length=cards2drag;	     
    aPiles[SourceI].length-=cards2drag;    
    PaintCards(SourceI);        

    }
else //Not Draggable
  {cards2drag=0;}

}

function DragEnd(){
if(!Dragging){return;}
Dragging=false;
InitTop=0;
InitLeft=0;
InitEltop=0;
InitElleft=0;
for(i=0;i<floater.children.length;i++)
  {floater.children[i].style.visibility='hidden';}
if(cards2drag==0){return}
//Detect target
InsideArea=0;
TargetI=-1;

ftop=floater.style.pixelTop;
fleft=floater.style.pixelLeft;
for(i=0;i<zone.children.length;i++){
     LastVisCard=0;
     for(j=0;j<zone.children[i].children.length;j++)
       {if(!(zone.children[i].children[j].style.visibility=='hidden')){LastVisCard=j}}
    TopElem=zone.children[i].children[LastVisCard];
    tmpleft=zone.children[i].style.pixelLeft+TopElem.offsetLeft;
    tmptop=zone.children[i].style.pixelTop+TopElem.offsetTop;
    //Thanks to Stanley Rajasingh for this algorithm
    hOverlap=CWIDTH-Math.abs(fleft-tmpleft);
    vOverlap=CHEIGHT-Math.abs(ftop-tmptop); 
    if((hOverlap>0)&&(vOverlap>0)){
       tmpArea=hOverlap*vOverlap;
       if(tmpArea>InsideArea){InsideArea=tmpArea;TargetI=i;TargetCard=LastVisCard}
       } 

    }

// alert(SourceCard)

if(!IsValidTarget()){
    tmpTargetLength=aPiles[SourceI].length;
    for(i=0;i<cards2drag;i++){
      aPiles[SourceI].length++;
      aPiles[SourceI][tmpTargetLength]=aDrag[i];
      tmpTargetLength++;
	}
    
    PaintCards(SourceI);

   }
else{ //Valid move--Transfer cards
    InUndo=true;
    SaveUndo(SourceI,TargetI,true);
    tmpTargetLength=aPiles[TargetI].length;
    for(i=0;i<cards2drag;i++){
      aPiles[TargetI].length++;
      aPiles[TargetI][tmpTargetLength]=aDrag[i];
      tmpTargetLength++;
	}
    
    PaintCards(TargetI);
    AutoFlip(SourceI);
    PaintCards(SourceI);
    
    }

Check4Completion();

//alert(aPiles[SourceI].join(","))
//alert(aPiles[TargetI].join(","))

//*******************HMS Capture card values****************zxc
 
var y = aPiles[TargetI]
var x = TargetI
var z =aPiles[TargetI].join(",")
var t = z.substr(2)
var m = z.substr(0,1)
var stat = x
var value = ''

if(t=="U" && m != issame){;
l += m;
//c1=l.substring(0,1);
//c2=l.substring(1,2);
//c3=l.substring(2,3);
//c4=l.substring(3,4);
//c5=l.substring(4,5);
//c6=l.substring(5,6);
//c7=l.substring(6,7);
//c8=l.substring(7,8);
//c9=l.substring(8,9);
//c10=l.substring(9,10);
//c11=l.substring(10,11);
//c12=l.substring(11,12);



//alert(x+m+"-c1---"+ c1+"-c2---"+ c2)


if (x==1) {c1=m;DoEffect()}
else{
	if (x==2) {c2=m;DoEffect()}
	else{
		if (x==3) {c3=m;DoEffect()}
		else{
			if (x==4) {c4=m;DoEffect()}
			else{
				if (x==5) {c5=m;DoEffect()}
				else{
					if (x==6) {c6=m;DoEffect()}
					else{
						if (x==7) {c7=m;DoEffect()}
						else{
							if (x==8) {c8=m;DoEffect()}
							else{
								if (x==9) {c9=m;DoEffect()}
								else{
									if (x==10) {c10=m;DoEffect()}
									else{
										if (x==11) {c11=m;DoEffect()}
										else{
											if (x==12) {c12=m;DoEffect()}
										}	
									}
								}
							}
						}
					}
				}
			}
		}			
	}
}


results = l.indexOf(m);
//alert('l->'+l+' targetI->'+TargetI+' issame->' + issame+' results->'+results +'-c1-->'+c1+ '-c2-->'+c2+'-c3-->'+c3+'-c4-->'+c4');
//alert('-c1-->'+c1+ '-c2-->'+c2+'-c3-->'+c3+'-c4-->'+c4)

issame = m;

//if(c3 == ''){}

}


}



//if(TargetI) == 3){results='Fucked Up';}
//alert('I say it is '+ results)


function DoDrag(){
if(Dragging){
  floater.style.pixelLeft=event.clientX+InitElleft-InitLeft;
  floater.style.pixelTop=event.clientY+InitEltop-InitTop;
  return false;
  }

}

//The most horrible example of spaghetti coding :-) 
function PaintCards(pileno){
ImgStr="";
TargetDiv=eval("document.all.P"+pileno);
pilelength=aPiles[pileno].length;
numimages=TargetDiv.children.length;
freeimages=0;
pilestruct=aBehaviours[pileno].substr(0,1);
//alert(pilelength)
//***********Paint proc for packed piles (1 image)
if(pilestruct=='P'){ 
    TargetDiv.children[0].style.visibility='visible';
    //************* Which card to paint
    //if pile is Empty paint suitable marker 
    if(pilelength==0) //No cards in pile
       {TargetDiv.children[0].src="cards\\"+aBehaviours[pileno].substr(1)+".gif";  ///hms1
        TargetDiv.children[0].draggable=false; }
    else { //Pile not empty - paint top card(Last card in Array)
         if(aPiles[pileno][pilelength-1].substr(2)=='U')//Card faces up
		{TargetDiv.children[0].src="cards\\"+aPiles[pileno][pilelength-1].substr(0,2)+".gif"
		 TargetDiv.children[0].draggable=true;
             }	
         else //Card faces down   //HMS
	      {TargetDiv.children[0].src="cards\\b.gif";
             TargetDiv.children[0].draggable=true;}

	   }
    }

//*************Paint proc for fanned piles(indeterminate images)
else{
    //**PART I**********Adjust length of pile********************
    //***First find no of free and used images
    for(i=0;i<numimages;i++){
	if(TargetDiv.children[i].style.visibility=='hidden'){freeimages++;}
	} 
    usedimages=TargetDiv.children.length-freeimages; 
    //alert(freeimages+","+usedimages+","+pilelength)
    //***If Pile Length has increased
    if(pilelength>usedimages){
	//***Use available images, if any
      for(i=usedimages;i<TargetDiv.children.length;i++)
	   {TargetDiv.children[i].style.visibility='';if(i==pilelength-1){break}}
      //***Create new images
      if(pilelength>TargetDiv.children.length){
          for(i=TargetDiv.children.length;i<pilelength;i++){
		if(pilestruct=='V'){ImgStr+="<IMG style='position:absolute;top:"+FANV*i+"' WIDTH='"+CWIDTH+"' HEIGHT='"+CHEIGHT+"' SRC='cards\\b.gif'>"}
            else{ImgStr+="<IMG style='position:absolute;left:"+FANH*i+"' WIDTH='"+CWIDTH+"' HEIGHT='"+CHEIGHT+"' SRC='cards\\b.gif'>"}

		}
          TargetDiv.innerHTML+=ImgStr;
          }
	}
    //***If Pile Length has decreased
    else{
	  //***Hide images
        
	  for(i=pilelength;i<usedimages;i++)
   		{TargetDiv.children[i].style.visibility='hidden';}
	  }
    //**PART II**********Draw Cards****************************
    //***Draw suitable marker if pile empty
    if(pilelength==0){
        TargetDiv.children[0].src="cards\\"+aBehaviours[pileno].substr(1)+".gif";TargetDiv.children[0].style.visibility='visible';
        TargetDiv.children[0].draggable=false;}
    //***Draw appropriate card 
    for(i=0;i<pilelength;i++){
	if(aPiles[pileno][i].substr(2)=='U'){ //***Face Up
	     TargetDiv.children[i].src="cards\\"+aPiles[pileno][i].substr(0,2)+".gif";
	     TargetDiv.children[i].draggable=true;
           }
	  else{ //***Face Down
	     TargetDiv.children[i].src="cards\\b.gif";
	     TargetDiv.children[i].draggable=false;
		}

        }		
    }
}


function BuildPile(ddown,dup){
aPiles[CurrPile]=new Array();
ddown=parseInt(ddown);
dup=parseInt(dup);
i=0;
//***Deal Cards
while(i<ddown){
  aPiles[CurrPile][i]=aPiles[0][aPiles[0].length-1];
  aPiles[0].length--;i++;  
  }

while(i<(ddown+dup)){
  aPiles[CurrPile][i]=aPiles[0][aPiles[0].length-1]+"U";
  aPiles[0].length--;i++;  
  }
CurrPile++;
}


function BuildStock(stocktype){
StockIndex=0;
StartRank=0;
aPiles[0]=new Array();
//Provision for German Deck
if((stocktype==3)||(stocktype==4)){
  StartRank=6;
  }

// HMS ///Numbor of cards to random 22
for(i=0;i<1;i++){
   for(j=StartRank;j<22;j++){
      aPiles[0][StockIndex]=RANKS[j]+SUITS[i];
	StockIndex++;
      if((stocktype%2)==0){
         aPiles[0][StockIndex]=RANKS[j]+SUITS[i];
	   StockIndex++;
	   }
      }
   }



//Shuffle
DeckLen=aPiles[0].length;
for(i=0;i<DeckLen;i++){
  j=(Math.random()*100)%(DeckLen-1);
  j=(Math.round(j));
  temp=aPiles[0][i];
  aPiles[0][i]=aPiles[0][j];
  aPiles[0][j]=temp;
  }

}


//Read Game Data File and Initialize Game Layout

function LoadGame(){ 

LayoutStr="";
while(!Rules.recordset.EOF){
    divID=Rules.recordset.absolutePosition-1; 
    divX=Rules.recordset.Fields("PosX").value;
    divY=Rules.recordset.Fields("PosY").value;
    dtype=Rules.recordset.Fields("Type").value;
    ddown=Rules.recordset.Fields("DealDn").value;
    dup=Rules.recordset.Fields("DealUp").value;
    dstruct=Rules.recordset.Fields("Structure").value;
    dgif=Rules.recordset.Fields("EmptyGIF").value;


    aBehaviours[divID]=dstruct+dgif;
    aBuild[divID]=Rules.recordset.Fields("Build").value;
    aGroup[divID]=Rules.recordset.Fields("Grp").value;
    aAutoTgt[divID]=Rules.recordset.Fields("AutoTgt").value;
    aMaxLength[divID]=Rules.recordset.Fields("MaxLength").value;
    aPileNames[divID]=dtype;
		
    if(dtype=="D"){ //***Deck
	//***Build the deck based on deck type in DealDn field
	//***Deck type 1=Std Single,2=Std Double, 3=German Sing, 4=German Dbl
      BuildStock(ddown);
      NumDeals=1;SaveNumDeals=dup;
      CompletionURL=Rules.recordset.Fields("Build").value;
      }
    else{ //***Foundation or Pile
      //***Load the cards into F or P using DealUp and DealDn info
      BuildPile(ddown,dup);
	}
    LayoutStr+="<DIV ID='P"+divID+"' style='position:absolute;left:"+divX+";top:"+divY+"'>"+
    "<IMG style='position:absolute;zorder:0' WIDTH='"+CWIDTH+"' HEIGHT='"+CHEIGHT+"' SRC='cards\\trans.gif'>"+"</DIV>";
     //Src needs to be set because of a bug in IE4 which prevents dynamically
	//setting the source if original source is not provided.
    Rules.recordset.MoveNext();	
    }


if(document.HasSpecialDeal){DoSpecialDeal()};
zone.innerHTML=LayoutStr;
numpiles=Rules.recordset.recordCount;
for(i=0;i<numpiles;i++)
 {setTimeout("PaintCards("+i+");",10);}
 //{PaintCards(i);}//bug-wont work
//****Populate the Floating Div
LayoutStr="";
for(i=0;i<FLOATIMGS;i++)
   {LayoutStr+="<IMG style='position:absolute;visibility:hidden;top:"+FANV*i+"' WIDTH='"+CWIDTH+"' HEIGHT='"+CHEIGHT+"' SRC='cards\\trans.gif'>"}
floater.innerHTML=LayoutStr;
}

function DoEffect(){
//a place for get card values from conn ///hms


//See what the user has chosen for Position 1;

//alert(Nineth.children[0].innerHTML)

if(TargetI==1){
if(c1=="A") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[0];
if(c1=="B") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[1];
if(c1=="C") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[2];
if(c1=="D") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[3];
if(c1=="E") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[4];
if(c1=="F") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[5];
if(c1=="G") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[6];
if(c1=="H") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[7];
if(c1=="I") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[8];
if(c1=="J") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[9];
if(c1=="K") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[10];
if(c1=="L") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[11];
if(c1=="M") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[12];
if(c1=="N") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[13];
if(c1=="O") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[14];
if(c1=="P") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[15];
if(c1=="Q") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[16];
if(c1=="R") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[17];
if(c1=="S") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[18];
if(c1=="T") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[19];
if(c1=="U") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[20];
if(c1=="V") Bubble.children[0].innerHTML= "<B>1. "+ "The unexpected, or what will dominate your near future" +"</B>  "+ FirstHouse[21];
}

if(TargetI==2){
if(c2=="A") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[0];
if(c2=="B") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[1];
if(c2=="C") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[2];
if(c2=="D") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[3];
if(c2=="E") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[4];
if(c2=="F") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[5];
if(c2=="G") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[6];
if(c2=="H") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[7];
if(c2=="I") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[8];
if(c2=="J") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B>  "+ SecondHouse[9];
if(c2=="K") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[10];
if(c2=="L") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[11];
if(c2=="M") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[12];
if(c2=="N") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[13];
if(c2=="O") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[14];
if(c2=="P") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[15];
if(c2=="Q") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[16];
if(c2=="R") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[17];
if(c2=="S") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[18];
if(c2=="T") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[19];
if(c2=="U") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[20];
if(c2=="V") Second.children[0].innerHTML="<B>2. "+ "Your financial life" +"</B> "+ SecondHouse[21];
//alert(Second.children[0].innerHTML)
}


if(TargetI==3){
if(c3=="A") Third.children[0].innerHTML= "<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[0];
if(c3=="B") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[1];
if(c3=="C") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[2];
if(c3=="D") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[3];
if(c3=="E") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[4];
if(c3=="F") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[5];
if(c3=="G") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[6];
if(c3=="H") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[7];
if(c3=="I") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[8];
if(c3=="J") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[9];
if(c3=="K") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[10];
if(c3=="L") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[11];
if(c3=="M") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[12];
if(c3=="N") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[13];
if(c3=="O") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[14];
if(c3=="P") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[15];
if(c3=="Q") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[16];
if(c3=="R") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[17];
if(c3=="S") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[18];
if(c3=="T") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[19];
if(c3=="U") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[20];
if(c3=="V") Third.children[0].innerHTML="<B>3. "+ "Your surroundings or travel" +"</B> "+ ThirdHouse[21];
}

if(TargetI==4){
if(c4=="A") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[0];
if(c4=="B") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[1];
if(c4=="C") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[2];
if(c4=="D") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[3];
if(c4=="E") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[4];
if(c4=="F") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[5];
if(c4=="G") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[6];
if(c4=="H") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[7];
if(c4=="I") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[8];
if(c4=="J") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[9];
if(c4=="K") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[10];
if(c4=="L") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[11];
if(c4=="M") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[12];
if(c4=="N") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[13];
if(c4=="O") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[14];
if(c4=="P") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[15];
if(c4=="Q") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[16];
if(c4=="R") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[17];
if(c4=="S") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[18];
if(c4=="T") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[19];
if(c4=="U") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[20];
if(c4=="V") Fourth.children[0].innerHTML="<B>4. "+ "Your home and family " +"</B> "+ FourthHouse[21];
}

//alert(TargetI)

if(TargetI==5){
if(c5=="A") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[0];
if(c5=="B") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[1];
if(c5=="C") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[2];
if(c5=="D") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[3];
if(c5=="E") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[4];
if(c5=="F") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[5];
if(c5=="G") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[6];
if(c5=="H") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[7];
if(c5=="I") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[8];
if(c5=="J") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[9];
if(c5=="K") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[10];
if(c5=="L") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[11];
if(c5=="M") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[12];
if(c5=="N") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[13];
if(c5=="O") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[14];
if(c5=="P") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[15];
if(c5=="Q") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[16];
if(c5=="R") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[17];
if(c5=="S") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[18];
if(c5=="T") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[19];
if(c5=="U") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[20];
if(c5=="V") Fifth.children[0].innerHTML="<B>5. "+ "Your love life, creation, or kids" +"</B> "+ FifthHouse[21];
}

if(TargetI==6){
if(c6=="A") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[0];
if(c6=="B") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[1];
if(c6=="C") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[2];
if(c6=="D") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[3];
if(c6=="E") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[4];
if(c6=="F") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[5];
if(c6=="G") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[6];
if(c6=="H") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[7];
if(c6=="I") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[8];
if(c6=="J") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[9];
if(c6=="K") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[10];
if(c6=="L") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[11];
if(c6=="M") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[12];
if(c6=="N") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[13];
if(c6=="O") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[14];
if(c6=="P") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[15];
if(c6=="Q") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[16];
if(c6=="R") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[17];
if(c6=="S") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[18];
if(c6=="T") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[19];
if(c6=="U") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[20];
if(c6=="V") Sixth.children[0].innerHTML="<B>6. "+ "Your present work situation or health" +"</B> "+ SixthHouse[21];
}

if(TargetI==7){
if(c7=="A") Seventh.children[0].innerHTML="<B>7."+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[0];
if(c7=="B") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[1];
if(c7=="C") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[2];
if(c7=="D") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[3];
if(c7=="E") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[4];
if(c7=="F") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[5];
if(c7=="G") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[6];
if(c7=="H") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[7];
if(c7=="I") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[8];
if(c7=="J") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[9];
if(c7=="K") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[10];
if(c7=="L") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[11];
if(c7=="M") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[12];
if(c7=="N") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[13];
if(c7=="O") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[14];
if(c7=="P") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[15];
if(c7=="Q") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[16];
if(c7=="R") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[17];
if(c7=="S") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[18];
if(c7=="T") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[19];
if(c7=="U") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[20];
if(c7=="V") Seventh.children[0].innerHTML="<B>7. "+ "Relationships, partnership or authority" +"</B>"+ SeventhHouse[21];
}

if(TargetI==8){
if(c8=="A") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[0];
if(c8=="B") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[1];
if(c8=="C") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[2];
if(c8=="D") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[3];
if(c8=="E") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[4];
if(c8=="F") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[5];
if(c8=="G") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[6];
if(c8=="H") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[7];
if(c8=="I") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[8];
if(c8=="J") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[9];
if(c8=="K") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[10];
if(c8=="L") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[11];
if(c8=="M") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[12];
if(c8=="N") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[13];
if(c8=="O") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[14];
if(c8=="P") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[15];
if(c8=="Q") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[16];
if(c8=="R") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[17];
if(c8=="S") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[18];
if(c8=="T") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[19];
if(c8=="U") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[20];
if(c8=="V") Eighth.children[0].innerHTML="<B>8. "+ "Money from others, credit, or spiritual power" +"</B>"+ EighthHouse[21];
}

if(TargetI==9){
if(c9=="A") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[0];
if(c9=="B") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[1];
if(c9=="C") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[2];
if(c9=="D") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[3];
if(c9=="E") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[4];
if(c9=="F") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[5];
if(c9=="G") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[6];
if(c9=="H") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[7];
if(c9=="I") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[8];
if(c9=="J") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[9];
if(c9=="K") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[10];
if(c9=="L") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[11];
if(c9=="M") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[12];
if(c9=="N") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[13];
if(c9=="O") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[14];
if(c9=="P") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[15];
if(c9=="Q") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[16];
if(c9=="R") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[17];
if(c9=="S") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[18];
if(c9=="T") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[19];
if(c9=="U") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[20];
if(c9=="V") Nineth.children[0].innerHTML="<B>9. "+ "Traveling and study" +"</B>"+ NinethHouse[21];

}

if(TargetI==10){
if(c10=="A") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[0];
if(c10=="B") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[1];
if(c10=="C") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[2];
if(c10=="D") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[3];
if(c10=="E") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[4];
if(c10=="F") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[5];
if(c10=="G") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[6];
if(c10=="H") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[7];
if(c10=="I") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[8];
if(c10=="J") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[9];
if(c10=="K") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[10];
if(c10=="L") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[11];
if(c10=="M") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[12];
if(c10=="N") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[13];
if(c10=="O") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[14];
if(c10=="P") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[15];
if(c10=="Q") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[16];
if(c10=="R") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[17];
if(c10=="S") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[18];
if(c10=="T") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[19];
if(c10=="U") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[20];
if(c10=="V") Tenth.children[0].innerHTML="<B>10. "+ "The unexpected or your professional life" +"</B>"+ TenthHouse[21];
}

if(TargetI==11){
if(c11=="A") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[0];
if(c11=="B") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[1];
if(c11=="C") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[2];
if(c11=="D") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[3];
if(c11=="E") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[4];
if(c11=="F") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[5];
if(c11=="G") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[6];
if(c11=="H") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[7];
if(c11=="I") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[8];
if(c11=="J") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[9];
if(c11=="K") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[10];
if(c11=="L") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[11];
if(c11=="M") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[12];
if(c11=="N") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[13];
if(c11=="O") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[14];
if(c11=="P") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[15];
if(c11=="Q") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[16];
if(c11=="R") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[17];
if(c11=="S") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[18];
if(c11=="T") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[19];
if(c11=="U") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[20];
if(c11=="V") Eleventh.children[0].innerHTML="<B>11. "+ "Your friends or projects" +"</B>"+ EleventhHouse[21];
}

if(TargetI==12){
if(c12=="A") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[0];
if(c12=="B") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[1];
if(c12=="C") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[2];
if(c12=="D") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[3];
if(c12=="E") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[4];
if(c12=="F") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[5];
if(c12=="G") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[6];
if(c12=="H") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[7];
if(c12=="I") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[8];
if(c12=="J") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[9];
if(c12=="K") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[10];
if(c12=="L") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[11];
if(c12=="M") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[12];
if(c12=="N") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[13];
if(c12=="O") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[14];
if(c12=="P") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[15];
if(c12=="Q") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[16];
if(c12=="R") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[17];
if(c12=="S") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[18];
if(c12=="T") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[19];
if(c12=="U") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[20];
if(c12=="V") Twelfth.children[0].innerHTML="<B>12. "+ "Your health or difficulties" +"</B>"+ TwelfthHouse[21];
}


Bubble.style.pixelLeft = 20 ;
Bubble.style.pixelTop=240;

Second.style.pixelLeft = 20 ;
Second.style.pixelTop=300;

Third.style.pixelLeft = 20 ;
Third.style.pixelTop=360;

Fourth.style.pixelLeft = 20 ;
Fourth.style.pixelTop=420;

Fifth.style.pixelLeft = 20 ;
Fifth.style.pixelTop=480;

Sixth.style.pixelLeft = 20;
Sixth.style.pixelTop=540;

Seventh.style.pixelLeft = 20 ;
Seventh.style.pixelTop=600;

Eighth.style.pixelLeft = 20 ;
Eighth.style.pixelTop=660;

Nineth.style.pixelLeft =20;
Nineth.style.pixelTop=720;

Tenth.style.pixelLeft =20;
Tenth.style.pixelTop=780;

Eleventh.style.pixelLeft = 20 ;
Eleventh.style.pixelTop=840;

Twelfth.style.pixelLeft =20;
Twelfth.style.pixelTop=900;



///box effect hms 

//if(Bubble.children[0].innerHTML=""){

//}

//if(readme.style.pixelTop<document.body.scrollTop) 
//readme.style.pixelTop=document.body.scrollTop;
//readme.style.visibility="visible";
//TheTimer=setTimeout("readme.style.visibility='hidden'",00000);

//alert("outof step")

}




