var fffade=100;
var lfftimer;
var fftimer;
var nfftimer;

function loadNewFFData() {
	
	doAjax(2,0,"featfront");
	
	// replace this with an AJAX call to load random contractor
//	ghwid=document.getElementById("featfront");
//	ghwid.innerHTML="<a href=\"javascript:ghw(1,1);\"><img src=\"/imgs/emptyfeat.jpg\"></a><br/><a href=\"javascript:ghw(1,1);\">Tom Cruise</a><br/>Los Angeles<p style='color:#000;'>*Key skills/features text here*</p>";
}
function fadeNewFF()
{
	ghwid=document.getElementById("featfront");
	fffade=parseInt(fffade)+5;
     if (fffade < 95) {
		setOpacity(ghwid,fffade/100);
	 	}
	 else {
		clearInterval(nfftimer);
	 	fffade=100;
		setOpacity(ghwid,1);
		lfftimer = setInterval("loadFeatFront()",4000);
      }
}

function startFadeUp() {
	clearInterval(fftimer);
	clearInterval(nfftimer);
	fffade=0;

	document.getElementById("featfront").innerHTML="&nbsp;";
	loadNewFFData();

	nfftimer = setInterval("fadeNewFF()",20);
}
function fadeOldFF()
{
	ghwid=document.getElementById("featfront");
	fffade=parseInt(fffade)-5;
     if (fffade > 6) {
		setOpacity(ghwid,fffade/100);
	 	}
	 else {
		setOpacity(ghwid,0);
		startFadeUp();
      }
}

function loadFeatFront() {
	clearInterval(lfftimer);
	clearInterval(fftimer);
	clearInterval(nfftimer);
	fftimer = setInterval("fadeOldFF()",20);
}

loadFeatFront();

