var BrowserName = -1;
var bodyScroll = 0;

function GetBrowserName() {
	if (typeof(navigator.appName) != 'undefined') 
		BrowserName = navigator.appName;
	else
		BrowserName = -1;
}

function doOnLoad(){
	GetBrowserName();
	SetHeight();
}


function isScrollH(oDiv){
   var iScrollWidth = document.body.scrollWidth;
   var iOffsetWidth = document.body.offsetWidth;
   var iDifference = iScrollWidth - iOffsetWidth;
/****************
	alert("Width: " + iOffsetWidth
      + "\nContent Width: " + iScrollWidth
      + "\nDifference: " + iDifference); 
*****************/
//	if (document.body.scroll = "auto"){
//		alert("Lehet vízszintes scroll, mert 'auto'-ra van állítva")
//	}

	if (iDifference > -20){
//		alert("Van vízszintes scroll.")
		return true;
	}
	return false;
}



function SetHeight(){
var magassag, objektum;
	magassag = document.body.clientHeight - 180 - 26;
/*****
	magassag += document.body.scrollHeight - document.body.offsetHeight;
******/
	if (document.body.clientHeight <= 586){
		magassag += 26;
		if (document.body.clientHeight > 560){
			magassag = 560 - 180 + 3;
			if(isScrollH()){
				magassag += 20;
			}
		}
	} else {
		if(isScrollH()){
			magassag += 20;
		}
	}

//	if (document.body.scroll)
//	alert("magassag: " + document.body.height);
	if (BrowserName == "Microsoft Internet Explorer") {
		objektum = document.getElementById("textDiv");
		if (objektum) {
			objektum.style.overflow = "auto";
			objektum.style.pixelHeight = magassag;
		}

		objektum = document.getElementById("centercolumn");
		objektum.style.background = "none";
	} else {
//		objektum = textDiv;
		objektum = document.getElementById("textDiv");
		if (objektum) {
			objektum.style.overflow = "auto";
			objektum.style.height = magassag;
		}

		objektum = document.getElementById("centercolumn");
		objektum.style.background = "none";
	}
}

function SetHeightOnScroll(){
//	SetHeight()
}

