//////////////////////////////////////////////////////////////

var UL_cihBox = new Array();     
var UL_cihImg = new Array();     
//////////////////////////////////////////////////////////////

function UL_cihBoxHover(id) {
	UL_cihBoxH(id, 220, 155)
}

function UL_cihBoxOut(id) {
	UL_cihBoxH(id, 200, 175)
}		

//////////////////////////////////////////////////////////////

function UL_cihBoxH(id, h, y) 
{
	var el = document.getElementById('cih_box_' + id);
	var img = el.firstChild;
	if( img.tagName != 'DIV') img = img.nextSibling;
	
	if(el && img) 
	{
		var o;
		if(!UL_cihBox[id]) {
			o = UL_cihBox[id] = new Object();
			i = UL_cihImg[id] = new Object();
		} else {
			o = UL_cihBox[id];
			i = UL_cihImg[id];
			clearInterval(o.timer);
		}
		
		o.el = el;
		i.el = img;
		
		o.fromH = o.curH = parseFloat(el.style.height);
		o.toH = h;
		
		i.fromH = i.curH = parseFloat(img.style.height);
		i.toH = h-59;
		
		o.fromY = o.curY = parseFloat(el.style.top);
		o.toY = y;				
		
		o.timer = setInterval("UL_cihBoxUpdate('"+id+"')", 20);
	}
}

//////////////////////////////////////////////////////////////
				
function UL_cihBoxUpdate(id) 
{
	var o = UL_cihBox[id];
	var i = UL_cihImg[id];
	
	o.curH += 0.4 * (o.toH - o.curH);
	o.curY += 0.4 * (o.toY - o.curY);
	i.curH += 0.4 * (i.toH - i.curH);
	
	var newH = Math.round(o.curH);
	var newY = Math.round(o.curY);
		
	var newI = Math.round(i.curH);

	o.el.style.height = newH + 'px';
	o.el.style.top = newY + 'px';
	i.el.style.height = newI + 'px';
	
	if(newH == o.toH && newY == o.toY) clearInterval(o.timer);
}

//////////////////////////////////////////////////////////////