function SizeContent(){

		var y = 0;
        if (self.innerHeight)
        {
                y = self.innerHeight;
        }
        else if (document.documentElement && document.documentElement.clientHeight)
        {
                y = document.documentElement.clientHeight;
        }
        else if (document.body)
        {
                y = document.body.clientHeight;
        }
	
	var TheHeight = parseInt(y - 220)
	
	if (TheHeight < 640){
		TheHeight = 640;
	}
	
	TheHeight = TheHeight + "px"
	
	document.getElementById("PageWrapper").style.height = TheHeight;
}

function PhotoThumb(PhotoID){
	document.getElementById("TheImage").src = "images/gallery/photo"+PhotoID+".jpg";
	document.form1.PhotoID.value = PhotoID;
}

function PreviousPhoto(){
	var CurrentPhoto = parseInt(document.form1.PhotoID.value);
	
	if (CurrentPhoto == 1) {
		CurrentPhoto = 12;	
	}else{
		CurrentPhoto = CurrentPhoto - 1;	
	}
	
	document.form1.PhotoID.value = CurrentPhoto;
	document.getElementById("TheImage").src = "images/gallery/photo"+CurrentPhoto+".jpg";
}

function NextPhoto(){
	var CurrentPhoto = parseInt(document.form1.PhotoID.value);
	
	if (CurrentPhoto == 12) {
		CurrentPhoto = 1;	
	}else{
		CurrentPhoto = CurrentPhoto + 1;	
	}
	
	document.form1.PhotoID.value = CurrentPhoto;
	document.getElementById("TheImage").src = "images/gallery/photo"+CurrentPhoto+".jpg";
}


