origWidth = innerWidth;origHeight = innerHeight;function reDo() {	if (innerWidth != origWidth || innerHeight != origHeight)	    location.reload();}onresize = reDo;arImLoad = ["barBg","barBgBl","bg","bgBl",            "butBd","butBu","butTd","butTu",            "tmbBg","tmbBgL","tmbBot","tmbTop"];arImList = [];for (counter in arImLoad) {    arImList[counter] = new Image();    arImList[counter].src = "images/" + arImLoad[counter] + ".gif";}docIncr = 8;barWidth = 16;thumbMinHeight = 10;origInt = 500;repeatInt = 50;initTimer = null;scrollTimer = null;bgTimer = null;thumbTimer = null;curY = null;butImage = null;pageLoaded = false;onload = initScroll;function initScroll(){	if (!pageLoaded) {pageLoaded=true;return}			makeScroll();}function makeScroll(){	elMain =  document.elCont.document.elMain;	elScroll = document.elCont.document.elScroll;	if (elMain.origTop) elMain.top = elMain.origTop;	elMain.origTop = elMain.top;	elMain.clip.top = 0;	if (elMain.origHeight) elMain.clip.height = elMain.origHeight;	elMain.origHeight = elMain.clip.height;	docHeight = elMain.document.height;	lyrHeight = elMain.clip.height;	if (docHeight <= lyrHeight){		elScroll.visibility = "hide";		return;	}	elThumb = elScroll.document.elThumb;	elThumb.top = barWidth;	elThumbBot = elThumb.document.elThumbBot;	elvBarHeight = elScroll.clip.height - (barWidth*2);	thumbHeight = Math.max((lyrHeight*elvBarHeight)/docHeight,thumbMinHeight)	elThumb.clip.height = thumbHeight;	elThumbBot.top = thumbHeight - elThumbBot.clip.height;	thumbMaxTop = (elvBarHeight + barWidth) - thumbHeight;	docToTravel = docHeight - lyrHeight;	scrToTravel = elvBarHeight - thumbHeight;	scrPixels = scrToTravel/docToTravel;	docPixels = docToTravel/scrToTravel;	upImage = elScroll.document.images[0];	elButtonBot = elScroll.document.elButtonBot;	downImage = elButtonBot.document.images[0];	upImage.direction = 0;	downImage.direction = 1;	upImage.onmousedown = butDown;			downImage.onmousedown = butDown;	elThumb.captureEvents(Event.MOUSEDOWN); 	elThumb.onmousedown = thumbDown;	elBG = elScroll.document.elBG;	elBGcol = elScroll.document.elBGcol;	elBG.captureEvents(Event.MOUSEDOWN);	elBG.onmousedown = bgDown;	elScroll.visibility="show";}function clearTimers() {	clearTimeout(initTimer);	clearInterval(scrollTimer);	initTimer = scrollTimer = null;	clearTimeout(bgTimer);	clearInterval(thumbTimer);	bgTimer = thumbTimer = null;}function butDown(e){	butImage = e.target;	dir = butImage.direction	butImage.origSrc = butImage.src;	butImage.src = (dir) ? "images/butBd.gif" : "images/butTd.gif";	butImage.onmouseout = butOut;	captureEvents(Event.MOUSEUP)	onmouseup = butUp;	butMove(dir);	if(e.type=="mousedown") initTimer = setTimeout("scrollTimer = setInterval(butMove,repeatInt,dir)",origInt);	else scrollTimer = setInterval(butMove,repeatInt,dir);	return false;}function butMove(dir) {	if ((dir && elMain.clip.top==docToTravel) || (!dir && elMain.clip.top==0)) {clearTimers();return}	elMain.top = (dir) ? Math.max(elMain.top-docIncr,elMain.origTop-docToTravel) : Math.min(elMain.top+docIncr,elMain.origTop);	elMain.clip.top = (dir) ? Math.min(elMain.clip.top+docIncr,docToTravel) : Math.max(elMain.clip.top-docIncr,0) ;	elMain.clip.height = elMain.origHeight;	elThumb.top = Math.min(Math.max(barWidth + (scrPixels*elMain.clip.top),barWidth),thumbMaxTop);}function butOut(){	clearTimers();	butImage.src = butImage.origSrc;	butImage.onmouseover = butDown;}function butUp(){	clearTimers();	butImage.src = butImage.origSrc;	butImage.onmouseout = null;	butImage.onmouseover = null;	releaseEvents(Event.MOUSEUP);	return false;}function thumbDown(e) {	curY = e.pageY;	captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); 	onmousemove = thumbMove;	onmouseup = thumbUp;	return false;}function thumbMove(e) {	difY = e.pageY - curY;	elThumb.top = Math.min(Math.max(elThumb.top+difY,barWidth),thumbMaxTop);	docAlign();	curY = e.pageY;}function thumbUp() {	releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP); }function docAlign(){	thumbDiff = elThumb.top - barWidth;	elMain.top = elMain.origTop - (thumbDiff*docPixels);	elMain.clip.top = (thumbDiff*docPixels);	elMain.clip.height = elMain.origHeight;}function bgDown(e){	dir = (e.pageY < elThumb.pageY) ? -1 : 1;	captureEvents(Event.MOUSEUP);	onmouseup = bgUp;	bgMove(e);	ev = e;	bgTimer = setTimeout("thumbTimer = setInterval(bgMove,repeatInt,ev)",origInt);	return false;}function bgMove(e){	if (e.pageY > elThumb.pageY && e.pageY <= elThumb.pageY+elThumb.clip.height) {bgUp();return}	elThumb.top = Math.min(Math.max(elThumb.top + elThumb.clip.height * dir,barWidth),thumbMaxTop);	elBGcol.top = (dir==1) ? elThumb.top : barWidth;	elBGcol.clip.bottom = (dir==1) ? scrToTravel : elThumb.top-barWidth;	elBGcol.moveAbove(elBG);	docAlign();}function bgUp(){	clearTimers();	releaseEvents(Event.MOUSEUP);	elBG.moveAbove(elBGcol);	return false;}function loadnew(num){	switch (num) {		case 0:			newFile = "oscar.html";			break;		case 1:			newFile = "raven.html";			break;		case 2:			newFile = "usher.html";			break;	}		elMain.load(newFile,376)}