/**********************************************************************************   
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\">Nasal retina:</span> transduces light from the temporal visual field and <a class=\"popUp\" href=\"javascript:link()\" onClick=\"popUpPhoto(\'nasal-retina.html\',390,400)\">sends neural signals across the chiasm to the contralateral brain hemisphere</a>.<p> <span class=\"anatomyDefinition\">Temporal retina:</span> transduces light from the nasal visual field and <a class=\"popUp\" href=\"javascript:link()\" onClick=\"popUpPhoto(\'temporal-retina.html\',390,400)\">sends neural signals to the ipsilateral brain hemisphere</a>.<p> <i>Nasal & Temporal retina working together:</i><p><a class=\"popUp\" href=\"javascript:link()\" onClick=\"popUpPhoto(\'left-hemifield-path.html\',390,500)\">An object viewed in the left hemifield sends visual signals to the right visual cortex.</a><p><a class=\"popUp\" href=\"javascript:link()\" onClick=\"popUpPhoto(\'right-hemifield-path.html\',390,500)\">An object viewed in the right hemifield sends visual signals to the left visual cortex.</a><p>&nbsp;<br>"
messages[2]="<span class=\"anatomyDefinition\">Temporal retina:</span> transduces light from the nasal visual field and <a class=\"popUp\" href=\"javascript:link()\" onClick=\"popUpPhoto(\'temporal-retina.html\',390,400)\">sends neural signals to the ipsilateral brain hemisphere</a>.<p> <span class=\"anatomyDefinition\">Nasal retina:</span> transduces light from the temporal visual field and <a class=\"popUp\" href=\"javascript:link()\" onClick=\"popUpPhoto(\'nasal-retina.html\',390,400)\">sends neural signals across the chiasm to the contralateral brain hemisphere</a>.<p> <i>Nasal & Temporal retina working together:</i><p><a class=\"popUp\" href=\"javascript:link()\" onClick=\"popUpPhoto(\'left-hemifield-path.html\',390,500)\">An object viewed in the left hemifield sends visual signals to the right visual cortex.</a><p><a class=\"popUp\" href=\"javascript:link()\" onClick=\"popUpPhoto(\'right-hemifield-path.html\',390,500)\">An object viewed in the right hemifield sends visual signals to the left visual cortex.</a><p>&nbsp;<br>"
messages[3]="<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[4]="<span class=\"anatomyDefinition\">Optic tract:</span> contains the retinal ganglion cell axons carrying visual signals from the contralateral hemifield. That is, the right optic tract has information about the left hemifield, and vice versa. Damage to the right optic tract (tumor or stroke, usually) would knock out vision from the temporal hemifield seen by the left eye and the nasal hemifield seen by the right eye (\"homonymous hemianopia\").<p>&nbsp;<br>"
messages[5]="<span class=\"anatomyDefinition\">Primary visual cortex:</span> the reception area for the optic radiations. Shape and luminance are encoded here, but color, texture, depth perception, and movement are not encoded until the signal is sent on to visual association cortex nearby.<p>&nbsp;<br>"
messages[6]="<span class=\"anatomyDefinition\">Optic chiasm:</span> where the two optic nerves come together and where the optic tracts start. The chiasm sorts retinal ganglion axons for the optic tracts so that those coming from nasal retina (temporal visual field) cross to the tract on the opposite side and those coming from temporal retina (nasal visual field) do not cross. The crossing fibers are much more vulnerable to any disease process than the non-crossing fibers. Therefore, loss of the temporal fields is the most common vision defect (\"bitemporal hemianopia\"). Pituitary tumors, meningiomas, aneurysms, and craniopharyngiomas are the most common causes of these defects.<p>&nbsp;<br>"
messages[7]="<span class=\"anatomyDefinition\">Lateral geniculate body:</span> contains the synapses of the retinal ganglion cell axons on cells that send their axons to the primary visual cortex in the occipital lobe. Damage is usually caused by stroke or head trauma. As with optic tract damage, the visual field loss is a contralateral homonymous hemianopia.<p>&nbsp;<br>"
messages[8]="<span class=\"anatomyDefinition\">Optic radiations:</span> carry the axons of the lateral geniculate body. These radiations are snug against the outer border of the posterior portion of the lateral ventricles. They are damaged by stroke, tumor, and disorders affecting white matter.<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() {
}

