/*********************************************

This script will detect the screen size and
position the footer at the bottom of the 
screen or the bottom of the photo container,
which ever is higher (lower in px)

*********************************************/

function heightFix(){
	
	if(!window.innerHeight){
	
		//this is an IE browser
		var IH = document.body.offsetHeight;
		//override
		IH = document.getElementById('heightTester').offsetHeight;
		
		//either WIN or MAC
		var plat = window.navigator.platform;
	
		var isWin;
	
		if(plat.indexOf('Mac') > -1){ isWin = false;}else{isWin = true;}
		
	}else{
	
		//this is a mozilla browser
		var IH = window.innerHeight;

		//either WIN or MAC
		var plat = window.navigator.platform;
	
		var isWin;
	
		if(plat.indexOf('Mac') > -1){ isWin = false;}else{isWin = true;}
		
	}
	
	
	if(window.outerHeight){var OH = window.outerHeight;}else{var OH = document.body.offsetHeight;}
	if(window.innerHeight){var IH = window.innerHeight;}else{var IH = document.getElementById('heightTester').offsetHeight;}
	
	var actualH = IH;
	
	//our target is 644px(height of photo + height of header) - 85px(height of footer) = 571px 
	if(IH < 629){
		var photoH = IH - 15;
	}else{
		var toppos = 544;
		var photoH = 544;
	}

		document.getElementById('photo').style.height = photoH+'px';
		document.getElementById('container').style.height = IH+'px';
}

