
	function getDocHeight() {
	var D = document;
	return Math.max(
		Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
		Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
		Math.max(D.body.clientHeight, D.documentElement.clientHeight)
		);
	}
	
	var GlobalWindowHeight  = getDocHeight(); 
	
	function initSizeScroll(){
		LeftColHeight  = document.getElementById('left').offsetHeight;
		RightColHeight  = document.getElementById('right').offsetHeight;
		RightColTop  = document.getElementById('right').offsetTop;
		LogoDiv  = document.getElementById('logo_bottom');
		LogoDivTop  = LogoDiv.offsetTop;
		LogoDivHeight  = LogoDiv.offsetHeight;
		WindowHeight = document.body.clientHeight;
		ScrollY = window.pageYOffset;
		FullHeight = getDocHeight();
		if (window.navigator.userAgent.indexOf("MSIE ") > -1 &&
		parseFloat(navigator.appVersion) >= 4){
			FullHeight = GlobalWindowHeight;
			ScrollY = document.documentElement.scrollTop;
		}
		ScrollTop = WindowHeight - LogoDivHeight + ScrollY;
		
		if(FullHeight >= ScrollTop) {
			if(ScrollTop >= LeftColHeight) {
				LogoDiv.style.top = WindowHeight - LogoDivHeight + ScrollY;
				if (window.navigator.userAgent.indexOf("MSIE ") > -1 &&
				parseFloat(navigator.appVersion) >= 4){
				LogoDiv.style.top = LogoDiv.offsetTop;
				}
			} else {
				LogoDiv.style.top = LeftColHeight;
			}
		} else {
			return false;
		}
	}
	
	function initSize(){
		LeftColHeight  = document.getElementById('left').offsetHeight;
		LogoDiv  = document.getElementById('logo_bottom');
		LogoDivHeight  = LogoDiv.offsetHeight;
		WindowHeight = document.body.clientHeight;
			
		if(WindowHeight > (LeftColHeight + LogoDivHeight) ){
			LogoDiv.style.top = WindowHeight - LogoDivHeight;
		}
		if( LogoDiv.offsetTop < LeftColHeight){
			LogoDiv.style.top = LeftColHeight;
		}	
	}

	function setMaxWidth(){
		WindowWidth = document.body.scrollWidth;
		if (window.navigator.userAgent.indexOf("MSIE ") > -1 &&
		parseFloat(navigator.appVersion) >= 4){
			WindowWidth = document.documentElement.scrollWidth;
		}
		LeftDiv = document.getElementById('left');
		RightDiv = document.getElementById('right');
		RightDivLeft  = RightDiv.offsetLeft;
		LeftDivWidth  = LeftDiv.offsetWidth;
		RightDiv.style.width = WindowWidth - RightDivLeft - 10;
	}

	function setMaxSize(){
		WindowHeight  = getDocHeight(); 
		LeftColHeight  = document.getElementById('left').offsetHeight;
		LogoDivHeight = document.getElementById('logo_bottom').offsetHeight;
		if (WindowHeight < LeftColHeight+LogoDivHeight) {
		document.body.childNodes.item(0).style.height = LeftColHeight+LogoDivHeight;
		} 
		
		ContentBGDiv = document.getElementById('content_bg');
		ContentBGDivTop  = ContentBGDiv.offsetTop;
		RightDivTop  = document.getElementById('right').offsetTop;
		TitleDivTop  = document.getElementById('title').offsetHeight; 
		ContentDivTop = ContentBGDivTop  + RightDivTop; 

		if (window.navigator.userAgent.indexOf("MSIE ") > -1 &&
		parseFloat(navigator.appVersion) >= 4){
			//ContentDivTop = 127;
			//ContentDivTop = ContentDivTop + 45;
		}else{
			//ContentDivTop = 110;
			//ContentDivTop = ContentDivTop + 45;
		}
		
		//ContentDivTop = ContentDivTop - 10; 
		
		var NewDivHeight = WindowHeight - ContentDivTop;
		ContentBGDiv.style.height = NewDivHeight;
		document.getElementById('content_bg_illustration').style.height = NewDivHeight;
		document.getElementById('content_bg_lines').style.height = NewDivHeight;
		
		GlobalWindowHeight  = getDocHeight()-LogoDivHeight; 
		
	}
	
	function DocOnLoadFunction() {
		setMaxSize();
		setMaxWidth();
		initSize();
		initSizeScroll();
	}
	
	function DocOnResizeFunction() {
		setMaxSize();
		setMaxWidth();
		initSize();
		initSizeScroll();
	}
	
	function DocOnScrollFunction() {
		initSizeScroll();
	}
	
	window.onload = DocOnLoadFunction;
	window.onresize = DocOnResizeFunction;
	window.onscroll = DocOnScrollFunction;
	
