
function setMainPicture(pictureId, pictureCaption)
{

	if((document.getElementById("mainPicture").complete) || (navigator.vendor.indexOf("Apple") != -1))
	{
		document.getElementById("mainImage").className = "loading";
		var container = document.getElementById("mainPicture").parentNode;
		container.removeChild(container.firstChild);
		document.getElementById("mainPictureCaption").innerHTML = pictureCaption;
		document.getElementById("mainPictureCaption").style.display = "none";
		var newImg = document.createElement("img");
		newImg.id = "mainPicture";
		newImg.src = "./image.php?id=" + pictureId;
		newImg.setAttribute("onload", "resetLoading()");
		newImg['onload'] = new Function("resetLoading()");
		document.getElementById("mainImage").appendChild(newImg);
	}
	return false;
}
function resetLoading()
{
	document.getElementById("mainImage").className = "notLoading";
	document.getElementById("mainPictureCaption").style.display = "block";
}

function showOptions(type)
{

	document.getElementById("options_medium").style.display = "none";
	document.getElementById("options_discipline").style.display = "none";
	document.getElementById("options_year").style.display = "none";
	document.getElementById("options_projects").style.display = "none";

	document.getElementById("options_" + type).style.display = "block";
}
