// JavaScript Document
// Made by geeeet@ghtml.com
// Keep these two lines and you're free to use this code

// Known bugs :
// If ie4.5 mac, please press apple-t to remove sidebar, otherwise everything is pushed 20px to the right...

// Corrected bugs :
// 25.01.2001 - When the height of the span "content" was less than the height of the span "contentClip" a javascript error occured, function changed : move()
// 21.02.2001 - Scrolling text wasn't selectable in ie, function changed : move()
// 05.03.2001 - Ie x and y coordinates was wrong when page was scrolled, function changed : getMouse()

// 19.04.2001 - Finally able to remove browser-scrollbar if content is longer than the browser is high:
// Just put this in the style-tag right before the end head-tag:
// body {margin-left:0; margin-right:0; margin-top:0; margin-bottom:0; width:100%;height:100%;overflow:hidden}

// Touch me here :-)
var upH1 = 9; // Height of up-arrow
var upW1 = 9; // Width of up-arrow
var downH1 = 9; // Height of down-arrow
var downW1 = 9; // Width of down-arrow
var dragH1 = 40; // Height of scrollbar
var dragW1 = 9; // Width of scrollbar
var dragTop1 = 632; // Top of Drag
var contentTop1 = 622;
var scrollH1 = 97; // Height of scrollbar
var upH2 = 9; // Height of up-arrow
var upW2 = 9; // Width of up-arrow
var downH2 = 9; // Height of down-arrow
var downW2 = 9; // Width of down-arrow
var dragH2 = 40; // Height of scrollbar
var dragW2 = 9; // Width of scrollbar
var dragTop2 = 632; // Top of Drag
var contentTop2 = 622;
var scrollH2 = 97; // Height of scrollbar
var upH3 = 9; // Height of up-arrow
var upW3 = 9; // Width of up-arrow
var downH3 = 9; // Height of down-arrow
var downW3 = 9; // Width of down-arrow
var dragH3 = 40; // Height of scrollbar
var dragW3 = 9; // Width of scrollbar
var dragTop3 = 632; // Top of Drag
var contentTop3 = 622;
var scrollH3 = 97; // Height of scrollbar
var upH4 = 9; // Height of up-arrow
var upW4 = 9; // Width of up-arrow
var downH4 = 9; // Height of down-arrow
var downW4 = 9; // Width of down-arrow
var dragH4 = 40; // Height of scrollbar
var dragW4 = 9; // Width of scrollbar
var dragTop4 = 632; // Top of Drag
var contentTop4 = 622;
var scrollH4 = 97; // Height of scrollbar
var upH5 = 9; // Height of up-arrow
var upW5 = 9; // Width of up-arrow
var downH5 = 9; // Height of down-arrow
var downW5 = 9; // Width of down-arrow
var dragH5 = 40; // Height of scrollbar
var dragW5 = 9; // Width of scrollbar
var dragTop5 = 214; // Top of Drag
var contentTop5 = 204;
var scrollH5 = 338; // Height of scrollbar
var speed = 4; // Scroll speed

var decScroll = 0;

// And now... go to the bottom of the page...

// Browser detection
var dom = document.getElementById ? true:false;
var nn4 = document.layers ? true:false;
var ie4 = document.all ? true:false;

var mouseY; // Mouse Y position onclick
var mouseX; // Mouse X position onclick

var clickUp = false; // If click on up-arrow
var clickDown = false; // If click on down-arrow
var clickDrag1 = false; // If click on scrollbar
var clickDrag2 = false; // If click on scrollbar
var clickDrag3 = false; // If click on scrollbar
var clickDrag4 = false; // If click on scrollbar
var clickDrag5 = false; // If click on scrollbar
var clickAbove = false; // If click above scrollbar
var clickBelow = false; // If click below scrollbar

var numglob;

var timer = setTimeout("",500); // Repeat variable
var upL1; // Up-arrow X
var upT1; // Up-arrow Y
var downL1; // Down-arrow X
var downT1; // Down-arrow Y
var dragL1; // Scrollbar X
var dragT1; // Scrollbar Y
var rulerL1; // Ruler X
var rulerT1; // Ruler Y
var contentT1; // Content layer Y;
var contentH1; // Content height
var contentClipH1; // Content clip height
var scrollLength1; // Number of pixels scrollbar should move
var startY1; // Keeps track of offset between mouse and span
var upL2; // Up-arrow X
var upT2; // Up-arrow Y
var downL2; // Down-arrow X
var downT2; // Down-arrow Y
var dragL2; // Scrollbar X
var dragT2; // Scrollbar Y
var rulerL2; // Ruler X
var rulerT2; // Ruler Y
var contentT2; // Content layer Y;
var contentH2; // Content height
var contentClipH2; // Content clip height
var scrollLength2; // Number of pixels scrollbar should move
var startY2; // Keeps track of offset between mouse and span
var upL3; // Up-arrow X
var upT3; // Up-arrow Y
var downL3; // Down-arrow X
var downT3; // Down-arrow Y
var dragL3; // Scrollbar X
var dragT3; // Scrollbar Y
var rulerL3; // Ruler X
var rulerT3; // Ruler Y
var contentT3; // Content layer Y;
var contentH3; // Content height
var contentClipH3; // Content clip height
var scrollLength3; // Number of pixels scrollbar should move
var startY3; // Keeps track of offset between mouse and span
var upL4; // Up-arrow X
var upT4; // Up-arrow Y
var downL4; // Down-arrow X
var downT4; // Down-arrow Y
var dragL4; // Scrollbar X
var dragT4; // Scrollbar Y
var rulerL4; // Ruler X
var rulerT4; // Ruler Y
var contentT4; // Content layer Y;
var contentH4; // Content height
var contentClipH4; // Content clip height
var scrollLength4; // Number of pixels scrollbar should move
var startY4; // Keeps track of offset between mouse and span
var upL5; // Up-arrow X
var upT5; // Up-arrow Y
var downL5; // Down-arrow X
var downT5; // Down-arrow Y
var dragL5; // Scrollbar X
var dragT5; // Scrollbar Y
var rulerL5; // Ruler X
var rulerT5; // Ruler Y
var contentT5; // Content layer Y;
var contentH5; // Content height
var contentClipH5; // Content clip height
var scrollLength5; // Number of pixels scrollbar should move
var startY5; // Keeps track of offset between mouse and span

function RePosAll() {
	for(i=1 ; i<=5 ; i++) {
		if(ie4){
			document.all["ruler"+i].style.top = eval("dragTop"+i);
			document.all["drag"+i].style.top = eval("dragTop"+i);
			document.all["content"+i].style.top = 0;
		}
		else if(nn4){
			document["ruler"+i].top = eval("dragTop"+i);
			document["drag"+i].top = eval("dragTop"+i);
			document["content"+i].top = eval("contentTop"+i);
		}
		else if(dom){
			document.getElementById("drag"+i).style.top = eval("dragTop"+i) + "px";
			document.getElementById("ruler"+i).style.top = eval("dragTop"+i) + "px";
			document.getElementById("contentClip"+i).style.top = eval("contentTop"+i) + "px";
		}
	}
}

function RePos(num) {
	if(ie4){
		document.all["ruler"+num].style.top = eval("dragTop"+num);
		document.all["drag"+num].style.top = eval("dragTop"+num);
		document.all["content"+num].style.top = 0;
	} else if(nn4){
		document["ruler"+num].top = eval("dragTop"+num);
		document["drag"+num].top = eval("dragTop"+num);
		document["content"+num].top = eval("contentTop"+num);
	} else if(dom){
		document.getElementById("drag"+num).style.top = eval("dragTop"+num) + "px";
		document.getElementById("ruler"+num).style.top = eval("dragTop"+num) + "px";
		document.getElementById("contentClip"+num).style.top = eval("contentTop"+num) + "px";
	}
}

// Mousedown
function down(e){
	if((document.layers && e.which!=1) || (document.all && event.button!=1)) return true; // Enables the right mousebutton
	getMouse(e);
	startY1 = (mouseY - dragT1);
	startY2 = (mouseY - dragT2);
	startY3 = (mouseY - dragT3);
	startY4 = (mouseY - dragT4);
	startY5 = (mouseY - dragT5);
		
	// If click on up-arrow
	if(mouseX >= upL1 && (mouseX <= (upL1 + upW1)) && mouseY >= upT1 && (mouseY <= (upT1 + upH1))){
		clickUp = true;
		return scrollUp(1);
	}	
	else if(mouseX >= upL2 && (mouseX <= (upL2 + upW2)) && mouseY >= upT2 && (mouseY <= (upT2 + upH2))){
		clickUp = true;
		return scrollUp(2);
	}	
	else if(mouseX >= upL3 && (mouseX <= (upL3 + upW3)) && mouseY >= upT3 && (mouseY <= (upT3 + upH3))){
		clickUp = true;
		return scrollUp(3);
	}
	else if(mouseX >= upL4 && (mouseX <= (upL4 + upW4)) && mouseY >= upT4 && (mouseY <= (upT4 + upH4))){
		clickUp = true;
		return scrollUp(4);
	}
	else if(mouseX >= upL5 && (mouseX <= (upL5 + upW5)) && mouseY >= upT5 && (mouseY <= (upT5 + upH5))){
		clickUp = true;
		return scrollUp(5);
	}
	// Else if click on down-arrow
	else if(mouseX >= downL1 && (mouseX <= (downL1 + downW1)) && mouseY >= downT1 && (mouseY <= (downT1 + downH1))){
		clickDown = true;
		return scrollDown(1);
	}
	else if(mouseX >= downL2 && (mouseX <= (downL2 + downW2)) && mouseY >= downT2 && (mouseY <= (downT2 + downH2))){
		clickDown = true;
		return scrollDown(2);
	}
	else if(mouseX >= downL3 && (mouseX <= (downL3 + downW3)) && mouseY >= downT3 && (mouseY <= (downT3 + downH3))){
		clickDown = true;
		return scrollDown(3);
	}
	else if(mouseX >= downL4 && (mouseX <= (downL4 + downW4)) && mouseY >= downT4 && (mouseY <= (downT4 + downH4))){
		clickDown = true;
		return scrollDown(4);
	}
	else if(mouseX >= downL5 && (mouseX <= (downL5 + downW5)) && mouseY >= downT5 && (mouseY <= (downT5 + downH5))){
		clickDown = true;
		return scrollDown(5);
	}
	// Else if click on scrollbar
	else if(mouseX >= dragL1 && (mouseX <= (dragL1 + dragW1)) && mouseY >= dragT1 && (mouseY <= (dragT1 + dragH1))){
		numglob = 1;
		clickDrag1 = true;
		return false;
	}
	else if(mouseX >= dragL2 && (mouseX <= (dragL2 + dragW2)) && mouseY >= dragT2 && (mouseY <= (dragT2 + dragH2))){
		numglob = 2;
		clickDrag2 = true;
		return false;
	}
	else if(mouseX >= dragL3 && (mouseX <= (dragL3 + dragW3)) && mouseY >= dragT3 && (mouseY <= (dragT3 + dragH3))){
		numglob = 3;
		clickDrag3 = true;
		return false;
	}
	else if(mouseX >= dragL4 && (mouseX <= (dragL4 + dragW4)) && mouseY >= dragT4 && (mouseY <= (dragT4 + dragH4))){
		numglob = 4;
		clickDrag4 = true;
		return false;
	}
	else if(mouseX >= dragL5 && (mouseX <= (dragL5 + dragW5)) && mouseY >= dragT5 && (mouseY <= (dragT5 + dragH5))){
		numglob = 5;
		clickDrag5 = true;
		return false;
	}
	else if(mouseX >= dragL1 && (mouseX <= (dragL1 + dragW1)) && mouseY >= rulerT1 && (mouseY <= (rulerT1 + scrollH1))){
		// If click above drag
		if(mouseY < dragT1){
			clickAbove = true;
			clickUp = true;
			return scrollUp(1);
		}
		// Else click below drag
		else {
			clickBelow = true;
			clickDown = true;
			return scrollDown(1);
		}
	}
	else if(mouseX >= dragL2 && (mouseX <= (dragL2 + dragW2)) && mouseY >= rulerT2 && (mouseY <= (rulerT2 + scrollH2))){
		// If click above drag
		if(mouseY < dragT2){
			clickAbove = true;
			clickUp = true;
			return scrollUp(2);
		}
		// Else click below drag
		else {
			clickBelow = true;
			clickDown = true;
			return scrollDown(2);
		}
	}
	else if(mouseX >= dragL3 && (mouseX <= (dragL3 + dragW3)) && mouseY >= rulerT3 && (mouseY <= (rulerT3 + scrollH3))){
		// If click above drag
		if(mouseY < dragT3){
			clickAbove = true;
			clickUp = true;
			return scrollUp(3);
		}
		// Else click below drag
		else {
			clickBelow = true;
			clickDown = true;
			return scrollDown(3);
		}
	}
	else if(mouseX >= dragL4 && (mouseX <= (dragL4 + dragW4)) && mouseY >= rulerT4 && (mouseY <= (rulerT4 + scrollH4))){
		// If click above drag
		if(mouseY < dragT4){
			clickAbove = true;
			clickUp = true;
			return scrollUp(4);
		}
		// Else click below drag
		else {
			clickBelow = true;
			clickDown = true;
			return scrollDown(4);
		}
	}
	else if(mouseX >= dragL5 && (mouseX <= (dragL5 + dragW5)) && mouseY >= rulerT5 && (mouseY <= (rulerT5 + scrollH5))){
		// If click above drag
		if(mouseY < dragT5){
			clickAbove = true;
			clickUp = true;
			return scrollUp(5);
		}
		// Else click below drag
		else {
			clickBelow = true;
			clickDown = true;
			return scrollDown(5);
		}
	}
	// If no scrolling is to take place
	else {
		return true;
	}
}

// Drag function

function move(e){
	if(clickDrag1 && eval("contentH"+numglob) > eval("contentClipH"+numglob)){
		getMouse(e);
		dragT1 = mouseY - eval("startY"+numglob);
		
		if(dragT1 < eval("rulerT"+numglob))
			dragT1 = eval("rulerT"+numglob);		
		if(dragT1 > (eval("rulerT"+numglob) + scrollH1 - dragH1))
			dragT1 = eval("rulerT"+numglob) + eval("scrollH"+numglob) - eval("dragH"+numglob);
		
		contentT1 = ((eval("dragT"+numglob) - eval("rulerT"+numglob))*(1/eval("scrollLength"+numglob)));
		contentT1 = eval('-' + "contentT"+numglob);

		moveTo(numglob);
		
		// So ie-pc doesn't select gifs
		if(ie4)
			return false;
	}
	else if(clickDrag2 && eval("contentH"+numglob) > eval("contentClipH"+numglob)){
		getMouse(e);
		dragT2 = (mouseY - startY2);
		
		if(dragT2 < (rulerT2))
			dragT2 = rulerT2;		
		if(dragT2 > (rulerT2 + scrollH2 - dragH2))
			dragT2 = (rulerT2 + scrollH2 - dragH2);
		
		contentT2 = ((dragT2 - rulerT2)*(1/scrollLength2));
		contentT2 = eval('-' + contentT2);

		moveTo(numglob);
		
		// So ie-pc doesn't select gifs
		if(ie4)
			return false;
	}
	else if(clickDrag3 && eval("contentH"+numglob) > eval("contentClipH"+numglob)){
		getMouse(e);
		dragT3 = (mouseY - startY3);
		
		if(dragT3 < (rulerT3))
			dragT3 = rulerT3;		
		if(dragT3 > (rulerT3 + scrollH3 - dragH3))
			dragT3 = (rulerT3 + scrollH3 - dragH3);
		
		contentT3 = ((dragT3 - rulerT3)*(1/scrollLength3));
		contentT3 = eval('-' + contentT3);

		moveTo(numglob);
		
		// So ie-pc doesn't select gifs
		if(ie4)
			return false;
	}
	else if(clickDrag4 && eval("contentH"+numglob) > eval("contentClipH"+numglob)){
		getMouse(e);
		dragT4 = (mouseY - startY4);
		
		if(dragT4 < (rulerT4))
			dragT4 = rulerT4;		
		if(dragT4 > (rulerT4 + scrollH4 - dragH4))
			dragT4 = (rulerT4 + scrollH4 - dragH4);
		
		contentT4 = ((dragT4 - rulerT4)*(1/scrollLength4));
		contentT4 = eval('-' + contentT4);

		moveTo(numglob);
		
		// So ie-pc doesn't select gifs
		if(ie4)
			return false;
	}
	else if(clickDrag5 && eval("contentH"+numglob) > eval("contentClipH"+numglob)){
		getMouse(e);
		dragT5 = (mouseY - startY5);
		
		if(dragT5 < (rulerT5))
			dragT5 = rulerT5;		
		if(dragT5 > (rulerT5 + scrollH5 - dragH5))
			dragT5 = (rulerT5 + scrollH5 - dragH5);
		
		contentT5 = ((dragT5 - rulerT5)*(1/scrollLength5));
		contentT5 = eval('-' + contentT5);

		moveTo(numglob);
		
		// So ie-pc doesn't select gifs
		if(ie4)
			return false;
	}
}

/*
function move(e){
	if(clickDrag && contentH1 > contentClipH1){
		getMouse(e);
		dragT1 = (mouseY - startY1);
		
		if(dragT1 < (rulerT1))
			dragT1 = rulerT1;		
		if(dragT1 > (rulerT1 + scrollH1 - dragH1))
			dragT1 = (rulerT1 + scrollH1 - dragH1);
		
		contentT1 = ((dragT1 - rulerT1)*(1/scrollLength1));
		contentT1 = eval('-' + contentT1);

		moveTo(numglob);
		
		// So ie-pc doesn't select gifs
		if(ie4)
			return false;
	}
}*/


function up(){
	clearTimeout(timer);
	// Resetting variables
	clickUp = false;
	clickDown = false;
	clickDrag1 = false;
	clickDrag2 = false;
	clickDrag3 = false;
	clickDrag4 = false;
	clickDrag5 = false;
	clickAbove = false;
	clickBelow = false;
	return true;
}

// Reads content layer top
function getT(num){
	if(ie4)
		this["contentT"+num] = document.all["content"+num].style.pixelTop;
	else if(nn4)
		this["contentT"+num] = document["contentClip"+num].document["content"+num].top;
		//alert(eval("contentT"+num));
	else if(dom)
		this["contentT"+num] = parseInt(document.getElementById("content"+num).style.top);
}

// Reads mouse X and Y coordinates
function getMouse(e){
	if(ie4){
		mouseY = event.clientY + document.body.parentNode.scrollTop;// + document.body.scrollTop;
		mouseX = event.clientX + document.body.parentNode.scrollLeft;// + document.body.scrollLeft;
	}
	else if(nn4 || dom){
		mouseY = e.pageY;
		mouseX = e.pageX;
	}
}

// Moves the layer
function moveTo(num){
	if(ie4){
		document.all["content"+num].style.top = eval("contentT"+num);
		document.all["ruler"+num].style.top = eval("dragT"+num);
		document.all["drag"+num].style.top = eval("dragT"+num);
	}
	else if(nn4){
		document["contentClip"+num].document["content"+num].top = eval("contentT"+num);
		document["ruler"+num].top = eval("dragT"+num);
		document["drag"+num].top = eval("dragT"+num);
	}
	else if(dom){
		document.getElementById("content"+num).style.top = eval("contentT"+num) + "px";
		document.getElementById("drag"+num).style.top = eval("dragT"+num) + "px";
		document.getElementById("ruler"+num).style.top = eval("dragT"+num) + "px";
	}
}

// Scrolls up
function scrollUp(num){
	getT(num);
	
	if(clickAbove){
		if(this["dragT"+num] <= (mouseY-(this["dragH"+num]/2)))
			return up();
	}
	
	if(clickUp){
		if(this["contentT"+num] < 0){		
			this["dragT"+num] = this["dragT"+num] - (speed*this["scrollLength"+num]);
			
			if(this["dragT"+num] < (this["rulerT"+num]))
				this["dragT"+num] = this["rulerT"+num];
				
			this["contentT"+num] = this["contentT"+num] + speed;
			if(this["contentT"+num] > 0)
				this["contentT"+num] = 0;
			
			moveTo(num);
			timer = setTimeout("scrollUp("+num+")",25);
		}
	}
	return false;
}

// Scrolls down
function scrollDown(num){
	getT(num);
	
	if(clickBelow){
		if(this["dragT"+num] >= (mouseY-(this["dragH"+num]/2)))
			return up();
	}

	if(clickDown){
		if(this["contentT"+num] > -(this["contentH"+num] - this["contentClipH"+num])){			
			this["dragT"+num] = this["dragT"+num] + (speed*this["scrollLength"+num]);
			if(this["dragT"+num] > (this["rulerT"+num] + this["scrollH"+num] - this["dragH"+num]))
				this["dragT"+num] = (this["rulerT"+num] + this["scrollH"+num] - this["dragH"+num]);
			
			this["contentT"+num] = this["contentT"+num] - speed;
			if(this["contentT"+num] < -(this["contentH"+num] - this["contentClipH"+num]))
				this["contentT"+num] = -(this["contentH"+num] - this["contentClipH"+num]);
			
			moveTo(num);
			timer = setTimeout("scrollDown("+num+")",25);
		}
	}
	return false;
}

// reloads page to position the layers again
function reloadPage(){
	location.reload();
}

// Preload
/*function eventLoader(){
	if(ie4){
		// Up-arrow X and Y variables
		upL1 = document.all.up1.style.pixelLeft;
		upT1 = document.all.up1.style.pixelTop;
		upL2 = document.all.up2.style.pixelLeft;
		upT2 = document.all.up2.style.pixelTop;	
		upL3 = document.all.up3.style.pixelLeft;
		upT3 = document.all.up3.style.pixelTop;	
		// Down-arrow X and Y variables
		downL1 = document.all.down1.style.pixelLeft;
		downT1 = document.all.down1.style.pixelTop;
		downL2 = document.all.down2.style.pixelLeft;
		downT2 = document.all.down2.style.pixelTop;
		downL3 = document.all.down3.style.pixelLeft;
		downT3 = document.all.down3.style.pixelTop;
		// Scrollbar X and Y variables
		dragL1 = document.all.drag1.style.pixelLeft;
		dragT1 = document.all.drag1.style.pixelTop;
		dragL2 = document.all.drag2.style.pixelLeft;
		dragT2 = document.all.drag2.style.pixelTop;
		dragL3 = document.all.drag3.style.pixelLeft;
		dragT3 = document.all.drag3.style.pixelTop;
		// Ruler Y variable
		rulerT1 = document.all.ruler1.style.pixelTop;	
		rulerT2 = document.all.ruler2.style.pixelTop;
		rulerT3 = document.all.ruler3.style.pixelTop;
		// Height of content layer and clip layer
		contentH1 = parseInt(document.all.content1.scrollHeight);
		contentClipH1 = parseInt(document.all.contentClip1.style.height);
		contentH2 = parseInt(document.all.content2.scrollHeight);
		contentClipH2 = parseInt(document.all.contentClip2.style.height);
		contentH3 = parseInt(document.all.content3.scrollHeight);
		contentClipH3 = parseInt(document.all.contentClip3.style.height);
	}
	else if(nn4){
		// Up-arrow X and Y variables
		upL1 = document.up1.left;
		upT1 = document.up1.top;
		upL2 = document.up2.left;
		upT2 = document.up2.top;
		upL3 = document.up3.left;
		upT3 = document.up3.top;
		// Down-arrow X and Y variables
		downL1 = document.down1.left;
		downT1 = document.down1.top;
		downL2 = document.down2.left;
		downT2 = document.down2.top;
		downL3 = document.down3.left;
		downT3 = document.down3.top;
		// Scrollbar X and Y variables
		dragL1 = document.drag1.left;
		dragT1 = document.drag1.top;
		dragL2 = document.drag2.left;
		dragT2 = document.drag2.top;
		dragL3 = document.drag3.left;
		dragT3 = document.drag3.top;
		// Ruler Y variable
		rulerT1 = document.ruler1.top;
		rulerT2 = document.ruler2.top;
		rulerT3 = document.ruler3.top;
		// Height of content layer and clip layer
		contentH1 = document.contentClip1.document.content1.clip.bottom;
		contentClipH1 = document.contentClip1.clip.bottom;
		contentH2 = document.contentClip2.document.content2.clip.bottom;
		contentClipH2 = document.contentClip2.clip.bottom;
		contentH3 = document.contentClip3.document.content3.clip.bottom;
		contentClipH3 = document.contentClip3.clip.bottom;
	}
	else if(dom){
		// Up-arrow X and Y variables
		upL1 = parseInt(document.getElementById("up1").style.left);
		upT1 = parseInt(document.getElementById("up1").style.top);
		upL2 = parseInt(document.getElementById("up2").style.left);
		upT2 = parseInt(document.getElementById("up2").style.top);
		upL3 = parseInt(document.getElementById("up3").style.left);
		upT3 = parseInt(document.getElementById("up3").style.top);
		// Down-arrow X and Y variables
		downL1 = parseInt(document.getElementById("down1").style.left);
		downT1 = parseInt(document.getElementById("down1").style.top);
		downL2 = parseInt(document.getElementById("down2").style.left);
		downT2 = parseInt(document.getElementById("down2").style.top);
		downL3 = parseInt(document.getElementById("down3").style.left);
		downT3 = parseInt(document.getElementById("down3").style.top);
		// Scrollbar X and Y variables
		dragL1 = parseInt(document.getElementById("drag1").style.left);
		dragT1 = parseInt(document.getElementById("drag1").style.top);
		dragL2 = parseInt(document.getElementById("drag2").style.left);
		dragT2 = parseInt(document.getElementById("drag2").style.top);
		dragL3 = parseInt(document.getElementById("drag3").style.left);
		dragT3 = parseInt(document.getElementById("drag3").style.top);
		// Ruler Y variable
		rulerT1 = parseInt(document.getElementById("ruler1").style.top);
		rulerT2 = parseInt(document.getElementById("ruler2").style.top);
		rulerT3 = parseInt(document.getElementById("ruler3").style.top);
		// Height of content layer and clip layer
		contentH1 = parseInt(document.getElementById("content1").offsetHeight);
		contentClipH1 = parseInt(document.getElementById("contentClip1").offsetHeight);
		document.getElementById("content1").style.top = 0 + "px";
		contentH2 = parseInt(document.getElementById("content2").offsetHeight);
		contentClipH2 = parseInt(document.getElementById("contentClip2").offsetHeight);
		document.getElementById("content2").style.top = 0 + "px";
		contentH3 = parseInt(document.getElementById("content3").offsetHeight);
		contentClipH3 = parseInt(document.getElementById("contentClip3").offsetHeight);
		document.getElementById("content3").style.top = 0 + "px";
		
	}
	// Number of pixels scrollbar should move
	scrollLength1 = ((scrollH1-dragH1)/(contentH1-contentClipH1));
	scrollLength2 = ((scrollH2-dragH2)/(contentH2-contentClipH2));
	scrollLength3 = ((scrollH3-dragH3)/(contentH3-contentClipH3));
	//alert(scrollLength1+", "+scrollLength2);
	// Initializes event capturing
	if(nn4){
		document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
		window.onresize = reloadPage;
	}
	document.onmousedown = down;
	document.onmousemove = move;
	document.onmouseup = up;
}*/

function eventLoader(){
eventLoader1();
eventLoader2();
eventLoader3();
eventLoader4();
eventLoader5();
if(nn4){
	document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
	window.onresize = reloadPage;
}
document.onmousedown = down;
document.onmousemove = move;
document.onmouseup = up;
}

function eventLoader1(){
	if(ie4){
		// Up-arrow X and Y variables
		upL1 = document.all.up1.style.pixelLeft;
		upT1 = document.all.up1.style.pixelTop;
		// Down-arrow X and Y variables
		downL1 = document.all.down1.style.pixelLeft;
		downT1 = document.all.down1.style.pixelTop;
		// Scrollbar X and Y variables
		dragL1 = document.all.drag1.style.pixelLeft;
		dragT1 = document.all.drag1.style.pixelTop;
		// Ruler Y variable
		rulerT1 = document.all.ruler1.style.pixelTop;	
		// Height of content layer and clip layer
		contentH1 = parseInt(document.all.content1.scrollHeight);
		contentClipH1 = parseInt(document.all.contentClip1.style.height);
	}
	else if(nn4){
		// Up-arrow X and Y variables
		upL1 = document.up1.left;
		upT1 = document.up1.top;
		// Down-arrow X and Y variables
		downL1 = document.down1.left;
		downT1 = document.down1.top;
		// Scrollbar X and Y variables
		dragL1 = document.drag1.left;
		dragT1 = document.drag1.top;
		// Ruler Y variable
		rulerT1 = document.ruler1.top;
		// Height of content layer and clip layer
		contentH1 = document.contentClip1.document.content1.clip.bottom;
		contentClipH1 = document.contentClip1.clip.bottom;
	}
	else if(dom){
		// Up-arrow X and Y variables
		upL1 = parseInt(document.getElementById("up1").style.left);
		upT1 = parseInt(document.getElementById("up1").style.top);
		// Down-arrow X and Y variables
		downL1 = parseInt(document.getElementById("down1").style.left);
		downT1 = parseInt(document.getElementById("down1").style.top);
		// Scrollbar X and Y variables
		dragL1 = parseInt(document.getElementById("drag1").style.left);
		dragT1 = parseInt(document.getElementById("drag1").style.top);
		// Ruler Y variable
		rulerT1 = parseInt(document.getElementById("ruler1").style.top);
		// Height of content layer and clip layer
		contentH1 = parseInt(document.getElementById("content1").offsetHeight);
		contentClipH1 = parseInt(document.getElementById("contentClip1").offsetHeight);
		document.getElementById("content1").style.top = 0 + "px";		
	}
	// Number of pixels scrollbar should move
	scrollLength1 = ((scrollH1-dragH1)/(contentH1-contentClipH1));
	if(contentH1 < contentClipH1) {
		document.getElementById("drag1").style.visibility = "hidden";
	} else {
		document.getElementById("drag1").style.visibility = "visible";	
	}
}

function eventLoader2(){
	if(ie4){
		// Up-arrow X and Y variables
		upL2 = document.all.up2.style.pixelLeft;
		upT2 = document.all.up2.style.pixelTop;	
		// Down-arrow X and Y variables
		downL2 = document.all.down2.style.pixelLeft;
		downT2 = document.all.down2.style.pixelTop;
		// Scrollbar X and Y variables
		dragL2 = document.all.drag2.style.pixelLeft;
		dragT2 = document.all.drag2.style.pixelTop;
		// Ruler Y variable	
		rulerT2 = document.all.ruler2.style.pixelTop;
		// Height of content layer and clip layer
		contentH2 = parseInt(document.all.content2.scrollHeight);
		contentClipH2 = parseInt(document.all.contentClip2.style.height);
	}
	else if(nn4){
		// Up-arrow X and Y variables
		upL2 = document.up2.left;
		upT2 = document.up2.top;
		// Down-arrow X and Y variables
		downL2 = document.down2.left;
		downT2 = document.down2.top;
		// Scrollbar X and Y variables
		dragL2 = document.drag2.left;
		dragT2 = document.drag2.top;
		// Ruler Y variable
		rulerT2 = document.ruler2.top;
		// Height of content layer and clip layer
		contentH2 = document.contentClip2.document.content2.clip.bottom;
		contentClipH2 = document.contentClip2.clip.bottom;
	}
	else if(dom){
		// Up-arrow X and Y variables
		upL2 = parseInt(document.getElementById("up2").style.left);
		upT2 = parseInt(document.getElementById("up2").style.top);
		// Down-arrow X and Y variables
		downL2 = parseInt(document.getElementById("down2").style.left);
		downT2 = parseInt(document.getElementById("down2").style.top);
		// Scrollbar X and Y variables
		dragL2 = parseInt(document.getElementById("drag2").style.left);
		dragT2 = parseInt(document.getElementById("drag2").style.top);
		// Ruler Y variable
		rulerT2 = parseInt(document.getElementById("ruler2").style.top);
		// Height of content layer and clip layer
		contentH2 = parseInt(document.getElementById("content2").offsetHeight);
		contentClipH2 = parseInt(document.getElementById("contentClip2").offsetHeight);
		document.getElementById("content2").style.top = 0 + "px";		
	}
	// Number of pixels scrollbar should move
	scrollLength2 = ((scrollH2-dragH2)/(contentH2-contentClipH2));
	if(contentH2 < contentClipH2) {
		document.getElementById("drag2").style.visibility = "hidden";
	} else {
		document.getElementById("drag2").style.visibility = "visible";	
	}
}

function eventLoader3(){
	if(ie4){
		// Up-arrow X and Y variables
		upL3 = document.all.up3.style.pixelLeft;
		upT3 = document.all.up3.style.pixelTop;	
		// Down-arrow X and Y variables
		downL3 = document.all.down3.style.pixelLeft;
		downT3 = document.all.down3.style.pixelTop;
		// Scrollbar X and Y variables
		dragL3 = document.all.drag3.style.pixelLeft;
		dragT3 = document.all.drag3.style.pixelTop;
		// Ruler Y variable
		rulerT3 = document.all.ruler3.style.pixelTop;
		// Height of content layer and clip layer
		contentH3 = parseInt(document.all.content3.scrollHeight);
		contentClipH3 = parseInt(document.all.contentClip3.style.height);
	}
	else if(nn4){
		// Up-arrow X and Y variables
		upL3 = document.up3.left;
		upT3 = document.up3.top;
		// Down-arrow X and Y variables
		downL3 = document.down3.left;
		downT3 = document.down3.top;
		// Scrollbar X and Y variables
		dragL3 = document.drag3.left;
		dragT3 = document.drag3.top;
		// Ruler Y variable
		rulerT3 = document.ruler3.top;
		// Height of content layer and clip layer
		contentH3 = document.contentClip3.document.content3.clip.bottom;
		contentClipH3 = document.contentClip3.clip.bottom;
	}
	else if(dom){
		// Up-arrow X and Y variables
		upL3 = parseInt(document.getElementById("up3").style.left);
		upT3 = parseInt(document.getElementById("up3").style.top);
		// Down-arrow X and Y variables
		downL3 = parseInt(document.getElementById("down3").style.left);
		downT3 = parseInt(document.getElementById("down3").style.top);
		// Scrollbar X and Y variables
		dragL3 = parseInt(document.getElementById("drag3").style.left);
		dragT3 = parseInt(document.getElementById("drag3").style.top);
		// Ruler Y variable
		rulerT3 = parseInt(document.getElementById("ruler3").style.top);
		// Height of content layer and clip layer
		contentH3 = parseInt(document.getElementById("content3").offsetHeight);
		contentClipH3 = parseInt(document.getElementById("contentClip3").offsetHeight);
		document.getElementById("content3").style.top = 0 + "px";
		
	}
	// Number of pixels scrollbar should move
	scrollLength3 = ((scrollH3-dragH3)/(contentH3-contentClipH3));
	if(contentH3 < contentClipH3) {
		document.getElementById("drag3").style.visibility = "hidden";
	} else {
		document.getElementById("drag3").style.visibility = "visible";	
	}
}

function eventLoader4(){
	if(ie4){
		// Up-arrow X and Y variables
		upL4 = document.all.up4.style.pixelLeft;
		upT4 = document.all.up4.style.pixelTop;	
		// Down-arrow X and Y variables
		downL4 = document.all.down4.style.pixelLeft;
		downT4 = document.all.down4.style.pixelTop;
		// Scrollbar X and Y variables
		dragL4 = document.all.drag4.style.pixelLeft;
		dragT4 = document.all.drag4.style.pixelTop;
		// Ruler Y variable
		rulerT4 = document.all.ruler4.style.pixelTop;
		// Height of content layer and clip layer
		contentH4 = parseInt(document.all.content4.scrollHeight);
		contentClipH4 = parseInt(document.all.contentClip4.style.height);
	}
	else if(nn4){
		// Up-arrow X and Y variables
		upL4 = document.up4.left;
		upT4 = document.up4.top;
		// Down-arrow X and Y variables
		downL4 = document.down4.left;
		downT4 = document.down4.top;
		// Scrollbar X and Y variables
		dragL4 = document.drag4.left;
		dragT4 = document.drag4.top;
		// Ruler Y variable
		rulerT4 = document.ruler4.top;
		// Height of content layer and clip layer
		contentH4 = document.contentClip4.document.content4.clip.bottom;
		contentClipH4 = document.contentClip4.clip.bottom;
	}
	else if(dom){
		// Up-arrow X and Y variables
		upL4 = parseInt(document.getElementById("up4").style.left);
		upT4 = parseInt(document.getElementById("up4").style.top);
		// Down-arrow X and Y variables
		downL4 = parseInt(document.getElementById("down4").style.left);
		downT4 = parseInt(document.getElementById("down4").style.top);
		// Scrollbar X and Y variables
		dragL4 = parseInt(document.getElementById("drag4").style.left);
		dragT4 = parseInt(document.getElementById("drag4").style.top);
		// Ruler Y variable
		rulerT4 = parseInt(document.getElementById("ruler4").style.top);
		// Height of content layer and clip layer
		contentH4 = parseInt(document.getElementById("content4").offsetHeight);
		contentClipH4 = parseInt(document.getElementById("contentClip4").offsetHeight);
		document.getElementById("content4").style.top = 0 + "px";
		
	}
	// Number of pixels scrollbar should move
	scrollLength4 = ((scrollH4-dragH4)/(contentH4-contentClipH4));
	if(contentH4 < contentClipH4) {
		document.getElementById("drag4").style.visibility = "hidden";
	} else {
		document.getElementById("drag4").style.visibility = "visible";	
	}
}

function eventLoader5(){
	if(ie4){
		// Up-arrow X and Y variables
		upL5 = document.all.up5.style.pixelLeft;
		upT5 = document.all.up5.style.pixelTop;	
		// Down-arrow X and Y variables
		downL5 = document.all.down5.style.pixelLeft;
		downT5 = document.all.down5.style.pixelTop;
		// Scrollbar X and Y variables
		dragL5 = document.all.drag5.style.pixelLeft;
		dragT5 = document.all.drag5.style.pixelTop;
		// Ruler Y variable
		rulerT5 = document.all.ruler5.style.pixelTop;
		// Height of content layer and clip layer
		contentH5 = parseInt(document.all.content5.scrollHeight);
		contentClipH5 = parseInt(document.all.contentClip5.style.height);
	}
	else if(nn4){
		// Up-arrow X and Y variables
		upL5 = document.up5.left;
		upT5 = document.up5.top;
		// Down-arrow X and Y variables
		downL5 = document.down5.left;
		downT5 = document.down5.top;
		// Scrollbar X and Y variables
		dragL5 = document.drag5.left;
		dragT5 = document.drag5.top;
		// Ruler Y variable
		rulerT5 = document.ruler5.top;
		// Height of content layer and clip layer
		contentH5 = document.contentClip5.document.content5.clip.bottom;
		contentClipH5 = document.contentClip5.clip.bottom;
	}
	else if(dom){
		// Up-arrow X and Y variables
		upL5 = parseInt(document.getElementById("up5").style.left);
		upT5 = parseInt(document.getElementById("up3").style.top);
		// Down-arrow X and Y variables
		downL5 = parseInt(document.getElementById("down5").style.left);
		downT5 = parseInt(document.getElementById("down3").style.top);
		// Scrollbar X and Y variables
		dragL5 = parseInt(document.getElementById("drag5").style.left);
		dragT5 = parseInt(document.getElementById("drag5").style.top);
		// Ruler Y variable
		rulerT5 = parseInt(document.getElementById("ruler5").style.top);
		// Height of content layer and clip layer
		contentH5 = parseInt(document.getElementById("content5").offsetHeight);
		contentClipH5 = parseInt(document.getElementById("contentClip5").offsetHeight);
		document.getElementById("content5").style.top = 0 + "px";
		
	}
	// Number of pixels scrollbar should move
	scrollLength5 = ((scrollH5-dragH5)/(contentH5-contentClipH5));
	if(contentH5 < contentClipH5) {
		document.getElementById("drag5").style.visibility = "hidden";
	} else {
		document.getElementById("drag5").style.visibility = "visible";	
	}
}