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_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_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 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 IM_quoteGen() {

	var list = new Array();
	var src = new Array();
	
	list[0] = "For variety and beauty of decoration there is no cavern in the kingdom can compare with this subterrannean temple";
	src[0] = "from Guide to Buxton by Ben Rose c.1890";
	
	list[1] = "Poole's Cavern was attracting the day trippers long ago. Mary Queen of Scots is said to have visited in 1580, and in 1680 the poet Charles Cotton listed the cave as one of his seven 'Wonders of the Peak', bringing a new-found fame to the site.";
	src[1] = "";
	
	list[2] = "A kind of 'abandon hope all ye who enter here' sort of feeling assails you as you pass beneath the low arch of rock, but the confident air of the guide reassures you";
	src[2] = "Art Hacker's 'Buxton Thro' Other Glasses' (turn of the century)";
	
	list[3] = "When you are entered about eight yards the hollow suffers you to rise, and view the beauty of the arched roof above, which shines as if 'twas beset with stars.";
	src[3] = "anonymous writer around 1710";
	
	list[4] = "The story of one Pole or Poole, a famous giant or robber, (they might as well have called him a man-eater) who harboured in this vault, and whose kitchen and lodging, or bedchamber, they show you on your right-hand, after you have crept about ten yards upon all-four; I say, this I leave to those who such stories are better suited to, than I expect of my readers.";
	src[4] = "Daniel Defoe's 'Tour of Britain' (1731)";
	
	n = Math.round(Math.random() * list.length) - 1; if(n<0) n=0;
	document.write('&quot;' + list[n] + '&quot;<div class="quotewho">' + src[n] + '</div>');
}
