function cbaniu(elm, pos, maxs)
{
	if (maxs >= pos) {
		if (maxs-pos > 40) {
			pos+=10;
		}
		
		if (maxs-pos <= 40 && maxs-pos >= 5) {
			pos+=5;
		}
		
		if (maxs-pos < 5) {
			pos+=1;	
		}
		
		document.getElementById(elm).style.height = pos+"px";
		setTimeout("cbaniu('"+elm+"', "+pos+", "+maxs+")", 10);
	} else {
		document.getElementById(elm).style.height = maxs+"px";
	}
}

function cbanid(elm, pos, maxs)
{
	if (pos >= maxs) {
		if (pos-maxs > 40) {
			pos-=10;
		}
		
		if (pos-maxs <= 40 && pos-maxs >= 5) {
			pos-=5;
		}
		
		if (pos-maxs < 5) {
			pos-=1;	
		}
		document.getElementById(elm).style.height = pos+"px";
		setTimeout("cbanid('"+elm+"', "+pos+", "+maxs+")", 10);
	} else {
		document.getElementById(elm).style.height = maxs+"px";
	}
}

function cartbarup()
{
  var cb = document.getElementById("cartbox");
  cbaniu("cartbox", parseInt(cb.style.height), 150); 
}

function cartbardown()
{
  var cb = document.getElementById("cartbox");
  cbanid("cartbox", parseInt(cb.style.height), 15); 
}

function cartbar()
{
	if (document.getElementById("cartbox").offsetHeight == "18") {
		document.getElementById("cartbox").style.height = "18px";
		cartbarup();	
	} else {
		cartbardown();	
	}
}