<!--

// tell the Navigationbar where we are
var wherearewe = "Text";
wherearewe = eval ( "'" + self.location + "'" ) ;

// function opening a slide display window

var Scope = null ;
var Image = "Picture" ;

function OpenScope(Image) {
	if (Scope == null || Scope.closed) {
		Scope = window.open (Image,"The_Scope","WIDTH=420,HEIGHT=420,RESIZABLE=YES,SCROLLBARS=NO");
		Scope.focus() }
	else {
		Scope.location=Image;
		Scope.focus() }
	clearTimeout(itsopen)
}	// End of Openscope

// show disclaimer

itsopen = setTimeout("OpenScope('QDisclaim.htm')",1000) ;

// The Questionmachine

var randomnumber = 0 ; 			// intermittent random number storage
var Qs = 0 ;								// number of available knowledge items
var rightone = 0 ; 					// knowledge item array number of the right answer
var Knitem = [ , ] ; 				// knowledge item array
var areacode = 0 ;					// subject areacode of the question

var negpos = [ , ] ;				// negative-positive question subject areacodes
var negposq = 0 ;						// negative-positive question indicator
var chooseq = 0 ;						// negative-positive question selector

var lastnorepeats = [ , ] ;		// norepeats-sources array
var counttonorepeats = 0 ;		// counting up to norepeats
var norepeats = 0 ;				// maximal norepeats-sources array size
var norepeatfrac = 0.35 ;		// fractions of unique knowledge items displayed in sequence

var CtrlAdmin = [ , ] ;			// central administration array
var stepper = 0 ;				// debug / review variable

var numberset = 0 ;				// number of set questions
var numberwrong = 0 ;			// number of wrong answers
var numberright = 0 ;			// number of right answers
var numberanswered = 0 ;		// number of answered questions
var performance = 0 ;			// performance score, % above chance
var nextone = 0 ;				// prevents logging correct answers more than once

// Define the questiontypes
Qtype = [" ", "Identify the organ", "Identify a cell type", "Identify a histological feature", "Identify a tissue type", "Percentages", "Hormones"] ;

// Initialize knowledge items

function Knitemize() {

	var aa = " "				// knowledge item source
	var bb = [ , ]				// knowledge item possible correct answers array
	var cc = 0;					// knowledge item question type
	var dd = 0;					// knowledge item subject area
	var ee = 0;					// knowledge item absolute drop value
	var ff = 0;					// knowledge item "non-self" subject area permission probability
	var n	= 0;				// negpos counter

	// reset form, counter variables and arrays
	Qs = -1 ;
	negpos.length = 0 ;
	lastnorepeats.length = 0 ;
	counttonorepeats = 0 ;
  if ( stepper != 0 ) numberset = 0 ;

	function Knit(aa, bb, cc, dd, ee, ff) {
		Qs++ ;
		if ( aa == "none" ) aa = eval ( "'" + aa + Qs + "'" ) ;
		Knitem[Qs] = [ aa, bb, cc, dd, ee, ff] ;
	} ; // end of Knit

	Knit(" ", ["dummy"], 0, 0, 0, 0) ;

	// Selectable knowledge item groups and definitions, last subject code used: 41

if ( document.forms["Selector"].Tissues.checked || document.forms["Selector"].Epithelia.checked ) {

// Epithelia and Glands, available codes 1-3

// epithelia, code 1

Knit("Quiz/Q242.jpg", ["simple squamous epithelium"], 4, 1, 1, 0);
Knit("Quiz/Q218.jpg", ["simple cuboidal epithelium", "simple squamous epithelium"], 4, 1, 1, 0.1);
Knit("Quiz/Q171.jpg", ["simple columnar epithelium", "unicellular exocrine gland (goblet cell)"], 4, 1, 0.5, 0.1);
Knit("Quiz/Q172.jpg", ["simple columnar epithelium"], 4, 1, 0.5, 0.1);
Knit("Quiz/Q174.jpg", ["transitional epithelium"], 4, 1, 1, 0.1);
Knit("Quiz/Q175.jpg", ["pseudostratified epithelium"], 4, 1, 1, 0.1);
Knit("Quiz/Q176.jpg", ["stratified squamous epithelium"], 4, 1, 0.4, 0.3);
Knit("Quiz/Q312.jpg", ["stratified cuboidal epithelium"], 4, 1, 0.8, 0.1);
Knit("Quiz/Q177.jpg", ["stratified columnar epithelium"], 4, 1, 1, 0.1);
Knit("Quiz/Q196.jpg", ["stratified squamous epithelium"], 4, 1, 0.6, 0);
Knit("Quiz/Q195.jpg", ["keratinized stratified squamous epithelium"], 4, 1, 1, 0.1);

// glands, code 1

Knit("Quiz/Q215.jpg", ["alveolar gland", "simple cuboidal epithelium"], 4, 1, 1, 0.4); // high mag H&E
Knit("Quiz/Q239.jpg", ["mucous gland", "mucous acinus"], 4, 1, 1, 0.4); // high mag H&E
Knit("Quiz/Q106.jpg", ["mucous acinus", "mucous gland"], 4, 1, 0.4, 0); // high mag H&E
Knit("Quiz/Q254.jpg", ["serous gland", "serous acinus"], 4, 1, 1, 0); // high mag H&E
Knit("Quiz/Q263.jpg", ["unicellular exocrine gland (goblet cell)"], 4, 1, 1, 0); // high mag H&E

Knit("Quiz/QT1G.htm", ["secretory epithelial sheath"], 4, 1, 0.3, 0);

}; // end of if-Tissues-Epithelia


if ( document.forms["Selector"].Tissues.checked || document.forms["Selector"].Connective.checked ) {

// connective tissues, code 4, available codes 4-6

Knit("Quiz/Q148.jpg", ["dense irregular connective tissue"], 4, 4, 1, 0.1); // high mag H&E
Knit("Quiz/Q191.jpg", ["loose irregular connective tissue"], 4, 4, 1, 0.1); // high mag H&E
Knit("Quiz/Q149.jpg", ["mucous connective tissue"], 4, 4, 0.2, 0.1); // high mag H&E
Knit("Quiz/Q150.jpg", ["mucous connective tissue"], 4, 4, 0.8, 0.1); // high mag H&E
Knit("Quiz/Q151.jpg", ["dense regular connective tissue", "skeletal muscle"], 4, 4, 0.3, 0.1); // high mag VG
Knit("Quiz/Q240.jpg", ["dense regular connective tissue"], 4, 4, 0.7, 0.1); // high mag H&E
Knit("Quiz/Q152.jpg", ["adipose tissue", "trabecular bone"], 4, 4, 0.5, 0.1); // high mag H&E
Knit("Quiz/Q224.jpg", ["adipose tissue"], 4, 4, 0.5, 0.1); // med mag H&E
Knit("Quiz/Q169.jpg", ["reticular connective tissue"], 4, 4, 0.5, 0.1); // med mag RE
Knit("Quiz/Q170.jpg", ["reticular connective tissue"], 4, 4, 0.5, 0.1); // med mag RE

// connective tissue cells, code 4

Knit("Quiz/Q068.jpg", ["macrophage", "hepatocyte"], 2, 4, 1, 1); // high mag tri
Knit("Quiz/Q143.jpg", ["mesenchymal cell", "fibrocyte"], 2, 4, 1, 1); // high mag umbi H&E
Knit("Quiz/QT0E.htm", ["monocyte", "macrophage"], 2, 4, 0.3, 1); // macrophage precursor
Knit("Quiz/QT0D.htm", ["mast cell", "basophil"], 2, 4, 0.5, 1); // histamine release
Knit("Quiz/QT1H.htm", ["fibrocyte", "mesenchymal cell"], 2, 4, 0.5, 1); // function
Knit("Quiz/QT1I.htm", ["adipocyte", "fibrocyte", "mesenchymal cell", "reticular cell"], 2, 4, 0.5, 1); // fixed cell type

}; // end of if-Tissues-Connective


if ( document.forms["Selector"].Tissues.checked || document.forms["Selector"].Skeletal.checked) {

// skeletal tissues, code 7, available codes 7-9

Knit("Quiz/Q016.jpg", ["compact bone"], 4, 7, 0.5, 0); // med mag ground
Knit("Quiz/Q017.jpg", ["compact bone"], 4, 7, 0.25, 0); // low mag Schmorl
Knit("Quiz/Q018.jpg", ["compact bone"], 4, 7, 0.25, 0); // med mag Schmorl
Knit("Quiz/Q025.jpg", ["trabecular bone"], 4, 7, 1, 0); // low mag H&E
Knit("Quiz/Q124.jpg", ["elastic cartilage"], 4, 7, 1, 0); // med mag elastin
Knit("Quiz/Q125.jpg", ["fibrous cartilage"], 4, 7, 0.45, 0); // med mag H&E
Knit("Quiz/Q126.jpg", ["fibrous cartilage"], 4, 7, 0.1, 0); // med mag VG
Knit("Quiz/Q127.jpg", ["fibrous cartilage"], 4, 7, 0.45, 0); // med mag H&E
Knit("Quiz/Q128.jpg", ["hyaline cartilage"], 4, 7, 0.7, 0); // med mag H&E
Knit("Quiz/Q164.jpg", ["hyaline cartilage"], 4, 7, 0.3, 0); // high mag VG
Knit("Quiz/Q131.jpg", ["articular cartilage"], 4, 7, 1, 0); // low mag H&E
		
// skeletal tissue cells, code 7

Knit("Quiz/Q132.jpg", ["chondrocyte"], 2, 7, 0.5, 0.1); // fibro high mag H&E
Knit("Quiz/Q165.jpg", ["chondrocyte"], 2, 7, 0.5, 0.1); // hyal high mag VG
Knit("Quiz/Q142.jpg", ["osteocyte"], 2, 7, 1, 0.1); // high mag H&E
Knit("Quiz/Q225.jpg", ["osteoblast"], 2, 7, 1, 0.1); // high mag H&E

Knit("Quiz/QT0A.htm", ["osteoclast"], 2, 7, 0.5, 0.1); // bone resorption
Knit("Quiz/QT0B.htm", ["osteoprogenitor cell", "osteoblast"], 2, 7, 0.5, 0.1); // osteoblast precursor
		
// skeletal tissue features, code 7

Knit("Quiz/Q016.jpg", ["Haversian system (osteon)", "Haversian canal", "osteocyte lacuna", "canaliculi"], 3, 7, 0.5, 0); // ground
Knit("Quiz/Q018.jpg", ["Haversian system (osteon)", "Haversian canal", "osteocyte lacuna", "canaliculi"], 3, 7, 0.5, 0); // Schmorl
Knit("Quiz/Q019.jpg", ["epiphyseal plate", "endochondral ossification", "bone marrow"], 3, 7, 0.8, 0);
Knit("Quiz/Q020.jpg", ["periosteum"], 3, 7, 0.8, 0); // H&E
Knit("Quiz/Q204.jpg", ["perichondrium"], 3, 7, 0.8, 0); // H&E
Knit("Quiz/Q021.jpg", ["intramembranous ossification"], 3, 7, 0.8, 0); // H&E
Knit("Quiz/Q022.jpg", ["intramembranous ossification"], 3, 7, 0.2, 0.5); // ABVG
Knit("Quiz/Q023.jpg", ["endochondral ossification"], 3, 7, 0.5, 0); // low mag H&E 
Knit("Quiz/Q024.jpg", ["endochondral ossification"], 3, 7, 0.3, 0); // med mag H&E
Knit("Quiz/Q233.jpg", ["zone of reserve cartilage", "endochondral ossification"], 3, 7, 0.2, 0); // med mag H&E
Knit("Quiz/Q234.jpg", ["zone of cartilage proliferation", "endochondral ossification"], 3, 7, 0.2, 0); // med mag H&E
Knit("Quiz/Q235.jpg", ["zone of cartilage hypertrophy", "endochondral ossification"], 3, 7, 0.2, 0); // med mag H&E
Knit("Quiz/Q236.jpg", ["zone of cartilage calcification", "endochondral ossification"], 3, 7, 0.2, 0); // med mag H&E
Knit("Quiz/Q121.jpg", ["Haversian canal"], 3, 7, 1, 0); // high mag ground
Knit("Quiz/Q122.jpg", ["osteocyte lacuna"], 3, 7, 1, 0); // high mag ground
Knit("Quiz/Q123.jpg", ["canaliculi"], 3, 7, 1, 0); // high mag ground
Knit("Quiz/Q129.jpg", ["interterritorial matrix"], 3, 7, 1, 0); // H&E
Knit("Quiz/Q194.jpg", ["territorial matrix"], 3, 7, 1, 0); // H&E
Knit("Quiz/Q130.jpg", ["isogenous group"], 3, 7, 1, 0); // H&E
Knit("Quiz/Q226.jpg", ["tangential layer, articular cartilage"], 3, 7, 1, 0); // H&E
Knit("Quiz/Q227.jpg", ["transitional layer, articular cartilage"], 3, 7, 1, 0); // H&E
Knit("Quiz/Q228.jpg", ["radial layer, articular cartilage"], 3, 7, 1, 0); // H&E

}; // end of if-Tissues-Skeletal


if ( document.forms["Selector"].Tissues.checked || document.forms["Selector"].Muscle.checked) {

// muscle, code 10, available codes 10-12

Knit("Quiz/Q133.jpg", ["cardiac muscle"], 4, 10, 0.7, 0); // high mag Whipf's
Knit("Quiz/Q265.jpg", ["cardiac muscle"], 4, 10, 0.3, 0); // high mag ironH
Knit("Quiz/Q134.jpg", ["smooth muscle"], 4, 10, 0.4, 0); // high mag H&E
Knit("Quiz/Q136.jpg", ["skeletal muscle"], 4, 10, 0.5, 0); // high mag trans H&E
Knit("Quiz/Q137.jpg", ["skeletal muscle"], 4, 10, 0.5, 0); // high mag long H&E
Knit("Quiz/Q138.jpg", ["smooth muscle"], 4, 10, 0.6, 0); // high mag H&E
Knit("Quiz/Q264.jpg", ["smooth muscle and skeletal muscle"], 4, 10, 0.6, 0); // high mag H&E
Knit("Quiz/Q232.jpg", ["smooth muscle and cardiac muscle"], 4, 10, 0.3, 0); // high mag Whipf's

Knit("Quiz/QT0R.htm", ["smooth muscle and cardiac muscle"], 4, 10, 0.4, 0); // structure
Knit("Quiz/QT0S.htm", ["cardiac muscle and skeletal muscle"], 4, 10, 0.3, 0); // structure
Knit("Quiz/QT0T.htm", ["smooth muscle and skeletal muscle"], 4, 10, 0.5, 0); // structure
Knit("Quiz/QT0U.htm", ["skeletal muscle"], 4, 10, 0.5, 0); // satelite cells

// muscle features, code 10

Knit("Quiz/Q135.jpg", ["muscle spindle", "intrafusal muscle fibre"], 3, 10, 1, 0.2); // high mag H&E
Knit("Quiz/Q151.jpg", ["muscle-tendon junction"], 3, 10, 1, 0.2); // high mag VG
Knit("Quiz/Q217.jpg", ["Purkinje fibre", "sarcomere(s)"], 3, 10, 1, 0.2); // high mag Whipf's
Knit("Quiz/Q241.jpg", ["intercalated disc", "Z-line", "sarcomere(s)"], 3, 10, 1, 0.2); // high mag AliB
Knit("Quiz/Q277.jpg", ["sarcomere(s)"], 3, 10, 0.5, 0.5); // high mag Whipf's
Knit("Quiz/Q282.jpg", ["intrafusal muscle fibre"], 3, 10, 0.5, 0.5); // high mag H&E

Knit("Quiz/QT1E.htm", ["sarcoplasmatic reticulum", "triad"], 3, 10, 0.5, 0.5); // structure

// muscle, EM & LM contractile apparatus, code 11

Knit("Quiz/Q271.jpg", ["A-band"], 3, 11, 0.3, 0);	// EM
Knit("Quiz/Q272.jpg", ["I-band"], 3, 11, 0.3, 0);	// EM	
Knit("Quiz/Q273.jpg", ["Z-line"], 3, 11, 0.3, 0);	// EM	
Knit("Quiz/Q274.jpg", ["M-line"], 3, 11, 0.5, 0);	// EM	
Knit("Quiz/Q275.jpg", ["sarcomere(s)"], 3, 11, 0.5, 0.3);	// EM	
Knit("Quiz/Q276.jpg", ["triad"], 3, 11, 0.5, 0);	// EM
Knit("Quiz/Q278.jpg", ["Z-line"], 3, 11, 0.3, 0); // LM Whipf's
Knit("Quiz/Q279.jpg", ["I-band"], 3, 11, 0.3, 0); // LM Whipf's
Knit("Quiz/Q280.jpg", ["H-band"], 3, 11, 0.5, 0); // LM Whipf's
Knit("Quiz/Q281.jpg", ["A-band"], 3, 11, 0.3, 0); // LM Whipf's

}; // end of if-Tissues-Muscle


if ( document.forms["Selector"].Tissues.checked || document.forms["Selector"].Nervous.checked ) {

// nervous tissues, code 14, available codes 14-16

Knit("Quiz/Q140.jpg", ["nervous tissue, peripheral nerve"], 4, 14, 1, 0.5); // low mag PNS osmium
Knit("Quiz/Q153.jpg", ["nervous tissue, peripheral nerve"], 4, 14, 1, 0.5); // high mag PNS H&E
Knit("Quiz/Q154.jpg", ["nervous tissue, spinal cord"], 4, 14, 1, 0.5); // low mag CNS H&E
Knit("Quiz/Q257.jpg", ["nervous tissue, autonomous ganglion"], 4, 14, 1, 0.5); // low mag PNS H&E
Knit("Quiz/Q284.jpg", ["nervous tissue, forebrain"], 4, 14, 1, 0.5); // low mag Giemsa

// nervous tissue cells, code 14

Knit("Quiz/Q139.jpg", ["neurone"], 2, 14, 0.6, 0.3); // high mag cord LFB
Knit("Quiz/Q144.jpg", ["neurone"], 2, 14, 0.2, 0.3); // high mag biocytin
Knit("Quiz/Q159.jpg", ["neurone", "glial cell", "oligodendrocyte", "astrocyte", "microglial cell"], 2, 14, 0.7, 0.3); // high mag CNS H&E

Knit("Quiz/Q285.jpg", ["glial cell", "oligodendrocyte", "astrocyte", "microglial cell"], 2, 14, 0.6, 0.3); // high mag cord LFB
Knit("Quiz/Q147.jpg", ["glial cell", "oligodendrocyte", "astrocyte", "microglial cell"], 2, 14, 0.2, 0.3); // high mag CNS Giemsa
Knit("Quiz/Q158.jpg", ["glial cell", "oligodendrocyte", "astrocyte", "microglial cell"], 2, 14, 0.4, 0.3); // high mag CNS LFB
Knit("Quiz/Q159.jpg", ["glial cell", "neurone", "oligodendrocyte", "astrocyte", "microglial cell"], 2, 14, 0.3, 0.3); // high mag CNS H&E

Knit("Quiz/Q146.jpg", ["ganglion cell", "neurone"], 2, 14, 0.8, 0.3); // high mag H&E
Knit("Quiz/Q286.jpg", ["ganglion cell", "neurone"], 2, 14, 0.4, 0.3); // high mag H&E
Knit("Quiz/Q145.jpg", ["satelite cell"], 2, 14, 1, 0.3); // high mag auto H&E

// nervous tissue cells, text questions, code 15

Knit("Quiz/QT0K.htm", ["oligodendrocyte"], 2, 15, 0.5, 0); // CNS myelin
Knit("Quiz/QT0L.htm", ["Schwann cell"], 2, 15, 0.4, 0); // PNS myelin
Knit("Quiz/QT0M.htm", ["ependymal cell"], 2, 15, 0.3, 0); // location
Knit("Quiz/QT0N.htm", ["microglial cell"], 2, 15, 0.5, 0); // function
Knit("Quiz/QT0O.htm", ["astrocyte", "oligodendrocyte"], 2, 15, 0.5, 0); // function
Knit("Quiz/QT0P.htm", ["Schwann cell"], 2, 15, 0.4, 0); // PNS function

// nervous tissue features, code 14

Knit("Quiz/Q141.jpg", ["myelin sheath"], 3, 14, 0.6, 0.3); // high mag PNS osmium
Knit("Quiz/Q283.jpg", ["myelin sheath"], 3, 14, 0.4, 0.3); // EM
Knit("Quiz/Q155.jpg", ["white matter"], 3, 14, 0.7, 0.3); // low mag CNS H&E
Knit("Quiz/Q156.jpg", ["grey matter"], 3, 14, 1, 0.3); // low mag CNS H&E
Knit("Quiz/Q157.jpg", ["white matter"], 3, 14, 0.3, 0.3); // high mag CNS H&E
Knit("Quiz/Q160.jpg", ["Nissl bodies", "rough endoplasmatic reticulum", "grey matter"], 3, 14, 0.7, 0.3); // high mag CNS H&E
Knit("Quiz/Q160.jpg", ["rough endoplasmatic reticulum", "Nissl bodies"], 3, 14, 0.3, 0.3); // high mag CNS H&E
Knit("Quiz/Q161.jpg", ["trunk of primary dendrite"], 3, 14, 1, 0.3); // high mag CNS H&E

Knit("Quiz/QT0Q.htm", ["perineurium"], 3, 14, 0.5, 0.3); //

}; // end of if-Tissues-Nervous


if ( document.forms["Selector"].Tissues.checked || document.forms["Selector"].Blood.checked ) {

// blood cells, code 17, available codes 17-19

Knit("Quiz/Q002.jpg", ["lymphocyte", "basophil", "basophil and lymphocyte", "erythrocyte", "platelet"], 2, 17, 0.2, 0);
Knit("Quiz/Q005.jpg", ["lymphocyte", "erythrocyte", "platelet"], 2, 17, 0.5, 0);
Knit("Quiz/Q006.jpg", ["lymphocyte", "erythrocyte"], 2, 17, 0.7, 0);
Knit("Quiz/Q009.jpg", ["lymphocyte", "monocyte", "lymphocyte and monocyte", "erythrocyte"], 2, 17, 0.1, 0);
Knit("Quiz/Q012.jpg", ["lymphocyte", "neutrophil", "neutrophil and lymphocyte", "erythrocyte"], 2, 17, 0.3, 0);

Knit("Quiz/Q004.jpg", ["neutrophil","eosinophil", "eosinophil and neutrophil", "erythrocyte", "platelet"], 2, 17, 0.3, 0);
Knit("Quiz/Q010.jpg", ["neutrophil", "erythrocyte"], 2, 17, 0.5, 0);
Knit("Quiz/Q011.jpg", ["neutrophil", "erythrocyte", "platelet"], 2, 17, 0.7, 0);
Knit("Quiz/Q012.jpg", ["neutrophil", "lymphocyte","neutrophil and lymphocyte", "erythrocyte"], 2, 17, 0.2, 0);
Knit("Quiz/Q288.jpg", ["neutrophil", "erythrocyte", "platelet"], 2, 17, 0.3, 0);

Knit("Quiz/Q011.jpg", ["platelet", "neutrophil", "erythrocyte"], 2, 17, 0.5, 0);
Knit("Quiz/Q013.jpg", ["platelet", "erythrocyte"], 2, 17, 0.5, 0);

Knit("Quiz/Q008.jpg", ["erythrocyte", "monocyte", "platelet"], 2, 17, 0.2, 0);
Knit("Quiz/Q011.jpg", ["erythrocyte", "platelet", "neutrophil"], 2, 17, 0.2, 0);
Knit("Quiz/Q013.jpg", ["erythrocyte", "platelet"], 2, 17, 0.6, 0);

Knit("Quiz/Q007.jpg", ["monocyte", "erythrocyte"], 2, 17, 0.5, 0);
Knit("Quiz/Q008.jpg", ["monocyte", "erythrocyte", "platelet"], 2, 17, 0.5, 0);
Knit("Quiz/Q009.jpg", ["monocyte", "lymphocyte", "lymphocyte and monocyte", "erythrocyte"], 2, 17, 0.3, 0);

Knit("Quiz/Q003.jpg", ["eosinophil", "erythrocyte"], 2, 17, 1, 0);
Knit("Quiz/Q004.jpg", ["eosinophil", "neutrophil", "eosinophil and neutrophil", "erythrocyte", "platelet"], 2, 17, 0.3, 0);

Knit("Quiz/Q001.jpg", ["basophil", "erythrocyte"], 2, 17, 1, 0);
Knit("Quiz/Q002.jpg", ["basophil", "lymphocyte", "basophil and lymphocyte", "erythrocyte", "platelet"], 2, 17, 0.5, 0);

Knit("Quiz/Q002.jpg", ["basophil and lymphocyte", "erythrocyte", "platelet"], 2, 17, 0.3, 0);
Knit("Quiz/Q004.jpg", ["eosinophil and neutrophil", "erythrocyte", "platelet"], 2, 17, 0.4, 0);
Knit("Quiz/Q009.jpg", ["lymphocyte and monocyte", "erythrocyte"], 2, 17, 0.5, 0);
Knit("Quiz/Q012.jpg", ["neutrophil and lymphocyte", "erythrocyte", "platelet"], 2, 17, 0.2, 0);

Knit("Quiz/Q014.jpg", ["megakaryoblast"], 2, 17, 0.3, 0.5); // med mag H&E
Knit("Quiz/Q290.jpg", ["megakaryoblast"], 2, 17, 0.3, 0.5); // high mag H&E
Knit("Quiz/Q015.jpg", ["megakaryocyte"], 2, 17, 0.3, 0.5); // med mag H&E
Knit("Quiz/Q289.jpg", ["megakaryocyte"], 2, 17, 0.3, 0.5); // high mag H&E
Knit("Quiz/Q326.jpg", ["normoblast"], 2, 17, 0.3, 0.5); // high mag H&E
Knit("Quiz/Q327.jpg", ["myelocyte"], 2, 17, 0.1, 0.5); // high mag H&E

// blood cells, text questions, code 17 and 18

Knit("Quiz/QT0C.htm", ["megakaryocyte", "platelet"], 2, 18, 0.5, 0); // platelet precursor
Knit("Quiz/QT0D.htm", ["basophil", "mast cell"], 2, 18, 0.5, 0); // histamine release
Knit("Quiz/QT0E.htm", ["monocyte", "macrophage"], 2, 18, 0.3, 0); // macrophage precursor
Knit("Quiz/QT0F.htm", ["plasma cell"], 2, 18, 0.3, 0); // antibody release
Knit("Quiz/QT0G.htm", ["eosinophil"], 2, 18, 0.3, 0); // histaminase release
Knit("Quiz/QT0H.htm", ["platelet"], 2, 18, 0.2, 0); // serotonin release
Knit("Quiz/QT0I.htm", ["platelet"], 2, 18, 0.2, 0); // haemostasis
Knit("Quiz/QT0J.htm", ["B-lymphocyte", "plasma cell"], 2, 18, 0.5, 0); // plasma cell precursor

Knit("Quiz/QT0Z.htm", ["~ 3%"], 5, 17, 0.5, 0); // eosinophils
Knit("Quiz/QT1A.htm", ["~ 0.5%"], 5, 17, 0.5, 0); // basophils
Knit("Quiz/QT1B.htm", ["~ 5%", "~ 3%"], 5, 17, 0.5, 0); // monocytes
Knit("Quiz/QT1C.htm", ["~ 30%"], 5, 17, 0.5, 0); // lymphocytes
Knit("Quiz/QT1D.htm", ["~ 60%"], 5, 17, 0.5, 0); // neutrophils
Knit("Quiz/QT1P.htm", ["~ 43%"], 5, 17, 0.5, 0); // haematocrit

}; // end of if-Tissues-Blood



if ( document.forms["Selector"].Organs.checked || document.forms["Selector"].Vascular.checked ) {

// vascular system types, code 20, available code 20-22

Knit("Quiz/Q244.jpg", ["muscular artery", "tunica media", "tunica adventitia"], 3, 20, 0.8, 0.2); // low mag H&E
Knit("Quiz/Q249.jpg", ["large vein", "tunica media", "tunica adventitia"], 3, 20, 1, 0.2); // low mag H&E
Knit("Quiz/Q266.jpg", ["elastic artery", "tunica media", "tunica intima"], 3, 20, 1, 0.2); // low mag elastin
Knit("Quiz/QT1F.htm", ["elastic artery"], 3, 20, 0.2, 0.2); // aorta
Knit("Quiz/Q256.jpg", ["muscular artery", "tunica media", "tunica adventitia"], 3, 20, 0.4, 0.2); // med mag Whipf's
Knit("Quiz/Q255.jpg", ["arteriole", "smooth muscle"], 3, 20, 0.9, 0.2); // H&E
Knit("Quiz/Q329.jpg", ["arteriole", "smooth muscle"], 3, 20, 0.1, 0.2); // VG
Knit("Quiz/Q330.jpg", ["venule", "smooth muscle"], 3, 20, 0.1, 0.2); // VG
Knit("Quiz/Q267.jpg", ["capillary"], 3, 20, 0.3, 0.2); // high mag H&E
Knit("Quiz/Q268.jpg", ["capillary"], 3, 20, 0.5, 0.2); // high mag H&E
Knit("Quiz/Q322.jpg", ["capillary"], 3, 20, 0.3, 0.2); // high mag Whipf's

// vascular system features, code 20

Knit("Quiz/Q245.jpg", ["tunica media", "smooth muscle"], 3, 20, 0.7, 0.2); // low mag H&E
Knit("Quiz/Q250.jpg", ["tunica media", "smooth muscle"], 3, 20, 0.3, 0.2); // low mag H&E
Knit("Quiz/Q269.jpg", ["tunica media, elastic artery", "smooth muscle"], 3, 20, 0.2, 0.1); // med mag EL
Knit("Quiz/Q270.jpg", ["tunica media, elastic artery", "smooth muscle"], 3, 20, 0.2, 0.1); // med mag H&E
Knit("Quiz/Q246.jpg", ["tunica adventitia"], 3, 20, 0.5, 0.2); // low mag H&E
Knit("Quiz/Q251.jpg", ["tunica adventitia", "smooth muscle"], 3, 20, 0.4, 0.2); // low mag H&E
Knit("Quiz/Q252.jpg", ["smooth muscle", "tunica adventitia"], 3, 20, 0.2, 0.5); // low mag H&E
Knit("Quiz/Q253.jpg", ["collagen fibres", "tunica adventitia"], 3, 20, 0.2, 0.5); // low mag H&E
Knit("Quiz/Q247.jpg", ["external elastic lamina"], 3, 20, 1, 0.2); // low mag elastin
Knit("Quiz/Q248.jpg", ["internal elastic lamina"], 3, 20, 1, 0.2); // low mag elastin
Knit("Quiz/Q238.jpg", ["vein valve"], 3, 20, 1, 0.2); // med mag H&E

}; // end if-Organs-Vascular


if ( document.forms["Selector"].Organs.checked || document.forms["Selector"].Integument.checked) {

// integumentary system cells, code 23, available codes 23-25

Knit("Quiz/Q313.jpg", ["myoepithelial cell"], 2, 23, 0.5, 0.5); // high mag H&E
Knit("Quiz/QT2T.htm", ["melanocyte"], 2, 23, 0.2, 0.5); // pigmentation
Knit("Quiz/QT2U.htm", ["keratinocyte"], 2, 23, 0.2, 0.5); // collective name
Knit("Quiz/QT2V.htm", ["Langerhans cell", "lymphocyte", "T-lymphocyte"], 2, 23, 0.2, 0.5); // immune reactions


// integumentary system features, code 23

Knit("Quiz/Q166.jpg", ["hair follicle", "hairy skin"], 3, 23, 1, 0.1); // med mag H&E
Knit("Quiz/Q167.jpg", ["sweat gland"], 3, 23, 0.4, 0.1); // med mag H&E
Knit("Quiz/Q230.jpg", ["excretory duct, sweat gland", "sweat gland"], 3, 23, 0.3, 0.1); // high mag H&E
Knit("Quiz/Q231.jpg", ["secretory tubulus, sweat gland", "sweat gland"], 3, 23, 0.3, 0.1); // high mag H&E
Knit("Quiz/Q216.jpg", ["sebaceous gland", "pilosebaceous unit"], 3, 23, 0.5, 0.1); // med mag H&E
Knit("Quiz/Q237.jpg", ["sebaceous gland", "pilosebaceous unit", "hair follicle"], 3, 23, 0.35, 0.1); // med mag H&E
Knit("Quiz/Q237.jpg", ["pilosebaceous unit", "sebaceous gland", "hair follicle"], 3, 23, 0.15, 0.1); // med mag H&E

Knit("Quiz/Q168.jpg", ["thick skin", "epidermis", "dermis", "hypodermis"], 3, 23, 1, 0.1); // low mag H&E
Knit("Quiz/Q197.jpg", ["hairy skin", "hair follicle"], 3, 23, 1, 0.1); // med mag H&E
Knit("Quiz/Q229.jpg", ["thin skin", "dermis", "hypodermis"], 3, 23, 1, 0.1); // low mag H&E
Knit("Quiz/Q195.jpg", ["thin skin", "epidermis"], 3, 23, 0.3, 0.1); // high mag H&E

Knit("Quiz/Q198.jpg", ["epidermis"], 3, 23, 0.5, 0.1); // low mag H&E
Knit("Quiz/Q199.jpg", ["dermis"], 3, 23, 0.5, 0.1); // low mag H&E
Knit("Quiz/Q200.jpg", ["hypodermis"], 3, 23, 0.5, 0.1); // low mag H&E
Knit("Quiz/Q195.jpg", ["epidermis", "thin skin", "dermis"], 3, 23, 0.7, 0.1); // high mag H&E

Knit("Quiz/Q206.jpg", ["stratum basale"], 3, 23, 0.4, 0.1); // high mag H&E
Knit("Quiz/Q210.jpg", ["stratum basale"], 3, 23, 0.4, 0.1); // high mag H&E
Knit("Quiz/QT0V.htm", ["stratum basale", "stratum spinosum", "epidermis", "hair follicle"], 3, 23, 0.4, 0.1); // proliferative

Knit("Quiz/Q207.jpg", ["stratum spinosum"], 3, 23, 0.5, 0.1); // high mag H&E
Knit("Quiz/Q211.jpg", ["stratum spinosum"], 3, 23, 0.5, 0.1); // high mag H&E

Knit("Quiz/Q208.jpg", ["stratum granulosum"], 3, 23, 0.4, 0.1); // high mag H&E
Knit("Quiz/Q212.jpg", ["stratum granulosum"], 3, 23, 0.4, 0.1); // high mag H&E
Knit("Quiz/QT0X.htm", ["stratum granulosum", "epidermis"], 3, 23, 0.4, 0.1); // keratohyalin

Knit("Quiz/QT0Y.htm", ["stratum lucidum", "thick skin", "epidermis"], 3, 23, 0.2, 0.1); // structure

Knit("Quiz/Q209.jpg", ["stratum corneum"], 3, 23, 0.4, 0.1); // high mag H&E
Knit("Quiz/Q213.jpg", ["stratum corneum"], 3, 23, 0.4, 0.1); // high mag H&E
Knit("Quiz/QT0W.htm", ["stratum corneum", "epidermis"], 3, 23, 0.4, 0.1); // barrier

}; // end of if-Organs-Integument


if ( document.forms["Selector"].Organs.checked || document.forms["Selector"].GIT.checked ){ 

// GIT organs, tubular code 26, glandular code 27, parenchymal code 28, available codes 26-30

Knit("Quiz/Q038.jpg", ["appendix"], 1, 26, 1, 0);
Knit("Quiz/Q028.jpg", ["colon"], 1, 26, 0.4, 0);
Knit("Quiz/Q027.jpg", ["colon"], 1, 26, 0.7, 0);
Knit("Quiz/Q030.jpg", ["duodenum"], 1, 26, 0.1, 0);
Knit("Quiz/QT1T.htm", ["duodenum", "oesophagus"], 1, 26, 0.2, 0); // submucosal glands
Knit("Quiz/QT1T.htm", ["oesophagus", "duodenum"], 1, 26, 0.2, 0); // submucosal glands
Knit("Quiz/Q031.jpg", ["ileum"], 1, 26, 1, 0);
Knit("Quiz/Q100.jpg", ["oesophagus"], 1, 26, 1, 0);
Knit("Quiz/QT1U.htm", ["oesophagus", "anal canal"], 1, 26, 0.2, 0); // stratified squamous epithelium
Knit("Quiz/QT1U.htm", ["anal canal", "oesophagus"], 1, 26, 0.01, 0); // stratified squamous epithelium
Knit("Quiz/Q291.jpg", ["stomach"], 1, 26, 1, 0.1); // low mag H&E

Knit("Quiz/Q058.jpg", ["pancreas"], 1, 27, 1, 0);
Knit("Quiz/Q065.jpg", ["liver"], 1, 28, 0.4, 0.2);
Knit("Quiz/Q068.jpg", ["liver"], 1, 28, 0.4, 0.2);
Knit("Quiz/Q064.jpg", ["liver"], 1, 28, 0.4, 0.2);
Knit("Quiz/Q066.jpg", ["gall bladder"], 1, 26, 1, 0.1);

Knit("Quiz/Q063.jpg", ["parotid gland"], 1, 27, 1, 0.1);
Knit("Quiz/Q060.jpg", ["sublingual gland"], 1, 27, 1, 0.1);
Knit("Quiz/Q062.jpg", ["submandibular gland"], 1, 27, 1, 0.1);

// GIT cells, code 26

Knit("Quiz/Q059.jpg", ["hepatocyte"], 2, 26, 0.7, 0.2); // high mag H&E
Knit("Quiz/Q068.jpg", ["hepatocyte", "macrophage"], 2, 26, 0.3, 0.2); // high mag tri
Knit("Quiz/Q068.jpg", ["macrophage", "hepatocyte"], 2, 26, 1, 0.2); // high mag tri
Knit("Quiz/Q033.jpg", ["Paneth cell", "goblet cell", "enterocyte"], 2, 26, 0.8, 0.2); // high mag H&E
Knit("Quiz/Q032.jpg", ["enterocyte", "goblet cell"], 2, 26, 0.8, 0.2); // high mag H&E
Knit("Quiz/Q032.jpg", ["goblet cell", "enterocyte"], 2, 26, 0.2, 0.2); // high mag H&E
Knit("Quiz/Q331.jpg", ["parietal cell", "chief cell"], 2, 26, 0.5, 0); // high mag H&E
Knit("Quiz/Q036.jpg", ["parietal cell"], 2, 26, 0.5, 0.2); // high mag H&E
Knit("Quiz/Q297.jpg", ["parietal cell"], 2, 26, 0.2, 0); // high mag H&E
Knit("Quiz/QT1S.htm", ["parietal cell"], 2, 26, 0.2, 0); // intrinsic factor
Knit("Quiz/Q298.jpg", ["chief cell"], 2, 26, 0.2, 0); // high mag H&E
Knit("Quiz/Q331.jpg", ["chief cell", "parietal cell"], 2, 26, 0.5, 0); // high mag H&E
Knit("Quiz/Q037.jpg", ["chief cell"], 2, 26, 0.8, 0.2); // high mag H&E
Knit("Quiz/Q220.jpg", ["intraepithelial lymphocyte"], 2, 26, 0.2, 0.2); // high mag H&E

// GIT features, code 26

Knit("Quiz/Q026.jpg", ["crypt of Lieberkühn","mucosa of the colon"], 3, 26, 1, 0.1);
Knit("Quiz/Q026.jpg", ["crypt of Lieberkühn","mucosa of the colon"], 3, 27, 0.4, 0.2);
Knit("Quiz/Q027.jpg", ["mucosa of the colon","crypt of Lieberkühn"], 3, 26, 0.8, 0.2);
Knit("Quiz/Q294.jpg", ["muscularis mucosae"], 3, 26, 1, 0); // low mag stomach H&E
Knit("Quiz/Q293.jpg", ["submucosa"], 3, 26, 1, 0); // low mag stomach H&E
Knit("Quiz/Q292.jpg", ["muscularis externa"], 3, 26, 1, 0); // low mag stomach H&E
Knit("Quiz/Q295.jpg", ["mucosa of the stomach"], 3, 26, 0.8, 0); // low mag H&E
Knit("Quiz/Q296.jpg", ["mucosa of the stomach"], 3, 26, 0.2, 0); // high mag H&E
Knit("Quiz/Q299.jpg", ["principal gland of the stomach", "corpus-fundic gland"], 3, 26, 0.5, 0); // high mag H&E
Knit("Quiz/Q299.jpg", ["corpus-fundic gland", "principal gland of the stomach"], 3, 26, 0.5, 0); // high mag H&E
Knit("Quiz/Q029.jpg", ["Brunner's glands", "submucosal gland"], 3, 26, 0.8, 0); // high mag H&E
Knit("Quiz/Q029.jpg", ["submucosal gland", "Brunner's glands",], 3, 26, 0.8, 0); // high mag H&E
Knit("Quiz/Q173.jpg", ["brush border"], 3, 26, 0.8, 0); // high mag H&E
Knit("Quiz/Q173.jpg", ["microvilli"], 3, 26, 0.2, 0); // high mag H&E
Knit("Quiz/Q305.jpg", ["microvilli"], 3, 26, 0.1, 0); // EM
Knit("Quiz/Q034.jpg", ["lacteal", "vilus", "lamina propria"], 3, 26, 1, 0); // med mag H&E
Knit("Quiz/Q221.jpg", ["lamina propria"], 3, 26, 1, 0); // high mag H&E
Knit("Quiz/Q222.jpg", ["muscularis mucosae"], 3, 26, 1, 0); // high mag H&E
Knit("Quiz/Q192.jpg", ["muscularis externa"], 3, 26, 1, 0); //low mag H&E
Knit("Quiz/Q301.jpg", ["taenia coli", "muscularis externa"], 3, 26, 0.8, 0); //low mag H&E
Knit("Quiz/Q193.jpg", ["vilus"], 3, 26, 1, 0); // low mag H&E
Knit("Quiz/Q223.jpg", ["plica circulare"], 3, 26, 1, 0); // low mag H&E
Knit("Quiz/Q219.jpg", ["Peyer's patch", "gut-associated lymphoid tissue"], 3, 26, 0.2, 0); // low mag H&E
Knit("Quiz/Q219.jpg", ["gut-associated lymphoid tissue", "Peyer's patch"], 3, 26, 0.2, 0); // low mag H&E

Knit("Quiz/Q039.jpg", ["portal triad"], 3, 26, 1, 0); // high mag H&E
Knit("Quiz/Q262.jpg", ["liver lobule"], 3, 26, 1, 0); // low mag trichrome
Knit("Quiz/Q057.jpg", ["large bile duct"], 3, 26, 0.8, 0); // high mag H&E
Knit("Quiz/Q058.jpg", ["island of Langerhans", "serous acinus"], 3, 26, 0.8, 0);
Knit("Quiz/Q120.jpg", ["central vein"], 3, 26, 0.3, 0); // med mag H&E

Knit("Quiz/Q061.jpg", ["striated duct", "serous acinus"], 3, 27, 0.8, 0);
Knit("Quiz/Q104.jpg", ["serous demilune", "serous acinus", "mucous acinus"], 3, 27, 0.8, 0);
Knit("Quiz/Q105.jpg", ["serous acinus"], 3, 27, 0.8, 0); // high mag H&E
Knit("Quiz/Q106.jpg", ["mucous acinus"], 3, 27, 0.6, 0); // high mag H&E
Knit("Quiz/Q107.jpg", ["taste bud"], 3, 26, 0.8, 0); // high mag H&E
Knit("Quiz/Q108.jpg", ["circumvallate papilla", "taste bud"], 3, 26, 0.3, 0); // low mag H&E
Knit("Quiz/Q304.jpg", ["circumvallate papilla", "taste bud"], 3, 27, 0.3, 0); // low mag VG
Knit("Quiz/Q302.jpg", ["fungiform papilla"], 3, 26, 0.2, 0); // low mag H&E
Knit("Quiz/Q303.jpg", ["filiform papilla"], 3, 26, 0.2, 0); // low mag H&E

Knit("Quiz/QT1N.htm", ["canaliculi"], 3, 26, 0.2, 0);

}; // end of if-Organs-GIT


if ( document.forms["Selector"].Organs.checked || document.forms["Selector"].Respiratory.checked ) {

// respiratory system organs, code 31 and code 26 (tubular), available codes 31-33

Knit("Quiz/Q096.jpg", ["lung"], 1, 31, 0.4, 0.5); // low mag Re
Knit("Quiz/Q097.jpg", ["lung"], 1, 31, 0.4, 0.5); // med mag H&E
Knit("Quiz/Q094.jpg", ["trachea"], 1, 26, 0.5, 1); // med mag H&E
Knit("Quiz/Q095.jpg", ["trachea"], 1, 26, 0.5, 1); // low mag H&E
Knit("Quiz/Q317.jpg", ["nose, nasal cavity, olfactory segment"], 1, 26, 0.5, 1); // low mag VG
Knit("Quiz/Q318.jpg", ["nose, nasal cavity, respiratory segment"], 1, 26, 0.5, 1); // low mag VG

// respiratory system cells, code 31

Knit("Quiz/Q098.jpg", ["alveolar type II cell"], 2, 31, 1, 0.5);
Knit("Quiz/Q319.jpg", ["olfactory cell"], 2, 31, 1, 0.5);
Knit("Quiz/QT1K.htm", ["alveolar type I cell"], 2, 31, 0.5, 0.5); // surface
Knit("Quiz/QT1J.htm", ["clara cell", "alveolar type II cell"], 2, 31, 0.2, 0.5); // function
Knit("Quiz/QT1L.htm", ["macrophage"], 2, 31, 0.5, 0.5); // location

// respiratory system features, code 31

Knit("Quiz/Q099.jpg", ["respiratory bronchiole", "alveolus"], 3, 31, 1, 0.5); // med mag H&E
Knit("Quiz/Q097.jpg", ["alveolar duct", "alveolus"], 3, 31, 1, 0.5); // med mag H&E
Knit("Quiz/Q097.jpg", ["alveolus", "alveolar duct"], 3, 31, 0.2, 0.5); // high mag H&E
Knit("Quiz/Q300.jpg", ["bronchiole"], 3, 31, 0.8, 0.5); // high mag H&E
Knit("Quiz/Q306.jpg", ["alveolus"], 3, 31, 0.8, 0.5); // high mag H&E
Knit("Quiz/Q314.jpg", ["bronchus"], 3, 31, 0.8, 0.5); // high mag H&E
Knit("Quiz/Q315.jpg", ["olfactory epithelium"], 3, 31, 0.5, 0.1); // high mag H&E
Knit("Quiz/Q316.jpg", ["respiratory epithelium", "pseudostratified epithelium"], 3, 31, 0.5, 0.1); // high mag H&E

Knit("Quiz/QT1Q.htm", ["bronchiole"], 3, 31, 0.2, 0); // structure
Knit("Quiz/QT1R.htm", ["bronchus"], 3, 31, 0.2, 0); // structure

}; // end of if-Organs-Respiratory



if ( document.forms["Selector"].Organs.checked || document.forms["Selector"].Lymphoid.checked ) {

// lymphoid organs, available codes 34-36

Knit("Quiz/Q084.jpg", ["young thymus", "thymus"], 1, 34, 1, 0.1); // low mag H&E
Knit("Quiz/Q067.jpg", ["old thymus", "thymus"], 1, 34, 1, 0.1); // low mag H&E
Knit("Quiz/Q086.jpg", ["spleen"], 1, 34, 0.8, 0); // low mag H&E
Knit("Quiz/Q086.jpg", ["spleen"], 1, 28, 0.2, 0.5); // low mag H&E
Knit("Quiz/Q087.jpg", ["lymph node"], 1, 34, 1, 0.1); // low mag H&E
Knit("Quiz/Q038.jpg", ["appendix"], 1, 34, 0.4, 0.3); // med mag H&E
Knit("Quiz/QT2R.htm", ["bone marrow"], 1, 34, 0.2, 0); // stem cells
Knit("Quiz/QT2S.htm", ["thymus", "bone marrow", "old thymus", "young thymus"], 1, 34, 0.2, 0);

// lymphoid cells

Knit("Quiz/Q220.jpg", ["intraepithelial lymphocyte"], 2, 34, 0.8, 1); // high mag H&E		
Knit("Quiz/QT2N.htm", ["reticular cell"], 2, 34, 1, 1);
Knit("Quiz/QT2O.htm", ["B-lymphocyte"], 2, 34, 1, 1); // follicles	
Knit("Quiz/QT2P.htm", ["T-lymphocyte"], 2, 34, 0.4, 1); // paracortex	
Knit("Quiz/QT2Q.htm", ["T-lymphocyte"], 2, 34, 0.4, 1); // PALS		
			
// lymphoid features

Knit("Quiz/Q085.jpg", ["high endothelial venule", "cortex of lymph node"], 3, 34, 1, 0.1); // high mag H&E
Knit("Quiz/Q101.jpg", ["subcapsular sinus", "cortex of lymph node"], 3, 34, 0.8, 0.1); // high mag H&E
Knit("Quiz/Q258.jpg", ["lymph follicle", "cortex of lymph node", "germinal center"], 3, 34, 1, 0.1); // med mag H&E
Knit("Quiz/Q259.jpg", ["cortex of lymph node"], 3, 34, 0.5, 0.1); // low mag H&E
Knit("Quiz/Q260.jpg", ["paracortex of lymph node"], 3, 34, 0.5, 0.1); // low mag H&E
Knit("Quiz/Q261.jpg", ["medulla of lymph node"], 3, 34, 0.5, 0.1); // low mag H&E
Knit("Quiz/Q102.jpg", ["central artery", "lymph follicle", "germinal center"], 3, 34, 0.8, 0.1);
Knit("Quiz/Q102.jpg", ["germinal center", "central artery", "lymph follicle"], 3, 34, 0.4, 0.1);
Knit("Quiz/Q103.jpg", ["medullary cord", "medullary sinus", "medulla of lymph node"], 3, 34, 0.8, 0.1);
Knit("Quiz/Q103.jpg", ["medullary sinus", "medullary cord", "medulla of lymph node"], 3, 34, 0.2, 0.1);

Knit("Quiz/Q219.jpg", ["Peyer's patch", "gut-associated lymphoid tissue"], 3, 34, 0.3, 0.1); // low mag H&E
Knit("Quiz/Q219.jpg", ["gut-associated lymphoid tissue", "Peyer's patch"], 3, 34, 0.3, 0.1); // low mag H&E
Knit("Quiz/Q325.jpg", ["Hassall body", "thymic corpuscle"], 3, 34, 0.2, 0.1);
Knit("Quiz/Q325.jpg", ["thymic corpuscle", "Hassal body"], 3, 34, 0.2, 0.1);

}; // end of if-Organs-Lymphoid


if ( document.forms["Selector"].Organs.checked || document.forms["Selector"].Endocrines.checked ){

// endocrine organs, glandular code 27 , parenchymal code 28, available codes 37-40

Knit("Quiz/Q090.jpg", ["neurohypophysis"], 1, 28, 0.2, 0.5);
Knit("Quiz/Q090.jpg", ["neurohypophysis"], 1, 27, 0.5, 0.1);
Knit("Quiz/QT2C.htm", ["neurohypophysis"], 1, 27, 0.1, 0.1); // oxytocin ADH
Knit("Quiz/QT2D.htm", ["hypothalamus"], 1, 27, 0.1, 0.1); // oxytocin ADH

Knit("Quiz/Q088.jpg", ["adenohypophysis"], 1, 27, 1, 0); // low mag POG

Knit("Quiz/Q051.jpg", ["parathyroid gland"], 1, 27, 0.7, 0); // low mag H&E
Knit("Quiz/Q056.jpg", ["parathyroid gland"], 1, 27, 0.3, 0); // med mag H&E

Knit("Quiz/Q048.jpg", ["adrenal gland"], 1, 27, 0.5, 0);
Knit("Quiz/Q049.jpg", ["adrenal gland"], 1, 27, 0.5, 0);

Knit("Quiz/Q053.jpg", ["thyroid gland"], 1, 27, 0.5, 0);
Knit("Quiz/Q054.jpg", ["thyroid gland"], 1, 27, 0.5, 0);
Knit("Quiz/QT1M.htm", ["thyroid gland"], 1, 27, 0.3, 0); // calcitonin

Knit("Quiz/Q324.jpg", ["pineal gland"], 1, 27, 1, 0); // calcitonin

// cells, endocrine code 37

Knit("Quiz/Q050.jpg", ["pituicyte"], 2, 37, 1, 0.1);
Knit("Quiz/Q091.jpg", ["spongiocyte"], 2, 37, 1, 0.1);
Knit("Quiz/Q055.jpg", ["follicular cell"], 2, 37, 1, 0.1);

Knit("Quiz/Q052.jpg", ["oxyphilic cell","chief cell"], 2, 37, 0.4, 0.1);
Knit("Quiz/Q052.jpg", ["chief cell","oxyphilic cell"], 2, 37, 0.8, 0.1);

Knit("Quiz/Q089.jpg", ["acidophil"], 2, 37, 0.8, 0); // high mag POG
Knit("Quiz/QT1Z.htm", ["acidophil"], 2, 37, 0.2, 0); // subtypes
Knit("Quiz/Q203.jpg", ["chromophobe"], 2, 37, 0.5, 0.1); // high mag POG
Knit("Quiz/Q205.jpg", ["basophil"], 2, 37, 0.8, 0); // high mag POG
Knit("Quiz/QT2A.htm", ["basophil"], 2, 37, 0.2, 0); // subtypes

Knit("Quiz/Q323.jpg", ["pinealocyte"], 2, 37, 1, 0); // subtypes

// endocrine cell types, text questions, code 38

Knit("Quiz/QT1V.htm", ["mammotroph", "acidophil"], 2, 38, 0.1, 0.3); // prolactin
Knit("Quiz/QT1W.htm", ["somatotroph", "acidophil"], 2, 38, 0.1, 0.3); // growth hormone
Knit("Quiz/QT1X.htm", ["gonadotroph", "basophil"], 2, 38, 0.1, 0.3); // FSH LH
Knit("Quiz/QT1Y.htm", ["corticotroph", "basophil"], 2, 38, 0.1, 0.3); // ACTH
Knit("Quiz/QT2B.htm", ["chief cell", "oxyphilic cell"], 2, 38, 0.1, 0.3); // PTH

// endocrine features, code 37

Knit("Quiz/Q050.jpg", ["Hering bodies"], 3, 37, 0.5, 0.2); // high mag PPOG

Knit("Quiz/Q047.jpg", ["zona fasciculata"], 3, 37, 0.5, 0.2); // high mag H&E
Knit("Quiz/Q092.jpg", ["zona reticularis"], 3, 37, 0.5, 0.2); // high mag H&E
Knit("Quiz/Q118.jpg", ["zona glomerulosa"], 3, 37, 0.5, 0.2); // high mag H&E
Knit("Quiz/Q119.jpg", ["adrenal medulla"], 3, 37, 0.2, 0.2); // high mag H&E
Knit("Quiz/Q202.jpg", ["adrenal medulla"], 3, 37, 0.4, 0.2); // low mag H&E
Knit("Quiz/Q201.jpg", ["adrenal cortex"], 3, 37, 0.5, 0.2); // low mag H&E

// hormones, text questions, code 39 

Knit("Quiz/QT2E.htm", ["prolactin"], 6, 39, 0.1, 0); // mammotrophs 
Knit("Quiz/QT2F.htm", ["luteinizing hormone (LH)"], 6, 39, 0.1, 0); // late follicular maturation 
Knit("Quiz/QT2G.htm", ["luteinizing hormone (LH)"], 6, 39, 0.05, 0); // oestrogen
Knit("Quiz/QT2H.htm", ["luteinizing hormone (LH)"], 6, 39, 0.1, 0); // corpus luteum
Knit("Quiz/QT2I.htm", ["luteinizing hormone (LH)"], 6, 39, 0.05, 0); // testosterone
Knit("Quiz/QT2J.htm", ["oxytocin"], 6, 39, 0.1, 0); // smooth muscle
Knit("Quiz/QT2K.htm", ["oxytocin"], 6, 39, 0.05, 0); // milk ejection reflex
Knit("Quiz/QT2L.htm", ["calcitonin"], 6, 39, 0.1, 0); // blood calcium
Knit("Quiz/QT2M.htm", ["parathyroid hormone (PTH)"], 6, 39, 0.1, 0); // blood calcium

}; // end of if-Organs-Endocrines


if ( document.forms["Selector"].Organs.checked || document.forms["Selector"].Repro.checked ){

// urinary and reproductive systems organs, code 40, available codes 40-42

Knit("Quiz/Q093.jpg", ["kidney"], 1, 28, 1, 0.2); // low mag H&E
Knit("Quiz/Q077.jpg", ["epididymis"], 1, 40, 0.4, 0); // low mag VG
Knit("Quiz/Q079.jpg", ["epididymis"], 1, 40, 0.4, 0); // high mag VG
Knit("Quiz/Q070.jpg", ["oviduct"], 1, 40, 0.6, 0); // low mag H&E
Knit("Quiz/Q070.jpg", ["oviduct"], 1, 26, 0.4, 0.1); // low mag H&E
Knit("Quiz/Q075.jpg", ["prostate"], 1, 40, 1, 0); // low mag H&E
Knit("Quiz/Q073.jpg", ["ovary"], 1, 40, 0.3, 0); // low mag H&E
Knit("Quiz/Q080.jpg", ["epididymis"], 1, 40, 0.4, 0); // high mag H&E
Knit("Quiz/Q081.jpg", ["testis"], 1, 40, 0.3, 0); // med mag H&E
Knit("Quiz/Q182.jpg", ["testis"], 1, 40, 0.7, 0.3); // low mag H&E
Knit("Quiz/Q082.jpg", ["vas deferens"], 1, 40, 1, 0); // low mag H&E
Knit("Quiz/Q046.jpg", ["ureter"], 1, 40, 1, 0); // med mag H&E
Knit("Quiz/Q078.jpg", ["seminal vesicle"], 1, 40, 1, 0); // high mag H&E
Knit("Quiz/Q109.jpg", ["uterus, proliferative phase"], 1, 40, 0.3, 0); // low mag H&E
Knit("Quiz/Q110.jpg", ["uterus, secretory phase"], 1, 40, 0.3, 0); // low mag H&E
Knit("Quiz/Q111.jpg", ["uterus, late secretory/early menstrual phase"], 1, 40, 0.3, 0); // low mag H&E

// urinary and reproductive systems cells, code 40

Knit("Quiz/Q071.jpg", ["oocyte", "granulosa cell"], 2, 40, 0.5, 0.1);
Knit("Quiz/Q072.jpg", ["oocyte", "granulosa cell"], 2, 40, 0.5, 0.1);
Knit("Quiz/Q072.jpg", ["granulosa cell", "oocyte"], 2, 40, 0.2, 0.1);
Knit("Quiz/Q307.jpg", ["granulosa cell"], 2, 40, 0.6, 0.1);
Knit("Quiz/Q074.jpg", ["peg cell"], 2, 40, 0.5, 0.1);

Knit("Quiz/Q114.jpg", ["Leydig cell"], 2, 40, 0.6, 0.1);
Knit("Quiz/Q178.jpg", ["Leydig cell"], 2, 40, 0.4, 0.1);
Knit("Quiz/Q115.jpg", ["Sertoli cell"], 2, 40, 0.4, 0.1);
Knit("Quiz/Q179.jpg", ["Sertoli cell"], 2, 40, 0.6, 0.1);
Knit("Quiz/Q181.jpg", ["spermatogonium"], 2, 40, 0.5, 0.1);
Knit("Quiz/Q184.jpg", ["spermatogonium"], 2, 40, 0.5, 0.1);
Knit("Quiz/Q180.jpg", ["primary spermatocyte"], 2, 40, 0.5, 0.1);
Knit("Quiz/Q187.jpg", ["primary spermatocyte"], 2, 40, 0.5, 0.1);
Knit("Quiz/Q185.jpg", ["secondary spermatocyte"], 2, 40, 0.2, 0.1);
Knit("Quiz/Q116.jpg", ["spermatid"], 2, 40, 0.5, 0.1);
Knit("Quiz/Q188.jpg", ["spermatid"], 2, 40, 0.5, 0.1);

Knit("Quiz/Q117.jpg", ["podocyte", "visceral layer of Bowman's capsule"], 2, 40, 0.8, 0.1); // high mag H&E
Knit("Quiz/Q117.jpg", ["visceral layer of Bowman's capsule", "podocyte"], 2, 40, 0.2, 0.1); // high mag H&E
Knit("Quiz/Q320.jpg", ["mesangial cell"], 2, 40, 0.4, 0.1); // high mag H&E
Knit("Quiz/Q321.jpg", ["parietal layer of Bowman's capsule"], 2, 40, 0.4, 0.1); // high mag H&E
Knit("Quiz/QT1O.htm", ["podocyte"], 2, 40, 0.3, 0.1);

// urinary and reproductive systems features, urinary code 41, repro code 40
      
Knit("Quiz/Q072.jpg", ["zona pelucida", "cumulus oophorus"], 3, 40, 0.5, 0.5);
Knit("Quiz/Q072.jpg", ["cumulus oophorus", "zona pelucida"], 3, 40, 0.5, 0.05);
Knit("Quiz/Q162.jpg", ["zona pelucida"], 3, 40, 0.5, 0);
Knit("Quiz/Q308.jpg", ["oocyte nucleus"], 3, 40, 0.2, 0.05);
Knit("Quiz/Q214.jpg", ["primordial follicle"], 3, 40, 1, 0.05);
Knit("Quiz/Q071.jpg", ["primary follicle", "zona pelucida"], 3, 40, 1, 0.05);
Knit("Quiz/Q309.jpg", ["theca folliculi"], 3, 40, 0.5, 0);
Knit("Quiz/Q073.jpg", ["corpus luteum", "secondary follicle"], 3, 40, 0.7, 0.05);
Knit("Quiz/Q163.jpg", ["corpus albicans"], 3, 40, 0.5, 0.05); // high mag H&E
Knit("Quiz/Q310.jpg", ["germinal epithelium"], 3, 40, 0.3, 0); // high mag H&E
Knit("Quiz/Q311.jpg", ["tunica albuginea"], 3, 40, 0.3, 0); // ovary high mag H&E
Knit("Quiz/Q069.jpg", ["lactiferous duct"], 3, 40, 0.5, 0.3); // high mag H&E
Knit("Quiz/Q112.jpg", ["uterine gland, secretory phase"], 3, 40, 0.5, 0.05); // med mag H&E
Knit("Quiz/Q113.jpg", ["uterine gland, proliferative phase"], 3, 40, 0.5, 0.05); // med mag H&E
Knit("Quiz/Q076.jpg", ["corpora amylacea"], 3, 40, 0.3, 0.05); // high mag H&E
Knit("Quiz/Q079.jpg", ["ductus epididymidis"], 3, 40, 0.8, 0.05); // high mag VG
Knit("Quiz/Q189.jpg", ["ductulus efferens"], 3, 40, 0.8, 0.05); // high mag VG
Knit("Quiz/Q081.jpg", ["seminiferous tubule"], 3, 40, 1, 0.05); // med mag H&E
Knit("Quiz/Q186.jpg", ["tunica albuginea"], 3, 40, 0.5, 0.05); // testis med mag H&E
Knit("Quiz/Q183.jpg", ["smooth muscle"], 3, 40, 0.5, 0.2); // high mag H&E

Knit("Quiz/Q042.jpg", ["glomerulus", "macula densa"], 3, 41, 0.8, 0.1);
Knit("Quiz/Q040.jpg", ["collecting duct", "distal tubule"], 3, 41, 1, 0.1);
Knit("Quiz/Q043.jpg", ["proximal tubule", "collecting duct", "distal tubule"], 3, 41, 0.3, 0.1);
Knit("Quiz/Q093.jpg", ["marrow ray", "proximal tubule", "distal tubule", "glomerulus"], 3, 41, 0.3, 0.1);
Knit("Quiz/Q044.jpg", ["proximal tubule", "distal tubule"], 3, 41, 0.7, 0.1);
Knit("Quiz/Q044.jpg", ["distal tubule", "proximal tubule"], 3, 41, 0.3, 0.1);
Knit("Quiz/Q045.jpg", ["thin tubule", "distal tubule"], 3, 41, 0.7, 0.1);
Knit("Quiz/Q045.jpg", ["distal tubule", "thin tubule"], 3, 41, 0.1, 0.1);
Knit("Quiz/Q041.jpg", ["macula densa", "glomerulus", "proximal tubule", "distal tubule"], 3, 41, 0.2, 0.1);
Knit("Quiz/Q041.jpg", ["glomerulus", "macula densa", "proximal tubule", "distal tubule"], 3, 41, 0.8, 0.1);
Knit("Quiz/Q287.jpg", ["macula densa"], 3, 41, 0.8, 0.1);

}; // end if-Organs-Repro


	// calculate the size of the norepeats array
	norepeats = Math.round( Qs * norepeatfrac ) ;

	// reset areanumber
	areanumber = 0 ;

	for ( i = 1; i <= Qs; i++ ) {
		if ( Knitem[i][3] > areanumber ) areanumber = Knitem[i][3] ;
		if ( Knitem[i][3] < 0 ) {
			negpos[n] = Math.abs(Knitem[i][3]) ;
			n++ } ;
	} ;

	for ( i = 0; i < Qtype.length; i++ ) CtrlAdmin[i] = new Array(areanumber+1) ;
	for ( i = 0; i < Qtype.length; i++ ) for ( l = 0; l <= areanumber; l++ ) CtrlAdmin[i][l] = 0 ;

	// count question type numbers in selected subject areas 
	for ( i = 1; i <= Qs; i++ ) {
		m = Knitem[i][2] ;
		l = Math.abs(Knitem[i][3]) ;
		CtrlAdmin[m][l] = CtrlAdmin[m][l] + 1 } ;

	// convert to relative frequencies
	for ( i = 0; i < Qtype.length; i++ ) {
		sumofQs = 0;
		for ( l = 0; l <= areanumber; l++ ) sumofQs = sumofQs + CtrlAdmin[i][l];
		for ( l = 0; l <= areanumber; l++ ) if ( CtrlAdmin[i][l] != 0 ) CtrlAdmin[i][l] = CtrlAdmin[i][l] / sumofQs } ;

}; // end of Knitemize

function setaquestion () {

	rightone = 0 ;
	nextone = 1 ;
	answerplace = 0 ;
	dropprob = 1 ;
	document.forms["QE"].Result.value = "" ;
	document.forms["QE"].Tellthetruth.value = "" ;
	document.forms["QE"].Feedbacktext.value = "" ;
	document.forms["QE"].TheQuestion.value = "" ;

	if ( Qs == 0 ) alert ('Select one or more topics for the test!')
	else
	{   // initialization check parenthesis

	// clear the old answers from the form
	for (i = 1; i < 5; i++) eval ( "document.forms['QE'].Answer" + i + ".value =" + "' '"); 

	// select a right answer

  if ( stepper == 0 ) {

	while ( rightone == 0 ) {

		randomnumber = Math.random()* (Qs + 0.4) ;
		rightone = Math.round(randomnumber) ;
		areacode = Knitem[rightone][3] ;

		if ( rightone != 0 && Math.random() > Knitem[rightone][4] ) rightone = 0 ;

		// check if the new right answer is an element of the lastnorepeats array 
		for ( i = 0; i < lastnorepeats.length; i++ ) {
			if ( rightone != 0 && Knitem[rightone][0] == lastnorepeats[i] ) rightone = 0 } ;

		// check areacodes for negative-positive type questions
		if ( Knitem[rightone][3] < 0 ) areacode = Math.abs(Knitem[rightone][3]) ;
		for ( i = 0; i < negpos.length; i++ )
			if ( Knitem[rightone][3] == negpos[i] ) areacode = 0 - Knitem[rightone][3]

	} ; // end of while select a right answer
  
  } ; // end of if stepper
   
	// debug line - show the right answer
	// document.forms["QE"].Feedbacktext.value = Knitem[rightone][1] ;

	// update lastnorepeats array
	lastnorepeats[counttonorepeats] = Knitem[rightone][0] ;
	counttonorepeats++ ;
	if ( counttonorepeats == norepeats) counttonorepeats = 0 ;

	// increment the number of questions set
	numberset++ ;

  // allow stepping through items for debugging and reviewing
  if ( stepper > 0 && numberset <=Qs ) {
		rightone = numberset ;
    areacode = Knitem[rightone][3];
    document.forms["QE"].Feedbacktext.value = eval ( '"' + rightone + " of " + Qs + '"') } ;
  
// write the question
	chooseq = 0;
	if ( Knitem[rightone][0].search("htm") == -1 || Knitem[rightone][0].search("img") != -1 ) {
		for ( i = 0; i < negpos.length; i++ ) {
			if ( Math.abs(areacode) == negpos[i] ) {
				chooseq = 1 ;
				if ( Knitem[rightone][3] < 0 ) negposq = 1
				else negposq = 0 } ;
		} ;
		thequestion = Knitem[rightone][2] ;
		if (chooseq == 0 ) document.forms["QE"].TheQuestion.value = Qtype[thequestion]
		else document.forms["QE"].TheQuestion.value = Qtype[thequestion][negposq] ;
	}; // end of write the question

// place the right answer
	while (0 == answerplace) {
		randomnumber = Math.random() * 4.4 ;
		answerplace = Math.round(randomnumber) } ;

// select three wrong answers
	wrong = [0,0,0,0,0] ;
	i = 1 ;
	l = 0 ;
	m = 0 ;
	while (i <= 4) {
		if ( i == answerplace ) {
			wrong[i] = 0 ;
			i++ }
		if ( i <= 4 ) {
			randomnumber = Math.random()* ( Qs + 0.4 ) ;
			wrong[i] = Math.round(randomnumber) ;
			if ( wrong[i] != 0 ) {
				checknew = wrong[i] ;
				checkagain = 1 ;

				// check the sign fit of areacodes for negative-positive type questions
				if ( Knitem[checknew][3] > 0 && areacode < 0 ) {
					checkagain = 0 ;
					i-- }
				else if ( Knitem[checknew][3] < 0 && areacode > 0 ) {
					checkagain = 0 ;
					i-- } ;

				// check if the wrong answer fits the question
				if ( checkagain == 1 && Knitem[checknew][2] != Knitem[rightone][2] ) {
					checkagain = 0 ;
          i -- } ;

				// check if the wrong answer is the right answer or a possible right answer
				if ( checkagain == 1 )
				for ( l = 0; l < Knitem[rightone][1].length && checkagain == 1; l++ )
				 	if ( Knitem[checknew][1][0] == Knitem[rightone][1][l]) {
						checkagain = 0 ;
						i-- } ;

				// check for duplicate wrong answers
				if ( checkagain == 1 && i != 1 )
					for ( k = 1; k < i; k++ ) {
						checkexist = wrong[k] ;
						checknew = wrong[i] ;
						if ( Knitem[checknew][1][0] == Knitem[checkexist][1][0]) {
							checkagain = 0 ;
							i-- } ;
					} ;

				// check for similarity, i.e. identical areacode, of right and wrong answers
				if ( checkagain == 1 && Knitem[checknew][3] != areacode) {
					m = Knitem[rightone][2] ;
					l = Math.abs(areacode) ;

					// drop the wrong answer with the probability specified in the Knitem array
					if ( Knitem[rightone][5] != 1 ) dropprob = Knitem[rightone][5] * CtrlAdmin[m][l] / (1 - CtrlAdmin[m][l]) ;
					if ( Math.random() >= dropprob ) {
						checkagain = 0 ;
						i-- } ;
				} ;

				// check for the absolute drop value specified in the Knitem array
				if ( checkagain == 1 && Math.random() > Knitem[checknew][4]) i--;

				i++;

			} ;			// end of if wrongone  != 0
		} ;				// end of if i <= 4
	} ;					// end of while "select three wrong answers"

	// display information related to the question
	if ( Knitem[rightone][0].search("none") == -1 ) itsopen = setTimeout("OpenScope(Knitem[rightone][0])",1000);
	document.forms["QE"].Numbers.value = numberset;

	// write the answers
	for ( i = 1; i < 5; i++ ) {
		wrongone = wrong[i];
		if ( i != answerplace ) eval ( "document.forms['QE'].Answer" + i + ".value =" + "Knitem[wrongone][1][0]")
		else 	eval ( "document.forms['QE'].Answer" + answerplace + ".value =" + "Knitem[rightone][1][0]") };

	} ;	 // end of initialization check
} ;		 // end of setaquestion

function Indicator () {
	performance = numberright / numberset *100;
	performance = (4 * performance - 100) / 3;
	performance = Math.round(performance);
	document.forms["QE"].Percabove.value = performance } ;

function Checkanswer () {
	if ( numberset != 0 &&  nextone != 0 )
		if ( document.forms["QE"].Choice[answerplace-1].checked ) {
			document.forms["QE"].Result.value = "correct" ;
			document.forms["QE"].Tellthetruth.value = "" ;
			document.forms["QE"].Feedbacktext.value = "" ;
			numberright ++ ;
			numberanswered ++ ;
			if (numberset > 5) Indicator() }
		else {
			document.forms["QE"].Result.value = "wrong" ;
			document.forms["QE"].Tellthetruth.value = answerplace ;
			numberwrong ++ ;
			numberanswered ++ ;
			if (numberset > 5) Indicator() } 
	else	document.forms["QE"].Feedbacktext.value = "no question set" ;
	nextone = 0 } // end of Checkanswer

function getfeedback () {
	if ( numberset > 20 && performance > 95) document.forms["QE"].Feedbacktext.value = "don't worry - be happy"
	else document.forms["QE"].Feedbacktext.value = "under construction" } // end of getfeedback

// -->
