function checkHeight() {

	var panes = document.getElementById('panes');
	var main = document.getElementById('main');
	var maincontent = document.getElementById('maincontent');
	
	if (maincontent != null) {
		if (maincontent.offsetHeight < panes.offsetHeight) {
			maincontent.style.height = panes.offsetHeight + 'px';
			document.getElementById('inner').style.height = main.offsetHeight - 70 + 'px';
		}
		else if (panes.offsetHeight < main.offsetHeight-70 ) {
			document.getElementById('inner').style.height = main.offsetHeight - 70 + 'px';
		}
	}
}


//Update graphics
function update_image(user_id, type_id) {
	//Initiate a variable that will keep the type
	var type = "";

	//Check type_id and set type
    if(type_id == 1) {
		type="end-1d";
	}
	else if(type_id == 2) {
		type="end-1wk";
	}
	else if(type_id == 3) {	
		type="end-1month";
	}
	else {	 
		type="end-1d";
	}
	
	
	//Update the images
	document.image_one.src   = "http://89.190.192.126:8080/cgi-bin/view_rrd.pl?c_id="+user_id+"&traffic=10&type=bytes&start="+type;
	document.image_two.src   = "http://89.190.192.126:8080/cgi-bin/view_rrd.pl?c_id="+user_id+"&traffic=20&type=bytes&start="+type;
	document.image_three.src = "http://89.190.192.126:8080/cgi-bin/view_rrd.pl?c_id="+user_id+"&traffic=1141&type=bytes&start="+type;
}