

function myalert() {
	alert("Add one of the links to one of your pages here.")
}
<!-- Browser check -->

var isNav=document.layers?1:0
var isIE=document.all?1:0
var isNav6=document.getElementById&&!document.all?1:0

<!-- global variables for functions -->
var pos=1
var count = 0
var heightcounter = 0
var scrolltimerup
var scrolltimerdown
var opentimer
var scrolldownon="no"
var scrollupon="no"
var swappertimeron="no"
var firstloop=1
var viewcounter = 70
var viewwidth = 0
var viewcounterp = 70
var viewwidthp = 129
var obj = ""
var contentobj = ""
var speed = 50
var stepdown = -1
var stepup = 1
var stepdownn6 = 0
var stepupn6 = 0


// Sets objects according to browser after loading page
function setobjects() {

	if (isNav6) {
       obj = document.getElementById("text").style
	   contentobj = document.getElementById("text")
	   stepdownn6=-1
	   stepupn6=1
	} else if (isIE) {
       obj = eval("document.all.text.style")
	   contentobj = eval("document.all.text")
	} else {
	   obj = document.layers[1].document.layers[0]
	} 
	typetext(1)
}

<!-- loads the page group content from the textarray into the text DIV tag -->
function typetext(incoming) {
	heightcounter = 0
	pos=incoming
	if (isNav6) {
	   contentobj.innerHTML = ""
	   contentobj.innerHTML=textarray[pos]
	} else if (isIE) {
	   contentobj.innerHTML = ""
	   contentobj.insertAdjacentHTML("BeforeEnd","<font type='Verdana' size='-2' style='color:black;font-weight:normal'>"+textarray[pos]+"</font>")
	} else {
	   document.textcontainerns.document.textns.document.write("<layer>"+textarray[pos]+"</layer>")
	   document.textcontainerns.document.textns.document.close()
	} 
	   shiftto(0,0)
	   titlechg()
	   count=pos
}

<!-- changes the title in the title DIV tag -->
function titlechg() {
	if (isNav6) {
       var objc = document.getElementById("title").style
	   var contentobjc = document.getElementById("title")
	   contentobjc.innerHTML = ""
	   contentobjc.innerHTML="<font type='Verdana' size='-2' style='color:black;font-weight:normal;'>"+titlearray[pos]+"</font>"
	} else if (isIE) {
       var objc = eval("document.all.title.style")
	   var contentobjc = eval("document.all.title")
	   contentobjc.innerHTML = ""
	   contentobjc.insertAdjacentHTML("BeforeEnd","<font type='verdana' size='-2' style='color:black;font-weight:normal'>"+titlearray[pos]+"</font>")
	} else {
	   document.titlecontainerns.document.titlens.document.write("<layer><font type='verdana' size='2' style='color:black;font-weight:normal;text-align:center;'>"+titlearray[pos]+"</font></layer>")	   	   
	   document.titlecontainerns.document.titlens.document.close()
	}
}

<!-- scroll function for scrolling down through a page group -->
function scrolldown() {

stopall()
var objheight = getobjectheight()
	if(heightcounter<objheight) {
		shiftby(0,stepdown+stepdownn6)
		heightcounter = heightcounter + 1
		scrolldownon = "yes"
		scrolltimerdown = setTimeout("scrolldown()",speed)
	}else{
		stopall()
		scrollup()
		scrolldownon = "no"
		scrollupon = "yes"
	}
}

<!-- scroll function for scrolling up through a page group -->
function scrollup() {

stopall()
	if (heightcounter>=0) {
                
		shiftby(0,stepup+stepupn6)
		heightcounter = heightcounter - 1
		scrollupon = "yes"
		scrolltimerup = setTimeout("scrollup()",speed)
	}else{
		stopall()
		scrolldown()
		scrollupon = "no"
		scrolldownon = "yes"
	}
}

<!-- selects the textarray content for the next page group, or the page group manually selected by the user. -->
function nexttext(man) {
	stopall()
	heightcounter = 0
	if (man) {
		openview()
		typetext(man)
	}else{
		if (count == (textarray.length-1)) {
			count = 1
		}else{
			count = count+1
		}
		openview()
		typetext(count)
	}
}

<!-- selects the content from the previous page group in the textArray. -->
function prevtext() {
	stopall()
	heightcounter = 0
	if (count > 1) {
		count = count-1
	}else{
		count=textarray.length-1
	}
	openviewp()
	typetext(count)
}

<!-- Wipe control for moving to the next page group. -->
function openview() {	
	if (isNav6) {
       var obj = document.getElementById("textcontainer").style
	} else if (isIE) {
       var obj = eval("document.all.textcontainer.style")
	} else {
	   var obj = document.textcontainerns
	}
	if(viewcounter >=0) {
		if(isNav) {
			obj.clip.right = viewwidth
			}
		if(isIE) {
			obj.clip="rect(0 "+viewwidth+" 129 0)"
			}
		viewcounter--
		viewwidth = viewwidth+2
		opentimer = setTimeout("openview()",5);	
	}else{
		clearTimeout(opentimer)
		viewcounter = 70
		viewwidth = 0
	}
}


<!-- Wipe control for moving to the previous page group. -->
function openviewp() {	
	if (isNav6) {
       var obj = document.getElementById("textcontainer").style
	} else if (isIE) {
       var obj = eval("document.all.textcontainer.style")
	} else {
	   var obj = document.textcontainerns
	}
	if(viewcounterp >=0) {	
		if(isNav) {
			obj.clip.left = viewwidthp
			}
		if(isIE) {
			obj.clip="rect(0 129 150 "+viewwidthp+")"
			}
		viewcounterp--
		viewwidthp = viewwidthp-2
		opentimer = setTimeout("openviewp()",5);	
	}else{
		clearTimeout(opentimer)
		viewcounterp = 70
		viewwidthp = 129
	}
}

<!-- function that shifts the object to top -->
function shifttotop() {
	shiftto(0,0)
	stopall()
	heightCounter = 0
}

<!-- Positioning an object at a specific pixel coordinate -->
function shiftto(x, y) {
	if (isNav) {
		obj.moveTo(x,y)
	} else if (isNav6) {
		obj.left = x
		obj.top = y
	} else {
		obj.pixelLeft = x
		obj.pixelTop = y
	}
}

<!-- Moving an object by x and/or y pixels -->
function shiftby(deltaX, deltaY) {
	if (isNav) {
		obj.moveBy(deltaX, deltaY)
	} else if (isNav6) {
		obj.left = parseInt(obj.left) + deltaX
		obj.top = parseInt(obj.top) + deltaY
	} else {
		obj.pixelLeft += deltaX
		obj.pixelTop += deltaY
	}
}

<!-- Gets object height in pixels -->
function getobjectheight() {
	if(isNav) {
		return obj.clip.height
	}else if(isNav6) {
		return contentobj.offsetHeight
	}else{
		return contentobj.clientHeight
	}
}

<!-- function to stop running timers -->
function stopall() {
	if(scrolldownon=="yes") {
	clearTimeout(scrolltimerdown)
	scrolldownon = "no"
	}
	if(scrollupon=="yes") {
	clearTimeout(scrolltimerup)
	scrollupon = "no"
	}
	if(swappertimeron=="yes") {
	clearTimeout(swappertimer)
	swappertimeron = "no"
	}
}

