// JavaScript Document
img_src = Array(
"/images/button_more_info_hover.jpg"
);
 
img_array = new Array();
 
for (counter in img_src) {
    img_array[counter] = new Image();
    img_array[counter].src = img_src[counter];
}

function featured_snapto(snapto){
	for(var x = 1; x <= featured_max; x++){
		if (x == snapto){
			document.getElementById('feat_img').src = featured_img[x];
			document.getElementById('feat_img').alt = featured_alt[x];
			document.getElementById('feat_blob_' + x).className = 'home-promo-box-selected';
			featured_selected = x;
		}else{
			document.getElementById('feat_blob_' + x).className = 'home-promo-box';
		}
	}
}

function featured_next(){
	if (featured_selected >= featured_max){
		featured_snapto(1);
	}else{
		featured_snapto(featured_selected + 1);
	}
}

function featured_prev(){
	if (featured_selected <= 1){
		featured_snapto(featured_max);
	}else{
		featured_snapto(featured_selected - 1);
	}
}

function featured_timer(){
	if (feat_mo == 0){
		featured_next();
	}
}

function featured_preload(){
	var imgpreload = new Array();
	for(var x = 1; x <= featured_max; x++){
		imgpreload[x] = new Image();
		imgpreload[x].src = featured_img[x];
	}
}

function featured_play(){
	featured_interval = setInterval("featured_timer()",3000);
}

function featured_pause(){
	clearInterval(featured_interval);
}

var featured_selected = 1;
var feat_mo = 0;
var featured_interval = 0;
