var curPOS=0;

function initBanBtn()
{
	document.getElementById("btn1").src = "/images/home_banners/sub_nav_1_active.gif";
}

function dspBanner(pos)
{
	var i=0, hb, hbSub, btn;
//	dspStatus(pos);
	curPOS = pos;
	hb = document.getElementById('homeBanners');
	hbSub = eval( 'document.getElementById("banner' + pos + '")' );	

	hb.innerHTML = hbSub.innerHTML;
	for(i=0;i<3;i++)	{
		btn = eval ( 'document.getElementById("btn' + (i+1) + '")' );
		if (i==pos)	{
				eval('btn.src="images/home_banners/sub_nav_"+(i+1)+"_active.gif"');
			}
		else
			{
				eval('btn.src="images/home_banners/sub_nav_"+(i+1)+".gif"');
			}
	}
}

function dspNext()
{
	if (curPOS < 2)
		curPOS++;
	else
		curPOS=0;
	dspBanner(curPOS);
//	dspStatus(curPOS);
}

function dspPrev()
{
	if (curPOS > 0 )
		curPOS--;
	else
		curPOS=2;
	dspBanner(curPOS);
//	dspStatus(curPOS);
}

function dspStatus(pos)
{
	if (pos == "0")
	{
		window.status = 'Over 11,376 mortgage companies have switched to Encompass';
	}
	else if (pos == "1")
	{
		window.status = 'Connect with more than 30 Lenders in just TWO clicks!';
	}
	else if (pos == "2")
	{
		window.status = 'Save time & money by drawing docs within Encompass';
	}
	else
	{
		window.status = '';
	}
}
