var contentResizer = new function () {
	var min = 1000;
	var max = 0;
	
	var id = 'start-flash';
	
	this.init = function () {
		var callback = window.onresize;
		var onloadclb = window.onload;
		var controller = this;
		
		window.onresize = function() {
			controller.onresize();
			
			if (callback) {
				callback();
			}
		}
		
		window.onload = function () {
			controller.onresize();
			
			if (onloadclb) {
				onloadclb();
			}
		}
		
		this.onresize();
	}
	
	this.onresize = function () {
		var resized = document.getElementById(id);
		var background = document.getElementById('background');
		
		var bgleft = document.getElementById('bg-left');
		var bgright = document.getElementById('bg-right');
		
		var width = document.documentElement.clientWidth;
		var height = document.documentElement.clientHeight;
		
		if (width <= min) {
			if (resized) {
				resized.style.width = min  + 'px';
			}
			
			if (background) {
				background.style.width = min  + 'px';
			}
		} else if (max != 0 && width > max) {
			if (resized) {
				resized.style.width = max + 'px';
			}
			
			if (background) {
				background.style.width = '100%';
			}
		} else if (max == 0 || (width > (min + 20) && width < (max - 20))) {
			if (resized) {
				resized.style.width = '100%';
			}
			
			if (background) {
				background.style.width = '100%';
			}
		}
		
		if (height <= 900) {
			if (resized) {
				resized.style.height = 900  + 'px';
			}
		} else {
			if (resized) {
				resized.style.height = '100%';
			}
		}
		
		if (width < (659 + 659)) {
			if (background) {
				bgleft.style.backgroundPosition = 'right top';
				bgright.style.backgroundPosition = 'left top';
			}
		} else {
			if (background) {
				bgleft.style.backgroundPosition = 'left top';
				bgright.style.backgroundPosition = 'right top';
			}
		}
	}
}