<!--
numOfPages= 1;
railColor= 'ffffff';
railHilite= 'ffffff';
buttonColor= 'E7F2FF';
scrollTm= 20;
tbOffset = 18;
var pageStep = 2;
var nsAdj = 0;

function sniffIt(){
	this.opera= (navigator.userAgent.indexOf('Opera')>-1);
	this.nn4= (document.layers);
	this.ie4= (document.all && !document.getElementById);
	this.ie5= (document.getElementById && document.all && !this.opera);
	this.nn6= (document.getElementById && !document.all && !this.opera);
	this.mac= (navigator.userAgent.indexOf('Mac')>-1 && this.ie4); // For excluding IE4 macs only
	this.ok= (this.nn4 || this.ie4 || this.ie5 || this.nn6 && !this.mac && !this.opera);
}
who= new sniffIt();

px= (who.nn6)?'px':0;

if(who.nn4){
	document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN | Event.MOUSEUP);
	scrX= innerWidth;	scrY= innerHeight; nsAdj = tbOffset;
	window.onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)}}
}
function makeObj(obj,nest){
	nest= (!nest)?'':'document.'+nest+'.';
	this.sty= (who.nn4)?eval(nest+'document.'+obj):(who.ie4)?document.all[obj].style:document.getElementById(obj).style;
	this.el= (who.nn4)?this.sty:(who.ie4)?document.all[obj]:document.getElementById(obj);
	this.moveIt= moveIt;
	this.showIt= showIt;
	this.hideIt= hideIt;
	this.chgCol= chgCol;
	this.ht= (who.nn4)?this.sty.clip.height:this.el.offsetHeight;
}

function moveIt(x,y){this.x=x; this.y=y; this.sty.left=x+px; this.sty.top=y+px;}
function showIt(){this.sty.visibility= 'visible';}
function hideIt(){this.sty.visibility= 'hidden';}
function chgCol(col){if(who.nn4)this.sty.bgColor= col; else this.sty.backgroundColor= col;}

var bottom = 0;
var top = 0;

function trackIt(e){	
	if(main.active){
		var tmp= pg[main.page];
		if(main.over==1){
			var y= ((who.nn4 || who.nn6)?e.pageY:event.y-2)-yLoc;
			y= (y<=0+tbOffset)?0+tbOffset:(y>=button.limit)?button.limit:y;
			button.moveIt(0,y);
			if(y==0+tbOffset) { tmp.moveIt(0,0); bottom=0; top=1; }
			else if (y>=button.limit-tmp.step) {//tmp.moveIt(0,-tmp.ht+view.ht); 
			bottom=1; top=0;}
			else {
				tmp.moveIt(0,y*tmp.inc); 
				bottom=0; top=0;
			}
			return false;
		}
	}
}
function dragIt(e){
	var bottom = 0;
	var top = 0;
	if(window.event && event.button==1 || window.Event && e.which==1){
	    yLoc= (who.nn4 || who.nn6)?e.pageY:event.y-2;
	    if(main.over==1){
		    yLoc-= button.y;
		    main.active= 1;
	        return false;
	    }
	    else if(main.over==2){
		    yLoc= yLoc-rail.y-tbOffset;
		    scrollIt();		
	    }
	}
	else if (who.nn4) {main.over=0; main.nn=0;}
}

function scrollIt(){
	var tmp= pg[main.page];
	main.speed= (main.speed>20)?main.speed-=20:20;
	if(yLoc-button.half>button.y-tbOffset && button.y<button.limit){
//			if (bottom==1) {return;}
		if(button.y >= button.limit-tmp.step){
//		   button.moveIt(0,button.limit-tmp.step);
		   tmp.moveIt(0,-tmp.ht+view.ht);
		   top = 0;
		   bottom = 1;
		}
		else{
		   button.moveIt(0,button.y+tmp.step);
		   tmp.moveIt(0,tmp.y+(tmp.inc*tmp.step))
		   top = 0;
		   bottom = 0;
		}
		main.timerID = setTimeout('scrollIt()',main.speed); 
	}
	else if(yLoc<=button.y+tbOffset){
		if (top==1) {return;}
		if(button.y <= tbOffset){
		   button.moveIt(0,tbOffset);
			   tmp.moveIt(0,0);
		   bottom = 0;
		   top = 1;
		}
		else{
		   button.moveIt(0,button.y-tmp.step);
		   tmp.moveIt(0,tmp.y-(tmp.inc*tmp.step));
		   bottom = 0;
		   top = 0;
		}
		main.timerID = setTimeout('scrollIt()',main.speed); 
	}
	else return false;
}

function dragEnd(){
	main.active= 0;
	main.speed= 70;
	clearTimeout(main.timerID);
	return true;
}
function chgPage(num){
	pg[main.page].yPos= button.y;
	pg[main.page].hideIt();
	main.page= num;
	if(pg[num].inc==0)rail.hideIt();
	else rail.showIt();
	button.moveIt(0,pg[num].yPos)
	pg[num].moveIt(0,pg[num].inc*button.y);
	pg[num].showIt();
}
function setUp(){
	main= {}
	main.over= 0;
	main.active= 0;
	main.page= 0;
	main.nn= 0;
	main.speed= scrollTm;
	main.timerID= null;
	document.onmousemove= trackIt;
	document.onmousedown= dragIt;
	document.onmouseup= dragEnd;
	if(document.all)document.onselectstart= function(){ if(main.active)return false };
	view= new makeObj('viewPort');
	rail= new makeObj('sRail');
	rail.moveIt(railLeft,railTop);
	rail.el.onmouseover= function(){if(!main.active)main.over= 2;main.nn=1}
	rail.el.onmouseout= function(){if(!main.active)main.over= 0;main.nn=0}
	button= new makeObj('sButton','sRail');
	button.chgCol(buttonColor);
	button.moveIt(0,0+tbOffset);
	button.limit= rail.ht-button.ht-tbOffset-nsAdj;
	button.half= Math.floor(button.ht-tbOffset/2);
	button.el.onmouseover= function(e){main.over= 1;if(who.ie4 || who.ie5)event.cancelBubble= 'true';if(who.nn6)e.cancelBubble= 'true'};
	button.el.onmouseout= function(e){ if(who.nn4){if(main.nn){main.over=2}else{main.over=0}} else if(!main.active) main.over=0; }
	pg= new Array()
	for(var i=0;i<numOfPages;i++){
		pg[i]= new makeObj('page'+i,'viewPort');
		pg[i].moveIt(0,0);
		pg[i].ht= (who.nn4)?pg[i].sty.clip.height:pg[i].el.offsetHeight;
		pg[i].inc= (pg[i].ht<view.ht)?0:-((pg[i].ht-view.ht)/(rail.ht-button.ht-24-nsAdj));
		pg[i].step= pg[i].inc!=0?pageStep/-pg[i].inc:0;
		pg[i].yPos= 0;
	}
	pg[0].showIt();
	view.showIt();
	if(pg[0].inc<0)rail.showIt();
}
if(who.ok) onload= setUp;
//-->