/* datas */

var glossary = [
	{"id":"def1","title":"Adjuvant","content":"Any substance that enhances the immune response to the antigen with which it is co-administered."},
	{"id":"def2","title":"Adjuvant treatment","content":"Additional treatment (e.g. chemotherapy, radiotherapy), usually given after surgery has removed all detectable disease, aimed at preventing the cancer from coming back."},
	{"id":"def4","title":"Anemia","content":"A common blood disorder in which the level of healthy red blood cells in the body becomes too low. This can lead to a variety of complications, including fatigue."},
	{"id":"def5","title":"Angiogenesis","content":"A physiological process involving the formation of new blood vessels from pre-existing vessels. This term is normally used to describe the formation of new blood vessels in a tumor."},
	{"id":"def6","title":"Antigen","content":"A molecule that is recognized as foreign by the immune system."},
	{"id":"def7","title":"ASCI (Antigen Specific Cancer Immunotherapeutics)","content":"A new immunotherapeutic approach that aims to teach our natural defense system to identify cancer cells, and then destroy them."},
	{"id":"def8","title":"Biopsy","content":"A small tissue sample that is taken for examination to make a diagnosis."},
	{"id":"def9","title":"Cancer marker","content":"A substance produced by the body in response to a cancer that can be detected in the blood, urine or certain body tissues. May also be produced by the tumor itself."},
	{"id":"def10","title":"Cancer staging","content":"The process by which a doctor defines how far a tumor has advanced in size and location, as well as the distance it has spread."},
	{"id":"def11","title":"Cancer grading","content":"The process by which a doctor evaluates the aspect and behavior of individual cancer cells, usually under a microscope."},
	{"id":"def12","title":"Cellular immune response","content":"An immune response mediated by effector cells such as macrophages, natural killer cells (NK), antigen-specific cytotoxic T-lymphocytes, and the release of various cytokines in response to an antigen."},
	{"id":"def13","title":"Chemotherapy","content":"Treatment aimed at destroying cancer cells by the use of drugs."},
	{"id":"def14","title":"Clinical study","content":"A research study that aims at finding different or better ways to prevent, screen for, diagnose or treat a disease by testing how well a new approach works in people."},
	{"id":"def15","title":"Cytokines","content":"A group of proteins and peptides made by cells that are used in organisms as signaling compounds. Cytokines act via specific cytokine receptors on the cells that they affect."},
	{"id":"def16","title":"Declaration of Helsinki","content":"A set of ethical principles for the medical community regarding human experimentation developed by the World Medical Association."},
	{"id":"def17","title":"Disease-free survival","content":"Length of time after treatment during which no cancer is detected. Can be reported for an individual patient or for a study population."},
	{"id":"def18","title":"Epitope","content":"A peptide derived from an antigen which is recognized by an antibody or a T cell receptor."},
	{"id":"def19","title":"Genome","content":"All of the genetic information or hereditary material possessed by an organism. It is the total of all chromosomes and DNA in a cell."},
	{"id":"def20","title":"High-grade cancer cells","content":"Fast-growing, very abnormal-looking cancer cells that are likely to spread fast."},
	{"id":"def21","title":"Humoral immune response","content":"An immune response mediated by secreted antibodies, produced in the cells of the B lymphocyte lineage (B cell)."},
	{"id":"def22","title":"Immunogenicity","content":"The state of being able to stimulate an immune response to an antigen."},
	{"id":"def23","title":"Immunotherapy","content":"Various types of treatments based upon modulating the immune system to fight disease."},
	{"id":"def24","title":"Informed consent","content":"A process by which people learn the important facts about a clinical study and, based on this information, freely agree to participate in the study."},
	{"id":"def25","title":"In vitro","content":"The technique of performing a given experiment in a test tube, or more generally in a controlled environment outside a living organism."},
	{"id":"def26","title":"Lobectomy","content":"The surgical removal of one or more sections of the lung."},
	{"id":"def27","title":"Low-grade cancer cells","content":"Slow-growing, less aggressive cancer cells."},
	{"id":"def28","title":"Lymph nodes","content":"Components of the lymphatic system, found throughout the body. They contain white blood cells and function as filters for foreign particles."},
	{"id":"def29","title":"Lymphoma","content":"A cancer that originates in white blood cells (lymphocytes)."},
	{"id":"def30","title":"MAGE-A3","content":"A cancer-specific antigen found in lung cancer, melanoma, bladder cancer and others. It is the first antigen investigated by GlaxoSmithKline (GSK) for use in ASCI."},
	{"id":"def31","title":"MAGRIT (MAGE-A3 as Adjuvant, Non-Small Cell Lung Immunotherapy)","content":"A large worldwide study to investigate the effectiveness and side effects of MAGE-A3 ASCI in the treatment of non-small cell lung cancer (NSCLC)."},
	{"id":"def32","title":"Malignant","content":"A term used to describe a severe and progressively worsening disease. A malignant tumor is capable of invading nearby tissue and spreading to other parts of the body."},
	{"id":"def33","title":"Melanoma","content":"A malignant tumor derived from melanocytes which are found predominantly in skin but also in the bowel and the eye."},
	{"id":"def34","title":"Metastasis","content":"The spread of cancer cells to nearby tissue and other parts of the body."},
	{"id":"def35","title":"Monoclonal antibodies","content":"Identical antibodies produced by cells of the immune system from the same cell line."},
	{"id":"def36","title":"NSCLC","content":"Non Small Cell Lung Cancer: a type of lung cancer as characterized by the size and appearance of the malignant cells."},
	{"id":"def37","title":"Placebo","content":"A dummy medication or treatment."},
	{"id":"def38","title":"Pneumectomy","content":"The surgical removal of the entire lung."},
	{"id":"def39","title":"PSA (Prostate Specific Antigen)","content":"A cancer marker found in the blood that may indicate the presence of prostate cancer."},
	{"id":"def40","title":"Radiotherapy","content":"A way to kill cancer cells in and around a tumor by directing a stream of high-energy particles (radiation) onto the affected tissue."},
	{"id":"def41","title":"SCLC","content":"Small Cell Lung Cancer: a type of lung cancer as characterized by the size and appearance of the malignant cells."},
	{"id":"def42","title":"Targeted therapy","content":"A cancer therapy that disrupts certain elements needed for the growth or spread of cancer cells, thus blocking the growth or dissemination of tumors."},
	{"id":"def43","title":"TNM (Tumor, Node, Metastasis)","content":"An internationally-used staging system, to define how far a cancer has developed and spread."},
	{"id":"def44","title":"Tumor","content":"A lump formed by abnormal cell growth in a tissue or organ."},
	{"id":"def45","title":"Wedge resection","content":"The surgical removal of a part of one section of the lung."}
]

/* don't edit the functions */

function loadGlossary() {
	var dl = $('glossary');
	dl.innerHTML = '';
	var dt, dd;
	var s_glossary = sortGlossary();
	setDirectLinks(s_glossary);
	for (var i=0; i<s_glossary.length; i++) {
		dt = document.createElement('dt');
		dt.innerHTML = s_glossary[i].title;
		dt.setAttribute('id',s_glossary[i].id);
		dd = document.createElement('dd')
		dd.innerHTML = s_glossary[i].content;
		dl.appendChild(dt);
		dl.appendChild(dd);
	}
}

function sortGlossary() {
	var temp;
	for (var i=1; i<glossary.length; i++) {
		for (var j=glossary.length; j>i; j--) {
			if (glossary[j-2].title.toLowerCase() > glossary[j-1].title.toLowerCase()) {
				temp = glossary[j-2];
				glossary[j-2] = glossary[j-1];
				glossary[j-1] = temp;
			}
		}
	}
	return glossary;
}

function setDirectLinks(glossary) {
	
	var a_d, e_h, i_o, p_z;
	var title;
	for (var i=glossary.length-1; i>=0; i--) {
		title = glossary[i].title.toLowerCase();
		if (title >= "a" && title <= "d") {
			a_d = glossary[i].id;
		}
		if (title >= "e" && title <= "h") {
			e_h = glossary[i].id;
		}
		if (title >= "i" && title <= "o") {
			i_o = glossary[i].id;
		}
		if (title >= "p" && title <= "z") {
			p_z = glossary[i].id;
		}
	}
	$('a_d').setAttribute('href','#'+a_d);
	$('e_h').setAttribute('href','#'+e_h);
	$('i_o').setAttribute('href','#'+i_o);
	$('p_z').setAttribute('href','#'+p_z);
}