/**********************************************************************************   
ChangeText 
*   Copyright (C) 2001 <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a> 
*********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()


if(document.layers){
	scrX= innerWidth; scrY= innerHeight;
	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}

msgFont="Verdana,Arial,Helvetiva,sans-serif"
msgFontSize=12
msgFontColor="#003366"
msgWidth= "95%"

messages=new Array()
messages[0]=""
messages[1]="<span class=\"anatomyDefinition\">Conjunctiva:</span> the mucous membrane covering of the anterior eye. It has two parts: the bulbar conjunctiva that covers the sclera, and the palpebral conjunctiva that covers the inner eyelids. Its main functions are to keep the cornea moist and to fend off infection.<p>&nbsp;<br>"
messages[2]="<span class=\"anatomyDefinition\">Schlemm's canal:</span> an endothelial-lined oval tube that forms part of the aqueous drainage system. It connects the trabecular meshwork internally with a plexus of deep scleral veins which ultimately drain into episcleral veins. This structure is rarely affected by disease. The trabecular meshwork is believed to be the site of obstruction in glaucoma.<p>&nbsp;<br>"
messages[3]="<span class=\"anatomyDefinition\">Extraocular muscle:</span> responsible for movement of the eye. There are six: four rectus muscles (medial, lateral, superior, inferior) and two obliques (superior and inferior).<p>&nbsp;<br>"
messages[4]="<span class=\"anatomyDefinition\">Cornea:</span> the transparent anterior refracting surface of the eye. It accounts for 2/3 of the refracting power of the eye (the lens accounts for the remaining 1/3). There are three main layers: an outer epithelium, a collagenous stroma, and an inner endothelium. If abraded or infected, the epithelium will regenerate without harming vision. But if the stroma is damaged, a scar forms to distort and opacify the cornea and reduce vision. This is why epithelial damage must be managed quickly and correctly. The endothelium has a metabolic pump that keeps water out of the cornea in order to maintain transparency. When it is damaged, the cornea becomes edematous and loses transparency.<p>&nbsp;<br>"
messages[5]="<span class=\"anatomyDefinition\">Anterior chamber:</span> bounded by the cornea in front and the iris-lens in back, it contains aqueous humor, a water-like fluid secreted by the ciliary body. When the iris becomes inflamed, cells and protein leak into the aqueous to make it turbid (\"flare\"). During infection of the anterior internal structures of the eye, white cells accumulate and settle in the bottom of the anterior chamber to form a \"hypopyon.\" In trauma, tearing of the iris vessels will result in blood collecting in the anterior chamber. Like hypopyon, it settles out inferiorly as a \"hyphema.\"<p>&nbsp;<br>"
messages[6]="<span class=\"anatomyDefinition\">Pupil:</span> the opening between the anterior and posterior chambers of the eye. Its size is controlled by constriction and dilation of the iris.<p>&nbsp;<br>"
messages[7]="<span class=\"anatomyDefinition\">Iris:</span> the diaphragm that controls the amount of light entering the eye. It has two layers, a posterior pigment epithelium and an anterior stroma made of collagen, muscle and pigment cells. The more pigment in these stromal cells, the darker the iris. There are two muscles: a circumferential parasympathetically-controlled sphincter that constricts the pupil and a radial sympathetically-controlled muscle that dilates it.<p>&nbsp;<br>"
messages[8]="<span class=\"anatomyDefinition\">Posterior chamber:</span> bounded by the iris in front and the anterior vitreous face in back. It contains aqueous secreted by the ciliary body.<p>&nbsp;<br>"
messages[9]="<span class=\"anatomyDefinition\">Zonules:</span> these fibers extend circumferentially from the ciliary muscle to the lens. When the ciliary muscle is relaxed, the zonules are tight and the lens is kept in an elongated shape. When the ciliary muscle contracts, the zonules loosen, and the lens assumes a more rounded shape. This \"rounding up\" gives the lens more refracting power and allows the eye to focus on objects viewed at reading distance, a process called \"accommodation.\" Accommodation is gradually lost with aging (\"presbyopia\") as the lens stiffens and cannot react to loosening of the zonules.<p>&nbsp;<br>"
messages[10]="<span class=\"anatomyDefinition\">Ciliary body:</span> consists of two portions, a secretory epithelium and a muscle. The secretory epithelium manufactures aqueous, a nutrient fluid. The muscle's function is to control accommodation, a change in the refracting power of the lens. When the ciliary muscle contracts, the zonules loosen, and the lens assumes a more rounded shape. This \"rounding up\" gives the lens more refracting power and allows the eye to focus on objects viewed at reading distance. Accommodation is gradually lost with aging (\"presbyopia\") as the lens stiffens and cannot react to loosening of the zonules.<p>&nbsp;<br>"
messages[11]="<span class=\"anatomyDefinition\">Lens:</span> a largely proteinaceous structure suspended by zonular ligaments. It accounts for 1/3 of the refracting power of the eye (the cornea accounts for 2/3). The anterior lens has dividing cells that migrate toward the center and lose their nuclei. Advancing age and metabolic, inflammatory, or traumatic insults bring about degeneration of lens protein and opacification of the lens (cataract). Fortunately, the lens can be removed surgically without harming the eye and replaced with a clear artificial lens implanted in the same area.<p>&nbsp;<br>"
messages[12]="<span class=\"anatomyDefinition\">Vitreous cavity:</span> is filled with the vitreous humor, a transparent gel that maintains the structure of the globe. It is made up of hyaluronic acid, collagen fibers, and a dilute salt water solution. The collagen is thickest in its peripheral portion, the vitreous cortex, which has firm attachments to the anterior retina and the border of the optic disc. With aging (or inflammation, high myopia, and trauma), the vitreous degenerates into lakes of water that place stress on its attachments to the retina. Eventually, the vitreous detaches itself from the optic disc, leaving a floater. If the peripheral vitreous cortex detaches from the retina, it may tear a hole in the retina. If fluid seeps under the hole, the retina may detach, and vision is lost. The retina must be emergently reattached surgically to preserve vision.<p>&nbsp;<br>"
messages[13]="<span class=\"anatomyDefinition\">Macula:</span> retinal region containing a high density of cones and ganglion cells specialized in visual acuity and color vision.<p>&nbsp;<br>"
messages[14]="<span class=\"anatomyDefinition\">Sclera:</span> the collagenous outer wall of the eyeball. Its outermost portion, called the episclera, has a rich vascular network. It is here that bilirubin accumulates to stain the superficial sclera yellow (\"icterus\"). The sclera becomes inflamed in connective tissue diseases, usually forming a nodule with a tangle of hyperemic episcleral and conjunctival vessels. The episclera is covered by the conjunctiva, a vascular mucous membrane.<p>&nbsp;<br>"
messages[15]="<span class=\"anatomyDefinition\">Choroid:</span> the vascular nutrient layer of the outer retina.<p>&nbsp;<br>"
messages[16]="<span class=\"anatomyDefinition\">Retina:</span> the neural inner layer of the posterior part of the eye. It has a nutrient retinal pigment epithelial outer portion and a sensory inner portion.<p>&nbsp;<br>"
messages[17]="<span class=\"anatomyDefinition\">Retinal artery & vein:</span> these vessels travel in the innermost retinal layer, and are visible through the ophthalmoscope. The arteries nourish only the retinal ganglion cells and their axons. The deeper layers of the retina get their blood from the choroid.<p>&nbsp;<br>"
messages[18]="<span class=\"anatomyDefinition\">Fovea:</span> central depression within the macula in which the retina consists only of cones. All other retinal layers are pushed aside to the surrounding area so that light can travel unimpeded directly to the cones.<p>&nbsp;<br>"
messages[19]="<span class=\"anatomyDefinition\">Optic nerve:</span> contains the retinal ganglion cell axons that are travelling to the optic chiasm and on to the lateral geniculate body.<p>&nbsp;<br>"

/********************************************************************************/

function makeChangeTextObj(obj){
   	this.css = bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
   	this.writeref = bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;	
	this.writeIt = b_writeIt;					
}
function b_writeIt(text,num){
	if (bw.ns4){
		this.writeref.write(text)
		this.writeref.close()
	}
    else this.writeref.innerHTML = messages[num]
}

function changeText(num){
	if(bw.bw) oMessage.writeIt('<table width="'+msgWidth+'" border="0" cellpadding="0" cellspacing="0"><tr><td class="anatomyText">'+messages[num]+'</td></tr></table>', num)}

function changeTextInit(){
	bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
	if (bw.opera5) bw.ns6 = 0
	
	oMessage = new makeChangeTextObj('divMessage')
	oLinks = new makeChangeTextObj('divLinks')
	if(bw.dom || bw.ie4){
		with(oMessage.writeref.style){fontFamily=msgFont; color=msgFontColor}
//		with(oMessage.writeref.style){fontFamily=msgFont; fontSize=msgFontSize+"px"; color=msgFontColor}
	}
	oMessage.css.visibility= "visible"
	oLinks.css.visibility= "visible"
}

if (bw.bw) onload = changeTextInit

function link() {
}

