
function returnLat(todo){
	if(todo == 'home'){ return 0; }
	if(todo == 'news'){ return -858; }
	if(todo == 'reels'){ return -1716; }
	if(todo == 'photos'){ return -2574; }
	if(todo == 'about'){ return -3432; }
	if(todo == 'contact'){ return -4290; }
}



function pageGo(todo){
if(todo != 'reels'){
	document.getElementById('reelflash').innterHTML = '';
}
	Effect.Fade(currentPage+"content", {duration:.2});
	changeContentBG(returnLat(todo));	
	
	todos = todo + "content";
	window.setTimeout('Effect.Appear(todos, {duration:.6})',1000);

	if(todo == 'photos') {Effect.Appear("photoset"+currentPhotoSet, {duration:.1});}
	currentPage = todo;
}
function photoShow(todo){
	Effect.Fade("photoset"+currentPhotoSet);
	todos = "photoset"+todo;
	window.setTimeout('Effect.Appear(todos, {duration:.6})',1000);
	currentPhotoSet = todo;
}

function changeContentBG(howfar) {
	element = document.getElementById('content');
	if(howfar != bgHPos){
		if (howfar > bgHPos){
			moveBGF(howfar);
		}
		else {
			moveBG(howfar);
		}
	} 
}


function moveBG(pos){
	element = document.getElementById('content');
	blur1 = document.getElementById('contentblur1');
	blur1.style.opacity=0.2;
	blur1.style.filter="alpha(opacity='20%')";
	
	element.style.backgroundPosition=bgHPos+"px";	
	bgHPos = (bgHPos - variance);
	blur1.style.backgroundPosition=bgHPos+"px";	

	if(bgHPos >= pos){
		setTimeout("moveBG("+pos+")",speed);
	} else{ bgHPos = pos;
	element.style.backgroundPosition=bgHPos+"px";
	blur1.style.backgroundPosition=bgHPos+"px";
	blur1.style.opacity=1.00;
	blur1.style.filter="alpha(opacity='100%')";
	}
}
function moveBGF(pos){
	element = document.getElementById('content');
	blur1 = document.getElementById('contentblur1');
	blur1.style.opacity=0.2;
	blur1.style.filter="alpha(opacity='20%')";
	
	element.style.backgroundPosition=bgHPos+"px";	
	bgHPos = (bgHPos + variance);
	blur1.style.backgroundPosition=bgHPos+"px";
	
	if(bgHPos <= pos){
		setTimeout("moveBGF("+pos+")",speed);
	} else{ bgHPos = pos;
	element.style.backgroundPosition=bgHPos+"px";
	blur1.style.backgroundPosition=bgHPos+"px";
	blur1.style.opacity=1.00;	
	blur1.style.filter="alpha(opacity='100%')";
	}
}