/**********************************************************************************   
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= "100%"

messages=new Array()
messages[0]=""
messages[1]="<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[2]="<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[3]="<span class=\"anatomyDefinition\">Ganglion cell:</span> conveys visual signals through the optic nerve to the lateral geniculate body in the thalamus.<p>&nbsp;<br>"
messages[4]="<span class=\"anatomyDefinition\">Bipolar cell:</span> way station in neural pathway from rods and cones to ganglion cells.<p>&nbsp;<br>"
messages[5]="<span class=\"anatomyDefinition\">Rod:</span> the photoreceptor that transduces light into neural signals responsible for vision in low light situations.<p>&nbsp;<br>"
messages[6]="<span class=\"anatomyDefinition\">Cone:</span> the photoreceptor that transduces light into neural signals responsible for high resolution and color vision.<p>&nbsp;<br>"
messages[7]="<span class=\"anatomyDefinition\">Retinal pigment epithelium:</span> a single layer of hexogonal cells that provides metabolic support to the rods and cones (photoreceptors). The tight junctions between retinal pigment epithelial cells form the outer blood-retinal barrier, which prevents macromolecules that escape from choroidal vessels from entering the retina.<p>&nbsp;<br>"
messages[8]="<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[9]="<span class=\"anatomyDefinition\">Choroid:</span> the vascular nutrient layer of the outer retina.<p>&nbsp;<br>"
messages[10]="<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[11]="<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>"
messages[12]="<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[13]="<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[14]="<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>"

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

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() {
}

