<!--
     var d=document.getElementById;
//for image cycling
     var cpos = 1;
//set up arrays for images and text
     exArraytxt = new Array();
	 exArraydesc = new Array();
	 var exWhatpositioninlist = [];
	 exWhatpositioninlist[0] = 0
	 eximportance = new Array();
	 var exal;
	 
	 exsArrayimg = new Array();
     exsArraytxt = new Array();
     exsArraylnk = new Array();
	 exsArraydesc = new Array();
	 var exsWhatpositioninlist = [];
	 exsWhatpositioninlist[0] = 0
	 exsimportance = new Array();
	 var exsal;

     np = new Array;
	 var dir4;
	 var currloc
	 var d_loc 
	 var dir 
	 var dir2
	 var d_loc2
	 var dir3 
	 	 
	 
//test if page has changed to see whether we cahnge the 'page x of y' at the bottom of the scroll box	 
	var haspagechanged = false;
	
//setup the array of the bar images for the top of the screen	 
	var imag;
	images = new Array
	images[0] = '../bar/0.jpg'
	images[1] = '../bar/1.jpg'
	images[2] = '../bar/2.jpg'
	images[3] = '../bar/3.jpg'
	images[4] = '../bar/4.jpg'

//GENERAL FUNCTIONS FOR THE SITE
//-------------------------------------------------------------------------------------------------
//=================================================================================================

//show a hudden object
function show(object) {
	if (document.layers) document.layers[object].visibility = 'show';
	if (document.getElementById) document.getElementById(object).style.visibility = 'visible';
	if (document.all) document.all[object].style.visibility = 'visible';
}

//hide an object
function hide(object) {
	if (document.layers) document.layers[object].visibility = 'hide';
	if (document.getElementById) document.getElementById(object).style.visibility = 'hidden';
	if (document.all) document.all[object].style.visibility = 'hidden';
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function goDisplay(menu, colx) {
//function to put drop down menus in the right place 
 var obj = document.getElementById('col1');
  if (colx=="c1") 
   {obj = document.getElementById('col1')}
  else if (colx=="c2") 
   {obj = document.getElementById('col2')}
  else if (colx=="c3") 
   {obj = document.getElementById('col3')}
  else if (colx=="c4") 
   {obj = document.getElementById('col4')}
  else if (colx=="c5") 
   {obj = document.getElementById('col5')}
  document.getElementById(menu).style.left = findPosX(obj) + 'px'
  show(menu);
  }

//calculate the left position of the object
 function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
	 return curleft;
   }
   
//calculate the top position of the object   
    function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
   	 return curtop;
   }
   
//function to change the header bar randomly
function changeTop(){
do {
imag = Math.round(Math.random() * 10)}
while (imag > 4);
}


//IMAGE CYCLING FOR THE EXHIBIT / EXHIBITION SCROLLER
//-------------------------------------------------------------------------------------------------
//=================================================================================================

function changeim() {
 	                     //change the image down the left and other things
						  haspagechanged = true;
						  currloc = window.location + ""; //location that we're at
						  d_loc = currloc.indexOf("_"); //find the first instance of _ which is the main directory
						  dir = currloc.substring(d_loc - 1, d_loc); //find whether section a, b, c etc
						  dir2 = currloc.substring(d_loc + 1, d_loc + 4); //find whether zex or zes
						  var d_loc2 = currloc.lastIndexOf(".") //find end point of page before .htm
						  dir3 = currloc.substring(0, d_loc2) //now make a new substring with everything up to the .file extension
						  var d_loc4 = dir3.lastIndexOf("_") //find last _ which should give page #
						  dir4 = dir3.substring(d_loc4 + 1)
						    if (dir4.length > 2){dir4 = 'default'} //this is the case if there is no page number within exhibits, i.e. if we are on the first page
							if (dir == "a")
						     {document.getElementById('arrow').src = "../images/a_b.jpg"; document.getElementById('menu1').src = "../images/images/bar_02.jpg"}
						    else if (dir == "b")
						     {document.getElementById('arrow').src = "../images/a_b.jpg"; document.getElementById('menu1').src = "../images/images/bar_02.jpg"}
							else if (dir == "c")
						     {document.getElementById('arrow').src = "../images/a_c.jpg"; document.getElementById('menu2').src = "../images/images/bar_04.jpg"}
							else if (dir == "d")
						     {document.getElementById('arrow').src = "../images/a_d.jpg"; document.getElementById('menu3').src = "../images/images/bar_06.jpg"}
							else if (dir == "e")
						     {document.getElementById('arrow').src = "../images/a_e.jpg"; document.getElementById('menu4').src = "../images/images/bar_08.jpg"}
						    else if (dir == "f")
						     {document.getElementById('arrow').src = "../images/a_f.jpg"; document.getElementById('menu5').src = "../images/images/bar_10.jpg"}
						 
						  if (self.des) {
						  //test for the existance of the custom design page function, if so load the iamges
						        nim1 = new Image; nim1.src = "../c_ph/photos/des_1.jpg"
								nim2 = new Image; nim2.src = "../c_ph/photos/des_2.jpg"
								nim3 = new Image; nim3.src = "../c_ph/photos/des_3.jpg"
								nim4 = new Image; nim4.src = "../c_ph/photos/des_4.jpg"
							     	   }
							
						  //Arrayimg - this is the image to be displayed
						  //Importance[X] = Y. Y is the value we are at, and X is the importance, the higher it is, the earlier it will appear in the list - 100 top
						  //Arraytxt - is the text to be displayed
						  //Arraylnk - the link to the page
						  //all these are defined on every page, so that sitemap can make reference to them all
                                        eximportance[20] = 1; exArraytxt[1] = 'Interactive Walkway'; 	                    exArraydesc[1] = 'Walk your way to reduced carbon emissions';
										eximportance[18] = 2; exArraytxt[2] = 'Monkey Chat'; 								exArraydesc[2] = 'Can you talk like a monkey?';
										eximportance[36] = 3; exArraytxt[3] = 'Face Morph';  								exArraydesc[3] = 'Morph your face into something different!';
										eximportance[27] = 4; exArraytxt[4] = 'Calorie Gallery'; 							exArraydesc[4] = 'Safer Routes to School';
                                        eximportance[12] = 5; exArraytxt[5] = 'Race 2 Recycle';								exArraydesc[5] = 'Time is running out';
										eximportance[31] = 6; exArraytxt[6] = 'Virus & Antibodies'; 						exArraydesc[6] = 'Try and find an antibody for this virus';
     									eximportance[29] = 7; exArraytxt[7] = 'Which Joint?'; 								exArraydesc[7] = 'Feel the effect of arthritis';
	                                    eximportance[8] = 8; exArraytxt[8] = 'One Life Bandit'; 							exArraydesc[8] = 'Play For Your Life';
										eximportance[24] = 9; exArraytxt[9] = 'Multiple Scleorisis'; 						exArraydesc[9] = 'What is going on in this complicated disease?';
										eximportance[22] = 10; exArraytxt[10] = 'Arterio Sclerosis';   						exArraydesc[10] = 'What happens when your arteries harden?';
	                                    eximportance[2] = 11; exArraytxt[11] = 'Blood Pressure'; 							exArraydesc[11] = 'See how hard your heart has to work!';
									    eximportance[48] = 12; exArraytxt[12] = 'Picture Perfect'; 							exArraydesc[12] = 'High Definition Play!';
    						 	        eximportance[34] = 13; exArraytxt[13] = 'Wind Turbine'; 							exArraydesc[13] = 'Make your own vanes and power the wind turbine';
										eximportance[13] = 14; exArraytxt[14] = 'Water Power';   							exArraydesc[14] = 'Watch the power of water generate electricity';
	                                    eximportance[10] = 15; exArraytxt[15] = 'Hand Generator';   	  					exArraydesc[15] = 'Power the LEDs by just your own strength';
									    eximportance[26] = 16; exArraytxt[16] = 'Transformer Station';    		            exArraydesc[16] = 'FifeXs step-up and step-down transformer station';
										eximportance[50] = 17; exArraytxt[17] = 'Seeing Through Things'; 					exArraydesc[17] = 'Different kinds of light can see through different materials';
										eximportance[56] = 18; exArraytxt[18] = 'The Ultimate Multimedia Booth';   		    exArraydesc[18] = 'The ultimate booth yet, with a range of new features';
										eximportance[5] = 19; exArraytxt[19] = 'FifeX Carbon Weigh-In!'; 					exArraydesc[19] = 'How heavy is your carbon emission?';
										eximportance[35] = 20; exArraytxt[20] = 'Memory Bank';          					exArraydesc[20] = 'What is your memory of St Andrews?';
									    eximportance[54] = 21; exArraytxt[21] = 'FifeX Kaleidoscope';          				exArraydesc[21] = 'With removable viewing cassettes';
									    eximportance[52] = 22; exArraytxt[22] = 'FifeX Stereoscope';          				exArraydesc[22] = 'A modern re-make of a traditional late 1800s taxiphote';
									    eximportance[41] = 23; exArraytxt[23] = 'Reflection & Refraction';      			exArraydesc[23] = 'Two core principles of optics in one exciting exhibit';
									    eximportance[15] = 24; exArraytxt[24] = 'FifeX Feely Box';          				exArraydesc[24] = 'Our take on this interactive classic';
									    eximportance[39] = 25; exArraytxt[25] = 'Magnetic Mace Jigsaws';        			exArraydesc[25] = 'A slightly tricky magnetic wall mounted jigsaw';
									    eximportance[33] = 26; exArraytxt[26] = 'Digital Stereoscope';          			exArraydesc[26] = 'A modern take on the traditional stereoscope using computers';
									    eximportance[43] = 27; exArraytxt[27] = 'Enthusing Water';          				exArraydesc[27] = 'A large table-top exhibit about water power';
									    eximportance[63] = 28; exArraytxt[28] = 'The Fluorescing Cell';          			exArraydesc[28] = 'Watch our giant cell fluoresce!';
									    eximportance[37] = 29; exArraytxt[29] = 'The Talking Cell';          				exArraydesc[29] = 'What is going on in that cell?';
									    eximportance[66] = 30; exArraytxt[30] = 'Kilo What?';             				    exArraydesc[30] = 'Our model energy efficient house?';
									    eximportance[68] = 31; exArraytxt[31] = 'Hand Generator';             				exArraydesc[31] = 'Powering up lights!';
										eximportance[59] = 32; exArraytxt[32] = 'Stemcell Challenge';             			exArraydesc[32] = 'How much do you know about Stemcells, blood and new medicines?';
										eximportance[61] = 33; exArraytxt[33] = 'Stemcell Stella';             				exArraydesc[33] = 'Stella needs your help!';
										eximportance[53] = 34; exArraytxt[34] = 'Boroscope Maze';             				exArraydesc[34] = 'Look inside and what can you see?!';
									    eximportance[65] = 35; exArraytxt[35] = 'Pinhole Camera Photodiode Array';          exArraydesc[35] = 'Build your own camera';
									    eximportance[70] = 36; exArraytxt[36] = 'Stemcell Lab';             				exArraydesc[36] = 'Can you make a cure for Stella?!';
									    
										//available numbers for exhibits
										//	1	3	4	6	7	9	11	14	15	16	17	19	21	23  25	28	32  38	40	42	44	45  46	47	49  51	55	57	58  60	62  64  67  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91	92	93	94	95	96	97	98	99	100
										
																				
										exsimportance[10]=1; exsArraytxt[1] = 'Science of Golf Touring Exhibition';              exsArraydesc[1] = 'Can you improve your swing in the science classroom?';
    	                                exsimportance[70]=2; exsArraytxt[2] = 'Life of Diving Mammals Touring Exhibition';       exsArraydesc[2] = 'The Life of Diving Mammals';
    									exsimportance[50]=3; exsArraytxt[3] = 'Meningitis Interactive Exhibition';               exsArraydesc[3] = 'From Hitchiker to Killer Bug';
    									exsimportance[40]=4; exsArraytxt[4] = 'Is Magnetism Attractive? - Touring Workshop';    exsArraydesc[4] = 'An introduction to magnetism!';
										exsimportance[65]=5; exsArraytxt[5] = 'A Healing Passion'; 					             exsArraydesc[5] = 'For the Hunterian Museum in Glasgow';
										exsimportance[60]=6; exsArraytxt[6] = 'Tripping the Light Fantastic Touring Exhibition'; exsArraydesc[6] = 'Light, Colour, Force and Tetris with atoms!';
                                       	exsimportance[80]=7; exsArraytxt[7] = 'Vision for the Future Touring Workshop';          exsArraydesc[7] = 'Millimetre Waves from the Uni of St Andrews';
									    exsimportance[90]=8; exsArraytxt[8] = 'Stem Cells for Blood Transfusion';          exsArraydesc[8] = 'Touring exhibition designed for The Royal Society Summer Exhibition 2010';
									    
										
										//set al which is used to test if the goChange function has moved to the end of the array
   										exal = exArraytxt.length - 1;
										exsal = exsArraytxt.length - 1;
										
                        if (dir2 == "zex"){				  
				          for (i=100;i>0;i--)
						  //this takes the importance rating and converts it to the positioninlist. It starts at a rating of 100 and works down
				    		{if (eximportance[i] != undefined){exWhatpositioninlist[exWhatpositioninlist.length] = eximportance[i]}
			    			}
							if(exWhatpositioninlist.length != exArraytxt.length) {alert ("two exhibit pages with same importance " + i)}
							}
						else if (dir2 == "zes"){	
							for (i=100;i>0;i--)
						  //this takes the importance rating and converts it to the positioninlist. It starts at a rating of 100 and works down
				    		{if (exsimportance[i] != undefined){exsWhatpositioninlist[exsWhatpositioninlist.length] = exsimportance[i]}
							}
							if(exsWhatpositioninlist.length != exsArraytxt.length) {alert ("two exhibition pages with same importance")}
							}
				 //close function
				}
								

	 
  function loadPage(){
  //ok, take the page location and seperate it out cos this will provide you with the last image that was in the middle of the scroll
	var nom
	wloc = window.location.href + ""; //full page address
	qpl = wloc.lastIndexOf("?"); //find the last instance of ?
	if (qpl == -1) {nom = 3}  //if it doesn't exist, use 3
	else 
	nom = wloc.substring(qpl + 1);
	np[3] = Number(nom)
	np[2] = np[3] - 1
	np[1] = np[3] - 2
	np[4] = np[3] + 1
	np[5] = np[3] + 2
	goCheck()
	}
	 
   function goChange(dir){
   //np is to set the NEW values
     if(dir == 'right') {
     np[2] = Number(cpos); //2nd image now becomes what was the middle
	 np[1] = np[2] - 1;	
  	 np[3] = np[2] + 1;
	 np[4] = np[2] + 2;
	 np[5] = np[2] + 3;
    //shut right if
     }
    if(dir == 'left') {
     np[4] = Number(cpos);	//4th image becomes what was the middle
	 np[5] = np[4] + 1;  
	 np[1] = np[4] - 3;
	 np[2] = np[4] - 2;
	 np[3] = np[4] - 1; 
    //shut left if
     }
   goCheck()
	 }
	 
   function goCheck(){ 
   //check and correct so that all values are inside the array
	
	 if (dir2 == "zex"){
//THIS IS IF ITS EX
//SAME AS THE FUNCTION ABOVE
	for (a=1; a<6; a++) //do it as a loop here
	 { 
	  if (np[a]>exal) 
	    {np[a] = (np[a] - exal)} //go to start of array if greater than array length
	  if (np[a]<1) 
	    {np[a] = (exal + np[a])} //go to end of array if less than zero
	 }
	 if (exArraytxt[np[3]] != undefined)
	 //do this if those images are all present and working, otherwise, stick with what's on the page
	  {
	cpos = np[3];  
    document.getElementById('scrolltitle').innerHTML = 'View more in this section (' + exal + ' pages)'
	document.getElementById('pic1').innerHTML = '<a href = "ex_' + exWhatpositioninlist[np[1]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exWhatpositioninlist[np[1]] + '.jpg" alt="' + exArraytxt[exWhatpositioninlist[np[1]]] + ', ' + exArraydesc[exWhatpositioninlist[np[1]]]+ ' - (Exhibit no. ' + np[1] + ')" title="' + exArraytxt[exWhatpositioninlist[np[1]]] + ', ' + exArraydesc[exWhatpositioninlist[np[1]]]+ ' - (Exhibit no. ' + np[1] + ')"></a>';
	document.getElementById('pic2').innerHTML = '<a href = "ex_' + exWhatpositioninlist[np[2]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exWhatpositioninlist[np[2]] + '.jpg" alt="' + exArraytxt[exWhatpositioninlist[np[2]]] + ', ' + exArraydesc[exWhatpositioninlist[np[2]]]+ ' - (Exhibit no. ' + np[2] + ')" title="' + exArraytxt[exWhatpositioninlist[np[2]]] + ', ' + exArraydesc[exWhatpositioninlist[np[2]]]+ ' - (Exhibit no. ' + np[2] + ')"></a>'; 
	document.getElementById('pic3').innerHTML = '<a href = "ex_' + exWhatpositioninlist[np[3]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exWhatpositioninlist[np[3]] + '.jpg" alt="' + exArraytxt[exWhatpositioninlist[np[3]]] + ', ' + exArraydesc[exWhatpositioninlist[np[3]]]+ ' - (Exhibit no. ' + np[3] + ')" title="' + exArraytxt[exWhatpositioninlist[np[3]]] + ', ' + exArraydesc[exWhatpositioninlist[np[3]]]+ ' - (Exhibit no. ' + np[3] + ')"></a>'; 
	document.getElementById('pic4').innerHTML = '<a href = "ex_' + exWhatpositioninlist[np[4]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exWhatpositioninlist[np[4]] + '.jpg" alt="' + exArraytxt[exWhatpositioninlist[np[4]]] + ', ' + exArraydesc[exWhatpositioninlist[np[4]]]+ ' - (Exhibit no. ' + np[4] + ')" title="' + exArraytxt[exWhatpositioninlist[np[4]]] + ', ' + exArraydesc[exWhatpositioninlist[np[4]]]+ ' - (Exhibit no. ' + np[4] + ')"></a>'; 
	document.getElementById('pic5').innerHTML = '<a href = "ex_' + exWhatpositioninlist[np[5]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exWhatpositioninlist[np[5]] + '.jpg" alt="' + exArraytxt[exWhatpositioninlist[np[5]]] + ', ' + exArraydesc[exWhatpositioninlist[np[5]]]+ ' - (Exhibit no. ' + np[5] + ')" title="' + exArraytxt[exWhatpositioninlist[np[5]]] + ', ' + exArraydesc[exWhatpositioninlist[np[5]]]+ ' - (Exhibit no. ' + np[5] + ')"></a>';
          if (haspagechanged == true) {
		  if (dir4 != 'default') 
		        {for (i=0; i<(exal+1) ;i++)
				    {//do a reference back from the array to find out what page we are on
					  if (exWhatpositioninlist[i] == dir4)
						  document.getElementById('infobx').innerHTML = i + '&nbsp;of&nbsp;' + exal
					}
				}
		   else {document.getElementById('infobx').innerHTML = 'Click&nbsp;to&nbsp;scroll'}
	       haspagechanged = false
		   }//do nothing if the page has not changed
		}//shut the check for ex section
		}
		 
		 
	else if (dir2 == "zes"){
//THIS IS IF ITS EXS
//SAME AS THE FUNCTION ABOVE	
	for (a=1; a<6; a++) //do it as a loop here
	 { 
	  if (np[a]>exsal) 
	    {np[a] = (np[a] - exsal)} //go to start of array if greater than array length
	  if (np[a]<1) 
	    {np[a] = (exsal + np[a])} //go to end of array if less than zero
	 }
		if (exsArraytxt[np[3]] != undefined)
	 //do this if those images are all present and working, otherwise, stick with what's on the page
	  {
	cpos = np[3]; 
	document.getElementById('scrolltitle').innerHTML = 'View more in this section (' + exsal + ' pages)' 
    document.getElementById('pic1').innerHTML = '<a href = "exs_' + exsWhatpositioninlist[np[1]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exsWhatpositioninlist[np[1]] + '.jpg" alt="' + exsArraytxt[exsWhatpositioninlist[np[1]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[1]]]+ ' - (Exhibition no. ' + np[1] + ')" title="' + exsArraytxt[exsWhatpositioninlist[np[1]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[1]]]+ ' - (Exhibition no. ' + np[1] + ')"></a>';
	document.getElementById('pic2').innerHTML = '<a href = "exs_' + exsWhatpositioninlist[np[2]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exsWhatpositioninlist[np[2]] + '.jpg" alt="' + exsArraytxt[exsWhatpositioninlist[np[2]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[2]]]+ ' - (Exhibition no. ' + np[2] + ')" title="' + exsArraytxt[exsWhatpositioninlist[np[2]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[2]]]+ ' - (Exhibition no. ' + np[2] + ')"></a>';
	document.getElementById('pic3').innerHTML = '<a href = "exs_' + exsWhatpositioninlist[np[3]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exsWhatpositioninlist[np[3]] + '.jpg" alt="' + exsArraytxt[exsWhatpositioninlist[np[3]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[3]]]+ ' - (Exhibition no. ' + np[3] + ')" title="' + exsArraytxt[exsWhatpositioninlist[np[3]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[3]]]+ ' - (Exhibition no. ' + np[3] + ')"></a>';
	document.getElementById('pic4').innerHTML = '<a href = "exs_' + exsWhatpositioninlist[np[4]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exsWhatpositioninlist[np[4]] + '.jpg" alt="' + exsArraytxt[exsWhatpositioninlist[np[4]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[4]]]+ ' - (Exhibition no. ' + np[4] + ')" title="' + exsArraytxt[exsWhatpositioninlist[np[4]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[4]]]+ ' - (Exhibition no. ' + np[4] + ')"></a>';
	document.getElementById('pic5').innerHTML = '<a href = "exs_' + exsWhatpositioninlist[np[5]] + '.php?' + cpos + '"><img width="80" height="60" class="imagecycle" border="0" src="menuimages/' + exsWhatpositioninlist[np[5]] + '.jpg" alt="' + exsArraytxt[exsWhatpositioninlist[np[5]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[5]]]+ ' - (Exhibition no. ' + np[5] + ')" title="' + exsArraytxt[exsWhatpositioninlist[np[5]]] + ', ' + exsArraydesc[exsWhatpositioninlist[np[5]]]+ ' - (Exhibition no. ' + np[5] + ')"></a>';
         
		  if (haspagechanged == true) {
		  if (dir4 != 'default') 
		        {for (i=0; i<(exsal+1) ;i++)
				    {
					//do a reference back from the array to find out what page we are on
					  if (exsWhatpositioninlist[i] == dir4)
						   document.getElementById('infobx').innerHTML = i + '&nbsp;of&nbsp;' + exsal
					}
				}
		   else {document.getElementById('infobx').innerHTML = 'Click&nbsp;to&nbsp;scroll'}
	       haspagechanged = false
		   } //do nothing if the page has not changed
		 }//shut if exs
		 }
	
  //shut function
  }
  -->