// JavaScript Document

// ON LOAD
var myimages = new Array();
function preloading(){
	for (x=0; x<preloading.arguments.length; x++){
		myimages[x] = new Image();
		myimages[x].src = preloading.arguments[x];
	}
}

function setOpacity(elemt, level) {
	//alert(document.getElementById(elemt));
	elem = document.getElementById(elemt);
	olevel = level / 100;
elem.style.opacity=olevel;//("opacity",olevel);
}
function setDefaultPerson(holdInPlace){
	switch(holdInPlace){
		case 1: // becky
			hipName = "becky";
			//hitFrame(1);
		break;
		case 2: // doug
			hipName = "doug";
			//hitFrame(37);
		break;
		case 3: // ben
			hipName = "ben";
			//hitFrame(71);
		break;
		case 4: // jay
			hipName = "jay";
			//hitFrame(106);
		break;
		case 5: // ray
			hipName = "ray";
			//hitFrame(141);
		break;
		case 6: // katie
			hipName = "katie";
			//hitFrame(176);
		break;
		case 7: // matt
			hipName = "matt";
			//hitFrame(211);
		break;
	}
	
	
	
	document.getElementById('cen_bot').style.background='url(images/fp_splash/'+hipName+'_bot.png)';
	return true;
}

function mouseOutUser(){
var rs = document.getElementById('pl_R');
var ls = document.getElementById('pl_L');
ls.src = 'images/home_blank_13.png';
rs.src = 'images/home_blank_14.png';
}


function mouseInUser(uid){
var rs = document.getElementById('pl_R');
var ls = document.getElementById('pl_L');
	switch(uid){
		case '1': // becky
			ls.src = 'images/home_becky_05.png';
			rs.src = 'images/home_becky_06.png';
		break;
		case '2': // doug
			ls.src = 'images/home_doug_05.png';
			rs.src = 'images/home_doug_06.png';
		break;
		case '3': // ben
			ls.src = 'images/home_ben_05.png';
			rs.src = 'images/home_ben_06.png';
		break;
		case '4': // jay
			ls.src = 'images/home_jay_05.png';
			rs.src = 'images/home_jay_06.png';
		break;
		case '5': // ray
			ls.src = 'images/home_ray_05.png';
			rs.src = 'images/home_ray_06.png';
		break;
		case '6': // katie
			ls.src = 'images/home_katie_05.png';
			rs.src = 'images/home_katie_06.png';
		break;
		case '7': // matt
			ls.src = 'images/home_matt_05.png';
			rs.src = 'images/home_matt_06.png';
		break;
	}
	return true;
}


function swapInPage(pgID){
	switch(pgID){
		case '1': // becky
			document.getElementById('cen_top').style.background='url(images/fp_splash/becky_top.png)';
			document.getElementById('cen_bot').style.background='url(images/fp_splash/becky_bot.png)';
			hitFrame(2);
		break;
		case '2': // doug
			document.getElementById('cen_top').style.background='url(images/fp_splash/doug_top.png)';
			document.getElementById('cen_bot').style.background='url(images/fp_splash/doug_bot.png)';
			hitFrame(37);
		break;
		case '3': // ben
			document.getElementById('cen_top').style.background='url(images/fp_splash/ben_top.png)';
			document.getElementById('cen_bot').style.background='url(images/fp_splash/ben_bot.png)';
			hitFrame(71);
		break;
		case '4': // jay
			document.getElementById('cen_top').style.background='url(images/fp_splash/jay_top.png)';
			document.getElementById('cen_bot').style.background='url(images/fp_splash/jay_bot.png)';
			hitFrame(106);
		break;
		case '5': // ray
			document.getElementById('cen_top').style.background='url(images/fp_splash/ray_top.png)';
			document.getElementById('cen_bot').style.background='url(images/fp_splash/ray_bot.png)';
			hitFrame(141);
		break;
		case '6': // katie
			document.getElementById('cen_top').style.background='url(images/fp_splash/katie_top.png)';
			document.getElementById('cen_bot').style.background='url(images/fp_splash/katie_bot.png)';
			hitFrame(176);
		break;
		case '7': // matt
			document.getElementById('cen_top').style.background='url(images/fp_splash/matt_top.png)';
			document.getElementById('cen_bot').style.background='url(images/fp_splash/matt_bot.png)';
			hitFrame(211);
		break;
	}
	//return true;
}

function popUp(which) {

	window.open('http://www.biblegateway.com/passage/?search=' + which + '&version=31&interface=print', '', 'menubar=no, resizeable=0, scrollbars=1, status=0, left=50, top=25, height=700, width=750');
}
