var slideShowImg = new Array("header-bg-2.jpg", "header-bg-3.jpg");
var slideShowIndex = 0;
var oldClassName = "";

function preloadSlideShow() {
	for (i = 0; i < slideShowImg.length; i++) {
		var img = new Image();
		img.src = "/images/structure/" + slideShowImg;
	}
}

function runSlideShow() {
	if (slideShowIndex == slideShowImg.length) {
		slideShowIndex = 0;
	}
	document.getElementById("slideShowBlock").style.backgroundImage = "url(/images/structure/" + slideShowImg[slideShowIndex] + ")";
	slideShowIndex++;
	setTimeout("runSlideShow()", 2000);
}

function showFooterTab(e, n) {
	var ancors = e.parentNode.getElementsByTagName("a");
	for (i = 0; i < ancors.length; i++) {
		var di = document.getElementById("footerTab" + i);
		if (i == n) {
			ancors[i].className = "selected";
			di.style.display = "block";
		} else {
			ancors[i].className = "";
			di.style.display = "none";
		}
	}
}

function menuItemOver(e) {
//	oldClassName = e.parentNode.className;
//	e.parentNode.className = "active";
	oldClassName = e.className;
	e.className = "active";
}

function menuItemOut(e) {
//	e.parentNode.className = oldClassName;
	e.className = oldClassName;
}


