﻿// JavaScript Document

function resizeImg() {
		var image=document.getElementById('introgfx');
		var imagebox=document.getElementById('intro');
		var clntwidth=$(document).width();
        if (clntwidth<500) {clntwidth=500;} 
		var clntheight= $(document).height();
		
		var boxheight= clntheight+"px";
		imagebox.style.height=boxheight;
		var boxwidth= clntwidth+"px";
		imagebox.style.width=boxwidth;
		
		if (clntwidth>=clntheight) {
			image.style.width=boxheight;
			image.style.height=boxheight;
		}
		else {
			image.style.width=boxwidth;
			image.style.height=boxwidth;
		}
	
}

window.onload = function() {
	resizeImg();
	
}
window.onresize = function() {
	resizeImg();
	
}

