function showNextPhoto(){
	if(!document.getElementById) return false;
	if(document.all){
		var ieSucks = 1;
	}else{
		var ieSucks = 0;
	}
	var prevLink = document.getElementById("photoPrevLink");
	var nextLink = document.getElementById("photoNextLink");
	var photoNavStat = document.getElementById("count");
	var currentPhotoString = prevLink.rel;
	var currentPhotoNum = parseInt(currentPhotoString);
	var totalPhotos = nextLink.rel;
	var lastPhoto = currentPhotoNum + 1;
	lastPhoto = lastPhoto + "";
	if(totalPhotos != lastPhoto) {
		var nextPhotoNum = currentPhotoNum+1;
		var friendlyPhotoNum = nextPhotoNum + 1;
		
		var currentPhoto = document.getElementById("photowrp"+currentPhotoString);
		var nextPhoto = document.getElementById("photowrp"+nextPhotoNum);
		
		if(ieSucks){
			currentPhoto.className = "photowrp hidden";
			nextPhoto.className = "photowrp";
		}else{
			currentPhoto.setAttribute("class","photowrp hidden");
			nextPhoto.setAttribute("class", "photowrp");
		}
		photoNavStat.innerHTML = friendlyPhotoNum + " of " + totalPhotos;
	
		prevLink.setAttribute("rel", nextPhotoNum);
	}
}

function showPrevPhoto(){
	if(!document.getElementById) return false;
	if(document.all){
		var ieSucks = 1;
	}else{
		var ieSucks = 0;
	}
	
	var prevLink = document.getElementById("photoPrevLink");
	var nextLink = document.getElementById("photoNextLink");
	var photoNavStat = document.getElementById("count");
	
	var currentPhotoString = prevLink.rel;
	var currentPhotoNum = parseInt(currentPhotoString);
	
	var totalPhotos = nextLink.rel;
	var prevPhotoNum = currentPhotoNum - 1;
	
	if(prevPhotoNum != -1){
		var prevPhotoLinkNum = prevPhotoNum;

		var currentPhoto = document.getElementById("photowrp"+currentPhotoString);
		var prevPhoto = document.getElementById("photowrp"+prevPhotoLinkNum);
		if(ieSucks){
			currentPhoto.className = "photowrp hidden";
			prevPhoto.className = "photowrp";
		}else{
			currentPhoto.setAttribute("class", "photowrp hidden");
			prevPhoto.setAttribute("class", "photowrp");
		}
		

		photoNavStat.innerHTML = currentPhotoNum + " of " + totalPhotos;
		
		prevLink.setAttribute("rel", prevPhotoLinkNum);
	}
}
