var mainholders = new Array('img1', 'img2', 'img3', 'img4', 'img5', 'img6', 'img7', 'img8', 'img9', 'img10', 'img11');
var thumbs = new Array('thumbimg1', 'thumbimg2', 'thumbimg3', 'thumbimg4', 'thumbimg5', 'thumbimg6', 'thumbimg7', 'thumbimg8', 'thumbimg9', 'thumbimg10', 'thumbimg11');
var current = 0;
var t;

function ShowHideDiv(divId, thumbId) {
	
	pauseRotate();
	if (document.getElementById) { // DOM3 = IE5, NS6
		for (var x = 0; x < mainholders.length; x++)
		   {
		   		if (document.getElementById(mainholders[x]) != null)
					document.getElementById(mainholders[x]).style.display = "none";
					
				if (document.getElementById(thumbs[x]) != null) {
					document.getElementById(thumbs[x]).style.filter = 'alpha(opacity=' + 100 + ')';
					document.getElementById(thumbs[x]).style.opacity = 1;
				}
		   }
		
		if (document.getElementById(divId) != null)
		    document.getElementById(divId).style.display = "block";
		
		if (document.getElementById(thumbId) != null) {
		    document.getElementById(thumbId).style.filter = 'alpha(opacity=' + 50 + ')';
		    document.getElementById(thumbId).style.opacity = 0.5;
		}
	}
	else {
		if (document.layers) { // Netscape 4
			for (var x = 0; x < mainholders.length; x++)
			   {
			   		if (document.mainholders[x] != null)
						document.mainholders[x].display = "none";
			   }
			
			document.divId.display = "block";
		}
		else { // IE 4
			for (var x = 0; x < mainholders.length; x++)
			   {
			   		if (document.all.mainholders[x] != null)
						document.all.mainholders[x].style.display = "none";
			   }
		
			document.all.divId.style.display = "block";
		}
	}
}

function Rotate() {
	if (document.getElementById) {
		for (var x = 0; x < mainholders.length; x++)
			   {
					if (document.getElementById(mainholders[x]) != null)
						document.getElementById(mainholders[x]).style.display = "none";
				
					if (document.getElementById(thumbs[x]) != null) {
						document.getElementById(thumbs[x]).style.filter = 'alpha(opacity=' + 100 + ')';
						document.getElementById(thumbs[x]).style.opacity = 1;
					}
			   }
			
		if (document.getElementById(mainholders[current]) != null)
			document.getElementById(mainholders[current]).style.display = "block";
		
		if (document.getElementById(thumbs[current]) != null) {
			document.getElementById(thumbs[current]).style.filter = 'alpha(opacity=' + 50 + ')';
			document.getElementById(thumbs[current]).style.opacity = 0.5;
		}
	}
	
	if (current == 10) 
		current = 0;
	else 
		current++;
		
	t = setTimeout("Rotate()",3000);
}

function pauseRotate()
{
	clearTimeout(t);
}

window.onload = Rotate;

/*function Setup()
{
	Rotate();
	ShowCurrentDay();
	initializemarquee();
}

window.onload = Setup;*/