var hideGLTime;

function showGL(object,e) {

	var mouseX
	var mouseY


	if (e.pageX) {
		mouseX = (window.innerWidth / 2) - 240 + 'px';
	}
	else if (e.clientX) {
		mouseX = (document.body.offsetWidth / 2) - 240 + 'px';
	}

	if (e.pageY) {
		mouseY = (e.pageY);
	}
	else if (e.clientY) {
		mouseY = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop);
	}

	if (document.getElementById) {
		document.getElementById('gl-term').style.left = document.getElementById('content-c-wide').style.left + 230 + 'px';
		document.getElementById('gl-term').style.top = mouseY + 8 +'px';
	}
	viewGL(object);
}

function viewGL(object, e) {
	if(window.hideGLTime){
		clearTimeout(window.hideGLTime);
	}
	if (document.getElementById) {
		document.getElementById('gl-term').style.display = 'block';
	}

	writeGL(object);
	delayHideGL();
}

function hideGL() {
	if (document.getElementById) {
		document.getElementById('gl-term').style.display = 'none';
	}
}

function termMouseOut(term, e){
	hideGL();
}

function delayHideGL() {
	if(window.hideGLTime){
		clearTimeout(window.hideGLTime);
	}
	window.hideGLTime = setTimeout('hideGL()', 5000);
}

function writeGL(object) {
	if (document.getElementById) {
		// analgesia
		if (object == 'analgesia') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Analgesia</strong></p><p class="glossary-info">medicines to reduce pain, also known as painkillers.</p>');
		}
		// anesthesia
		if (object == 'anesthesia') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Anesthesia</strong></p><p class="glossary-info">medicines that block sensation so no pain is felt.</p>');
		}
		// Animal Welfare Organization
		if (object == 'animal-welfare-org') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Animal Welfare Organization</strong></p><p class="glossary-info">a group within Novartis that sets, implements and monitors global animal welfare standards for both internal animal research and studies pursued with external partners at a local and global level.</p>');
		}
		// antibiotic
		if (object == 'antibiotic') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Antibiotic</strong></p><p class="glossary-info">medicines that stop the growth of, or kill, bacteria. Penicillin is an example of an antibiotic.</p>');
		}
		// bacteria
		if (object == 'bacteria') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Bacteria</strong></p><p class="glossary-info">single cell organisms that are found everywhere on earth. Some bacteria may cause diseases.</p>');
		}
		// cell cultures
		if (object == 'cell-cultures') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Cell cultures</strong></p><p class="glossary-info">cells grown under controlled and reproducible conditions, usually in a laboratory.</p>');
		}
		// Declaration of Helsinki
		if (object == 'declaration-of-helsinki') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Declaration of Helsinki</strong></p><p class="glossary-info">established in 1964 to set up the code of conduct and principles of research in humans. It states that research in humans must be based on the results of animal research.</p>');
		}
		// DNA
		if (object == 'dna') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>DNA</strong></p><p class="glossary-info">Deoxyribonucleic acid, or DNA, contains the genetic instructions for most living organisms, including animals and humans.</p>');
		}
		// EC Directive 86/609
		if (object == 'ec-directive') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>EC Directive 86/609</strong></p><p class="glossary-info">the 1986 European Union law regarding the protection of animals used for research and other scientific purposes.</p>');
		}
		// gene sequencing
		if (object == 'gene-sequencing') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Gene sequencing</strong></p><p class="glossary-info">determining the order of the nucleotides in DNA. With this understanding, scientists can determine which genes work in a specific way.</p>');
		}
		// genetics
		if (object == 'genetics') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Genetics</strong></p><p class="glossary-info">the study of heredity and how characteristics are passed down from one generation to the next.</p>');
		}
		// in silico
		if (object == 'in-silico') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong><em>In silico<\/em></strong></p><p class="glossary-info">scientific tests done on a computer.</p>');
		}
		// in vitro
		if (object == 'in-vitro') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong><em>In vitro<\/em></strong></p><p class="glossary-info">scientific tests done in a test tube.</p>');
		}
		// in vivo
		if (object == 'in-vivo') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong><em>In vivo<\/em></strong></p><p class="glossary-info">scientific tests done in a living organism, such as animals or humans.</p>');
		}
		// penicillin
		if (object == 'penicillin') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>penicillin</strong></p><p class="glossary-info">an antibiotic discovered in 1928 that was a major breakthrough in fighting bacterial infections</p>');
		}
		// non-human primates
		if (object == 'non-human-primates') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Non-human primates</strong></p><p class="glossary-info">animals such as monkeys.</p>');
		}
		// pharmacokinetics
		if (object == 'pharmacokinetics') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Pharmacokinetics</strong></p><p class="glossary-info">studying what the body does to the medicine when it is given. This includes finding out how and how quickly it is absorbed and distributed, for example.</p>');
		}
		// pharmacodynamics
		if (object == 'pharmacodynamics') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Pharmacodynamics</strong></p><p class="glossary-info">studying what a medicine does to the body when it is given. For example, physiological reactions e.g. impacting blood pressure.</p>');
		}
		// polio
		if (object == 'polio') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Polio</strong></p><p class="glossary-info">a viral infectious disease that crippled thousands of people, mostly children, until a successful vaccine was developed in the 1950s.</p>');
		}
		// prodrugs
		if (object == 'prodrugs') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Prodrugs</strong></p><p class="glossary-info">a medicine  that is not active when administered, but becomes active once it metabolizes with specific substances in the body.</p>');
		}
		// the 3Rs
		if (object == 'the3rs') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>3Rs</strong></p><p class="glossary-info">reduction, refinement and replacement of animals in medical research.</p>');
		}
		// reduction
		if (object == 'reduction') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Reduction</strong></p><p class="glossary-info">methods to reduce the number of animals used in research in areas where animal research is essential.</p>');
		}
		// refinement
		if (object == 'refinement') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Refinement</strong></p><p class="glossary-info">improving the research process to minimize discomfort and maximizing the research information obtained from each animal in research.</p>');
		}
		// replacement
		if (object == 'replacement') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Replacement</strong></p><p class="glossary-info">alternative research methods to minimize the need for animal research, including in vitro and other modern scientific methods.</p>');
		}
		// research and development
		if (object == 'rnd') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Research and development</strong></p><p class="glossary-info">the discovery and study of molecules and chemical compounds to find out if they are safe and effective for treating specific diseases.</p>');
		}
		// sedation
		if (object == 'sedation') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Sedation</strong></p><p class="glossary-info">medicines which are used to calm; often used to reduce anxiety in medical procedures.</p>');
		}
		// screening
		if (object == 'screening') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Screening</strong></p><p class="glossary-info">attempting to detect the presence of disease or determine the prevalence of certain diseases by examining a broad sample in a population.</p>');
		}
		// stem cells
		if (object == 'stem-cells') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Stem cells</strong></p><p class="glossary-info">cells that are able to develop into many different cell types in the body during early life and growth. They can be grown and transformed into specialized cells like bone, muscle or brain cells.</p>');
		}
		// transgenic animals
		if (object == 'transgenic') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Transgenic animals</strong></p><p class="glossary-info">an animal that has a gene from another animal specifically inserted into its genome. This is done to better understand disease pathways and to find new treatments.</p>');
		}
		// US Animal Welfare Act
		if (object == 'us-animal-welfare-act') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>US Animal Welfare Act</strong></p><p class="glossary-info">first signed in 1966, this law is designed to ensure the welfare of animals used for experimental and research purposes in the USA. It has been amended six times and was last amended in 2007.</p>');
		}
		// vaccine
		if (object == 'vaccine') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Vaccine</strong></p><p class="glossary-info">a medication that is given to boost immunity to certain diseases; vaccines are often made from dead or weakened forms of the disease germs.</p>');
		}
		// virus
		if (object == 'virus') {
			document.getElementById('gl-term').innerHTML = ('<p class="glossary-term"><strong>Virus</strong></p><p class="glossary-info">a microscopic organism that causes disease. It can only multiply in a living host cell. Some well-known viruses include the common cold, the flu and chicken pox.</p>');
		}
	}
}




