
isResized = function(){
	return parseInt(document.getElementById('resizer').style.height.replace("px"))>0;
}

var animateMutex = 0;

function isAnimateCan()
{
	return animateMutex==0;
}

function animateClose()
{
	animateMutex++;
}

function animateOpen()
{
	animateMutex--;
}


function increaseImage(){

	if(isResized()) return;
	if(!isAnimateCan()) return;

	animateClose();
	
	var t = 
		new TransferatorLinear(
		0,
		126,
		[0,   0.25,  0.5,	0.8,   1],
		[0.5,   7.5,   10,    10, 0.5], 
		new StyleSetterHeight(document.getElementById("resizer")));
	
	t.begin(30, animateOpen);
}

function collapseImage(event){
	
	if(!isResized()) return;
	if(!isAnimateCan()) return;
	
	animateClose();

	var t = 
		new TransferatorLinear(
		126,
		0,
		[0,   0.25,  0.5,	0.8,   1],
		[0.5,   7.5,   10,    10, 0.5], 
		new StyleSetterHeight(document.getElementById("resizer")));
	
	t.begin(20, animateOpen);
}
