var uniBrow = (navigator.appName.indexOf("Microsoft") != -1) ? "1" : "2";

var intervalID = undefined;
var appHeightIEUno = 0;

function resizeMe (height) {
	if (uniBrow == "1") {
		changeSizeIE(height);
	} else {
		changeSize(height);
	}
}
	
function changeSizeIE (heightIE) {	
	//window.document.getElementById("eventslist").height = heightIE + "px";
	
	window.document.getElementById("eventBox").style.height = heightIE + "px";
	
	//document.write(document.getElementById("eventslist").height + "<br />");
	//alert(document.getElementById("eventslist").height);

	
}

/* HÄR NEDANFÖR ÄR ALLA UTOM IE */

function changeSize (height) {	
	//alert(height);
	
	function f () {
		var appHeight = getAppHeight();	
		var newHeight = appHeight + ((height - appHeight) / 2);
		setAppHeight(newHeight);
	}
			
	if (intervalID != undefined) {
		clearInterval(intervalID);
		intervalID = setInterval(f, 50);
	} else {
		intervalID = setInterval(f, 50);
	}
}

function setAppHeight (minNyaHeight) 	{
	window.document.getElementById("eventBox").style.height = minNyaHeight + "px";
}
		
	
function getAppHeight () {
	return parseInt(window.getComputedStyle(document.getElementById("eventBox"),null).height);
}