//======= Natural Floorcovering Centre
//======= www.naturalfloor.com.au






//Global Variables

// feature timer
var FtrTimer = window.setInterval("showFtr()", 5000);


var ftrLink; // the page this feature links to.

//var txtPhotoPath;
var txtFtrPhotoPath = "images\\home_btm_feature-";

var NUMBER_OF_FEATURES = 3;


// Pre-load images
var FtrImg = new Array(NUMBER_OF_FEATURES);
var FtrAlts = new Array(NUMBER_OF_FEATURES);
var FtrLinks  = new Array(NUMBER_OF_FEATURES);
var FtrTxt  = new Array(NUMBER_OF_FEATURES);


// p is how many features we have
var p;
p = 0;



//j is what ftr is showing now
var j;
j = 0;



FtrImg[p] = new Image;
FtrImg[p].src = txtFtrPhotoPath + "seagrass.jpg";
FtrAlts[p]  = "Seagrass Squares";
FtrLinks[p] = "entrancemats.html#seagrass";
FtrTxt[p] = "<B>Seagrass Squares</B><BR>The original, do-it-yourself, natural floor covering available by the row or by the bale...";

p++ ;

FtrImg[p] = new Image;
FtrImg[p].src = txtFtrPhotoPath + "entrance.jpg";
FtrAlts[p]  = "Brush Coir Entrance Mats";
FtrLinks[p] = "entrancemats.html#entrance";
FtrTxt[p] = "<B>Brush Coir Entrance Mats</B><BR>";
FtrTxt[p] += "Perfect for apartment blocks, shopping malls, and even your front door... ...."
p++ ;

/*
FtrImg[p] = new Image;
FtrImg[p].src = txtFtrPhotoPath + "chair1.jpg";
FtrAlts[p]  = "Wall-to-Wall Installations";
FtrLinks[p] = "walltowall_1.html";
FtrTxt[p] = "<b>Wall-to-Wall</b><BR>Pure natural floorcoverings for everywhere from an allergists surgery to the Sydney Olympic Visitors Centre."

p++ ;
*/

FtrImg[p] = new Image;
FtrImg[p].src = txtFtrPhotoPath + "chair2.jpg";
FtrAlts[p]  = "Wall-to-Wall Installations";
FtrLinks[p] = "walltowall_1.html";
FtrTxt[p] = "<b>Wall-to-Wall</b><BR>Pure natural floorcoverings for everywhere from an allergists surgery to the Sydney Olympic Visitors Centre."

p++ ;

/*
FtrImg[p] = new Image;
FtrImg[p].src = txtFtrPhotoPath + "foot.jpg";
FtrAlts[p]  = "Wall-to-Wall Installations";
FtrLinks[p] = "walltowall_1.html";
FtrTxt[p] = "<b>Wall-to-Wall</b><BR>Pure natural floorcoverings for everywhere from an allergists surgery to the Sydney Olympic Visitors Centre."

*/




function showFtr() {

	// steps thru featurss
	
	j++;
	if (j >= NUMBER_OF_FEATURES) { j = 0; }

        updateFtr(j);

	// j is the existing feature


}

function updateFtr(x) {

	//alert (x + "  P:" + p + "  J:" + j);
	//alert (FtrAlts[x] + " " + FtrLinks[x]);

	//make this image on
	document.imgfeature.src = FtrImg[x].src;
	document.imgfeature.alt = FtrAlts[x];
	ftrLink = FtrLinks[x];
	document.getElementById("spnFtr").innerHTML = FtrTxt[x];

	//var testTxt = document.getElementById("spnFtr").innerHTML;
	//alert (testTxt);

}
