glossary = new glossClass();
id = 0;


/*========================
A
========================*/

glossary.AddEntry("Absorption", "The total or partial absorption of light falling onto a surface or passing through a medium such as %water%.  The absorbed light is converted to heat.  The light not absorbed is either transmitted (by transparent or translucent substances) or reflected (by opaque substances).");
glossary.AddEntry("Aperture", "The aperture, or diaphram, is a circular hole in the middel of the lens through which light passes through the lens. The aperture can be fixed or adjustable depending on the type of camera. With an adjustable aperture the amount of light that passes through the lens can be altered by changing the size of the hole that lets light through. Wide open aperture lets as much light into the camera as possible. Stopped down aperture redusces the amount of light entering the camera. Aperture settings are marked in standard f/numbers or f/stops ('f' is a symbol for the word focal). They indicate the diameter of the aperture opening. Typically marked as f/22, f16, f11, f8, f5.6, f4, and f2.8. f/numbers are calculated by dividing the focal length of the lens by the diameter of the opening. A high f/number (such as 22) has a small diameter opening, a low f/number (such as f2.8) has a large diameter opening.");

glossary.AddRefer("Absorb", "Absorption");

/*========================
B
========================*/


/*========================
C
========================*/
glossary.AddEntry("Close-Up Lens", "Is a lens placed in front of the primary lens to enable the subject to be focused with a shorter subject /camera distance.");
glossary.AddRefer("Close-Up Outfit", "Close-Up Lens");
/*========================
D
========================*/
glossary.AddEntry("Depth of Field", "Depth-of-field is the range between which objects are focussed. The larger the f-number (or smaller aperture) the greater the Depth of field. For example: an f-number of 2.8 will give a shallower depth-of-field than an f-number of 22.");


/*========================
E
========================*/
glossary.AddEntry("Extension Tubes", "Tubes, placed between the lens and camera, to allow for greater magnification. In underwater photography they are commonly 3:1, 2:1, 1:1, 1:2.");
glossary.AddRefer("Extension Tube", "Extension Tubes");
glossary.AddEntry("Equalize", "Too avoid injury a diver needs to equalize the air space in his middle ear. Equalize means to add air until both internal and external air pressures are equal.");



/*========================
F
========================*/
glossary.AddEntry("Flash", "An artificial light source giving a short but very bright light of the same quality as daylight. Bulb flashes are for once only use, whilst electronic flashes can be used repeatedly.");
glossary.AddEntry("f-numbers", "Numbers on the lens barrel that indicate the size of the aperture relative to the focal length of the lens. f-numbers are calculated by dividing the focal length of the lens by the effective diameter of the aperture. For example an 80mm lens with an effective aperture of 20mm gives and f-number of f4. All lenses stopped down to the same f-number should transmit the same amount of light. Every change of number indicates a doubling or halving of the size of the aperture and therefore the amount of light transmitted.");


/*========================
G
========================*/



/*========================
H
========================*/
glossary.AddEntry("Housing", "A specially designed waterproof case allowing you to use conventional cameras underwater. They are designed for a specific camera. Special housings are also available for flashguns. ");


/*========================
I
========================*/



/*========================
J
========================*/


/*========================
K
========================*/
glossary.AddEntry("Kelvins(K)", "Units of measurement on the absolute temperature scale. They are used to measure the relative color quality of light sources. They can vary between 2000K and 10000k.");


/*========================
L
========================*/
glossary.AddEntry("Lens", "The Lens is, in its simplest form, a disk of highly polished ground glass with the ends thinner than the center. The lens collects light from the subject and focuses it into a bright clear image. The focal length of the lens is the distance from the lens to the focal plane, and is a measure of how much the lens can 'bend' light. The focal plane is the point at which light from the subject is brought to sharp focus. Camera lenses are usually combinations of converging and diverging lenses.");



/*========================
M
========================*/



/*========================
N
========================*/
glossary.AddEntry("Nikonos II", "Underwater camer from Nikon. <img src=\"http://nikonimaging.com/global/products/filmcamera/underwater/2/img/pic_001.jpg\"/><br><a target=\"_top\" href=\"http://nikonimaging.com/global/products/filmcamera/underwater/2/\">NIKONOS II - features and specifications </a> ");
glossary.AddEntry("Nikonos III", "Underwater camer from Nikon. <img src=\"http://nikonimaging.com/global/products/filmcamera/underwater/3/img/pic_001.jpg\"/><br><a target=\"_top\" href=\"http://nikonimaging.com/global/products/filmcamera/underwater/3/\">NIKONOS III - features and specifications </a> ");
glossary.AddEntry("Nikonos IV-A", "Underwater camer from Nikon. <img src=\"http://nikonimaging.com/global/products/filmcamera/underwater/4-a/img/pic_001.jpg\"/><br><a target=\"_top\" href=\"http://nikonimaging.com/global/products/filmcamera/underwater/4-a/\">NIKONOS IV-A - features and specifications </a> ");
glossary.AddEntry("Nikonos V", "Underwater camer from Nikon. <img src=\"http://nikonimaging.com/global/products/filmcamera/underwater/5/img/pic_001.jpg\"/><br><a target=\"_top\" href=\"http://nikonimaging.com/global/products/filmcamera/underwater/5/\">NIKONOS 5 - features and specifications </a> ");
glossary.AddEntry("Nikonos RS", "Underwater camer from Nikon. <img src=\"http://nikonimaging.com/global/products/filmcamera/underwater/rs/img/pic_001.jpg\"/><br><a target=\"_top\" href=\"http://nikonimaging.com/global/products/filmcamera/underwater/RS/\">NIKONOS RS - features and specifications </a> ");
glossary.AddEntry("Nikonos Calypso", "Underwater camer from Nikon. <img src=\"http://nikonimaging.com/global/products/filmcamera/underwater/nikonos/img/pic_001.jpg\"/><br><a target=\"_top\" href=\"http://nikonimaging.com/global/products/filmcamera/underwater/nikonos/index.htm\">NIKONOS Calypso - features and specifications </a> ");


/*========================
O
========================*/
glossary.AddEntry("O-rings", "O-rings seal your camera or equipment preventing water from entering. If your o-rings are not good then your camera is not waterproof! O-rings are circular elastic rings that fit between camera parts to prevent water from passing between them. They distort under pressure to provide an even greater sealing ability.");
glossary.AddRefer("O-ring", "O-rings");


/*========================
P
========================*/




/*========================
Q
========================*/



/*========================
R
========================*/



/*========================
S
========================*/
glossary.AddEntry("Shutter and Shutter speed", "The Shutter keeps light from the film until the instant of exposure. It also controls the length of time that light hits the film. It typically remains open for a fraction of a second. Shutter speeds are calibrated in a standard series of fractions of a second - such as 1/30, 1/60, 1/125, 1/250. 1/500, and 1/1000. Slow shutter speeds (such as 1/30) let more light hit the film than fast shutter speeds (such as 1/500). Picture sharpness is influenced by shutter speeds. Slow shutter speeds that stay open for a long period of time may allow for camera or subject movement, resulting in blurred pictures.");
glossary.AddRefer("Shutter", "Shutter and Shutter speed");
glossary.AddRefer("Shutter speed", "Shutter and Shutter speed");

glossary.AddEntry("Symbiosis", "Symbiosis (pl. symbioses) (from the Greek words syn = con/plus and biono = living) is an interaction between two organisms living together in more or less intimate association or even the merging of two dissimilar organisms. The term host is usually used for the larger (macro) of the two members of a symbiosis. The smaller (micro) member is called the symbiont (alternately, symbiote, and the plural is symbionts or symbiotes). When a microscopic symbiont lives inside a host, it is referred to as an endosymbiont.");

/*========================
T
========================*/




/*========================
U
========================*/



/*========================
W
========================*/
glossary.AddEntry("Water", "The wet stuff");



/*========================
X
========================*/




//******************************************
//
//  E N D    O F    G L O S S A R Y
//
//******************************************




function glossClass()
{
	this.theGlossary = new Array;
	this.errors = new Array;
	this.entries = new Array;
	this.AddEntry = _AddEntry;
	this.AddRefer = _AddRefer;
	this.TraceEntry = _TraceEntry;
	this.TraceEntryName = _TraceEntryName;
}

function _AddEntry(entry, definition)
{
	var lcEntry = entry.toLowerCase();

	if (this.theGlossary[lcEntry] != null)
		this.errors[this.errors.length] = "Warning:\tDuplicate entry (" + entry + ") added, old value overwritten.";
	else
		this.entries[this.entries.length] = lcEntry;

	this.theGlossary[lcEntry] = new glossEntry(entry, definition);
}

function _AddRefer(entry, referTo)
{
	var lcEntry = entry.toLowerCase();
	var lcReferTo = referTo.toLowerCase();

	if (lcEntry == lcReferTo)
	{
		this.errors[this.errors.length] = "Error:\tReferral (" + entry + ") refers to itself.  Ignored.";
		return;
	}

	if (this.theGlossary[lcEntry] != null)
		this.errors[this.errors.length] = "Warning:\tDuplicate entry (" + entry + ") added, old value overwritten.";

	var temp = this.TraceEntryName(lcReferTo);

	if (temp && temp == lcEntry)
	{
		this.errors[this.errors.length] = "Error:\tReferral (" + entry + ") is circular.  Dummy entry added instead.";
		this.AddEntry(entry, "[!circular!] Dummy entry to prevent circularity. Please contact the online course administrator.");
		return;
	}

	this.entries[this.entries.length] = lcEntry;

	this.theGlossary[lcEntry] = new glossRefer(entry, lcReferTo);	
}

function glossEntry(entry, definition)
{
	this.entry = entry;
	this.definition = definition;
	this.isEntry = true;
	this.id = id;
	id++;
}

function glossRefer(entry, referTo)
{
	this.entry = entry;
	this.referTo = referTo;
	this.isEntry = false;
	this.id = id;
	id++;
}

function _TraceEntryName(entry)
{
	var result = "";
	do
	{
		var temp = this.theGlossary[entry.toLowerCase()];
		if (temp && temp.isEntry == false)
			entry = temp.referTo;
		else  // we hit an entry or a dead end
			result = entry;

	}while(result == "")

	return result;
}

function _TraceEntry(entry)
{
	var temp = this.TraceEntryName(entry.toLowerCase());
	
	if (temp)
		return this.theGlossary[temp];
	else
		return null;
}
