// JavaScript Document

//Function that rotates images on home page
//color background green
function selectThisBlock(listName,obj) {
	if (document.getElementById) {
		obj = document.getElementById(obj);
		group = document.getElementById(listName);
	} else if (document.all) {
		obj = document.all.item(obj);
		group = document.all.item(listName);
	} else {
		group = null;
		obj = null;
	}
  	if (group==null) return;
  	var groupList = group.getElementsByTagName("div");
	for (i = 0; i < groupList.length; i++) {
		groupList[i].className = "white_bg";
	}
	obj.className = "green_bg";
}
//set rotation time and swap images
function swapMainImage()
{
	setTimeout("showhidePopUpLayer('home_main_image1',true);showhidePopUpLayer('home_main_image2',false);showhidePopUpLayer('home_main_image3',false);selectThisBlock('blurbs','blurb1');", 0);
	setTimeout("showhidePopUpLayer('home_main_image2',true);showhidePopUpLayer('home_main_image1',false);showhidePopUpLayer('home_main_image3',false);selectThisBlock('blurbs','blurb2');", 4000);
	setTimeout("showhidePopUpLayer('home_main_image3',true);showhidePopUpLayer('home_main_image2',false);showhidePopUpLayer('home_main_image1',false);selectThisBlock('blurbs','blurb3');", 8000);

	setTimeout("swapMainImage()", 12000);
}

window.onload=swapMainImage;