// JavaScript Document

function hideData(){	
	document.getElementById('about').style.display = "none";
	document.getElementById('about').style.visibility = "hidden";
	document.getElementById('charter').style.display = "none";
	document.getElementById('charter').style.visibility = "hidden";
	document.getElementById('publishing').style.display = "none";
	document.getElementById('publishing').style.visibility = "hidden";
	document.getElementById('contact').style.display = "none";
	document.getElementById('contact').style.visibility = "hidden";
}


function showData(id){
	document.getElementById(id).style.display = "";
	document.getElementById(id).style.visibility = "";
}

function sendData(data){
  window.location = "index.html?" + data;
}

var adImages = new Array("images/featured1.jpg","images/featured2.jpg","images/featured3.jpg","images/featured4.jpg");
var thisAd = 0;

function choosePic() {
	thisAd = Math.floor((Math.random() * adImages.length));
	document.getElementById("featuredPublications").src = adImages[thisAd];
	
	rotate();
}

function rotate() {
	thisAd++;
	if (thisAd == adImages.length) {
		thisAd = 0;
	}
	document.getElementById("featuredPublications").src = adImages[thisAd];

	setTimeout(rotate, 8 * 1000);
}

