function getPageSize(){
	var xScroll, yScroll;

	if (window.innerHeight && window.scrollMaxY) {
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}

	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}

	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else {
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}

	
	// alert(pageWidth + ' - ' + pageHeight + ' - ' + windowWidth + ' - ' + windowHeight);
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
	return arrayPageSize;
}


function addLoadEvent(func){
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}
}

function lablecBlokkBeigazitasa(){
	var content_block_felso = document.getElementById('content_block_felso').clientHeight;
	var content_block = document.getElementById('content_block').clientHeight;
	var lablec_blokk = document.getElementById('lablec_blokk').clientHeight;
	var kiegeszites = 91;
	var marginTop = content_block_felso-content_block-kiegeszites;
	document.getElementById('lablec_blokk').style.marginTop =  (marginTop) + "px";
}

function getSiteWidth(){
	var ret = getPageSize();
	if(ret[2]>897){
		document.getElementById('content_block_also').style.marginLeft=((ret[2]-914)/2) + "px";
		document.getElementById('content_block_felso').style.marginLeft=((ret[2]-914)/2) + "px";
		document.getElementById('content_block').style.marginLeft=((ret[2]-870)/2) + "px";
	}
	else{
		document.getElementById('hatter_felso').style.width = "914px";
		document.getElementById('hatter_also').style.width = "914px";
		document.getElementById('content_block_also').style.marginLeft = 9 + "px";
		document.getElementById('content_block').style.marginLeft = 20 + "px";
	}
}
