//////////////////////////////////////////////////////////////

var UL_homeBox = new Array();     

//////////////////////////////////////////////////////////////

function UL_homeBoxHover(id) {
	UL_homeBoxH(id, 144, 287)
}

function UL_homeBoxOut(id) {
	UL_homeBoxH(id, 90, 341)
}		

//////////////////////////////////////////////////////////////

function UL_homeBoxH(id, h, y) 
{
	var el = document.getElementById('home_box_' + id);
	
	if(el) 
	{
		var o;
		if(!UL_homeBox[id]) {
			o = UL_homeBox[id] = new Object();
		} else {
			o = UL_homeBox[id];
			clearInterval(o.timer);
		}
		
		o.el = el;
		
		o.fromH = o.curH = parseFloat(el.style.height);
		o.toH = h;
		
		o.fromY = o.curY = parseFloat(el.style.top);
		o.toY = y				
		
		o.timer = setInterval("UL_homeBoxUpdate('"+id+"')", 20);
	}
}

//////////////////////////////////////////////////////////////
				
function UL_homeBoxUpdate(id) 
{
	var o = UL_homeBox[id];
	
	o.curH += 0.4 * (o.toH - o.curH);
	o.curY += 0.4 * (o.toY - o.curY);
	
	var newH = Math.round(o.curH);
	var newY = Math.round(o.curY);
		
	o.el.style.height = newH + 'px';
	o.el.style.top = newY + 'px';
	
	if(newH == o.toH && newY == o.toY) clearInterval(o.timer);
}

//////////////////////////////////////////////////////////////

var t=setTimeout("updateHomeContent(1)",15000);

var img2 = new Image();
img2.src="/Frontend/Images/img-home2.jpg";

function updateHomeContent( img )
{
	var el = document.getElementById('homecontent');
	
	if(el)
	{
		if( img == 1 ) {
			el.className="home_content2";
		} else {
			el.className="home_content";
		}
	}
	if( img == 1 ) {
		img = 2;
	} else {
		img = 1;
	}
 
	var t=setTimeout("updateHomeContent("+img+")",15000);

}
