function changeimg (obj){
	var tabs = document.getElementById("tabs");
	/*var anchors = tabs.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++){
		anchors[i].className = "";
	}*/
	obj.className = "active";
	
	var thelink = document.getElementById("splashlink");
	thelink.href = obj.href;
	
	var target = obj.href.split("/");
	var tlen = target.length - 1;
	var source = target[tlen].split(".");
	
	thelink.style.background = "url(/lib/yhst-46249621793050/" + source[0] + ".jpg)";
}

function rotate(){
	
	//var tabs = document.getElementById("tabs");
	var thelink = document.getElementById("splashlink");
	var src = thelink.href;
	var target = src.split("/");
	var tlen = target.length - 1;
	var source = target[tlen].split(".");
	
	for (var i=0; i<imgarray.length; i++){
		if (source[0] == imgarray[i]){
			if (i == (imgarray.length - 1)){
				thelink.href = imgarray[0] + ".html";
				thelink.style.background = "url(/lib/yhst-46249621793050/" + imgarray[0] + ".jpg)";
				/*var anchors = tabs.getElementsByTagName("a");
				for (var j=0; j<anchors.length; j++){
					anchors[j].className = "";
				}
				anchors[0].className = "active";*/
			}
			else{
				thelink.href = imgarray[i + 1] + ".html";
				thelink.style.background = "url(/lib/yhst-46249621793050/" + imgarray[i + 1] + ".jpg)";
				/*var anchors = tabs.getElementsByTagName("a");
				for (var j=0; j<anchors.length; j++){
					anchors[j].className = "";
				}
				anchors[i + 1].className = "active";*/
			}
		}
	}
	
	window.setTimeout("rotate();",4500);
}

setTimeout("rotate()", 4500);
