
/**
 * Headshot
 */
var Headshot = {
	
	resize: function() {
		var image = document.getElementById("headshot");
		if (!image) {
			return;
		}
		
		var viewportwidth;
		var viewportheight;
		
		// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
		
		if (typeof window.innerWidth != 'undefined') {
			//	Mozilla/Opera/IE7
			viewportwidth = window.innerWidth,
			viewportheight = window.innerHeight
		} else if (typeof document.documentElement != 'undefined'
			&& typeof document.documentElement.clientWidth !=
			'undefined' && document.documentElement.clientWidth != 0) {
			// IE6
			viewportwidth = document.documentElement.clientWidth,
			viewportheight = document.documentElement.clientHeight
		} else {
			//	IE5
			viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
			viewportheight = document.getElementsByTagName('body')[0].clientHeight
		}
		
		var originalHeight = 768;
		var originalWidth = 723;
		
		var newHeight = viewportheight;
		var newWidth  = viewportheight * (originalWidth / originalHeight);
		
		image.height           = newHeight;
		image.width            = newWidth;
		image.display          = "inline";
		image.style.visibility = "visible";
	}
	
};


/**
 * Body
 */
var Page = {
	
	scrollUp: function() {
		scroll(0, 0);
	}
	
};


/**
 * Main
 */
window.onresize = Headshot.resize;
var intervalId = window.setInterval(Page.scrollUp, 200);