var curFrameNum = 1;

function featureSwapAll(frameName,num) {
	hideFrame = frameName + curFrameNum;
	showFrame = frameName + num;
	hideCircle = 'featureNavBar' + curFrameNum;
	showCircle = 'featureNavBar' + num;
	hideText = 'featuredProjectText' + curFrameNum;
	showText = 'featuredProjectText' + num;
	hideVid = 'videoRight' + curFrameNum;
	showVid = 'videoRight' + num;
	if (document.getElementById) {
		tempHideFrame = window.document.getElementById(hideFrame);
		tempShowFrame = window.document.getElementById(showFrame);
		tempHideCircle = window.document.getElementById(hideCircle);
		tempShowCircle = window.document.getElementById(showCircle);
		tempHideText = window.document.getElementById(hideText);
		tempShowText = window.document.getElementById(showText);
		tempHideVid = window.document.getElementById(hideVid);
		tempShowVid = window.document.getElementById(showVid);
	}
	else if (document.layers) {
		tempHideFrame = window.document.layers[hideFrame];
		tempShowFrame = window.document.layers[showFrame];
		tempHideCircle = window.document.layers[hideCircle];
		tempShowCircle = window.document.layers[showCircle];
		tempHideText = window.document.layers[hideText];
		tempShowText = window.document.layers[showText];
		tempHideVid = window.document.layers[hideVid];
		tempShowVid = window.document.layers[showVid];
	}
	else if (document.all) {
		tempHideFrame = window.document.all[hideFrame];
		tempShowFrame = window.document.all[showFrame];
		tempHideCircle = window.document.all[hideCircle];
		tempShowCircle = window.document.all[showCircle];
		tempHideText = window.document.all[hideText];
		tempShowText = window.document.all[showText];
		tempHideVid = window.document.all[hideVid];
		tempShowVid = window.document.all[showVid];
	}
	tempHideFrame.style.display = 'none';
	tempShowFrame.style.display = 'block';
	tempHideCircle.style.backgroundImage = 'url(../images/button_circle_full.gif)';
	tempShowCircle.style.backgroundImage = 'url(../images/button_circle_empty.gif)';
	if (tempHideText) {
		tempHideText.style.display = 'none';
	}
	if (tempShowText) {
		tempShowText.style.display = 'block';
	}
	if (tempHideVid) {
		tempHideVid.style.display = 'none';
	}
	if (tempShowVid) {
		tempShowVid.style.display = 'block';
	}
	curFrameNum = num;
}

function featurePicNavBack(frameName) {
	if (curFrameNum > 1) {
		num = (curFrameNum - 1);
		featureSwapAll(frameName,num);
	}
}

function featurePicNav(frameName, num) {
	if (curFrameNum != num) {
		featureSwapAll(frameName,num);
	}
}

function featurePicNavNext(frameName, numFrames) {
	if (curFrameNum < numFrames) {
		num = (curFrameNum + 1);
		featureSwapAll(frameName,num);
	}
}