function roll_in_or_out() {
 	if (typeof(rolling) == 'undefined') {
		
		if (document.getElementById('right_col').offsetWidth < 100) {
			rolling = setInterval('rollout()', 1);
		} else
			rolling = setInterval('collapse()', 1)
		;
	}
}

function rollout() {
 	var div = document.getElementById('right_col');
 	var wWidth = window.innerWidth*0.5 + (document.getElementById('right_col_inner').offsetWidth)/2;
	div.style.width = (div.offsetWidth + (wWidth+20-div.offsetWidth)/20) + 'px';
 	if (wWidth <= div.offsetWidth) {
 		clearInterval(rolling);
 		rolling = setInterval('expand()',1);
 	}
}

function rollin() {
 	var div = document.getElementById('right_col');
 	div.style.width = (div.offsetWidth - 50) + 'px';
 	if (69 >= div.offsetWidth) {
		div.style.width='38px';
 		clearInterval(rolling);
 		rolling = undefined;
 	}
}

function move_panel() {
	if(typeof(expanding) == 'undefined') {
			if(document.getElementById('right_col_inner').style.height < 50) {
				expanding = setIntervall('expand()',1);
			} else {
				expanding = setIntervall('collapse()',1);
			}
	}
}

function expand() {
	var div = document.getElementById('right_col_inner');
	div.style.height = (div.offsetHeight + 4) + 'px';
	if (100 <= div.offsetHeight) {
		clearInterval(expanding);
		expanding = undefined;
	}
}

function collapse() {
	var div = document.getElementById('right_col_inner');
	div.style.height = (div.offsetHeight - 4) + 'px';
	if (5 >= div.offsetHeight) {
	   div.style.height = '2px';
		clearInterval(expanding);
		expanding = 'undefined';
	}
}
