/* this is the script for verifying where the user came from and for verifying if case is to be viewed as a known or unknown  

The script is copyright and property of Edward Escott, 1998.  Non-profit re-use or alteration is allowed if credit is given:   Edward Escott, e-mail: edescott@yahoo.com
Re-use for profit or on a commercial site is prohibitted  */

var sourceScript;
var known;
var fromLink = top.fromLink;


if ((top.fromLink == "http://www.uchsc.edu/sm/neuroimaging/tflist_test.htm") || (top.fromLink == "http://www.uchsc.edu/sm/neuroimaging/tflist.htm"))
	{known = true}
	else if (top.fromLink == "http://www.uchsc.edu/sm/neuroimaging/unklist.htm")
	{known = false}
	else {if (confirm("I can not determine where you came here from because you are not using Navigator 4.0 or Communicator 4.0.  Click OK (YES) or hit ENTER to view case as a known or CANCEL (NO) to view as an unknown.")==1) {
		    known = true}
		    else {known = false};
		}
if (known == true) {howViewed = "Known"}
	else {if (known == false) {howViewed = "Unknown"}
		else	{alert("There has been an error.  You will be sent back to the teaching file list");top.document.location="http://www.uchsc.edu/sm/neuroimaging/tflist.htm"};
}
if (confirm("You have chosen to view this as a " + howViewed + " case.  Correct?")== false) {alert("You will be returned to the teaching file list");top.document.location="http://www.uchsc.edu/sm/neuroimaging/tflist.htm"};
//	top.document.location="http://www.uchsc.edu/sm/neuroimaging/tflist.htm"};
