function linkto_catalogue(date,title){
		 var ref = document.getElementById("recordnum").getAttribute("href");
		 var protocol = location.protocol;
		 var loc = location.hostname;
		 var port = location.port;
		 var url = protocol + "//" + loc + ":" + port;
		 //next line removes URL stem and /record= to leave .b number on staging and live
		 ref = ref.replace(/^.*\/record=/,"");
		 //remove scope and other extraneous info from url end
		 ref = ref.replace(/~S\d/,"");
		 //add 'a' to subsitute for check digit
		 ref = ref + "a";
 		 var baseLink = ("https://secure.wellcome.ac.uk/librarydigitalservices/Start.aspx?reference=");
 		 document.write('<a href="' + baseLink + ref + '&date=' + date + '&title=' + title + '" id="photo_form_link" target="_top"><img src="/screens/imaging.jpg" width="88" height="88" border="0" alt="Request new photography of this item" title="Request new photography of this item"></a>');
		 }
