// JavaScript Document
function imgSize() {
	var imgRate = ((document.documentElement.clientWidth * 0.8) * 0.8) / 1997;
	var imgWidth = Math.round(1997 * imgRate);
	var imgHeight = Math.round(716 * imgRate);
	var imgMain = document.getElementById('img-main');
	imgMain.style.height = imgHeight + 'px';
	imgMain.style.width = imgWidth + 'px';
}

window.onresize = function() {
	imgSize();
};

function rollImg (imgFlag) {
	switch (imgFlag) {
		case 0:
			document.getElementById('img-main').src = 'ad.png';
		break
		case 1:
			document.getElementById('img-main').src = 'ad2.png';
		break
	}
}

