
<!-- 
	/*
	This portion of the script detects the user's browser type and version.  If the 
	browser is IE 3.0x or 4.0+, or Netscape 4.0+, the script writes
	a link tag to load a separate style sheet for each browser.
	You will need to supply the style sheets, and change the path
	and file names as necessary in the link tags.
	*/
	 var browser=navigator.appName;
	 var version=navigator.appVersion
	 var ver1=version.substring(0,1)
	 var ver2=version.lastIndexOf("MSIE")
	 var ver3=version.substring(ver2+5,ver2+6)
	
	 function itsNetscape() { // write the link for Netscape 4.0+
	  document.write('<LINK REL=StyleSheet HREF="../styles/nc4.css" TYPE="text/css">')
	 }	
	 function itsMsie() { // find out which version of IE is in use
	  if (browser == "Microsoft Internet Explorer")
	  ieVersion()
	 }
	 function ieVersion(){ // write the link for IE3 or IE4+
	  if (ver1 >= 4)
	   document.write('<LINK REL=StyleSheet HREF="../styles/ie4.css" TYPE="text/css">')
	  if (ver3 == 3)
	   document.write('<LINK REL=StyleSheet HREF="../styles/ie3.css" TYPE="text/css">')
	 }
	 if ((browser == "Netscape") && (ver1 >= 4)){ // check to see if the browser is Netscape
	  itsNetscape()
	 }
	 else{ // otherwise assume the browser is IE
	  itsMsie()
	 }
	/*
	This portion of the script creates the finds the location of the previous, next, and first files
	in a regularly numbered set of HTML files that all reside in the same
	directory.  The files must be named in the form: xxxx000.html, xxxx001.html,
	and so forth, where xxxx can be any consistent string of characters
	of any length.  The extension need not be 'html', so long as it is the
	same for all file.
	One function sets the
	location to the previous file, the other to the next file.
	These functions can be used for Previous and Next page links
	by setting the HREF values in the respective A tags to
	javascript:previousFile() and javascript:nextFile().
	Note that this script should be placed in the HEAD section
	of the file, to insure that the functions are loaded before
	the links that call them.
	*/
		var URL = unescape(location.href)	// get current URL in plain ASCII
		var xstart = URL.lastIndexOf("/") + 1
		var xend = URL.length
		var digitOnePlace = URL.lastIndexOf('.') - 2
		var digitTwoPlace = URL.lastIndexOf('.') - 1
		var digitOne = URL.charAt(digitOnePlace)
		var digitTwo = URL.charAt(digitTwoPlace)
		var filePrefix = URL.substring(xstart,digitOnePlace)
		var suffixStart = URL.lastIndexOf('.')
		var fileSuffix = URL.substring(suffixStart,xend)
		var previousFileName = null
		var nextFileName = null
		var firstFileName = null
		
		/* The following lines provide a workaround for the JS
		implementation in Opera 3.0, which treats all elements
		of a string as string values, and therefore cannot
		perform arithmatical operations on them correctly;
		to get around this, I create new variables with number
		values equivalent to the values of digitOne and digitTwo
		*/
		var dig1 = null
		var dig2 = null
		dig1 = parseInt(digitOne)
		dig2 = parseInt(digitTwo)

	function previousFile() { // construct the name of the previous file in the set and jump to it

		if (dig2 == 0) {
			dig2 = 9
			dig1--
		}
		else {
			dig2--
		}
		previousFileName = filePrefix + dig1 + dig2 + fileSuffix
		location.href = previousFileName
	}
	
	function nextFile() { // construct the name of the next file in the set and jump to it
	if (dig2 == 9) {
			dig2 = 0
			dig1++
		}
		else {
			dig2++
		}
		nextFileName = filePrefix + dig1 + dig2 + fileSuffix
		location.href = nextFileName
	
	}

	function firstFile() { // construct the name of the first file in the set and jump to it
			dig2 = 0
			dig1 = 0
		firstFileName = filePrefix + dig1 + dig2 + fileSuffix
		location.href = firstFileName
	
	}

//  -->

