(document.getElementById) ? dom = true : dom = false;

function showIt(featureNum) {
	if (dom) {
		for(a=1;a<=totalNum;a++) {
			document.getElementById('hs_feature_'+a).style.visibility='hidden';
			document.getElementById('hs_highlight_'+a).style.visibility='hidden';
		}
		document.getElementById('hs_feature_'+featureNum).style.visibility='visible';
		document.getElementById('hs_highlight_'+featureNum).style.visibility='visible';
	}
	if (document.layers) {
		for(b=1;b<=totalNum;b++) {
			document.layers['hs_feature_'+b].visible='hide';
			document.layers['hs_highlight_'+b].visible='hide';
		}
		document.layers['hs_feature_'+featureNum].visible='show';
		document.layers['hs_highlight_'+featureNum].visible='show';
	}
	stopCount()
}

var c=0;
var t;
var timer_is_on=0;

function timedCount() {
	if (c==0) {
		showIt(1);
		c=1;
	} else if (c==1) {
		showIt(2);
		c=2;
	} else if (c==2) {
		showIt(3);
		c=0;
	}
	t=setTimeout("timedCount()",8000);
}

function doTimer() {
	if (!timer_is_on) {
		timer_is_on=1;
		timedCount();
	}
}

function stopCount() {
	clearTimeout(t);
	timer_is_on=0;
}

window.onload = function() {
	doTimer();
}
