//Javacscript to set up the glossary - in the form glossary["word to be explained"] = "<h5>word being explained</h5><p>The explanation</p>";
//The word to be explained MUST be in all lowercase letters

glossary = new Array();
glossary["accident"] = "<h5>Accident</h5><p>External violent and visible means leading to a bodily injury or harm.</p>";
glossary["acupuncturist"] = "<h5>Acupuncturist</h5><p>A person who is on the professional register of the Acupuncture Council of Ireland (TCMCI Ltd) or the Acupuncture Foundation Professional Association or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["acute"] = "<h5>Acute</h5><p>Of short and sharp onset and which requires immediate medical attention.</p>";
glossary["approved treatment centre for scans"] = "<h5>Approved treatment centre for scans</h5><p>Any centre listed on our list of approved treatment centres for scans.</p>";
glossary["benefits"] = "<h5>Benefits</h5><p>What is covered under your policy as set out in your handbook and the schedule of benefits.</p>";
glossary["breastfeeding consultant"] = "<h5>Breastfeeding consultant</h5><p>A registered midwife who is also a member of the ALCI (Association of Lactation Consultants in Ireland) and who holds International Board Certified Lactation Consultant (IBCLC) membership.</p>";
glossary["chemotherapy"] = "<h5>Chemotherapy</h5><p>The internal use of chemical substances/agent to treat disease.</p>";
glossary["chiropractor"] = "<h5>Chiropractor</h5><p>A member of the Chiropractic Association of Ireland, A member of the Mc Timony Chiropractic Association of Ireland, or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["consultant"] = "<h5>Consultant</h5><p>A registered medical practitioner who holds a current full registration with the Irish Medical Council and is engaged in hospital practice and who, by reason of his or her training, skill and experience in a designated specialty, (including appropriate specialist training) is consulted by other registered medical practitioners and undertakes full clinical responsibility for patients in his or her care, or that aspect of care on which he or she has been consulted, without supervision in professional matters by any other person and who is recognised by Aviva as a consultant to an approved post in an approved Aviva hospital or treatment centre. In the context of treatment abroad a consultant is defined as a surgeon, physician or anaesthetist who is legally qualified to provide that treatment in that country.</p>";
glossary["convalescence"] = "<h5>Convalescence / nursing home</h5><p>A nursing home registered pursuant to the Health(Nursing Homes) Act, 1990 which is approved by us and is named on our list of approved convalescence homes.</p>";
glossary["cosmetic surgery"] = "<h5>Cosmetic surgery</h5><p>Treatment which is intended to improve the patient's appearance for psychological or personal reasons and which is not wholly medically necessary..</p>";
glossary["Day case"] = "<h5>Day case</h5><p>An in-patient hospital stay where you need to be medically admitted into hospital and which does not involve an overnight stay. This includes side room procedures.</p>";
glossary["dentist"] = "<h5>Dentist</h5><p>A dental practitioner who holds a current full registration with the Irish Dental Council who is community based and provides dental care or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["dietician"] = "<h5>Dietician</h5><p>A member of the Irish Nutrition & Dietetic Institute or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["dependant"] = "<h5>Dependant</h5><p>Your husband, wife, co-habiting same or opposite sex partner and any child under the age of 18, or over the age of 18 who is in full time education and dependent on you (up to the age of 23) and who is named on your membership certificate as one of your dependants.</p>";
glossary["drug abuse"] = "<h5>Drug abuse</h5><p>A mental or physical condition caused directly or indirectly by taking any drug substance or solvent unless a General Practitioner or consultant has prescribed it.</p>";
glossary["eligible treatment"] = "<h5>Eligible treatment</h5><p>Treatment specified in the schedule of benefits  for a condition that is not excluded in this policy.</p>";
glossary["emergency"] = "<h5>Emergency</h5><p>A sudden, unexpected, acute medical condition that without medical care within 48 hours of onset would result in death or cause serious impairment of critical bodily functions.</p>";
glossary["established treatment"] = "<h5>Established treatment</h5><p>Treatment that is in the opinion of our medical advisors established clinical practice, that is supported by publication in Irish or international peer reviewed journals and that is carried out in more than one hospital in Ireland.</p>";
glossary["excess"] = "<h5>Excess</h5><p>The amount of money to be payable by the insured member towards any claim(s) made in the policy year.</p>";
glossary["general practitioner"] = "<h5>General practitioner / G.P.</h5><p>A person who is fully registered with the Irish Medical Council, who is qualified to practice as a primary medical care physician and who holds a primary medical qualification or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["hazardous sports"] = "<h5>Hazardous Sports</h5><p>Any dangerous sporting activity including, but not limited to: hunting, shooting, mountaineering, rock climbing, motor sports including motor cycle sport, quad-biking, aviation other than as a fare paying passenger, ballooning, bungee jumping, hang gliding, microlighting, parachuting, paragliding or parascending, potholing or caving, power boat racing, water rafting, competitive yachting or sailing, bobsleighing, off-piste skiing, competitive canoeing or kayaking, boxing, wrestling, karate, judo or martial arts, scuba diving, any professional sporting activity, or extreme sports such as free diving, base jumping, shin racing and ice climbing.</p>";
glossary["health insurance contract"] = "<h5>Health insurance contract</h5><p>Means a health insurance contract to which the Health Insurance Acts 1994 to 2003, and any regulations thereunder, apply.</p>";
glossary["homeopath"] = "<h5>Homeopath</h5><p>A person who is on the professional register of the Irish Society of Homeopaths or the Irish Medical Homeopathic Society or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["hospital costs"] = "<h5>Hospital costs</h5><p>Charges for (i) hospital accommodation, (ii) services provided by a private hospital or clinic (such as hospital technical charges for the use of the operating theatre, radiology and pathology and public hospital statutory levies), but not fees levied by a consultant.</p>";
glossary["in patient treatment"] = "<h5>In-patient treatment</h5><p>An episode of treatment requiring overnight accommodation in a private or semi-private room in a hospital.</p>";
glossary["ireland"] = "<h5>Ireland</h5><p>Ireland excluding Northern Ireland.</p>";
glossary["lists"] = "<h5>Lists</h5><p>These are the lists specified in Part 6 of your handbook relating to the cover that is provided to the limits specified under your plan for specific treatment or procedures in the specific hospitals/homes listed. Detailed in Part 7:</p><ul><li>List of public and private hospitals.</li><li>List of approved treatment centres for scans. Please contact us 1890 717 717 for the lists below.</li><li>List of approved convalescence homes.</li><li>List of special procedures.</li><li>List of cardiac procedures.</li><li>List of specified conditions.</li><li>List of post operative home help (POHH) procedures.</li><li>List of manual lymph drainage (MLD) conditions.</li><li>List of approved private ambulance companies.</li></ul>";
glossary["massage therapist"] = "<h5>Massage therapist</h5><p>A member of the Irish Massage Therapists Association or a person holding an equivalent recognized qualification outside Ireland.</p>";
glossary["baby massage therapist"] = "<h5>Baby massage therapist</h5><p>Registered members of Baby Massage Ireland (BMI), the Irish chapter of the International Association of Infant Massage (IAIM) or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["material fact"] = "<h5>Material fact</h5><p>Any information given verbally or in writing on the application or claim form about any member that may have affected the terms by which we issue this policy, in particular any reference to a previous health insurance cover.</p>";
glossary["medical advisors"] = "<h5>Medical advisors</h5><p>Our medical advisors are fully qualified and registered medical consultants, registered with the Medical Council who provide medical advice to us.</p>";
glossary["medical herbalist"] = "<h5>Medical Herbalist</h5><p>A member of the Irish Institute of Medical Herbalists (IIMH) or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["medically necessary"] = "<h5>Medically necessary</h5><p>Treatment or a hospital stay, which in the opinion of our medical advisors is generally accepted as appropriate with regard to good standards of medical practice and is: </p><ul><li>consistent with the symptoms or diagnosis or treatment.</li><li>necessary for such a diagnosis or treatment.</li><li>not provided primarily for the convenience of the patient, the doctor or other provider or at the request of the patient and</li><li>furnished at the most appropriate level, which can be safely and effectively provided to the patient.</li></ul>";
glossary["member"] = "<h5>Member</h5><p>A person named under a health insurance contract with Aviva.</p>";
glossary["member of doula ireland"] = "<h5>Member of Doula Ireland</h5><p>A person who is a fully qualified member of Doula Ireland.</p>";
glossary["member of mld ireland"] = "<h5>Member of MLD Ireland</h5><p>A person who is a full member (not associates) qualified to treat people with lymphoedema. Members have qualified from one of the schools recognized by the British Lymphology Society. Vodder (part 3). LeDuc, Foldi, Casley-Smith, Asdonk or a person holding an equivalent recognized qualification outside Ireland.</p>";
glossary["membership number"] = "<h5>Membership number</h5><p>The number assigned by us to a member. Each person named on the policy has a separate membership number, as set out in the membership certificate.</p>";
glossary["midwife"] = "<h5>Midwife</h5><p>A person, having been admitted to a midwifery educational programme duly recognised in the country in which it is located, has successfully completed the prescribed course of studies in midwifery and has acquired the requisite qualifications to be registered and/or legally licensed to practice midwifery as defined International Confederation of Midwives 1990, and is registered to practice as such in Ireland by An Bord Altranais.</p>";
glossary["minimum benefit regulations"] = "<h5>Minimum benefit regulations</h5><p>The Health Insurance Act, 1994 S.I. 83/1996 (Minimum Benefit) Regulations, 1996 made pursuant to the Health Insurance Acts, 1994 to 2003 or as amended from time to time.</p>";
glossary["non-participating hospital"] = "<h5>Non-participating Hospital</h5><p>A hospital which does not have an agreement with Aviva regarding the services it will provide to health members with Aviva.</p>";
glossary["nurse"] = "<h5>Nurse</h5><p>A nurse, who is registered with An Bord Altranais, for midwifery, health visiting and/or nursing.</p>";
glossary["occupational therapist"] = "<h5>Occupational therapist</h5><p>A member of the Association of Occupational Therapists of Ireland or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["osteopath"] = "<h5>Osteopath</h5><p>A member of the Irish Osteopathic Association or the Association of Osteopaths of Ireland or a person holding an equivalent recognised qualification outside Ireland. A cranial Osteopath is a registered member of the Irish Osteopathic Association and the General Osteopathic Council in the UK.</p>";
glossary["out patient"] = "<h5>Out-patient</h5><p>A procedure falling within the meaning of out-patient services as laid out in the Health Act, 1970.</p>";
glossary["participating hospital"] = "<h5>Participating hospital</h5><p>A hospital which has an agreement with us regarding the fees to be charged for services provided to health members with Aviva. A list of these hospitals is set out in part 6.</p>";
glossary["physical therapist"] = "<h5>Physical therapist</h5><p>A member of the Institute of Physical Therapy and Applied Science or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["physiotherapist"] = "<h5>Physiotherapist</h5><p>A chartered physiotherapist , who is a member of the Irish Society of Chartered Physiotherapists or a member of the Chartered Society of Physiotherapists or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["plan"] = "<h5>Plan</h5><p>The benefits set out in your membership handbook and included in your policy.</p>";
glossary["podiatrist"] = "<h5>Podiatrist/Chiropodists</h5><p>A member of the Society for Chiropodists/Podiatrists, Society of Chiropodists and Podiatrists in Ireland, Institute of Chiropodists and Podiatrists in Ireland, Irish branch of the British Chiropody and Podiatry Association or the Irish Chiropodists/Podiatrists Organisation Ltd. or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["policy"] = "<h5>Policy</h5><p>The health insurance contract between you and us compromising of the following documents:</p><ul><li>your membership handbook including lists</li><li>your completed application form</li><li>your membership certificate</li><li>the schedule of benefits</li></ul>";
glossary["policy holder"] = "<h5>Policyholder</h5><p>The person who effected the policy as shown on the membership certificate.</p>";
glossary["policy year"] = "<h5>Policy year</h5><p>The period of insurance cover under this policy as shown on your membership certificate.</p>";
glossary["pre-existing condition"] = "<h5>Pre-existing condition</h5><p>Any disease, illness or injury that began before the person with the disease, illness or injury started his/her membership under any health insurance contract.</p>";
glossary["prescription"] = "<h5>Prescription</h5><p>Drugs and medicine can only be claimed where supplied on the prescription of a General Practitioner, Consultant, Dentist or Prescribing Nurse.</p>";
glossary["preventative treatments"] = "<h5>Preventative treatment</h5><p>Medical treatment that is used to identify whether you are likely to suffer from an illness, injury or disease in the future but in a situation where no clinical symptoms are present.</p>";
glossary["private hospital"] = "<h5>Private hospital</h5><p>A hospital listed as a private hospital within the list of public and  private hospitals. Level 1 excludes Blackrock Clinic, Mater Private  Hospital, Beacon Hospital, Hermitage Clinic and Galway Clinic. <br />Level  2-5 exclude Blackrock Clinic, Mater Private Hospital and Beacon  Hospital.</p>";
glossary["private room"] = "<h5>Private room</h5><ul><li>A room in a private hospital which contains only one bed,</li> or <li>A room in a public hospital which contains only one bed which, under S.I 135/1991 Health Services (In-Patients) Regulations,1991, is designated as a private bed.</li></ul>";
glossary["procedure"] = "<h5>Procedure</h5><p>A medical process or course of action. We will cover the procedures that are listed in our schedule of benefits  and that are included in the terms of your plan.</p>";
glossary["psychologist"] = "<h5>Psychologist</h5><p>A member of the Irish Association for Counselling & Psychotherapy, a member of the Psychological Society of Ireland or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["public hospital"] = "<h5>Public hospital</h5><p>A publicly funded hospital other than a nursing home which provides services to a person pursuant to his or her entitlements under Chapter 11 of Part IV of the Irish Health Act 1970 and listed as a public hospital within our list of private and public hospitals.</p>";
glossary["radiotherapy"] = "<h5>Radiotherapy</h5><p>The treatment of disease with ionizing radiation. Also called radiation therapy.</p>";
glossary["reflexologist"] = "<h5>Reflexologist</h5><p>A member of the National Register of Reflexologists (Ireland), Irish Reflexologists' Institute or a person holding an equivalent recognised qualification outside Ireland.</p>";
glossary["renewal date"] = "<h5>Renewal date</h5><p>The renewal date shown on your most recent membership certificate.</p>";
glossary["resident of ireland"] = "<h5>Resident of Ireland</h5><p>A person who does not reside outside Ireland for a period of six months or more.</p>";
glossary["schedule of benefits"] = "<h5>Schedule of benefits </h5><p>The schedule which details the amount we shall pay a consultant in relation to treatments provided to you. The schedule also specifies the amount we shall pay your GP for any surgical out-patient treatment he or she may carry out. The schedule includes the rates which we shall pay both, participating and non-participating consultants and G.P.s.</p>";
glossary["semi-private room"] = "<h5>Semi-private room</h5><ul><li>A room in a private hospital which contains not more than five beds, or</li><li>A room in a public hospital which contains not more than five beds which, under S.I. 135/1991 Health Services (In-Patient) Regulations, 1991, are designated as private beds.</li></ul>";
glossary["side room procedures"] = "<h5>Side room procedures</h5><p>Treatment or investigation which is marked as day case in the schedule of benefits.</p>";
glossary["speech and language therapist"] = "<h5>Speech and language therapist</h5><p>A member of the Irish Association of Speech and Language Therapists.</p>";
glossary["surgical out patient treatment"] = "<h5>Surgical out-patient treatment</h5><p>Out-patient treatment consisting of a surgical procedure listed at the time of treatment in the schedule of benefits for professional fees.</p>";
glossary["surgical procedure"] = "<h5>Surgical procedure</h5><p>The treatment of disease, injury or deformity by physical, manual or instrumental intervention.</p>";
glossary["terminal illness"] = "<h5>Terminal illness</h5><p>A serious and incurable disease of which a member had or should reasonably have had knowledge and which in the opinion of our medical advisors or an attending consultant results in a life expectancy of less than one year.</p>";
glossary["transplants"] = "<h5>Transplants</h5><p>The transfer of tissue or organ(s) from its original position to a new position(s) necessary to treat irreversible end stage failure of the relevant tissue or organ(s) including heart, combined heart and lung, kung (single an bilateral), simultaneous pancreas and kidney, liver, small bowel, kidney, simultaneous small bowel and liver, bone marrow or stem cells.</p>";
glossary["temporary stay abroad"] = "<h5>Temporary stay abroad</h5><p>A stay outside of Ireland for any period of not more than 31 days at any one time.</p>";
glossary["treatment"] = "<h5>Treatment</h5><p>Any health service a person needs solely for the medical investigation, cure, or alleviation of the symptoms of illness or injury for which benefits are payable.</p>";
glossary["waiting period"] = "<h5>Waiting period</h5><p>The period of time during which you cannot claim.</p>";



























var x = "";
var y = "";
var myGloss;
var iebody;
var left;
var top;
var findCoords = false;

//document.onmouseover = getCoords; 


function glossaryInit()
{
   if (document.getElementsByTagName)
   {
	span_a = document.getElementsByTagName("span");
        embeds = document.getElementsByTagName("embed");
	for (i=0;i<span_a.length;i++)
	{
		span = span_a[i];
		if (span.className == "glossary")
		{
			//span.setAttribute("onmouseover", "displayGlossary(this);");
			//span.setAttribute("onmouseout", "hideGlossary(this);");
			span.onmouseover = displayGlossary;
			span.onmouseout = hideGlossary;
			span.setAttribute("id", "glossary_" + i);
			span.style.color = "#006EBB";
			span.style.textDecoration = "none";
                        span.style.position = "relative";
                        span.style.zIndex = "24";
                        span.style.cursor = "help";
		}
	}

        for (i=0;i<embeds.length;i++)
	{
               //embeds[i].wmode = "opaque";
	}

   }

}


function displayGlossary (e)
{
                getCoords(e);             
 
                for (i=0;i<embeds.length;i++)
	        {
                        //embeds[i].wmode = "opaque";
	        }

                
                this.style.zIndex = "25";
		phrase = this.innerHTML.toLowerCase();
		id = this.getAttribute("id") + "_tooltip";
		if (glossary[phrase])
		{
			el = document.getElementById(id);
			if (el) el.parentNode.removeChild(el);
   			el = document.createElement("DIV");
			el.setAttribute("id", id);
			el.setAttribute("class", "gloss-tooltip");
			el.setAttribute("style", "background-color:#fff; -moz-opacity:.90; filter:alpha(opacity:90); opacity:.90;position:absolute;width:250px;color:#666; height:auto; line-height:18px; min-height:20px; padding:10px; border:1px solid #999; font-size:85%; ");
			el.style.position = "absolute";
			el.style.width = "250px";
			el.style.border = "1px solid #999";
			el.style.background = "#fff";
                           el.style.color = "#666";
                           el.style.fontSize = "85%";
			el.style.padding = "10px";
			//el.style.top = "1.5em";
			//el.style.left = "1em";
			el.innerHTML = glossary[phrase];
			//this.appendChild(el);
                           	el.style.top = y;
			el.style.left = x;
//alert("(" + x + ", " + y + ")");
                           document.body.appendChild(el);

		}

}

function hideGlossary ()
{
		id = this.getAttribute("id") + "_tooltip";
		el = document.getElementById(id);
		if (el) el.parentNode.removeChild(el);
                  findCoords = false;
		
}




function writeContents(){
                for(i in glossary){
                        document.write(glossary[i]);
                }
}		


function getCoords(e){

                //iebody = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body;

	       //left = document.all? iebody.scrollLeft : pageXOffset;
	       //top = document.all? iebody.scrollTop : pageYOffset;

                if(!findCoords){
               
                  if (!e) var e = window.event;
	         x = 0;
	         y = 0;

	         if (e.pageX || e.pageY) 	{
		  x = e.pageX;
		  y = e.pageY;
	         }
	       
                  else if (e.clientX || e.clientY) 	{
		  x = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		  y = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	         }
	
                	
	         x = x + 'px';
	         y = y + 'px';

                  findCoords = true;

                }

}
				