function changeDesc(paragraph) {
	for(x=0;x<7;x++){
		document.getElementById("p"+x).style.display="none";	
	}
	document.getElementById(paragraph).style.display="";	
}
var picWidth;
var myImage;
var value = 100;
var preloads;

function changePic(number,image,pic) {
	document.getElementById("exhibitPhoto").src="img/"+number+"_"+image+".jpg";
	
	myImage = new Image();
	myImage.src = "img/"+number+"_"+image+".jpg";	
	var picWidth = myImage.width;
	document.getElementById('exhibitBorder').style.width=picWidth+"px";	
	
	// Everything after here is to do with 
	// the numbered links and not to do with 
	// this query - this works fine :0)
	
	for(x=1;x<=pic;x++){
		document.getElementById("link"+x).style.background="#C7DCD3";	
		document.getElementById("link"+x).style.color="#666";	
	}
	document.getElementById("link"+image).style.background="#A4C6B7";
	document.getElementById("link"+image).style.color="#333";
}

var preloads=[];
function preload(){
	for(var i=0;i< arguments.length;i ++) {
   	preloads[preloads.length]=new Image();
   	preloads[preloads.length-1].src=arguments[i];
  	}	
}

