var nextInt = 0; //Global integer for progressive Header Image display
function swapMeV(whichLink) {
	if (whichLink == "vCard1") {
		document.vCardImage.src = "images/rotVert/0.jpg";
		nextInt = 0;
	}
	else if (whichLink == "vCard2") {
		document.vCardImage.src = "images/rotVert/1.jpg";
		nextInt = 1;
	}
	else if (whichLink == "vCard3") {
		document.vCardImage.src = "images/rotVert/2.jpg";
		nextInt = 2;
	}
	else if (whichLink == "vCard4") {
		document.vCardImage.src = "images/rotVert/3.jpg";
		nextInt = 3;
	}
	else if (whichLink == "vCard5") {
		document.vCardImage.src = "images/rotVert/4.jpg";
		nextInt = 4;
	}
	else if (whichLink == "vCard6") {
		document.vCardImage.src = "images/rotVert/5.jpg";
		nextInt = 5;
	}
	else if (whichLink == "vCard7") {
		document.vCardImage.src = "images/rotVert/6.jpg";
		nextInt = 6;
	}
	else if (whichLink == "vCard8") {
		document.vCardImage.src = "images/rotVert/7.jpg";
		nextInt = 7;
	}
	else if (whichLink == "vCard9") {
		document.vCardImage.src = "images/rotVert/8.jpg";
		nextInt = 8;
	}
	else if (whichLink == "vCard10") {
		document.vCardImage.src = "images/rotVert/9.jpg";
		nextInt = 9;
	}
	else if (whichLink == "vCard11") {
		document.vCardImage.src = "images/rotVert/10.jpg";
		nextInt = 10;
	}
	else if (whichLink == "vCard12") {
		document.vCardImage.src = "images/rotVert/11.jpg";
		nextInt = 11;
	}
	else if (whichLink == "vCard13") {
		document.vCardImage.src = "images/rotVert/12.jpg";
		nextInt = 12;
	}
	else if (whichLink == "vCard14") {
		document.vCardImage.src = "images/rotVert/13.jpg";
		nextInt = 13;
	}
	else if (whichLink == "vCard15") {
		document.vCardImage.src = "images/rotVert/14.jpg";
		nextInt = 14;
	}
	else if (whichLink == "vCard16") {
		document.vCardImage.src = "images/rotVert/15.jpg";
		nextInt = 15;
	}
	else if (whichLink == "vCard17") {
		document.vCardImage.src = "images/rotVert/16.jpg";
		nextInt = 16;
	}
	else if (whichLink == "vCard18") {
		document.vCardImage.src = "images/rotVert/17.jpg";
		nextInt = 17;
	}
	else if (whichLink == "vCard19") {
		document.vCardImage.src = "images/rotVert/18.jpg";
		nextInt = 18;
	}
	else if (whichLink == "vCard20") {
		document.vCardImage.src = "images/rotVert/19.jpg";
		nextInt = 19;
	}
	else {
		alert("What Happened?");
		return;
	}
}

function swapMeH(whichLink) {
	if (whichLink == "hCard1") {
		document.hCardImage.src = "images/rotHoriz/0.jpg";
		nextInt = 0;
	}
	else if (whichLink == "hCard2") {
		document.hCardImage.src = "images/rotHoriz/1.jpg";
		nextInt = 1;
	}
	else if (whichLink == "hCard3") {
		document.hCardImage.src = "images/rotHoriz/2.jpg";
		nextInt = 2;
	}
	else if (whichLink == "hCard4") {
		document.hCardImage.src = "images/rotHoriz/3.jpg";
		nextInt = 3;
	}
	else if (whichLink == "hCard5") {
		document.hCardImage.src = "images/rotHoriz/4.jpg";
		nextInt = 4;
	}
	else if (whichLink == "hCard6") {
		document.hCardImage.src = "images/rotHoriz/5.jpg";
		nextInt = 5;
	}
	else if (whichLink == "hCard7") {
		document.hCardImage.src = "images/rotHoriz/6.jpg";
		nextInt = 6;
	}
	else if (whichLink == "hCard8") {
		document.hCardImage.src = "images/rotHoriz/7.jpg";
		nextInt = 7;
	}
	else if (whichLink == "hCard9") {
		document.hCardImage.src = "images/rotHoriz/8.jpg";
		nextInt = 8;
	}
	else if (whichLink == "hCard10") {
		document.hCardImage.src = "images/rotHoriz/9.jpg";
		nextInt = 9;
	}
	else if (whichLink == "hCard11") {
		document.hCardImage.src = "images/rotHoriz/10.jpg";
		nextInt = 10;
	}
	else if (whichLink == "hCard12") {
		document.hCardImage.src = "images/rotHoriz/11.jpg";
		nextInt = 11;
	}
	else if (whichLink == "hCard13") {
		document.hCardImage.src = "images/rotHoriz/12.jpg";
		nextInt = 12;
	}
	else if (whichLink == "hCard14") {
		document.hCardImage.src = "images/rotHoriz/13.jpg";
		nextInt = 13;
	}
	else if (whichLink == "hCard15") {
		document.hCardImage.src = "images/rotHoriz/14.jpg";
		nextInt = 14;
	}
	else if (whichLink == "hCard16") {
		document.hCardImage.src = "images/rotHoriz/15.jpg";
		nextInt = 15;
	}
	else if (whichLink == "hCard17") {
		document.hCardImage.src = "images/rotHoriz/16.jpg";
		nextInt = 16;
	}
	else if (whichLink == "hCard18") {
		document.hCardImage.src = "images/rotHoriz/17.jpg";
		nextInt = 17;
	}
	else if (whichLink == "hCard19") {
		document.hCardImage.src = "images/rotHoriz/18.jpg";
		nextInt = 18;
	}
	else if (whichLink == "hCard20") {
		document.hCardImage.src = "images/rotHoriz/19.jpg";
		nextInt = 19;
	}
	else {
		alert("What Happened?");
		return;
	}
}

function restoreMe() {
	/*document.vCardImage.src = "images/MEI_Logo_140.jpg";*/
	return;
}

var maxCardsV = 18; //Global, set total number of Card Images supplied in images/rotVert/ folder
var maxCardsH = 20; //Global, set total number of Card Images supplied in images/rotHoriz/ folder
function randomCardV() {
	var randomInt = Math.floor(Math.random()*maxCardsV);
	nextInt = randomInt; //set nextInt to display next image after randomInt
	document.vCardImage.src = "images/rotVert/"+randomInt+".jpg";
	return;
}
function randomCardH() {
	var randomInt = Math.floor(Math.random()*maxCardsV);
	nextInt = randomInt; //set nextInt to display next image after randomInt
	document.hCardImage.src = "images/rotHoriz/"+randomInt+".jpg";
	return;
}
function nextCardV() {
	nextInt = nextInt+1;
	if (nextInt == maxCardsV) {
		nextInt=0;
	}
	document.vCardImage.src = "images/rotVert/"+nextInt+".jpg";
	return;
}
function prevCardV() {
	nextInt = nextInt-1;
	if (nextInt == -1) {
		nextInt=maxCardsV-1;
	}
	document.vCardImage.src = "images/rotVert/"+nextInt+".jpg";
	return;
}
function nextCardH() {
	nextInt = nextInt+1;
	if (nextInt == maxCardsH) {
		nextInt=0;
	}
	document.hCardImage.src = "images/rotHoriz/"+nextInt+".jpg";
	return;
}
function prevCardH() {
	nextInt = nextInt-1;
	if (nextInt == -1) {
		nextInt=maxCardsH-1;
	}
	document.hCardImage.src = "images/rotHoriz/"+nextInt+".jpg";
	return;
}