
	//Scroll Functions
	function rightScroll() {
			window.scrollBy(50,0); // horizontal and vertical scroll increments
			scrolldelay = setTimeout('rightScroll()',100); // scrolls every 100 milliseconds
	}
	function leftScroll() {
			window.scrollBy(-50,0); // horizontal and vertical scroll increments
			scrolldelay = setTimeout('leftScroll()',100); // scrolls every 100 milliseconds
	}
	function stopScroll() {
			clearTimeout(scrolldelay);
	}
	
	//Resize Page
	function sizePage(){
		var obj = document.getElementById("tracer");
		var posX = obj.offsetLeft;
		while(obj.offsetParent){
			if(obj==document.getElementsByTagName('body')[0]){break;}
			else{
				posX=posX+obj.offsetParent.offsetLeft;
				obj=obj.offsetParent;
			}
		}
		posX += 32;
		document.body.style.width = posX + "px";
	}
	
	function setWidth() {
		var thewidth = 400000;
		document.body.style.width = thewidth + "px"; 
		setTimeout('sizePage()',100);
		resizeImgAndContent();
		displayLoading();
	}
	
	//Size Content 
	function resizeImgAndContent(){
		//Set Variables
		var images = document.getElementById('content').getElementsByTagName('img');
		var ps = document.getElementById('content').getElementsByTagName('p');
		
		//Get Browser Height
		var theheight = document.height;
		if (self.innerHeight){
			var theheight = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight){
			var theheight = document.documentElement.clientHeight;
		}
		else if (document.body){
			var theheight = document.body.clientHeight;
		}
		
		theheight -= 250;
		theheight -= document.getElementById('top').offsetHeight;
		 
		//Set content padding
		var contentpadding = 170 + document.getElementById('top').offsetHeight;
		document.getElementById("content").style.padding = contentpadding + "px 0 0 150px";
		
		//Resize Images
		for(i=0;images[i];i++){
			//var theheight = screen.height;
			var imagewidth = images[i].offsetWidth;
			var imageheight = images[i].offsetHeight;
		
			var widthratio = theheight/imageheight;
			images[i].style.width = (Math.round(imagewidth*widthratio)) + "px";
			images[i].style.height = (Math.round(imageheight*widthratio)) + "px";
		}
		
		//Resize Paragraphs
		for(i=0;ps[i];i++){
			ps[i].style.height = theheight + "px";
			ps[i].style.overflow = "auto";
		}
		
		//Resize Paragraphs with images inside of them
		
		for(i=0;ps[i];i++){
			pimg = ps[i].getElementsByTagName('img');
			totalWidth = 0;
			for(a=0;pimg[a];a++){
				totalWidth += pimg[a].offsetWidth;
				if(a>0){
					totalWidth += 15;
				}
			}
			if(pimg[0]){
				ps[i].style.width = totalWidth + "px";
				ps[i].style.height = pimg[0].offsetHeight + "px";
				ps[i].style.overflow = "hidden";
				ps[i].style.margin = "0";
			}
		}
		
		//Delete blank paragraph elements
		for(i=0;ps[i];i++){
			if(ps[i].innerHTML.length < 3){
				ps[i].style.display = "none";
			}
		}
		
		//Hide "end" element if it is not needed
		if(!document.getElementById('end').getElementsByTagName('ul')[0]){
			document.getElementById('end').style.display = "none";
		}
	}
	
		
	//Loading
	function displayLoading(){
		if(!document.getElementById('loading')){
			//Do nothing
		}else{
			document.getElementById('loading').style.display = "none";
		}
	}